diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java index d985d82..521b105 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java @@ -98,7 +98,8 @@ public class PatientWeightController extends BaseController { @RequestParam(value = "beforeWeight", required = false) String beforeWeight, @RequestParam(value = "bregmatic", required = false) String bregmatic, @RequestParam(value = "bregmaticOther", required = false) String bregmaticOther, - @RequestParam(value = "height", required = false) String height, String version) { + @RequestParam(value = "height", required = false) String height, + String version) { return patientWeightService.report(id, getUserId(request), rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther); } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java index e0dcffa..c6f8616 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java @@ -645,16 +645,11 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient if (patientWeight != null && StringUtils.isNotEmpty(beforeWeight) && StringUtils.isNotEmpty(patientWeight.getBeforeHeight())) { isUpdate = true; patientWeightBefore.setBeforeWeight(beforeWeight); - if (StringUtils.isNotEmpty(height)) { - String bmi = getBmi(beforeWeight, height); - patientWeightBefore.setBmi(bmi); - patientWeight.setBmi(bmi); - } else { - String bmi = getBmi(beforeWeight, patientWeight.getBeforeHeight()); - patientWeightBefore.setBmi(bmi); - patientWeight.setBmi(bmi); - } + String bmi = getBmi(beforeWeight, height); + patientWeightBefore.setBmi(bmi); + patientWeight.setBmi(bmi); + patientWeight.setBeforeHeight(height); patientWeight.setBeforeWeight(beforeWeight); } @@ -686,7 +681,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient PatientWeight patientWeight = mongoTemplate.findById(id, PatientWeight.class); - updateWeight(beforeWeight, patientWeight, height, bregmatic, bregmaticOther); + updateWeight(beforeWeight, patientWeight, bregmatic, bregmaticOther, height); if (patientWeight != null) { Map map = new LinkedHashMap<>();