Commit 0e15a04ed4354aab738256d23573305bea97e0b5
1 parent
e36fd20932
Exists in
master
and in
6 other branches
体重报告身高字段添加
Showing 2 changed files with 7 additions and 11 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java
View file @
0e15a04
... | ... | @@ -98,7 +98,8 @@ |
98 | 98 | @RequestParam(value = "beforeWeight", required = false) String beforeWeight, |
99 | 99 | @RequestParam(value = "bregmatic", required = false) String bregmatic, |
100 | 100 | @RequestParam(value = "bregmaticOther", required = false) String bregmaticOther, |
101 | - @RequestParam(value = "height", required = false) String height, String version) { | |
101 | + @RequestParam(value = "height", required = false) String height, | |
102 | + String version) { | |
102 | 103 | return patientWeightService.report(id, getUserId(request), rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther); |
103 | 104 | } |
104 | 105 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
0e15a04
... | ... | @@ -645,16 +645,11 @@ |
645 | 645 | if (patientWeight != null && StringUtils.isNotEmpty(beforeWeight) && StringUtils.isNotEmpty(patientWeight.getBeforeHeight())) { |
646 | 646 | isUpdate = true; |
647 | 647 | patientWeightBefore.setBeforeWeight(beforeWeight); |
648 | - if (StringUtils.isNotEmpty(height)) { | |
649 | - String bmi = getBmi(beforeWeight, height); | |
650 | - patientWeightBefore.setBmi(bmi); | |
651 | - patientWeight.setBmi(bmi); | |
652 | - } else { | |
653 | - String bmi = getBmi(beforeWeight, patientWeight.getBeforeHeight()); | |
654 | - patientWeightBefore.setBmi(bmi); | |
655 | - patientWeight.setBmi(bmi); | |
656 | - } | |
657 | 648 | |
649 | + String bmi = getBmi(beforeWeight, height); | |
650 | + patientWeightBefore.setBmi(bmi); | |
651 | + patientWeight.setBmi(bmi); | |
652 | + patientWeight.setBeforeHeight(height); | |
658 | 653 | patientWeight.setBeforeWeight(beforeWeight); |
659 | 654 | |
660 | 655 | } |
... | ... | @@ -686,7 +681,7 @@ |
686 | 681 | |
687 | 682 | PatientWeight patientWeight = mongoTemplate.findById(id, PatientWeight.class); |
688 | 683 | |
689 | - updateWeight(beforeWeight, patientWeight, height, bregmatic, bregmaticOther); | |
684 | + updateWeight(beforeWeight, patientWeight, bregmatic, bregmaticOther, height); | |
690 | 685 | |
691 | 686 | if (patientWeight != null) { |
692 | 687 | Map<String, Object> map = new LinkedHashMap<>(); |