Commit 22bd3a5f2d7ef1d9b0c5618caeb9c55f760724a6
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 8 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BCTransferInController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanPatientWorker.java
- platform-operate-api/src/main/resources/log4j_config.xml
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
22bd3a5
| ... | ... | @@ -300,9 +300,9 @@ |
| 300 | 300 | if(CollectionUtils.isNotEmpty(patientses)){ |
| 301 | 301 | for(Patients patients1:patientses){ |
| 302 | 302 | patients.setId(patients1.getId()); |
| 303 | - patients.setBookbuildingDate(patients1.getBookbuildingDate()); | |
| 303 | +// patients.setBookbuildingDate(patients1.getBookbuildingDate()); | |
| 304 | 304 | patients.setHospitalId(patients1.getHospitalId()); |
| 305 | - patients.setBookbuildingDoctor(patients1.getBookbuildingDoctor()); | |
| 305 | +// patients.setBookbuildingDoctor(patients1.getBookbuildingDoctor()); | |
| 306 | 306 | patients.setCreated(patients1.getCreated()); |
| 307 | 307 | //修改隐藏建档的基本信息 |
| 308 | 308 | updatePatient(patients); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BCTransferInController.java
View file @
22bd3a5
| ... | ... | @@ -178,7 +178,7 @@ |
| 178 | 178 | httpServletResponse.setHeader("Content-Disposition", "attachment;filename=" + new String(("证明入库(" + startDate + "至" + endDate + ").xls").getBytes("UTF-8"), "ISO-8859-1")); |
| 179 | 179 | ExcelUtil.toExcel(httpServletResponse.getOutputStream(), list, header); |
| 180 | 180 | } catch (Exception e) { |
| 181 | - ExceptionUtils.catchException(e, "bc/transfer/in/excel异常"); | |
| 181 | + ExceptionUtils.catchException(e, "bc/transfer/in/excel异常1"); | |
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
22bd3a5
| ... | ... | @@ -11,10 +11,6 @@ |
| 11 | 11 | import com.lyms.platform.common.utils.SystemConfig; |
| 12 | 12 | import com.lyms.platform.operate.web.request.*; |
| 13 | 13 | import com.lyms.platform.operate.web.result.*; |
| 14 | -import com.lyms.platform.operate.web.utils.FunvCommonUtil; | |
| 15 | -import com.lyms.platform.operate.web.utils.ResolveUtils; | |
| 16 | -import com.lyms.platform.operate.web.utils.UnitConstants; | |
| 17 | -import com.lyms.platform.operate.web.utils.UnitUtils; | |
| 18 | 14 | import com.lyms.platform.permission.model.Organization; |
| 19 | 15 | import com.lyms.platform.permission.model.Users; |
| 20 | 16 | import com.lyms.platform.permission.service.OrganizationService; |
| ... | ... | @@ -22,7 +18,6 @@ |
| 22 | 18 | import com.lyms.platform.pojo.*; |
| 23 | 19 | import com.lyms.platform.query.*; |
| 24 | 20 | import org.apache.commons.collections.CollectionUtils; |
| 25 | -import org.apache.commons.collections.MapUtils; | |
| 26 | 21 | import org.apache.commons.lang.StringUtils; |
| 27 | 22 | import org.apache.commons.lang.math.NumberUtils; |
| 28 | 23 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -71,8 +66,6 @@ |
| 71 | 66 | @Autowired |
| 72 | 67 | private PatientCheckTicketService patientCheckTicketService; |
| 73 | 68 | |
| 74 | - @Autowired | |
| 75 | - private AntenatalExaminationService antExService; | |
| 76 | 69 | /** |
| 77 | 70 | * 处理区域隐藏建档 |
| 78 | 71 | * |
| 79 | 72 | |
| ... | ... | @@ -173,10 +166,11 @@ |
| 173 | 166 | p1.setRiskFactorId(patients.getRiskFactorId()); |
| 174 | 167 | p1.setRiskLevelId(patients.getRiskLevelId()); |
| 175 | 168 | p1.setRiskScore(patients.getRiskScore()); |
| 176 | - p1.setNextCheckTime(com.lyms.platform.common.utils.StringUtils.isEmpty(nextCheckTime)?null:DateUtil.parseYMD(nextCheckTime)); | |
| 169 | + p1.setNextCheckTime(com.lyms.platform.common.utils.StringUtils.isEmpty(nextCheckTime) ? null : DateUtil.parseYMD(nextCheckTime)); | |
| 177 | 170 | p1.setFmDate(patients.getFmDate()); |
| 178 | 171 | p1.setServiceStatus(patients.getServiceStatus()); |
| 179 | 172 | p1.setLastCheckEmployeeId(patients.getLastCheckEmployeeId()); |
| 173 | + | |
| 180 | 174 | patientsService.updatePatient(p1); |
| 181 | 175 | patientsService.updatePatientOneCol(masterPatients.getId(), com.lyms.platform.common.utils.StringUtils.isEmpty(nextCheckTime)?null:DateUtil.parseYMD(nextCheckTime)); |
| 182 | 176 | }else{ |
| 183 | 177 | |
| ... | ... | @@ -185,12 +179,14 @@ |
| 185 | 179 | patientsQuery1.setYn(YnEnums.YES.getId()); |
| 186 | 180 | List<Patients> list= patientsService.queryPatient(patientsQuery1); |
| 187 | 181 | if(CollectionUtils.isNotEmpty(list)){ |
| 188 | - for(Patients p:list){ | |
| 182 | + for (Patients p : list) { | |
| 189 | 183 | Patients p1 = new Patients(); |
| 190 | 184 | p1.setId(p.getId()); |
| 191 | 185 | p1.setModified(patients.getModified()); |
| 192 | 186 | p1.setoRiskFactor(patients.getoRiskFactor()); |
| 193 | 187 | p1.setLastCTime(patients.getLastCTime()); |
| 188 | + p1.setBookbuildingDoctor(patients.getBookbuildingDoctor()); | |
| 189 | + p1.setBookbuildingDate(patients.getBookbuildingDate()); | |
| 194 | 190 | p1.setPostViewTimes(patients.getPostViewTimes()); |
| 195 | 191 | p1.setLastRhTime(patients.getLastRhTime()); |
| 196 | 192 | p1.setRiskFactorId(patients.getRiskFactorId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
22bd3a5
| ... | ... | @@ -190,7 +190,8 @@ |
| 190 | 190 | if (org.apache.commons.lang.StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId)) && org.apache.commons.lang.StringUtils.isNotEmpty(pid)) { |
| 191 | 191 | babyModelQuery.setId(null); |
| 192 | 192 | babyModelQuery.setPid(pid); |
| 193 | - babyModel= findBabyCond(babyModelQuery,li, false); | |
| 193 | + babyModelQuery.setEnable(null); | |
| 194 | + babyModel= findBabyCond(babyModelQuery,groupsFacade.findGroupHospital(userId, false), false); | |
| 194 | 195 | babyModel.setSource(babyModel.getId()); |
| 195 | 196 | babyModel.setId(null); |
| 196 | 197 | babyModel.setHospitalId(hospitalId); |
| ... | ... | @@ -216,10 +217,6 @@ |
| 216 | 217 | babyQuery.setId(babyId); |
| 217 | 218 | babyQuery.setYn(YnEnums.YES.getId()); |
| 218 | 219 | |
| 219 | - //在区域组的时候不用查询隐藏档案 | |
| 220 | - /* if (null != groupsFacade.findByCurrentUserId(autoMatchFacade.getHospitalId(userId))) { | |
| 221 | - babyQuery.setExtEnable(false); | |
| 222 | - }*/ | |
| 223 | 220 | |
| 224 | 221 | //查询建档记录 得到pid 通过pid查询所有的儿童建档记录 |
| 225 | 222 | List<BabyModel> builds = babyBookbuildingService.queryBabyBuildByCond(babyQuery); |
| ... | ... | @@ -230,6 +227,7 @@ |
| 230 | 227 | |
| 231 | 228 | String[] buildIds = null; |
| 232 | 229 | List<Map<String, String>> list = new ArrayList<>(); |
| 230 | + | |
| 233 | 231 | //查询建档记录 |
| 234 | 232 | List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); |
| 235 | 233 | if (CollectionUtils.isNotEmpty(models)) { |
| ... | ... | @@ -240,6 +238,10 @@ |
| 240 | 238 | |
| 241 | 239 | BabyModel babyModel = models.get(i); |
| 242 | 240 | buildIds[i] = babyModel.getId(); |
| 241 | + //隐藏建档不显示 | |
| 242 | + if("2".equals(babyModel.getEnable())){ | |
| 243 | + continue; | |
| 244 | + } | |
| 243 | 245 | Map<String, String> checkRecord = new HashMap<>(); |
| 244 | 246 | checkRecord.put("id", babyModel.getId()); |
| 245 | 247 | checkRecord.put("pid", babyModel.getPid()); |
| ... | ... | @@ -1240,6 +1242,12 @@ |
| 1240 | 1242 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 1241 | 1243 | babyQuery.setYn(YnEnums.YES.getId()); |
| 1242 | 1244 | babyQuery.setPid(babayPerson.getId()); |
| 1245 | + | |
| 1246 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(autoMatchFacade.getHospitalId(userId)))){ | |
| 1247 | + babyQuery.setExtEnable(false); | |
| 1248 | + } | |
| 1249 | + | |
| 1250 | + | |
| 1243 | 1251 | List<BabyModel> builds = babyBookbuildingService.queryBabyBuildByCond(babyQuery, "buildDate", Sort.Direction.DESC); |
| 1244 | 1252 | |
| 1245 | 1253 | List<Map<String, String>> list = new ArrayList<>(); |
| ... | ... | @@ -1284,7 +1292,11 @@ |
| 1284 | 1292 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 1285 | 1293 | babyQuery.setYn(YnEnums.YES.getId()); |
| 1286 | 1294 | babyQuery.setVcCardNo(param.getVcCardNo()); |
| 1287 | - babyQuery.setHospitalId(param.getHospitalId()); | |
| 1295 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(autoMatchFacade.getHospitalId(userId)))){ | |
| 1296 | + babyQuery.setExtEnable(false); | |
| 1297 | + } | |
| 1298 | + | |
| 1299 | + babyQuery.setHospitalIdList(groupsFacade.findGroupHospital(userId,false)); | |
| 1288 | 1300 | |
| 1289 | 1301 | List<BabyModel> babyModels = babyBookbuildingService.queryBabyBuildByCond(babyQuery); |
| 1290 | 1302 | if (CollectionUtils.isNotEmpty(babyModels)) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
22bd3a5
| ... | ... | @@ -723,11 +723,18 @@ |
| 723 | 723 | babyQuery.setMcertNo(StringUtils.isEmpty(cardNo) ? null : cardNo); |
| 724 | 724 | babyQuery.setVcCardNo(StringUtils.isEmpty(vcCardNo) ? null : vcCardNo); |
| 725 | 725 | babyQuery.setYn(YnEnums.YES.getId()); |
| 726 | - babyQuery.setHospitalId(hospitalId); | |
| 727 | 726 | |
| 727 | + //表示区域的 | |
| 728 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { | |
| 729 | + babyQuery.setExtEnable(false); | |
| 730 | + } | |
| 731 | + | |
| 732 | + List<String> hList = groupsFacade.findGroupHospital(userId, false); | |
| 733 | + babyQuery.setHospitalIdList(hList); | |
| 734 | + | |
| 728 | 735 | List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); |
| 729 | 736 | for (BabyModel model : models) { |
| 730 | - if (model != null && model.getHospitalId() != null && model.getHospitalId().equals(hospitalId)) { | |
| 737 | + if (model != null && model.getHospitalId() != null && hList.contains(hospitalId)) { | |
| 731 | 738 | isBuild = true; |
| 732 | 739 | } |
| 733 | 740 | BabyChooseResult result = new BabyChooseResult(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
22bd3a5
| ... | ... | @@ -431,10 +431,11 @@ |
| 431 | 431 | fetalPresentation += placenta.getFetalPresentation() == null ? "" : placenta.getFetalPresentation(); |
| 432 | 432 | //胎心率 |
| 433 | 433 | heartRate += placenta.getHeartRate() == null ? "" : placenta.getHeartRate().toString(); |
| 434 | + if(StringUtils.isNotEmpty(heartRate)){ | |
| 435 | + Integer a = (int)Double.parseDouble(heartRate); | |
| 436 | + heartRate = String.valueOf(a); | |
| 437 | + } | |
| 434 | 438 | |
| 435 | - Integer a = (int)Double.parseDouble(heartRate); | |
| 436 | - heartRate = String.valueOf(a); | |
| 437 | - | |
| 438 | 439 | join = placenta.getJoin(); |
| 439 | 440 | } |
| 440 | 441 | |
| 441 | 442 | |
| ... | ... | @@ -450,10 +451,11 @@ |
| 450 | 451 | } |
| 451 | 452 | } |
| 452 | 453 | heartRate += placenta.get("heartRate") == null ? "" : placenta.get("heartRate"); |
| 454 | + if(StringUtils.isNotEmpty(heartRate)) { | |
| 455 | + Integer a = (int) Double.parseDouble(heartRate); | |
| 456 | + heartRate = String.valueOf(a); | |
| 457 | + } | |
| 453 | 458 | |
| 454 | - Integer a = (int)Double.parseDouble(heartRate); | |
| 455 | - heartRate = String.valueOf(a); | |
| 456 | - | |
| 457 | 459 | fetalPresentation += placenta.get("fetalPresentation") == null ? "" : placenta.get("fetalPresentation"); |
| 458 | 460 | join = placenta.get("join"); |
| 459 | 461 | } |
| ... | ... | @@ -830,10 +832,11 @@ |
| 830 | 832 | fetalPresentation += placenta.getFetalPresentation() == null ? "" : placenta.getFetalPresentation(); |
| 831 | 833 | //胎心率 |
| 832 | 834 | heartRate += placenta.getHeartRate() == null ? "" : placenta.getHeartRate().toString(); |
| 833 | - //转换为整数 | |
| 834 | - Integer a = (int)Double.parseDouble(heartRate); | |
| 835 | - heartRate = String.valueOf(a); | |
| 836 | - | |
| 835 | + if(StringUtils.isNotEmpty(heartRate)){ | |
| 836 | + //转换为整数 | |
| 837 | + Integer a = (int)Double.parseDouble(heartRate); | |
| 838 | + heartRate = String.valueOf(a); | |
| 839 | + } | |
| 837 | 840 | } |
| 838 | 841 | |
| 839 | 842 | if ("java.util.LinkedHashMap".equals(obj.getClass().getName())) { |
| ... | ... | @@ -848,8 +851,10 @@ |
| 848 | 851 | } |
| 849 | 852 | } |
| 850 | 853 | heartRate += placenta.get("heartRate") == null ? "" : placenta.get("heartRate"); |
| 851 | - Integer a = (int)Double.parseDouble(heartRate); | |
| 852 | - heartRate = String.valueOf(a); | |
| 854 | + if(StringUtils.isNotEmpty(heartRate)){ | |
| 855 | + Integer a = (int)Double.parseDouble(heartRate); | |
| 856 | + heartRate = String.valueOf(a); | |
| 857 | + } | |
| 853 | 858 | |
| 854 | 859 | fetalPresentation += placenta.get("fetalPresentation") == null ? "" : placenta.get("fetalPresentation"); |
| 855 | 860 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanPatientWorker.java
View file @
22bd3a5
| ... | ... | @@ -94,7 +94,10 @@ |
| 94 | 94 | stopWatch.start("query ant count"); |
| 95 | 95 | //复诊次数 |
| 96 | 96 | List<AntenatalExaminationModel> ant = antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); |
| 97 | + //系统复诊次数 | |
| 97 | 98 | int i = 0; |
| 99 | + //系统初诊次数 | |
| 100 | + int ichu=0; | |
| 98 | 101 | if (CollectionUtils.isNotEmpty(ant)) { |
| 99 | 102 | //复诊次数 |
| 100 | 103 | i = ant.size(); |
| ... | ... | @@ -116,6 +119,7 @@ |
| 116 | 119 | antExChuQuery1.setPid(patients.getPid()); |
| 117 | 120 | antExChuQuery1.setYn(YnEnums.YES.getId()); |
| 118 | 121 | List<AntExChuModel> chu = antExService.queryAntExChu(antExChuQuery1); |
| 122 | + ichu=chu.size(); | |
| 119 | 123 | for (AntExChuModel a : chu) { |
| 120 | 124 | try { |
| 121 | 125 | if (StringUtils.isNotEmpty(a.getHospitalId())) { |
| 122 | 126 | |
| ... | ... | @@ -134,10 +138,11 @@ |
| 134 | 138 | antExChuQuery.setYn(YnEnums.YES.getId()); |
| 135 | 139 | antExChuQuery.setHospitalId(null); |
| 136 | 140 | //初诊次数 |
| 137 | - int b = antExService.queryAntExChuCount(antExChuQuery.convertToQuery()); | |
| 138 | - quanPatientsResult.setcTimes(i + b); | |
| 141 | + if(0==ichu){ | |
| 142 | + ichu = antExService.queryAntExChuCount(antExChuQuery.convertToQuery()); | |
| 143 | + } | |
| 144 | + quanPatientsResult.setcTimes(i + ichu); | |
| 139 | 145 | |
| 140 | - | |
| 141 | 146 | antExChuQuery.setHospitalId(hospital); |
| 142 | 147 | |
| 143 | 148 | antExQuery.setHospitalId(hospital); |
| ... | ... | @@ -145,7 +150,7 @@ |
| 145 | 150 | int chi = antExService.queryAntExChuCount(antExChuQuery.convertToQuery()); |
| 146 | 151 | |
| 147 | 152 | //本院复诊 |
| 148 | - int chb = antExService.queryAntenatalExaminationCount(antExQuery.convertToQuery()); | |
| 153 | + int chb = capLocalHospital(hospital,ant); | |
| 149 | 154 | quanPatientsResult.setcHTimes(chi + chb); |
| 150 | 155 | stopWatch.stop(); |
| 151 | 156 | String nextCheckTime = ""; |
| ... | ... | @@ -171,6 +176,7 @@ |
| 171 | 176 | |
| 172 | 177 | |
| 173 | 178 | stopWatch.stop(); |
| 179 | + stopWatch.start("query basicconfig"); | |
| 174 | 180 | //注册地址 |
| 175 | 181 | quanPatientsResult.setRegisterAddr(CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService)); |
| 176 | 182 | quanPatientsResult.setAddr(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService)); |
| 177 | 183 | |
| ... | ... | @@ -209,10 +215,24 @@ |
| 209 | 215 | |
| 210 | 216 | quanPatientsResult.setrLevel(HighScoreResult.filter(level)); |
| 211 | 217 | } |
| 218 | + stopWatch.stop(); | |
| 212 | 219 | data.add(quanPatientsResult); |
| 213 | 220 | logger.debug(stopWatch.toString()); |
| 214 | 221 | } |
| 215 | 222 | return data; |
| 223 | + } | |
| 224 | + | |
| 225 | + private int capLocalHospital(String hospitalId,List<AntenatalExaminationModel> list){ | |
| 226 | + if(CollectionUtils.isEmpty(list)){ | |
| 227 | + return 0; | |
| 228 | + } | |
| 229 | + int count= 0; | |
| 230 | + for(AntenatalExaminationModel model:list){ | |
| 231 | + if(model.getHospitalId().equals(hospitalId)){ | |
| 232 | + count++; | |
| 233 | + } | |
| 234 | + } | |
| 235 | + return count; | |
| 216 | 236 | } |
| 217 | 237 | } |
platform-operate-api/src/main/resources/log4j_config.xml
View file @
22bd3a5