Commit 81069fe4a3288c1e26de715d1157fdcbc92599f2
1 parent
5a9b3274e1
Exists in
master
and in
1 other branch
宫高
Showing 2 changed files with 56 additions and 24 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntenatalExaminationService.java
View file @
81069fe
... | ... | @@ -324,6 +324,10 @@ |
324 | 324 | return iAntExChuDao.query(antExChuQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); |
325 | 325 | } |
326 | 326 | |
327 | + public List<AntExChuModel> queryAntExChu(AntExChuQuery antExChuQuery,Sort.Direction direction,String field) { | |
328 | + return iAntExChuDao.query(antExChuQuery.convertToQuery().addOrder(Sort.Direction.DESC, field)); | |
329 | + } | |
330 | + | |
327 | 331 | public List<AntExChuModel> queryAntExChu(MongoQuery mongoQuery) { |
328 | 332 | return iAntExChuDao.query(mongoQuery); |
329 | 333 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
81069fe
... | ... | @@ -123,6 +123,9 @@ |
123 | 123 | @Autowired |
124 | 124 | private DiagnoseConfigService diagnoseConfigService; |
125 | 125 | |
126 | + @Autowired | |
127 | + private PersonService personService; | |
128 | + | |
126 | 129 | /** |
127 | 130 | * 处理区域隐藏建档 |
128 | 131 | * |
129 | 132 | |
130 | 133 | |
131 | 134 | |
132 | 135 | |
133 | 136 | |
134 | 137 | |
135 | 138 | |
... | ... | @@ -2565,45 +2568,70 @@ |
2565 | 2568 | List<String> values = new ArrayList<>(); |
2566 | 2569 | |
2567 | 2570 | |
2571 | + Patients patients = patientsService.findOnePatientById(patientId); | |
2572 | + | |
2573 | + List<String> patientIds = new ArrayList<>(); | |
2574 | + | |
2575 | + if (patients != null) | |
2576 | + { | |
2577 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
2578 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
2579 | + patientsQuery.setPid(patients.getPid()); | |
2580 | + List<Patients> patientses = patientsService.queryPatient(patientsQuery); | |
2581 | + if (CollectionUtils.isNotEmpty(patientses)) | |
2582 | + { | |
2583 | + for (Patients pat : patientses) | |
2584 | + { | |
2585 | + patientIds.add(pat.getId()); | |
2586 | + } | |
2587 | + } | |
2588 | + } | |
2589 | + else | |
2590 | + { | |
2591 | + patientIds.add(patientId); | |
2592 | + } | |
2593 | + | |
2568 | 2594 | List<Map<String,String>> tables = new LinkedList<>(); |
2569 | 2595 | |
2570 | 2596 | AntExChuQuery antExChuQuery = new AntExChuQuery(); |
2571 | 2597 | antExChuQuery.setYn(YnEnums.YES.getId()); |
2572 | - antExChuQuery.setParentId(patientId); | |
2573 | - List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
2598 | + antExChuQuery.setParentIds(patientIds); | |
2599 | + List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery,Sort.Direction.ASC, "created"); | |
2574 | 2600 | if (CollectionUtils.isNotEmpty(antExChuModels)) |
2575 | 2601 | { |
2576 | - AntExChuModel chumodel = antExChuModels.get(0); | |
2577 | - if (StringUtils.isNotEmpty(chumodel.getGonggao()) || StringUtils.isNotEmpty(chumodel.getGonggaoSelect())) | |
2602 | + for (AntExChuModel chumodel : antExChuModels) | |
2578 | 2603 | { |
2579 | - Map<String,String> item = new HashMap<>(); | |
2580 | - String value = ""; | |
2581 | - if (StringUtils.isNotEmpty(chumodel.getGonggaoSelect()) ) | |
2604 | + if (StringUtils.isNotEmpty(chumodel.getGonggao()) || StringUtils.isNotEmpty(chumodel.getGonggaoSelect())) | |
2582 | 2605 | { |
2583 | - if (StringUtils.isNotEmpty(chumodel.getGonggaoType())) { | |
2584 | - value = GongJingEnums.getGongGaoNameById(chumodel.getGonggaoSelect()) + "," + GongJingEnums.getHengZhiNameById(chumodel.getGonggaoType()); | |
2585 | - } else { | |
2586 | - value = GongJingEnums.getGongGaoNameById(chumodel.getGonggaoSelect()); | |
2606 | + Map<String,String> item = new HashMap<>(); | |
2607 | + String value = ""; | |
2608 | + if (StringUtils.isNotEmpty(chumodel.getGonggaoSelect()) ) | |
2609 | + { | |
2610 | + if (StringUtils.isNotEmpty(chumodel.getGonggaoType())) { | |
2611 | + value = GongJingEnums.getGongGaoNameById(chumodel.getGonggaoSelect()) + "," + GongJingEnums.getHengZhiNameById(chumodel.getGonggaoType()); | |
2612 | + } else { | |
2613 | + value = GongJingEnums.getGongGaoNameById(chumodel.getGonggaoSelect()); | |
2614 | + } | |
2587 | 2615 | } |
2616 | + else if (StringUtils.isNotEmpty(chumodel.getGonggao())) | |
2617 | + { | |
2618 | + value = chumodel.getGonggao(); | |
2619 | + } | |
2620 | + item.put("value", value); | |
2621 | + item.put("time", DateUtil.getyyyy_MM_dd(chumodel.getCheckTime())); | |
2622 | + if (StringUtils.isNotEmpty(chumodel.getGonggao()) && (StringUtils.isNumeric(chumodel.getGonggao()) || Pattern.compile("^[-\\+]?[.\\d]*$").matcher(chumodel.getGonggao()).matches())) | |
2623 | + { | |
2624 | + titles.add(DateUtil.getyyyy_MM_dd(chumodel.getCheckTime())); | |
2625 | + values.add(chumodel.getGonggao()); | |
2626 | + } | |
2627 | + tables.add(item); | |
2588 | 2628 | } |
2589 | - else if (StringUtils.isNotEmpty(chumodel.getGonggao())) | |
2590 | - { | |
2591 | - value = chumodel.getGonggao(); | |
2592 | - } | |
2593 | - item.put("value", value); | |
2594 | - item.put("time", DateUtil.getyyyy_MM_dd(chumodel.getCheckTime())); | |
2595 | - if (StringUtils.isNotEmpty(chumodel.getGonggao()) && (StringUtils.isNumeric(chumodel.getGonggao()) || Pattern.compile("^[-\\+]?[.\\d]*$").matcher(chumodel.getGonggao()).matches())) | |
2596 | - { | |
2597 | - titles.add(DateUtil.getyyyy_MM_dd(chumodel.getCheckTime())); | |
2598 | - values.add(chumodel.getGonggao()); | |
2599 | - } | |
2600 | - tables.add(item); | |
2601 | 2629 | } |
2602 | 2630 | } |
2603 | 2631 | |
2604 | 2632 | |
2605 | 2633 | AntExQuery antExQuery = new AntExQuery(); |
2606 | - antExQuery.setParentId(patientId); | |
2634 | + antExQuery.setParentIds(patientIds); | |
2607 | 2635 | antExQuery.setYn(YnEnums.YES.getId()); |
2608 | 2636 | List<AntenatalExaminationModel> examinationModelList = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.ASC, "created")); |
2609 | 2637 | if (CollectionUtils.isNotEmpty(examinationModelList)) |