Commit b29cb74fb84c02ffbc0d29b0d5b554c2959e2543
1 parent
753c39c077
Exists in
master
and in
6 other branches
产后复查
Showing 6 changed files with 311 additions and 26 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/PostReviewModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PostReviewController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IPostReviewService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PostReviewServiceImpl.java
platform-dal/src/main/java/com/lyms/platform/pojo/PostReviewModel.java
View file @
b29cb74
... | ... | @@ -209,7 +209,26 @@ |
209 | 209 | private String cityId; |
210 | 210 | private String areaId; |
211 | 211 | private String streetId; |
212 | + private String address; | |
212 | 213 | |
214 | + /** | |
215 | + * 产后休养地 | |
216 | + */ | |
217 | + private String addressPostRest; | |
218 | + private String provincePostRestId; | |
219 | + private String cityPostRestId; | |
220 | + private String areaPostRestId; | |
221 | + private String streetPostRestId; | |
222 | + | |
223 | + /** | |
224 | + * 孕妇户籍地址 | |
225 | + */ | |
226 | + private String addressRegister; | |
227 | + private String provinceRegisterId; | |
228 | + private String cityRegisterId; | |
229 | + private String areaRegisterId; | |
230 | + private String streetRegisterId; | |
231 | + | |
213 | 232 | //出院时间 |
214 | 233 | private Date outDate; |
215 | 234 | //分类 |
... | ... | @@ -219,6 +238,94 @@ |
219 | 238 | private Map<String,Object> referral; |
220 | 239 | //温度 |
221 | 240 | private String temperature; |
241 | + | |
242 | + public String getAddress() { | |
243 | + return address; | |
244 | + } | |
245 | + | |
246 | + public void setAddress(String address) { | |
247 | + this.address = address; | |
248 | + } | |
249 | + | |
250 | + public String getAddressPostRest() { | |
251 | + return addressPostRest; | |
252 | + } | |
253 | + | |
254 | + public void setAddressPostRest(String addressPostRest) { | |
255 | + this.addressPostRest = addressPostRest; | |
256 | + } | |
257 | + | |
258 | + public String getProvincePostRestId() { | |
259 | + return provincePostRestId; | |
260 | + } | |
261 | + | |
262 | + public void setProvincePostRestId(String provincePostRestId) { | |
263 | + this.provincePostRestId = provincePostRestId; | |
264 | + } | |
265 | + | |
266 | + public String getCityPostRestId() { | |
267 | + return cityPostRestId; | |
268 | + } | |
269 | + | |
270 | + public void setCityPostRestId(String cityPostRestId) { | |
271 | + this.cityPostRestId = cityPostRestId; | |
272 | + } | |
273 | + | |
274 | + public String getAreaPostRestId() { | |
275 | + return areaPostRestId; | |
276 | + } | |
277 | + | |
278 | + public void setAreaPostRestId(String areaPostRestId) { | |
279 | + this.areaPostRestId = areaPostRestId; | |
280 | + } | |
281 | + | |
282 | + public String getStreetPostRestId() { | |
283 | + return streetPostRestId; | |
284 | + } | |
285 | + | |
286 | + public void setStreetPostRestId(String streetPostRestId) { | |
287 | + this.streetPostRestId = streetPostRestId; | |
288 | + } | |
289 | + | |
290 | + public String getAddressRegister() { | |
291 | + return addressRegister; | |
292 | + } | |
293 | + | |
294 | + public void setAddressRegister(String addressRegister) { | |
295 | + this.addressRegister = addressRegister; | |
296 | + } | |
297 | + | |
298 | + public String getProvinceRegisterId() { | |
299 | + return provinceRegisterId; | |
300 | + } | |
301 | + | |
302 | + public void setProvinceRegisterId(String provinceRegisterId) { | |
303 | + this.provinceRegisterId = provinceRegisterId; | |
304 | + } | |
305 | + | |
306 | + public String getCityRegisterId() { | |
307 | + return cityRegisterId; | |
308 | + } | |
309 | + | |
310 | + public void setCityRegisterId(String cityRegisterId) { | |
311 | + this.cityRegisterId = cityRegisterId; | |
312 | + } | |
313 | + | |
314 | + public String getAreaRegisterId() { | |
315 | + return areaRegisterId; | |
316 | + } | |
317 | + | |
318 | + public void setAreaRegisterId(String areaRegisterId) { | |
319 | + this.areaRegisterId = areaRegisterId; | |
320 | + } | |
321 | + | |
322 | + public String getStreetRegisterId() { | |
323 | + return streetRegisterId; | |
324 | + } | |
325 | + | |
326 | + public void setStreetRegisterId(String streetRegisterId) { | |
327 | + this.streetRegisterId = streetRegisterId; | |
328 | + } | |
222 | 329 | |
223 | 330 | public String getTemperature() { |
224 | 331 | return temperature; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PostReviewController.java
View file @
b29cb74
... | ... | @@ -148,8 +148,42 @@ |
148 | 148 | @ResponseBody |
149 | 149 | public BaseObjectResponse postpartumReview(Date startDate, Date endDate, String doctorId, |
150 | 150 | Integer startDay, Integer endDay, String zyList, String jcxList, String gcDoctorId, |
151 | - String key, Integer page, Integer limit, HttpServletRequest request) { | |
152 | - return postReviewService.postpartumReview(getUserId(request), startDate, endDate, doctorId, key, page, limit, startDay, endDay, zyList, jcxList,gcDoctorId); | |
151 | + String key, Integer page, Integer limit, HttpServletRequest request, | |
152 | + String hospitalId, | |
153 | + String area, | |
154 | + //产后修改修养地 | |
155 | + String provincePostRestId, | |
156 | + String cityPostRestId, | |
157 | + String areaPostRestId, | |
158 | + String streetPostRestId, | |
159 | + //户籍地址 | |
160 | + String provinceRegisterId, | |
161 | + String cityRegisterId, | |
162 | + String areaRegisterId, | |
163 | + String streetRegisterId, | |
164 | + //家庭地址 | |
165 | + String provinceId, | |
166 | + String cityId, | |
167 | + String areaId, | |
168 | + String streetId | |
169 | + ) { | |
170 | + return postReviewService.postpartumReview(getUserId(request), startDate, endDate, doctorId, key, page, limit, startDay, | |
171 | + endDay, zyList, jcxList,gcDoctorId, | |
172 | + hospitalId, | |
173 | + area, | |
174 | + provincePostRestId, | |
175 | + cityPostRestId, | |
176 | + areaPostRestId, | |
177 | + streetPostRestId, | |
178 | + provinceRegisterId, | |
179 | + cityRegisterId, | |
180 | + areaRegisterId, | |
181 | + streetRegisterId, | |
182 | + provinceId, | |
183 | + cityId, | |
184 | + areaId, | |
185 | + streetId | |
186 | + ); | |
153 | 187 | } |
154 | 188 | |
155 | 189 | /** |
... | ... | @@ -165,7 +199,8 @@ |
165 | 199 | public void postpartumReviewExport(Date startDate, Date endDate, String doctorId, |
166 | 200 | Integer startDay, Integer endDay, |
167 | 201 | String key, HttpServletRequest request, HttpServletResponse response) { |
168 | - postReviewService.postpartumReviewExport(getUserId(request), startDate, endDate, doctorId, key, response,startDay, endDay); | |
202 | + postReviewService.postpartumReviewExport(getUserId(request), startDate, endDate, doctorId, key, | |
203 | + response,startDay, endDay); | |
169 | 204 | } |
170 | 205 | |
171 | 206 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
b29cb74
... | ... | @@ -6598,6 +6598,20 @@ |
6598 | 6598 | postReviewModel.setCityId(patients.getCityRegisterId()); |
6599 | 6599 | postReviewModel.setAreaId(patients.getAreaRegisterId()); |
6600 | 6600 | postReviewModel.setStreetId(patients.getStreetRegisterId()); |
6601 | + postReviewModel.setAddress(patients.getAddressRegister()); | |
6602 | + | |
6603 | + postReviewModel.setProvincePostRestId(patients.getProvincePostRestId()); | |
6604 | + postReviewModel.setCityPostRestId(patients.getCityPostRestId()); | |
6605 | + postReviewModel.setAreaPostRestId(patients.getAreaPostRestId()); | |
6606 | + postReviewModel.setStreetPostRestId(patients.getStreetPostRestId()); | |
6607 | + postReviewModel.setAddressPostRest(patients.getAddressPostRest()); | |
6608 | + | |
6609 | + | |
6610 | + postReviewModel.setProvinceRegisterId(patients.getProvinceId()); | |
6611 | + postReviewModel.setCityRegisterId(patients.getCityId()); | |
6612 | + postReviewModel.setAreaRegisterId(patients.getAreaId()); | |
6613 | + postReviewModel.setStreetRegisterId(patients.getStreetId()); | |
6614 | + postReviewModel.setAddressRegister(patients.getAddress()); | |
6601 | 6615 | System.out.println("产后访视同步居住地址:"+postReviewModel.getId()); |
6602 | 6616 | Update update = MongoConvertHelper |
6603 | 6617 | .convertToNativeUpdate(ReflectionUtils.getUpdateField(postReviewModel)); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
View file @
b29cb74
... | ... | @@ -3909,24 +3909,27 @@ |
3909 | 3909 | hospitalDate.put("data18",data17_data2+"%"); |
3910 | 3910 | |
3911 | 3911 | |
3912 | - //产后访视人数 | |
3913 | - int data19= (int)mongoTemplate.count(new Query(Criteria. | |
3914 | - where("streetId").in(streetIds).and("checkTime").lte(endDate).gte(startDateFirst).and("yn").is(1)),PostReviewModel.class); | |
3915 | - System.out.println("===12"+new Query(Criteria. | |
3916 | - where("streetId").in(streetIds).and("checkTime").lte(endDate).gt(startDateFirst).and("yn").is(1)).toString()); | |
3917 | - int lastDate19= null==hospitalDate.get("data19")?0:Integer.parseInt(hospitalDate.get("data19").toString()); | |
3918 | - hospitalDate.put("data19",data19+lastDate19); | |
3919 | - //产后访视率% | |
3920 | - String data19_data2="0.00"; | |
3921 | - if(Integer.parseInt(hospitalDate.get("data2").toString())!=0){ | |
3922 | - float v = (float) Integer.parseInt(hospitalDate.get("data19").toString()) / Integer.parseInt(hospitalDate.get("data2").toString()); | |
3923 | - if(v>=1){ | |
3924 | - data19_data2="100.00"; | |
3925 | - }else { | |
3926 | - data19_data2 = df.format(v * 100); | |
3927 | - } | |
3928 | - } | |
3929 | - hospitalDate.put("data20",data19_data2+"%"); | |
3912 | +// //产后访视人数 | |
3913 | +// int data19= (int)mongoTemplate.count(new Query(Criteria. | |
3914 | +// where("streetId").in(streetIds).and("checkTime").lte(endDate).gte(startDateFirst).and("yn").is(1)),PostReviewModel.class); | |
3915 | +// System.out.println("===12"+new Query(Criteria. | |
3916 | +// where("streetId").in(streetIds).and("checkTime").lte(endDate).gt(startDateFirst).and("yn").is(1)).toString()); | |
3917 | +// int lastDate19= null==hospitalDate.get("data19")?0:Integer.parseInt(hospitalDate.get("data19").toString()); | |
3918 | +// hospitalDate.put("data19",data19+lastDate19); | |
3919 | +// //产后访视率% | |
3920 | +// String data19_data2="0.00"; | |
3921 | +// if(Integer.parseInt(hospitalDate.get("data2").toString())!=0){ | |
3922 | +// float v = (float) Integer.parseInt(hospitalDate.get("data19").toString()) / Integer.parseInt(hospitalDate.get("data2").toString()); | |
3923 | +// if(v>=1){ | |
3924 | +// data19_data2="100.00"; | |
3925 | +// }else { | |
3926 | +// data19_data2 = df.format(v * 100); | |
3927 | +// } | |
3928 | +// } | |
3929 | +// hospitalDate.put("data20",data19_data2+"%"); | |
3930 | + | |
3931 | + hospitalDate.put("data19",0); | |
3932 | + hospitalDate.put("data20","0%"); | |
3930 | 3933 | |
3931 | 3934 | PatientsQuery patientsQuery1 = new PatientsQuery(); |
3932 | 3935 | patientsQuery1.setStreetRegisterIds(streetIds); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IPostReviewService.java
View file @
b29cb74
... | ... | @@ -10,7 +10,26 @@ |
10 | 10 | */ |
11 | 11 | public interface IPostReviewService extends IBaseService { |
12 | 12 | // BaseObjectResponse postpartumReview(Integer userId, Date startDate, Date endDate, String doctorId, String key, Integer page, Integer limit,Integer startDay, Integer endDay); |
13 | - BaseObjectResponse postpartumReview(Integer userId, Date startDate, Date endDate, String doctorId, String key, Integer page, Integer limit, Integer startDay, Integer endDay, String zyList, String jcxList,String gcDoctorId); | |
13 | + BaseObjectResponse postpartumReview(Integer userId, Date startDate, Date endDate, String doctorId, String key, | |
14 | + Integer page, Integer limit, Integer startDay, Integer endDay, String zyList, | |
15 | + String jcxList,String gcDoctorId, | |
16 | + String hospitalId, | |
17 | + String area, | |
18 | + //产后修改修养地 | |
19 | + String provincePostRestId, | |
20 | + String cityPostRestId, | |
21 | + String areaPostRestId, | |
22 | + String streetPostRestId, | |
23 | + //户籍地址 | |
24 | + String provinceRegisterId, | |
25 | + String cityRegisterId, | |
26 | + String areaRegisterId, | |
27 | + String streetRegisterId, | |
28 | + //家庭地址 | |
29 | + String provinceId, | |
30 | + String cityId, | |
31 | + String areaId, | |
32 | + String streetId); | |
14 | 33 | |
15 | 34 | void postpartumReviewExport(Integer userId, Date startDate, Date endDate, String doctorId, String key, HttpServletResponse response,Integer startDay, Integer endDay); |
16 | 35 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PostReviewServiceImpl.java
View file @
b29cb74
... | ... | @@ -13,7 +13,11 @@ |
13 | 13 | import com.lyms.platform.operate.web.utils.MongoUtil; |
14 | 14 | import com.lyms.platform.operate.web.utils.ResponseUtil; |
15 | 15 | import com.lyms.platform.permission.dao.master.MasterUsersMapper; |
16 | +import com.lyms.platform.permission.model.Organization; | |
17 | +import com.lyms.platform.permission.model.OrganizationQuery; | |
16 | 18 | import com.lyms.platform.permission.model.Users; |
19 | +import com.lyms.platform.permission.service.OrganizationService; | |
20 | +import com.lyms.platform.permission.service.UsersService; | |
17 | 21 | import com.lyms.platform.pojo.Patients; |
18 | 22 | import com.lyms.platform.pojo.PostReviewModel; |
19 | 23 | import org.apache.commons.collections.CollectionUtils; |
20 | 24 | |
... | ... | @@ -38,8 +42,11 @@ |
38 | 42 | |
39 | 43 | @Autowired |
40 | 44 | private AutoMatchFacade autoMatchFacade; |
41 | - | |
42 | 45 | @Autowired |
46 | + private OrganizationService organizationService; | |
47 | + @Autowired | |
48 | + private UsersService usersService; | |
49 | + @Autowired | |
43 | 50 | private MasterUsersMapper usersMapper; |
44 | 51 | |
45 | 52 | @Autowired |
46 | 53 | |
47 | 54 | |
48 | 55 | |
... | ... | @@ -52,12 +59,111 @@ |
52 | 59 | |
53 | 60 | @Override |
54 | 61 | public BaseObjectResponse postpartumReview(Integer userId, Date startDate, Date endDate, String doctorId, String key, Integer page, |
55 | - Integer limit,Integer startDay, Integer endDay,String zyList,String jcxList,String gcDoctorId) { | |
62 | + Integer limit,Integer startDay, Integer endDay,String zyList,String jcxList,String gcDoctorId, | |
63 | + String hid, | |
64 | + String area, | |
65 | + //产后修改修养地 | |
66 | + String provincePostRestId, | |
67 | + String cityPostRestId, | |
68 | + String areaPostRestId, | |
69 | + String streetPostRestId, | |
70 | + //户籍地址 | |
71 | + String provinceRegisterId, | |
72 | + String cityRegisterId, | |
73 | + String areaRegisterId, | |
74 | + String streetRegisterId, | |
75 | + //家庭地址 | |
76 | + String provinceId, | |
77 | + String cityId, | |
78 | + String areaId, | |
79 | + String streetId | |
80 | + ) { | |
56 | 81 | |
57 | 82 | |
83 | + | |
84 | + | |
58 | 85 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
59 | - Query query = Query.query(Criteria.where("hospitalId").is(hospitalId).and("yn").ne(0)); | |
86 | + List<String> hids = new LinkedList<>(); | |
87 | + hids.add(hospitalId); | |
88 | + if (StringUtils.isNotEmpty(area)) | |
89 | + { | |
60 | 90 | |
91 | + if (StringUtils.isNotEmpty(hid)) | |
92 | + { | |
93 | + hids.remove(hospitalId); | |
94 | + hids.add(hid); | |
95 | + } | |
96 | + else | |
97 | + { | |
98 | + Organization users = organizationService.getOrganization(Integer.parseInt(hospitalId)); | |
99 | + OrganizationQuery query = new OrganizationQuery(); | |
100 | + query.setYn(YnEnums.YES.getId()); | |
101 | + query.setAreaId(users.getAreaId()); | |
102 | + query.setCityId(users.getCityId()); | |
103 | + query.setProvinceId(users.getProvinceId()); | |
104 | + List<Organization> organizations = organizationService.queryHospitalIds(query); | |
105 | + | |
106 | + for(Organization org : organizations) | |
107 | + { | |
108 | + hids.add(org.getId()+""); | |
109 | + } | |
110 | + } | |
111 | + } | |
112 | + | |
113 | + Query query = Query.query(Criteria.where("hospitalId").in(hids).and("yn").ne(0)); | |
114 | + | |
115 | + //户籍地址 | |
116 | + if (StringUtils.isNotEmpty(provinceRegisterId)) | |
117 | + { | |
118 | + query.addCriteria(Criteria.where("provinceRegisterId").is(provinceRegisterId)); | |
119 | + if (StringUtils.isNotEmpty(cityRegisterId)) | |
120 | + { | |
121 | + query.addCriteria(Criteria.where("cityRegisterId").is(cityRegisterId)); | |
122 | + if (StringUtils.isNotEmpty(areaRegisterId)) | |
123 | + { | |
124 | + query.addCriteria(Criteria.where("areaRegisterId").is(areaRegisterId)); | |
125 | + if (StringUtils.isNotEmpty(streetRegisterId)) | |
126 | + { | |
127 | + query.addCriteria(Criteria.where("streetRegisterId").is(streetRegisterId)); | |
128 | + } | |
129 | + } | |
130 | + } | |
131 | + } | |
132 | + //家庭地址 | |
133 | + if (StringUtils.isNotEmpty(provinceId)) | |
134 | + { | |
135 | + query.addCriteria(Criteria.where("provinceId").is(provinceId)); | |
136 | + if (StringUtils.isNotEmpty(provinceId)) | |
137 | + { | |
138 | + query.addCriteria(Criteria.where("cityId").is(cityId)); | |
139 | + if (StringUtils.isNotEmpty(cityId)) | |
140 | + { | |
141 | + query.addCriteria(Criteria.where("areaId").is(areaId)); | |
142 | + if (StringUtils.isNotEmpty(areaId)) | |
143 | + { | |
144 | + query.addCriteria(Criteria.where("streetId").is(streetId)); | |
145 | + } | |
146 | + } | |
147 | + } | |
148 | + } | |
149 | + | |
150 | + //产后修改修养地 | |
151 | + if (StringUtils.isNotEmpty(provincePostRestId)) | |
152 | + { | |
153 | + query.addCriteria(Criteria.where("provincePostRestId").is(provincePostRestId)); | |
154 | + if (StringUtils.isNotEmpty(cityPostRestId)) | |
155 | + { | |
156 | + query.addCriteria(Criteria.where("cityPostRestId").is(cityPostRestId)); | |
157 | + if (StringUtils.isNotEmpty(areaPostRestId)) | |
158 | + { | |
159 | + query.addCriteria(Criteria.where("areaPostRestId").is(areaPostRestId)); | |
160 | + if (StringUtils.isNotEmpty(streetPostRestId)) | |
161 | + { | |
162 | + query.addCriteria(Criteria.where("streetPostRestId").is(streetPostRestId)); | |
163 | + } | |
164 | + } | |
165 | + } | |
166 | + } | |
61 | 167 | if(StringUtils.isNotEmpty(zyList)){ |
62 | 168 | List <String> zyLists = StringUtils.covertToList(zyList, String.class); |
63 | 169 | for (int i = 0; i <zyLists.size() ; i++) { |
... | ... | @@ -228,7 +334,8 @@ |
228 | 334 | |
229 | 335 | @Override |
230 | 336 | public void postpartumReviewExport(Integer userId, Date startDate, Date endDate, String doctorId, String key, HttpServletResponse response,Integer startDay, Integer endDay) { |
231 | - BaseObjectResponse rest = postpartumReview(userId, startDate, endDate, doctorId, key, 1, Integer.MAX_VALUE,startDay,endDay,null,null,null); | |
337 | + BaseObjectResponse rest = postpartumReview(userId, startDate, endDate, doctorId, key, 1, Integer.MAX_VALUE,startDay,endDay,null,null,null,null,null,null,null,null,null,null,null,null, | |
338 | + null,null,null,null,null); | |
232 | 339 | PageResult pageResult = (PageResult) rest.getData(); |
233 | 340 | List<Map<String, Object>> datas = (List<Map<String, Object>>) pageResult.getGrid(); |
234 | 341 | Map<String, String> cnames = new LinkedHashMap<>(); |