Commit cc0f987bf9c9ecafe663f18e45922f804ff51e90
1 parent
d87eb0b912
Exists in
master
and in
1 other branch
增加设置parentid
Showing 5 changed files with 15 additions and 11 deletions
- 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/MatDeliverFacade.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/facade/PostReviewFacade.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
cc0f987
... | ... | @@ -19,6 +19,7 @@ |
19 | 19 | import org.apache.commons.lang.StringUtils; |
20 | 20 | import org.apache.commons.lang.math.NumberUtils; |
21 | 21 | import org.springframework.beans.factory.annotation.Autowired; |
22 | +import org.springframework.data.domain.Sort; | |
22 | 23 | import org.springframework.stereotype.Component; |
23 | 24 | |
24 | 25 | import java.util.*; |
... | ... | @@ -229,8 +230,11 @@ |
229 | 230 | * |
230 | 231 | * @return |
231 | 232 | */ |
232 | - public HighScoreResult findLastRisk(String parentId, boolean needLevel) { | |
233 | - List<AntenatalExaminationModel> list = antenatalExaminationService.findAllByParentId(parentId); | |
233 | + public HighScoreResult findLastRisk(String pid, boolean needLevel) { | |
234 | + AntExQuery antExQuery=new AntExQuery(); | |
235 | + antExQuery.setPid(pid); | |
236 | + antExQuery.setYn(YnEnums.YES.getId()); | |
237 | + List<AntenatalExaminationModel> list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "modified")); | |
234 | 238 | HighScoreResult highScoreResult = new HighScoreResult(); |
235 | 239 | boolean next = true; |
236 | 240 | if (CollectionUtils.isNotEmpty(list)) { |
... | ... | @@ -286,7 +290,7 @@ |
286 | 290 | if (next) { |
287 | 291 | //初诊 |
288 | 292 | AntExChuQuery antExChuQuery = new AntExChuQuery(); |
289 | - antExChuQuery.setParentId(parentId); | |
293 | + antExChuQuery.setPid(pid); | |
290 | 294 | antExChuQuery.setYn(YnEnums.YES.getId()); |
291 | 295 | List<AntExChuModel> list1 = antenatalExaminationService.queryAntExChu(antExChuQuery); |
292 | 296 | if (CollectionUtils.isNotEmpty(list1)) { |
... | ... | @@ -361,7 +365,7 @@ |
361 | 365 | if (CollectionUtils.isNotEmpty(list)) { |
362 | 366 | antexListResult.convertToResult(null, list.get(0), null); |
363 | 367 | for (Patients patients : list) { |
364 | - HighScoreResult highScoreResult = findLastRisk(patients.getId(), false); | |
368 | + HighScoreResult highScoreResult = findLastRisk(patients.getPid(), false); | |
365 | 369 | antexListResult.setRiskFactor(highScoreResult.getHighRisk()); |
366 | 370 | antexListResult.setRiskScore(highScoreResult.getScore() + ""); |
367 | 371 | |
... | ... | @@ -606,7 +610,7 @@ |
606 | 610 | //获取初诊记录 |
607 | 611 | List<AntExChuModel> antExChulist = antenatalExaminationService.queryAntExChu(antExChuQuery); |
608 | 612 | |
609 | - HighScoreResult highScoreResult = findLastRisk(patients.getId(), false); | |
613 | + HighScoreResult highScoreResult = findLastRisk(patients.getPid(), false); | |
610 | 614 | AntExQuery antExQuery = new AntExQuery(); |
611 | 615 | antExQuery.setYn(YnEnums.YES.getId()); |
612 | 616 | antExQuery.setParentId(patients.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
cc0f987
... | ... | @@ -374,7 +374,7 @@ |
374 | 374 | applyOrderResult.setApplyDoctor(users.getName()); |
375 | 375 | } |
376 | 376 | } |
377 | - HighScoreResult highScoreResult= antenatalExaminationFacade.findLastRisk(orderModel.getParentId(), true); | |
377 | + HighScoreResult highScoreResult= antenatalExaminationFacade.findLastRisk(orderModel.getPid(), true); | |
378 | 378 | applyOrderResult.setrRisk(highScoreResult.gethighRiskStr()); |
379 | 379 | applyOrderResult.setScore(highScoreResult.getScore()); |
380 | 380 | applyOrderResult.setrLevel(highScoreResult.getLevelStr()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
cc0f987
... | ... | @@ -414,7 +414,7 @@ |
414 | 414 | antExQuery.setParentId(patients.getId()); |
415 | 415 | antExQuery.setYn(YnEnums.YES.getId()); |
416 | 416 | List<AntenatalExaminationModel> examinationModel = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); |
417 | - HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getId(), false); | |
417 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(), false); | |
418 | 418 | try { |
419 | 419 | String tTireNumber = ""; |
420 | 420 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
cc0f987
... | ... | @@ -246,7 +246,7 @@ |
246 | 246 | patientBaseResult.convert(patients); |
247 | 247 | } |
248 | 248 | try { |
249 | - HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getId(),false); | |
249 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(),false); | |
250 | 250 | patientBaseResult.setRiskFactor(highScoreResult.getHighRisk()); |
251 | 251 | patientBaseResult.setRiskScore(highScoreResult.getScore() + ""); |
252 | 252 | } catch (Exception e) { |
... | ... | @@ -392,7 +392,7 @@ |
392 | 392 | nextCheckTime = DateUtil.getyyyy_MM_dd(list.get(0).getNextCheckTime()); |
393 | 393 | } |
394 | 394 | } |
395 | - HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getId(), true); | |
395 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(), true); | |
396 | 396 | quanPatientsResult.setcTime(nextCheckTime); |
397 | 397 | quanPatientsResult.setrLevel(highScoreResult.getLevelStr()); |
398 | 398 | data.add(quanPatientsResult); |
... | ... | @@ -440,7 +440,7 @@ |
440 | 440 | } |
441 | 441 | antExQuery.setParentId(patients.getId()); |
442 | 442 | antExQuery.setYn(YnEnums.YES.getId()); |
443 | - HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getId(),true); | |
443 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(),true); | |
444 | 444 | //复诊次数 |
445 | 445 | int i = antExService.queryAntenatalExaminationCount(antExQuery.convertToQuery()); |
446 | 446 | antExChuQuery.setParentId(patients.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
View file @
cc0f987
... | ... | @@ -142,7 +142,7 @@ |
142 | 142 | dueDate= list.get(0).getDueDate(); |
143 | 143 | |
144 | 144 | } |
145 | - HighScoreResult highScoreResult = examinationFacade.findLastRisk(patientsList.getId(),false); | |
145 | + HighScoreResult highScoreResult = examinationFacade.findLastRisk(patientsList.getPid(),false); | |
146 | 146 | |
147 | 147 | List<PostReviewListResult.AntData> dataList = new ArrayList<>(); |
148 | 148 | if(CollectionUtils.isNotEmpty(postReviewModels)){ |