Commit 9a00ec7cf43a298eb2c8b10a91d7ae4e1f35a079
1 parent
410daebdfe
Exists in
dev
#fix:优化大同产检、检查统计高危因素逻辑处理
Showing 2 changed files with 21 additions and 3 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java
View file @
9a00ec7
| ... | ... | @@ -52,11 +52,11 @@ |
| 52 | 52 | @Override |
| 53 | 53 | public BaseResponse saveLisData(final List<LisReportModel> lisList, ThreadPoolTaskExecutor commonThreadPool) { |
| 54 | 54 | try { |
| 55 | - System.out.println("saveLis data size = " + lisList.size()); | |
| 55 | + // System.out.println("saveLis data size = " + lisList.size()); | |
| 56 | 56 | if (CollectionUtils.isNotEmpty(lisList)) { |
| 57 | 57 | //线程数 |
| 58 | 58 | int threadCount = lisList.size() % BATCH_SIZE == 0 ? lisList.size() / BATCH_SIZE : lisList.size() / BATCH_SIZE + 1; |
| 59 | - System.out.println("threadCount = " + threadCount); | |
| 59 | + // System.out.println("threadCount = " + threadCount); | |
| 60 | 60 | CountDownLatch countDownLatch = new CountDownLatch(threadCount); |
| 61 | 61 | int end = 0; |
| 62 | 62 | for (int i = 0; i < lisList.size(); i += BATCH_SIZE) { |
| ... | ... | @@ -579,6 +579,11 @@ |
| 579 | 579 | antenatalExaminationModel.setCheckDate(new Date()); |
| 580 | 580 | antenatalExaminationService.updateOneAnt(antenatalExaminationModel, antenatalExaminationModel.getId()); |
| 581 | 581 | } else { |
| 582 | + AntExRecordQuery antExRecordQuery=new AntExRecordQuery(); | |
| 583 | + //antExRecordQuery.setType(1); | |
| 584 | + antExRecordQuery.setParentId(patients.getId()); | |
| 585 | + List<AntExRecordModel> recordModels= antExRecordService.queryAntExRecords(antExRecordQuery); | |
| 586 | + | |
| 582 | 587 | AntExRecordModel antExRecordModel = new AntExRecordModel(); |
| 583 | 588 | antExRecordModel.setType(2); |
| 584 | 589 | antExRecordModel.setHospitalId(patients.getHospitalId()); |
| ... | ... | @@ -613,7 +618,19 @@ |
| 613 | 618 | antExRecordModel.setStatus(antExRecordModel.getDueDate().compareTo(new Date()) > 0 ? 2 : 1); |
| 614 | 619 | antExRecordModel.setDueStatus(antExRecordModel.getStatus()); |
| 615 | 620 | } |
| 616 | - | |
| 621 | + if (CollectionUtils.isNotEmpty(recordModels)){ | |
| 622 | + List hRisk= recordModels.get(0).gethRisk(); | |
| 623 | + if (CollectionUtils.isNotEmpty(hRisk)){ | |
| 624 | + antExRecordModel.sethRisk(hRisk); | |
| 625 | + antExRecordModel.sethLevel(recordModels.get(0).gethLevel()); | |
| 626 | + antExRecordModel.sethScore(recordModels.get(0).gethScore()); | |
| 627 | + }else { | |
| 628 | + AntExRecordModel antExRecordModel1= recordModels.get(recordModels.size()-1); | |
| 629 | + antExRecordModel.sethRisk(antExRecordModel1.gethRisk()); | |
| 630 | + antExRecordModel.sethLevel(antExRecordModel1.gethLevel()); | |
| 631 | + antExRecordModel.sethScore(antExRecordModel1.gethScore()); | |
| 632 | + } | |
| 633 | + } | |
| 617 | 634 | |
| 618 | 635 | antenatalExaminationModel.setYn(1); |
| 619 | 636 | antenatalExaminationModel.setParentId(patients.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntExManagerResult.java
View file @
9a00ec7