Commit 7207500852d186a3a39daf0fa1cdbe89411a5eaf
1 parent
c3e698262d
Exists in
dev
#fix:优化开通服务数据为null的问题,处理妊娠期高危因素不展示的问题
Showing 14 changed files with 63 additions and 22 deletions
- platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
- platform-common/src/main/java/com/lyms/platform/common/utils/SystemConfig.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientServiceController.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/ApplyOrderFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyScreeningFacade.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/BabyEarFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/BabyBuildSerToPatientSerWorker.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/BuildSerToPatientSerWorker.java
platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
View file @
7207500
platform-common/src/main/java/com/lyms/platform/common/utils/SystemConfig.java
View file @
7207500
| ... | ... | @@ -101,6 +101,8 @@ |
| 101 | 101 | public static final String REDIS_ORGANIZATION="ORGANIZATION"; |
| 102 | 102 | //组织结构-城市ID |
| 103 | 103 | public static final String REDIS_ORGANIZATION_CITY="ORGANIZATION_CITY_"; |
| 104 | + //妊娠高危 | |
| 105 | + public static final String REDIS_NEW_HIGH_RISK_PARENT_RENSHEN="REDIS_NEW_HIGH_RISK_PARENT_RENSHEN"; | |
| 104 | 106 | |
| 105 | 107 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientServiceController.java
View file @
7207500
| ... | ... | @@ -233,7 +233,9 @@ |
| 233 | 233 | PatientService ps = new PatientService(); |
| 234 | 234 | ps.setSerStatus(1); |
| 235 | 235 | ps.setParentid(patients.getId()); |
| 236 | - ps.setCreateUser(bookbuildingDoctor); | |
| 236 | + if (StringUtils.isNotEmpty(bookbuildingDoctor)){ | |
| 237 | + ps.setCreateUser(bookbuildingDoctor); | |
| 238 | + } | |
| 237 | 239 | ps.setCreateDate(new Date()); |
| 238 | 240 | //1孕妇 2儿童 3 产妇 |
| 239 | 241 | if (patients.getType()==1){ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
7207500
| ... | ... | @@ -4700,7 +4700,7 @@ |
| 4700 | 4700 | map.put("organizations", convert()); |
| 4701 | 4701 | map.put("cTime", DateUtil.getyyyy_MM_dd(new Date())); |
| 4702 | 4702 | if (CollectionUtils.isEmpty(mainBasicConfigList)) { |
| 4703 | - List<BasicConfig> basicConfigList = (List<BasicConfig>) RedisUtils.getObj(SystemConfig.REDIS_NEW_HIGH_RISK_PARENT); | |
| 4703 | + List<BasicConfig> basicConfigList = (List<BasicConfig>) RedisUtils.getObj(SystemConfig.REDIS_NEW_HIGH_RISK_PARENT_RENSHEN); | |
| 4704 | 4704 | |
| 4705 | 4705 | if (CollectionUtils.isEmpty(basicConfigList)) { |
| 4706 | 4706 | BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); |
| 4707 | 4707 | |
| ... | ... | @@ -4708,14 +4708,14 @@ |
| 4708 | 4708 | basicConfigQuery.setTypeId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); |
| 4709 | 4709 | //所有数据 |
| 4710 | 4710 | basicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery); |
| 4711 | - RedisUtils.setObj(SystemConfig.REDIS_NEW_HIGH_RISK_PARENT, basicConfigList, 86400); | |
| 4712 | - mainBasicConfigList = (List<BasicConfig>) RedisUtils.getObj(SystemConfig.REDIS_NEW_HIGH_RISK_BASE); | |
| 4711 | + RedisUtils.setObj(SystemConfig.REDIS_NEW_HIGH_RISK_PARENT_RENSHEN, basicConfigList, 86400); | |
| 4712 | + mainBasicConfigList = (List<BasicConfig>) RedisUtils.getObj(SystemConfig.REDIS_NEW_HIGH_RISK_PARENT_RENSHEN); | |
| 4713 | 4713 | if (CollectionUtils.isEmpty(mainBasicConfigList)) { |
| 4714 | 4714 | //主节点数据 |
| 4715 | 4715 | basicConfigQuery.setTypeId(null); |
| 4716 | 4716 | basicConfigQuery.setParentId("fb43fd5a-b153-4cb9-9180-c46f5612ba43"); |
| 4717 | 4717 | mainBasicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery); |
| 4718 | - RedisUtils.setObj(SystemConfig.REDIS_NEW_HIGH_RISK_BASE, mainBasicConfigList, 86400); | |
| 4718 | + RedisUtils.setObj(SystemConfig.REDIS_NEW_HIGH_RISK_PARENT_RENSHEN, mainBasicConfigList, 86400); | |
| 4719 | 4719 | } |
| 4720 | 4720 | } |
| 4721 | 4721 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
7207500
| ... | ... | @@ -266,7 +266,9 @@ |
| 266 | 266 | |
| 267 | 267 | patientService.setSerInfos(Arrays.asList(serInfo)); |
| 268 | 268 | patientService.setPerType(1); |
| 269 | - patientService.setCreateUser(String.valueOf(userId)); | |
| 269 | + if (userId!=null){ | |
| 270 | + patientService.setCreateUser(String.valueOf(userId)); | |
| 271 | + } | |
| 270 | 272 | //开通日期与建档日期一致 |
| 271 | 273 | patientService.setCreateDate(patients.getBookbuildingDate()); |
| 272 | 274 | patientService.setParentid(id); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyScreeningFacade.java
View file @
7207500
| ... | ... | @@ -211,7 +211,10 @@ |
| 211 | 211 | |
| 212 | 212 | patientService.setSerInfos(Arrays.asList(serInfo)); |
| 213 | 213 | patientService.setPerType(1); |
| 214 | - patientService.setCreateUser(String.valueOf(userId)); | |
| 214 | + if (userId!=null){ | |
| 215 | + patientService.setCreateUser(String.valueOf(userId)); | |
| 216 | + } | |
| 217 | + | |
| 215 | 218 | //开通日期与建档日期一致 |
| 216 | 219 | patientService.setCreateDate(patients.getBookbuildingDate()); |
| 217 | 220 | patientService.setParentid(id); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
7207500
| ... | ... | @@ -1072,7 +1072,9 @@ |
| 1072 | 1072 | PatientService patientService = new PatientService(); |
| 1073 | 1073 | patientService.setPerType(2); |
| 1074 | 1074 | patientService.setSerInfos(request.getSerInfos()); |
| 1075 | - patientService.setCreateUser(String.valueOf(userId)); | |
| 1075 | + if (userId!=null){ | |
| 1076 | + patientService.setCreateUser(String.valueOf(userId)); | |
| 1077 | + } | |
| 1076 | 1078 | //开通日期与建档日期一致 |
| 1077 | 1079 | patientService.setCreateDate(DateUtil.parseYMD(request.getBuildDate())); |
| 1078 | 1080 | patientService.setParentid(model.getId()); |
| ... | ... | @@ -1703,7 +1705,10 @@ |
| 1703 | 1705 | PatientService patientService = new PatientService(); |
| 1704 | 1706 | patientService.setPerType(2); |
| 1705 | 1707 | patientService.setSerInfos(b.getSerInfos()); |
| 1706 | - patientService.setCreateUser(String.valueOf(userId)); | |
| 1708 | + if (userId!=null){ | |
| 1709 | + patientService.setCreateUser(String.valueOf(userId)); | |
| 1710 | + } | |
| 1711 | + | |
| 1707 | 1712 | //开通日期与建档日期一致 |
| 1708 | 1713 | patientService.setCreateDate(new Date()); |
| 1709 | 1714 | patientService.setParentid(b.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
View file @
7207500
| ... | ... | @@ -539,7 +539,9 @@ |
| 539 | 539 | PatientService patientService = new PatientService(); |
| 540 | 540 | patientService.setPerType(2); |
| 541 | 541 | patientService.setSerInfos(babyEarBase.getSerInfos()); |
| 542 | - patientService.setCreateUser(String.valueOf(userId)); | |
| 542 | + if (userId!=null){ | |
| 543 | + patientService.setCreateUser(String.valueOf(userId)); | |
| 544 | + } | |
| 543 | 545 | //开通日期与建档日期一致 |
| 544 | 546 | patientService.setCreateDate(DateUtil.parseYMD(babyEarBase.getCreateTime())); |
| 545 | 547 | patientService.setParentid(baby.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
7207500
| ... | ... | @@ -114,6 +114,7 @@ |
| 114 | 114 | basicConfig.setName(basicConfig.getName()+"1"); |
| 115 | 115 | } |
| 116 | 116 | }*/ |
| 117 | + | |
| 117 | 118 | mainBasicConfigList = (List<BasicConfig>) RedisUtils.getObj(SystemConfig.REDIS_NEW_HIGH_RISK_BASE); |
| 118 | 119 | if (CollectionUtils.isEmpty(mainBasicConfigList)) { |
| 119 | 120 | BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
7207500
| ... | ... | @@ -479,7 +479,9 @@ |
| 479 | 479 | PatientService patientService = new PatientService(); |
| 480 | 480 | patientService.setSerInfos(yunRequest.getSerInfos()); |
| 481 | 481 | patientService.setPerType(1); |
| 482 | - patientService.setCreateUser(String.valueOf(userId)); | |
| 482 | + if(userId!=null){ | |
| 483 | + patientService.setCreateUser(String.valueOf(userId)); | |
| 484 | + } | |
| 483 | 485 | //开通日期与建档日期一致 |
| 484 | 486 | patientService.setCreateDate(DateUtil.parseYMD(yunRequest.getBookbuildingDate())); |
| 485 | 487 | patientService.setParentid(p.getId()); |
| ... | ... | @@ -4475,7 +4477,10 @@ |
| 4475 | 4477 | serInfos.add(params); |
| 4476 | 4478 | patientService.setSerInfos(serInfos); |
| 4477 | 4479 | patientService.setPerType(1); |
| 4478 | - patientService.setCreateUser(patient.getFirstCheckId()); | |
| 4480 | + if (StringUtils.isNotEmpty(patient.getFirstCheckId())){ | |
| 4481 | + patientService.setCreateUser(patient.getFirstCheckId()); | |
| 4482 | + } | |
| 4483 | + | |
| 4479 | 4484 | //开通日期与建档日期一致 |
| 4480 | 4485 | patientService.setCreateDate(patient.getBookbuildingDate()); |
| 4481 | 4486 | patientService.setParentid(patient.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
7207500
| ... | ... | @@ -459,7 +459,10 @@ |
| 459 | 459 | |
| 460 | 460 | |
| 461 | 461 | PatientService pser = new PatientService(); |
| 462 | - pser.setCreateUser(ps.getCreateUser()); | |
| 462 | + if (StringUtils.isNotEmpty(ps.getCreateUser())){ | |
| 463 | + pser.setCreateUser(ps.getCreateUser()); | |
| 464 | + } | |
| 465 | + | |
| 463 | 466 | pser.setCreateDate(ps.getCreateDate()); |
| 464 | 467 | pser.setParentid(ps.getParentid()); |
| 465 | 468 | //设置服务对象类型 服务人类型(1-孕妇、2-儿童 3-产妇) |
| ... | ... | @@ -510,7 +513,9 @@ |
| 510 | 513 | //服务开通操作时间 |
| 511 | 514 | pser.setUpdateDate(new Date()); |
| 512 | 515 | //服务开通操作人 |
| 513 | - pser.setUpdateUser(String.valueOf(userId)); | |
| 516 | + if (userId!=null){ | |
| 517 | + pser.setUpdateUser(String.valueOf(userId)); | |
| 518 | + } | |
| 514 | 519 | |
| 515 | 520 | if (serInfo.containsKey("device") && StringUtils.isNotEmpty(serInfo.get("device"))) { |
| 516 | 521 | pser.setDevice(Integer.parseInt(serInfo.get("device"))); |
| ... | ... | @@ -803,7 +808,10 @@ |
| 803 | 808 | |
| 804 | 809 | PatientService before = patientServiceService.getPatientService(ps.getId()); |
| 805 | 810 | //开通人为上一次的数据,因为系统端不能修改,但是小程序可以修改 |
| 806 | - ps.setCreateUser(before.getCreateUser()); | |
| 811 | + if (StringUtils.isNotEmpty(before.getCreateUser())){ | |
| 812 | + ps.setCreateUser(before.getCreateUser()); | |
| 813 | + } | |
| 814 | + | |
| 807 | 815 | |
| 808 | 816 | if (before.getSerStatus() == PatientSerEnums.SerStatusEnums.td.getId()) {//如果上一次是退订状态,重新开通,开通时间为当前时间 |
| 809 | 817 | ps.setCreateDate(new Date()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java
View file @
7207500
| ... | ... | @@ -98,9 +98,9 @@ |
| 98 | 98 | if (CollectionUtils.isNotEmpty(patientServices)) {//修改 |
| 99 | 99 | PatientService ps = patientServices.get(0); |
| 100 | 100 | //开通医生修改为小程序开通 |
| 101 | - ps.setCreateUser(null); | |
| 101 | + // ps.setCreateUser(""); | |
| 102 | 102 | //操作员修改为小程序开通 |
| 103 | - ps.setUpdateUser(null); | |
| 103 | + //ps.setUpdateUser(""); | |
| 104 | 104 | ps.setPerType(patientService.getPerType()); |
| 105 | 105 | ps.setSerStatus(patientService.getSerStatus()); |
| 106 | 106 | ps.setSerCode(patientService.getSerCode()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/BabyBuildSerToPatientSerWorker.java
View file @
7207500
| ... | ... | @@ -133,7 +133,10 @@ |
| 133 | 133 | |
| 134 | 134 | public void convertPatient(BabyModel pt, PatientService pser2) { |
| 135 | 135 | pser2.setIsOld(1); |
| 136 | - pser2.setCreateUser(pt.getBuildDoctor()); | |
| 136 | + if (StringUtils.isNotEmpty(pt.getBuildDoctor())){ | |
| 137 | + pser2.setCreateUser(pt.getBuildDoctor()); | |
| 138 | + } | |
| 139 | + | |
| 137 | 140 | if (pt.getBuildDate() != null) { |
| 138 | 141 | pser2.setCreateDate(pt.getBuildDate()); |
| 139 | 142 | } else { |
| ... | ... | @@ -156,7 +159,10 @@ |
| 156 | 159 | // pser.setReceiveDate(new Date()); |
| 157 | 160 | |
| 158 | 161 | //服务开通操作人 |
| 159 | - pser2.setUpdateUser(pt.getBuildDoctor()); | |
| 162 | + if (StringUtils.isNotEmpty(pt.getBuildDoctor())){ | |
| 163 | + pser2.setUpdateUser(pt.getBuildDoctor()); | |
| 164 | + } | |
| 165 | + | |
| 160 | 166 | } |
| 161 | 167 | |
| 162 | 168 | public void convertZZFWtoPserStatus(BabyModel pt, PatientService pser) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/BuildSerToPatientSerWorker.java
View file @
7207500
| ... | ... | @@ -164,7 +164,10 @@ |
| 164 | 164 | |
| 165 | 165 | public void convertPatient(Patients pt, PatientService pser2) { |
| 166 | 166 | pser2.setIsOld(1); |
| 167 | - pser2.setCreateUser(pt.getBookbuildingDoctor()); | |
| 167 | + if (StringUtils.isNotEmpty(pt.getBookbuildingDoctor())){ | |
| 168 | + pser2.setCreateUser(pt.getBookbuildingDoctor()); | |
| 169 | + } | |
| 170 | + | |
| 168 | 171 | pser2.setCreateDate(pt.getBookbuildingDate()); |
| 169 | 172 | pser2.setParentid(pt.getId()); |
| 170 | 173 | pser2.setPid(pt.getPid()); |
| ... | ... | @@ -179,7 +182,9 @@ |
| 179 | 182 | //服务开通操作时间 |
| 180 | 183 | pser2.setUpdateDate(pt.getBookbuildingDate()); |
| 181 | 184 | //服务开通操作人 |
| 182 | - pser2.setUpdateUser(pt.getBookbuildingDoctor()); | |
| 185 | + if (StringUtils.isNotEmpty(pt.getBookbuildingDoctor())){ | |
| 186 | + pser2.setUpdateUser(pt.getBookbuildingDoctor()); | |
| 187 | + } | |
| 183 | 188 | } |
| 184 | 189 | |
| 185 | 190 | public void convertZZFWtoPserStatus(Patients pt, PatientService pser) { |