Commit b4cae9d005e48133fcfd746220fa7870c82312b3
1 parent
ca4c87a6af
Exists in
master
and in
6 other branches
bbbbbb
Showing 1 changed file with 7 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
b4cae9d
... | ... | @@ -536,6 +536,7 @@ |
536 | 536 | |
537 | 537 | @Override |
538 | 538 | public BaseObjectResponse health(String parentId, Integer userId) { |
539 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
539 | 540 | List<Map<String, Object>> restList = new ArrayList<>(); |
540 | 541 | Patients patients = mongoTemplate.findById(parentId, Patients.class); |
541 | 542 | if(patients == null) { |
... | ... | @@ -672,7 +673,12 @@ |
672 | 673 | } |
673 | 674 | |
674 | 675 | if(tzFlag) { |
675 | - setReport(tzMap, weights, antExChuModels.get(0).getYqWeight(), PatientWeightServiceImpl.getBmi(antExChuModels.get(0).getYqWeight(), antExChuModels.get(0).getHeight())); | |
676 | + for (AntExChuModel antExChuModel : antExChuModels) { | |
677 | + if(hospitalId.equals(antExChuModel.getHospitalId()) && StringUtils.isNotEmpty(antExChuModel.getYqWeight()) && StringUtils.isNotEmpty(antExChuModel.getHeight())) { | |
678 | + setReport(tzMap, weights, antExChuModel.getYqWeight(), PatientWeightServiceImpl.getBmi(antExChuModel.getYqWeight(), antExChuModel.getHeight())); | |
679 | + break; | |
680 | + } | |
681 | + } | |
676 | 682 | // setReport(tzMap, weights, antExChuModels.get(antExChuModels.size() - 1).getYqWeight(), PatientWeightServiceImpl.getBmi(antExChuModels.get(antExChuModels.size() - 1).getYqWeight(), antExChuModels.get(antExChuModels.size() - 1).getHeight())); |
677 | 683 | } |
678 | 684 |