Commit f356912585d2e407028c5b8e3659b6d145fd1279
1 parent
c20e02707b
Exists in
master
and in
6 other branches
体重报告三周限制
Showing 7 changed files with 61 additions and 47 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TrackDownController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/ITrackDownService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TemporaryWeightServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TrackDownServiceImpl.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TrackDownController.java
View file @
f356912
... | ... | @@ -87,20 +87,19 @@ |
87 | 87 | @RequestMapping(value = "/all", method = RequestMethod.GET) |
88 | 88 | public BaseResponse all(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, Date fmEnd, String key, Integer type, |
89 | 89 | @RequestParam Integer page, @RequestParam Integer limit, HttpServletRequest request, |
90 | - Integer check, String checkup, String pregnantBuild, Integer followupStatus, Boolean isDeliver) { | |
90 | + Integer check, String checkup, String pregnantBuild, Integer followupStatus, Boolean isDeliver, Integer encryption) { | |
91 | 91 | return trackDownService.all(buildStart, buildEnd, checkStart, checkEnd, fmStart, fmEnd, key, |
92 | - page, limit, getUserId(request), type, check, checkup, pregnantBuild, followupStatus, isDeliver); | |
92 | + page, limit, getUserId(request), type, check, checkup, pregnantBuild, followupStatus, isDeliver, encryption); | |
93 | 93 | } |
94 | 94 | |
95 | - | |
96 | 95 | @ResponseBody |
97 | 96 | @TokenRequired |
98 | 97 | @RequestMapping(value = "/allExport", method = RequestMethod.GET) |
99 | 98 | public void allExport(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, Date fmEnd, String key, Integer type, |
100 | - @RequestParam Integer page, @RequestParam Integer limit, HttpServletRequest request, | |
101 | - Integer check, String checkup, String pregnantBuild, Integer followupStatus, Boolean isDeliver, HttpServletResponse response) { | |
102 | - trackDownService.Export(buildStart, buildEnd, checkStart, checkEnd, fmStart, fmEnd, key, | |
103 | - page, limit, getUserId(request), type, check, checkup, pregnantBuild, followupStatus, isDeliver, response); | |
99 | + HttpServletRequest request, | |
100 | + Integer check, String checkup, String pregnantBuild, Integer followupStatus, Boolean isDeliver, HttpServletResponse response, Integer encryption) { | |
101 | + trackDownService.Export(buildStart, buildEnd, checkStart, checkEnd, fmStart, fmEnd, key | |
102 | + , getUserId(request), type, check, checkup, pregnantBuild, followupStatus, isDeliver, response, encryption); | |
104 | 103 | } |
105 | 104 | |
106 | 105 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
f356912
... | ... | @@ -1084,8 +1084,8 @@ |
1084 | 1084 | AntExChuQuery antExChuQuery = new AntExChuQuery();//获取初诊记录 |
1085 | 1085 | antExChuQuery.setParentId(patients.getId()); |
1086 | 1086 | List<AntExChuModel> antExChulist = antExService.queryAntExChu(antExChuQuery); |
1087 | - AntExChuModel data2=null; | |
1088 | - if(antExChulist.size()!=0){ | |
1087 | + AntExChuModel data2 = null; | |
1088 | + if (antExChulist.size() != 0) { | |
1089 | 1089 | data2 = antExService.findOne(antExChulist.get(0).getId()); |
1090 | 1090 | } |
1091 | 1091 | //孕次:怀孕次数== 查看母子实现 |
1092 | 1092 | |
1093 | 1093 | |
1094 | 1094 | |
... | ... | @@ -1104,19 +1104,19 @@ |
1104 | 1104 | String basicConfig = getBasicConfig(patients.getPliveTypeId()); |
1105 | 1105 | //keyPregnantWomenExcelModel.setAddress(basicConfig); |
1106 | 1106 | // keyPregnantWomenExcelModel.setAddress( map.get("residence").toString()); |
1107 | - if(basicConfig.contains("常住")){ | |
1107 | + if (basicConfig.contains("常住")) { | |
1108 | 1108 | keyPregnantWomenExcelModel.setAddressbs("√"); |
1109 | 1109 | keyPregnantWomenExcelModel.setAddressld(""); |
1110 | 1110 | keyPregnantWomenExcelModel.setAddresswd(""); |
1111 | - }else if(basicConfig.contains("暂住")){ | |
1111 | + } else if (basicConfig.contains("暂住")) { | |
1112 | 1112 | keyPregnantWomenExcelModel.setAddressbs(""); |
1113 | 1113 | keyPregnantWomenExcelModel.setAddressld(""); |
1114 | 1114 | keyPregnantWomenExcelModel.setAddresswd("√"); |
1115 | - }else if(basicConfig.contains("流动")){ | |
1115 | + } else if (basicConfig.contains("流动")) { | |
1116 | 1116 | keyPregnantWomenExcelModel.setAddressbs(""); |
1117 | 1117 | keyPregnantWomenExcelModel.setAddressld("√"); |
1118 | 1118 | keyPregnantWomenExcelModel.setAddresswd(""); |
1119 | - }else{ | |
1119 | + } else { | |
1120 | 1120 | keyPregnantWomenExcelModel.setAddressbs(""); |
1121 | 1121 | keyPregnantWomenExcelModel.setAddressld(""); |
1122 | 1122 | keyPregnantWomenExcelModel.setAddresswd(""); |
... | ... | @@ -1132,8 +1132,8 @@ |
1132 | 1132 | //高危等级:展示红/橙/黄/紫 (不显示绿色)==rLevel |
1133 | 1133 | getRiskLevelId(patients, keyPregnantWomenExcelModel); |
1134 | 1134 | String str = keyPregnantWomenExcelModel.getrLevel(); |
1135 | - if(str.contains("(") && str.contains(")") ){ | |
1136 | - String jieguo = str.substring(str.indexOf("("),str.indexOf(")")+1); | |
1135 | + if (str.contains("(") && str.contains(")")) { | |
1136 | + String jieguo = str.substring(str.indexOf("("), str.indexOf(")") + 1); | |
1137 | 1137 | keyPregnantWomenExcelModel.setrLevel(str.replace(jieguo, "")); |
1138 | 1138 | } |
1139 | 1139 | keyPregnantWomenExcelModel.setAcknowledgingTiem(DateUtil.getyyyy_MM_dd(new Date())); |
... | ... | @@ -1146,7 +1146,7 @@ |
1146 | 1146 | response.setContentType("application/force-download"); |
1147 | 1147 | response.setHeader("Content-Disposition", "attachment;filename=" + new String(("重点孕妇登记表.xls").getBytes("UTF-8"), "ISO-8859-1")); |
1148 | 1148 | String path = this.getClass().getResource("/").getPath() + "zddc.xls"; |
1149 | - Map<String , Object> model=new HashMap<String , Object>(); | |
1149 | + Map<String, Object> model = new HashMap<String, Object>(); | |
1150 | 1150 | model.put("employees", keyPregnantWomenExcelModelList); |
1151 | 1151 | model.put("nowdate", new Date()); |
1152 | 1152 | JxlsUtils.exportExcel(path, response.getOutputStream(), model); |
... | ... | @@ -1526,7 +1526,7 @@ |
1526 | 1526 | //发放机构:当前机构名称== 当前机构名称 |
1527 | 1527 | String hospitalName = couponMapper.getHospitalName(patients.getHospitalId()); |
1528 | 1528 | healthHandbookExcelModel.setOrganization(hospitalName == null ? "诸城市人民医院" : hospitalName); |
1529 | - if(patients!=null && patients.getId()!=null){ | |
1529 | + if (patients != null && patients.getId() != null) { | |
1530 | 1530 | //镇街、村居或单位:现住地址 |
1531 | 1531 | Map<String, Object> map = viewFacade.getPatientViewData(patients, patients.getId()); |
1532 | 1532 | healthHandbookExcelModel.setAddress(map.get("register").toString()); |
1533 | 1533 | |
1534 | 1534 | |
... | ... | @@ -1535,13 +1535,13 @@ |
1535 | 1535 | AntExChuQuery antExChuQuery = new AntExChuQuery();//获取初诊记录 |
1536 | 1536 | antExChuQuery.setParentId(patients.getId()); |
1537 | 1537 | List<AntExChuModel> antExChulist = antExService.queryAntExChu(antExChuQuery); |
1538 | - if(CollectionUtils.isNotEmpty(antExChulist)){ | |
1538 | + if (CollectionUtils.isNotEmpty(antExChulist)) { | |
1539 | 1539 | AntExChuModel data = antExChulist.get(0); |
1540 | 1540 | healthHandbookExcelModel.setChildTime(data == null ? "" : (data.getProdTime() == null ? "" : data.getProdTime().toString())); |
1541 | - }else { | |
1541 | + } else { | |
1542 | 1542 | healthHandbookExcelModel.setChildTime(""); |
1543 | 1543 | } |
1544 | - }else{ | |
1544 | + } else { | |
1545 | 1545 | healthHandbookExcelModel.setAddress(""); |
1546 | 1546 | healthHandbookExcelModel.setChildTime(""); |
1547 | 1547 | |
... | ... | @@ -1734,6 +1734,16 @@ |
1734 | 1734 | patientBaseResult.setFlag(false); |
1735 | 1735 | } else { |
1736 | 1736 | patientBaseResult.setFlag(true); |
1737 | + } | |
1738 | + if (null != pw.getPrintingTime()) { | |
1739 | + int hasPrint = DateUtil.getDays(pw.getPrintingTime(), new Date()); | |
1740 | + if (hasPrint > 21) { | |
1741 | + patientBaseResult.setHasPrintInWeek(false); | |
1742 | + } else { | |
1743 | + patientBaseResult.setHasPrintInWeek(true); | |
1744 | + } | |
1745 | + } else { | |
1746 | + patientBaseResult.setHasPrintInWeek(false); | |
1737 | 1747 | } |
1738 | 1748 | return new BaseObjectResponse().setData(patientBaseResult).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); |
1739 | 1749 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
View file @
f356912
... | ... | @@ -63,6 +63,17 @@ |
63 | 63 | |
64 | 64 | private String doctorId; |
65 | 65 | |
66 | + //限制三周打印 | |
67 | + private boolean hasPrintInWeek; | |
68 | + | |
69 | + public boolean isHasPrintInWeek() { | |
70 | + return hasPrintInWeek; | |
71 | + } | |
72 | + | |
73 | + public void setHasPrintInWeek(boolean hasPrintInWeek) { | |
74 | + this.hasPrintInWeek = hasPrintInWeek; | |
75 | + } | |
76 | + | |
66 | 77 | public String getDoctorId() { |
67 | 78 | return doctorId; |
68 | 79 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/ITrackDownService.java
View file @
f356912
... | ... | @@ -18,11 +18,11 @@ |
18 | 18 | |
19 | 19 | BaseObjectResponse all(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, |
20 | 20 | Date fmEnd, String key, Integer page, Integer limit, Integer userId, Integer type, |
21 | - Integer check, String checkup, String pregnantBuild, Integer followupStatus, Boolean isDeliver); | |
21 | + Integer check, String checkup, String pregnantBuild, Integer followupStatus, Boolean isDeliver, Integer encryption); | |
22 | 22 | |
23 | 23 | void Export(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, Date fmEnd, String key, |
24 | - Integer page, Integer limit, Integer userId, Integer type, Integer check, String checkup, String pregnantBuild, | |
25 | - Integer followupStatus, Boolean isDeliver, HttpServletResponse response); | |
24 | + Integer userId, Integer type, Integer check, String checkup, String pregnantBuild, | |
25 | + Integer followupStatus, Boolean isDeliver, HttpServletResponse response, Integer encryption); | |
26 | 26 | |
27 | 27 | BaseObjectResponse info(String patientId, Integer trackType, Integer buildType); |
28 | 28 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
f356912
... | ... | @@ -364,7 +364,7 @@ |
364 | 364 | } |
365 | 365 | if (null != patientWeight.getPrintingTime()) { |
366 | 366 | int hasPrint = DateUtil.getDays(patientWeight.getPrintingTime(), new Date()); |
367 | - if (hasPrint > 7) { | |
367 | + if (hasPrint > 21) { | |
368 | 368 | map.put("hasPrintInWeek", false); |
369 | 369 | } else { |
370 | 370 | map.put("hasPrintInWeek", true); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TemporaryWeightServiceImpl.java
View file @
f356912
... | ... | @@ -372,7 +372,7 @@ |
372 | 372 | //限制一周能打印 |
373 | 373 | if (null != template.getPrintingTime()) { |
374 | 374 | int hasPrint = DateUtil.getDays(template.getPrintingTime(), new Date()); |
375 | - if (hasPrint > 7) { | |
375 | + if (hasPrint > 21) { | |
376 | 376 | map.put("hasPrintInWeek", false); |
377 | 377 | } else { |
378 | 378 | map.put("hasPrintInWeek", true); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TrackDownServiceImpl.java
View file @
f356912
... | ... | @@ -73,7 +73,7 @@ |
73 | 73 | @Override |
74 | 74 | public BaseObjectResponse all(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, Date fmEnd, String key, |
75 | 75 | Integer page, Integer limit, Integer userId, Integer type, Integer check, String checkup, String pregnantBuild, |
76 | - Integer followupStatus, Boolean isDeliver) { | |
76 | + Integer followupStatus, Boolean isDeliver, Integer encryption) { | |
77 | 77 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
78 | 78 | List<Map<String, Object>> restList = new ArrayList<>(); |
79 | 79 | Integer archiveModelCount = 0; |
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | //优化前 |
101 | 101 | // stopWatch.start("妇女建档优化前"); |
102 | 102 | if (null != check) { |
103 | - List<Map<String, Object>> checkList = getResidentMainData(modelList); | |
103 | + List<Map<String, Object>> checkList = getResidentMainData(modelList, encryption); | |
104 | 104 | //婚检过 |
105 | 105 | if (check == 1) { |
106 | 106 | for (Map<String, Object> checkMap : checkList) { |
... | ... | @@ -117,7 +117,7 @@ |
117 | 117 | } |
118 | 118 | } |
119 | 119 | } else { |
120 | - restList = getResidentMainData(modelList); | |
120 | + restList = getResidentMainData(modelList, encryption); | |
121 | 121 | } |
122 | 122 | |
123 | 123 | |
... | ... | @@ -156,7 +156,7 @@ |
156 | 156 | // System.out.println(stopWatch.toString()); |
157 | 157 | //优化后 |
158 | 158 | stopWatch.start("孕妇建档优化后"); |
159 | - restList = dispPatient(patientsList, hospitalId); | |
159 | + restList = dispPatient(patientsList, hospitalId, encryption); | |
160 | 160 | stopWatch.stop(); |
161 | 161 | System.out.println(stopWatch.toString()); |
162 | 162 | |
163 | 163 | |
... | ... | @@ -168,17 +168,14 @@ |
168 | 168 | |
169 | 169 | @Override |
170 | 170 | public void Export(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, Date fmEnd, String key, |
171 | - Integer page, Integer limit, Integer userId, Integer type, Integer check, String checkup, String pregnantBuild, | |
172 | - Integer followupStatus, Boolean isDeliver, HttpServletResponse response) { | |
171 | + Integer userId, Integer type, Integer check, String checkup, String pregnantBuild, | |
172 | + Integer followupStatus, Boolean isDeliver, HttpServletResponse response, Integer encryption) { | |
173 | 173 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
174 | 174 | List<Map<String, Object>> restList = new ArrayList<>(); |
175 | 175 | Integer archiveModelCount = 0; |
176 | 176 | if (type == 1) {//查询妇女建档为主数据 |
177 | 177 | //查询条件 |
178 | 178 | ResidentsArchiveQuery query = new ResidentsArchiveQuery(); |
179 | - query.setLimit(limit); | |
180 | - query.setPage(page); | |
181 | - query.setNeed("1"); | |
182 | 179 | query.setYn(YnEnums.YES.getId()); |
183 | 180 | query.setQueryNo(key); |
184 | 181 | query.setHospitalId(hospitalId); |
... | ... | @@ -191,7 +188,7 @@ |
191 | 188 | query.setFollowupStatus(followupStatus); |
192 | 189 | //妇女建档主数据 |
193 | 190 | List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(query); |
194 | - restList = getResidentMainData(modelList); | |
191 | + restList = getResidentMainData(modelList, encryption); | |
195 | 192 | this.surveyExport(restList, response); |
196 | 193 | |
197 | 194 | } else {//孕妇建档主数据 |
... | ... | @@ -202,9 +199,6 @@ |
202 | 199 | patientsQuery.setFmDateEnd(fmEnd); |
203 | 200 | patientsQuery.setTypeList(Arrays.asList(1, 3)); |
204 | 201 | patientsQuery.setYn(YnEnums.YES.getId()); |
205 | - patientsQuery.setNeed("need"); | |
206 | - patientsQuery.setLimit(limit); | |
207 | - patientsQuery.setPage(page); | |
208 | 202 | patientsQuery.setHospitalId(hospitalId); |
209 | 203 | patientsQuery.setQueryNo(key); |
210 | 204 | patientsQuery.setFollowupStatus(followupStatus); |
211 | 205 | |
... | ... | @@ -219,14 +213,14 @@ |
219 | 213 | // System.out.println(stopWatch.toString()); |
220 | 214 | //优化后 |
221 | 215 | stopWatch.start("孕妇建档优化后"); |
222 | - restList = dispPatient(patientsList, hospitalId); | |
216 | + restList = dispPatient(patientsList, hospitalId, encryption); | |
223 | 217 | this.surveyExport(restList, response); |
224 | 218 | } |
225 | 219 | |
226 | 220 | |
227 | 221 | } |
228 | 222 | |
229 | - private List<Map<String, Object>> dispResidentMainData(List<ResidentsArchiveModel> residentsArchiveModels, String hospitalId) { | |
223 | + /*private List<Map<String, Object>> dispResidentMainData(List<ResidentsArchiveModel> residentsArchiveModels, String hospitalId) { | |
230 | 224 | List<Map<String, Object>> archiveModelList = new ArrayList<>(); |
231 | 225 | |
232 | 226 | List<Patients> patients = new ArrayList<>(); |
233 | 227 | |
... | ... | @@ -299,9 +293,9 @@ |
299 | 293 | archiveModelList.addAll(dispPatient(patientsList, hospitalId)); |
300 | 294 | } |
301 | 295 | return archiveModelList; |
302 | - } | |
296 | + }*/ | |
303 | 297 | |
304 | - private List<Map<String, Object>> getResidentMainData(List<ResidentsArchiveModel> residentsArchiveModels) { | |
298 | + private List<Map<String, Object>> getResidentMainData(List<ResidentsArchiveModel> residentsArchiveModels, Integer encryption) { | |
305 | 299 | List<Map<String, Object>> archiveModelList = new ArrayList<>(); |
306 | 300 | |
307 | 301 | |
308 | 302 | |
... | ... | @@ -315,9 +309,9 @@ |
315 | 309 | temp.put("check", 3); // 婚检 |
316 | 310 | |
317 | 311 | temp.put("id", archiveModel.getId()); |
318 | - temp.put("cardNo", StringUtils.encryCardNo(archiveModel.getCertificateNum())); | |
312 | + temp.put("cardNo", encryption == 0 ? StringUtils.encryCardNo(archiveModel.getCertificateNum()) : archiveModel.getCertificateNum()); | |
319 | 313 | temp.put("username", archiveModel.getUsername()); |
320 | - temp.put("phone", StringUtils.encryPhone(archiveModel.getPhone())); | |
314 | + temp.put("phone", encryption == 0 ? StringUtils.encryPhone(archiveModel.getPhone()) : archiveModel.getPhone()); | |
321 | 315 | temp.put("age", DateUtil.getAge(archiveModel.getBirthday())); |
322 | 316 | temp.put("residentDate", DateUtil.getyyyy_MM_dd(archiveModel.getBuildDay())); // 妇女建档日期 |
323 | 317 | |
... | ... | @@ -436,7 +430,7 @@ |
436 | 430 | return archiveModelList; |
437 | 431 | } |
438 | 432 | |
439 | - private List<Map<String, Object>> dispPatient(List<Patients> patients, String hospitalId) { | |
433 | + private List<Map<String, Object>> dispPatient(List<Patients> patients, String hospitalId, Integer encryption) { | |
440 | 434 | List<Map<String, Object>> restList = new ArrayList<>(); |
441 | 435 | |
442 | 436 | Map<String, Map<String, Object>> cardMap = new HashMap<>(); |
443 | 437 | |
... | ... | @@ -455,9 +449,9 @@ |
455 | 449 | temp.put("fm", 3);//分娩空白 |
456 | 450 | temp.put("chfc", 3);//产后复查空白 |
457 | 451 | temp.put("id", patient.getId()); |
458 | - temp.put("cardNo", StringUtils.encryCardNo(patient.getCardNo())); | |
452 | + temp.put("cardNo", encryption == 0 ? StringUtils.encryCardNo(patient.getCardNo()) : patient.getCardNo()); | |
459 | 453 | temp.put("username", patient.getUsername()); |
460 | - temp.put("phone", StringUtils.encryPhone(patient.getPhone())); | |
454 | + temp.put("phone", encryption == 0 ? StringUtils.encryPhone(patient.getPhone()) : patient.getPhone()); | |
461 | 455 | temp.put("age", DateUtil.getAge(patient.getBirth())); |
462 | 456 | //建档时间 |
463 | 457 | temp.put("bookbuildDate", DateUtil.getyyyy_MM_dd(patient.getBookbuildingDate())); |