Commit c45b76b7d76d14fdf10310cd2779ec6ca7b2a711
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 3 changed files
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
c45b76b
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | import java.util.Date; |
4 | 4 | import java.util.List; |
5 | +import java.util.Objects; | |
5 | 6 | |
6 | 7 | import org.springframework.data.mongodb.core.mapping.Document; |
7 | 8 | import org.springframework.data.mongodb.core.mapping.Field; |
... | ... | @@ -933,6 +934,19 @@ |
933 | 934 | |
934 | 935 | public void setStreetRegisterId(String streetRegisterId) { |
935 | 936 | this.streetRegisterId = streetRegisterId; |
937 | + } | |
938 | + | |
939 | + @Override | |
940 | + public boolean equals(Object o) { | |
941 | + if (this == o) return true; | |
942 | + if (o == null || getClass() != o.getClass()) return false; | |
943 | + Patients patients = (Patients) o; | |
944 | + return Objects.equals(id, patients.id); | |
945 | + } | |
946 | + | |
947 | + @Override | |
948 | + public int hashCode() { | |
949 | + return Objects.hash(id); | |
936 | 950 | } |
937 | 951 | } |
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
View file @
c45b76b
... | ... | @@ -155,9 +155,49 @@ |
155 | 155 | patientsQuery.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId()); |
156 | 156 | patientsQuery.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId()); |
157 | 157 | |
158 | - | |
159 | 158 | //查询符合条件的孕妇 |
160 | 159 | List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
160 | + | |
161 | + patientsQuery.setServiceType(null); | |
162 | + patientsQuery.setServiceStatus(null); | |
163 | + patientsQuery.setExpVip(1); | |
164 | + //查询符合条件的体验会员的用户孕妇 | |
165 | + List<Patients> vipPatients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
166 | + if (CollectionUtils.isNotEmpty(patients) && CollectionUtils.isNotEmpty(vipPatients)) | |
167 | + { | |
168 | + for(Patients vip : vipPatients) | |
169 | + { | |
170 | + if (vip == null || vip.getExpType() == null || vip.getLastMenses() == null) | |
171 | + { | |
172 | + continue; | |
173 | + } | |
174 | + if (ExpYunEnums.SGY.getId() == vip.getExpType()) | |
175 | + { | |
176 | + Date expDate = DateUtil.addMonth(vip.getLastMenses(),3); | |
177 | + if (expDate.getTime() > new Date().getTime()) | |
178 | + { | |
179 | + int count = Collections.frequency(patients,vip); | |
180 | + if (count == 0) | |
181 | + { | |
182 | + patients.add(vip); | |
183 | + } | |
184 | + } | |
185 | + } | |
186 | + else if (ExpYunEnums.ETFW.getId() == vip.getExpType()) | |
187 | + { | |
188 | + Date expDate = DateUtil.addWeek(vip.getLastMenses(), 42); | |
189 | + if (expDate.getTime() > new Date().getTime()) | |
190 | + { | |
191 | + int count = Collections.frequency(patients,vip); | |
192 | + if (count == 0) | |
193 | + { | |
194 | + patients.add(vip); | |
195 | + } | |
196 | + } | |
197 | + } | |
198 | + } | |
199 | + } | |
200 | + | |
161 | 201 | if (CollectionUtils.isNotEmpty(patients)) |
162 | 202 | { |
163 | 203 | |
... | ... | @@ -260,12 +300,12 @@ |
260 | 300 | { |
261 | 301 | for(MessageContent message : messageContents) |
262 | 302 | { |
263 | - //判断当前短信是否已经发送 通过短信ID和孕妇ID | |
264 | - boolean isExist = SaveMessageService.isExistSms(pat.getId(), message.getId()); | |
265 | - if (isExist) | |
266 | - { | |
267 | - continue; | |
268 | - } | |
303 | +// //判断当前短信是否已经发送 通过短信ID和孕妇ID | |
304 | +// boolean isExist = SaveMessageService.isExistSms(pat.getId(), message.getId()); | |
305 | +// if (isExist) | |
306 | +// { | |
307 | +// continue; | |
308 | +// } | |
269 | 309 | |
270 | 310 | String messageContent = "【"+messagePrefix+"】" + message.getContent(); |
271 | 311 | MessageRequest request = getMessageRequest( messageContent,pat.getPhone(),ServiceObjEnums.YUNOBJ.getId(), SmsServiceEnums.YBZD.getId(), |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
c45b76b
... | ... | @@ -131,6 +131,8 @@ |
131 | 131 | } |
132 | 132 | |
133 | 133 | Integer type = 1; //1孕妇 2儿童 3产妇 |
134 | + //建档类型 0 未分娩建档 1儿童建档时建档 2 自动分娩类型 3 转诊自动建档 | |
135 | + Integer buildType = 0; | |
134 | 136 | Date date = null; |
135 | 137 | if (yunRequest.getLastMenstrualPeriod() != null) |
136 | 138 | { |
... | ... | @@ -139,6 +141,7 @@ |
139 | 141 | if (date.getTime() <= currentDate.getTime()) |
140 | 142 | { |
141 | 143 | type = 3; |
144 | + buildType = 2; | |
142 | 145 | } |
143 | 146 | } |
144 | 147 | |
... | ... | @@ -186,7 +189,7 @@ |
186 | 189 | patient.setDueStatus(0); |
187 | 190 | //1孕妇 3 产妇 |
188 | 191 | patient.setType(type); |
189 | - patient.setBuildType(0); | |
192 | + patient.setBuildType(buildType); | |
190 | 193 | if (type == 3 && date != null) |
191 | 194 | { |
192 | 195 | patient.setFmDate(date); |