Commit 24212b0a80aa1ed0496e754b7abf92debe687a5b
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 7 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntExRecordService.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntenatalExaminationService.java
- platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.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/PremaritalCheckupFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntExRecordService.java
View file @
24212b0
... | ... | @@ -93,6 +93,50 @@ |
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
96 | + | |
97 | + | |
98 | + private void syncSingle(String parentId){ | |
99 | + AntExQuery antExQuery = new AntExQuery(); | |
100 | + antExQuery.setYn(YnEnums.YES.getId()); | |
101 | + antExQuery.setParentId(parentId); | |
102 | + //复诊 | |
103 | + List<AntenatalExaminationModel> list = antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC,"checkDate")); | |
104 | + for (AntenatalExaminationModel antEx : list) { | |
105 | + AntExRecordModel record = convert(antEx); | |
106 | + if (null != record) { | |
107 | + AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); | |
108 | + antExRecordQuery.setParentId(record.getParentId()); | |
109 | + antExRecordQuery.setcId(record.getCheckDoctor()); | |
110 | + Integer count = count(antExRecordQuery); | |
111 | + if (null == count || 0 == count) { | |
112 | + antExRecordDao.addOneRecord(record); | |
113 | + } | |
114 | + } | |
115 | + } | |
116 | + | |
117 | + | |
118 | + //初诊 | |
119 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
120 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
121 | + antExChuQuery.setParentId(parentId); | |
122 | + List<AntExChuModel> antExChuModelList = antExService.queryAntExChu(antExChuQuery.convertToQuery()); | |
123 | + | |
124 | + if (CollectionUtils.isNotEmpty(antExChuModelList)) { | |
125 | + for (AntExChuModel antEx : antExChuModelList) { | |
126 | + AntExRecordModel record = convert(antEx); | |
127 | + if (null != record) { | |
128 | + AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); | |
129 | + antExRecordQuery.setParentId(record.getParentId()); | |
130 | + antExRecordQuery.setcId(record.getCheckDoctor()); | |
131 | + Integer count = count(antExRecordQuery); | |
132 | + if (null == count || 0 == count) { | |
133 | + antExRecordDao.addOneRecord(record); | |
134 | + } | |
135 | + } | |
136 | + } | |
137 | + } | |
138 | + } | |
139 | + | |
96 | 140 | /** |
97 | 141 | * 处理删除检查 |
98 | 142 | * |
99 | 143 | |
... | ... | @@ -102,8 +146,13 @@ |
102 | 146 | if (StringUtils.isEmpty(parentId)) { |
103 | 147 | return; |
104 | 148 | } |
149 | + AntExRecordQuery antExRecordQuery1 = new AntExRecordQuery(); | |
150 | + antExRecordQuery1.setParentId(parentId); | |
151 | + antExRecordDao.findAndMove(antExRecordQuery1.convertToQuery()); | |
105 | 152 | |
106 | - //先删除掉该人的 | |
153 | + | |
154 | + syncSingle(parentId); | |
155 | + /* //先删除掉该人的 | |
107 | 156 | AntExRecordQuery antExRecordQuery1 = new AntExRecordQuery(); |
108 | 157 | antExRecordQuery1.setParentId(parentId); |
109 | 158 | antExRecordDao.findAndMove(antExRecordQuery1.convertToQuery()); |
... | ... | @@ -145,7 +194,7 @@ |
145 | 194 | } |
146 | 195 | } |
147 | 196 | } |
148 | - } | |
197 | + }*/ | |
149 | 198 | } |
150 | 199 | |
151 | 200 |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntenatalExaminationService.java
View file @
24212b0
... | ... | @@ -111,6 +111,7 @@ |
111 | 111 | if (CollectionUtils.isNotEmpty(list)) { |
112 | 112 | antExRecordService.batchUpdate(antExRecordModel,antExRecordQuery); |
113 | 113 | } else { |
114 | + antExRecordQuery.setfId(null); | |
114 | 115 | antExRecordQuery.setParentId(antExRecordModel.getParentId()); |
115 | 116 | antExRecordQuery.setcId(antExRecordModel.getCheckDoctor()); |
116 | 117 | Integer count = antExRecordService.count(antExRecordQuery); |
platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
View file @
24212b0
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.java
View file @
24212b0
... | ... | @@ -100,5 +100,14 @@ |
100 | 100 | return residentsArchiveFacade.queryResidentsArchives(residentsArchiveQueryRequest,loginState.getId(),"true"); |
101 | 101 | } |
102 | 102 | |
103 | + //返回证件类型 | |
104 | + @RequestMapping(value = "/getCertificateType", method = RequestMethod.GET) | |
105 | + @ResponseBody | |
106 | + public BaseResponse queryCardNoType(){ | |
107 | + return residentsArchiveFacade.queryCardNoType(); | |
108 | + } | |
109 | + | |
110 | + | |
111 | + | |
103 | 112 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
24212b0
... | ... | @@ -271,8 +271,8 @@ |
271 | 271 | setLashCTimes(hospitalId, antExChuModel.getParentId(), 1); |
272 | 272 | |
273 | 273 | //初诊,修改产检管理 |
274 | - antenatalExaminationService.updateAntExRecord(antExChuModel.getId(), 1); | |
275 | - | |
274 | +// antenatalExaminationService.updateAntExRecord(antExChuModel.getId(), 1); | |
275 | + recordService.handExRecord(antExChuModel.getParentId()); | |
276 | 276 | } else { |
277 | 277 | AntExChuQuery antExChuQuery1 = new AntExChuQuery(); |
278 | 278 | antExChuQuery1.setParentId(excAddRequest.getParentId()); |
... | ... | @@ -313,7 +313,7 @@ |
313 | 313 | //修改本院最后一次定义高危 |
314 | 314 | updateLastRhTime(patients.getId(), hospitalId); |
315 | 315 | setLashCTimes(hospitalId, antExChuModel.getParentId(), 1); |
316 | - antenatalExaminationService.updateAntExRecord(antExChuModel.getId(), 1); | |
316 | + recordService.handExRecord(antExChuModel.getParentId()); | |
317 | 317 | if (null != patients.getBuildType() && patients.getBuildType() == 3) { |
318 | 318 | Patients patients1 = new Patients(); |
319 | 319 | patients1.setEnable("1"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PremaritalCheckupFacade.java
View file @
24212b0
... | ... | @@ -54,11 +54,10 @@ |
54 | 54 | public BaseObjectResponse getPremaritalCheckup(PremaritalCheckupQueryRequest requestParam) { |
55 | 55 | |
56 | 56 | PremaritalCheckup result = null; |
57 | - PremaritalCheckupHistoryResult historyResult = null; | |
58 | 57 | ResidentsArchiveModel archiveModel = null; |
59 | 58 | Map<String, Object> archiveMap = null; |
60 | - | |
61 | 59 | Map<String, Object> resultMap = new HashMap<>(); |
60 | + List<PremaritalCheckupHistoryResult> historyList = null; | |
62 | 61 | |
63 | 62 | //婚检ID不为空 |
64 | 63 | if (StringUtils.isNotEmpty(requestParam.getId())) { |
... | ... | @@ -101,7 +100,7 @@ |
101 | 100 | result = checkupList.get(0); |
102 | 101 | //历史婚检记录 |
103 | 102 | for (PremaritalCheckup data : checkupList){ |
104 | - historyResult = new PremaritalCheckupHistoryResult(); | |
103 | + PremaritalCheckupHistoryResult historyResult = new PremaritalCheckupHistoryResult(); | |
105 | 104 | historyResult.setId(data.getId()); |
106 | 105 | historyResult.setPremaritalUpTime(data.getPremaritalUpTime()); |
107 | 106 | Organization org = organizationService.getOrganization(Integer.valueOf(data.getHospitalId())); |
... | ... | @@ -109,6 +108,8 @@ |
109 | 108 | historyResult.setPremaritalUpHospital(org.getName()); |
110 | 109 | historyResult.setHospitalId(data.getHospitalId()); |
111 | 110 | } |
111 | + historyList = new ArrayList<>(); | |
112 | + historyList.add(historyResult); | |
112 | 113 | } |
113 | 114 | } |
114 | 115 | } |
... | ... | @@ -130,7 +131,7 @@ |
130 | 131 | |
131 | 132 | resultMap.put("archiveResult", archiveMap); |
132 | 133 | resultMap.put("checkupResult", result); |
133 | - resultMap.put("premaritalCheckupHistory",historyResult); | |
134 | + resultMap.put("premaritalCheckupHistory",historyList); | |
134 | 135 | |
135 | 136 | BaseObjectResponse response = new BaseObjectResponse(); |
136 | 137 | response.setData(resultMap); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
24212b0
... | ... | @@ -460,7 +460,15 @@ |
460 | 460 | } |
461 | 461 | |
462 | 462 | |
463 | + public BaseObjectResponse queryCardNoType(){ | |
464 | + BaseObjectResponse response = new BaseObjectResponse(); | |
463 | 465 | |
466 | + List<BasicConfigResult> pcerteTypeResult = basicConfigFacade.getBaseicConfigByParentId(SystemConfig.CERTE_TYPE_ID); | |
467 | + response.setData(pcerteTypeResult); | |
468 | + response.setErrorcode(ErrorCodeConstants.SUCCESS); | |
469 | + response.setErrormsg("成功"); | |
470 | + return response; | |
471 | + } | |
464 | 472 | |
465 | 473 | } |