Commit ff9e04666e60a689c1030b963449a776897ef5cc
1 parent
dd02589d14
Exists in
master
and in
6 other branches
区域数据
Showing 1 changed file with 7 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
ff9e046
... | ... | @@ -106,7 +106,7 @@ |
106 | 106 | patientWeight.setOperaterId(userId.toString()); |
107 | 107 | patientWeight.setCreated(new Date()); |
108 | 108 | if(StringUtils.isNotBlank(patientWeight.getNowWeight()) && patientWeight.getBeforeHeight() != null) { |
109 | - patientWeight.setBmi(getBmi(patientWeight.getNowWeight(), patientWeight.getBeforeHeight())); | |
109 | + patientWeight.setBmi(getBmi(patientWeight.getBeforeWeight(), patientWeight.getBeforeHeight())); | |
110 | 110 | } |
111 | 111 | patientWeight.setYn("1"); |
112 | 112 | mongoTemplate.save(patientWeight); |
... | ... | @@ -310,6 +310,12 @@ |
310 | 310 | PatientWeight pw = mongoTemplate.findOne(Query.query(Criteria.where("patientId").is(patientWeight.getPatientId())), PatientWeight.class); |
311 | 311 | Map<String, String> dayWeights = new HashMap<>(); |
312 | 312 | if(pw == null && StringUtils.isEmpty(patientWeight.getBeforeWeight())) { |
313 | + /* patients = mongoTemplate.findOne(Query.query(Criteria.where("source").is(patientWeight.getPatientId()).and("hospitalId").is(hospitalId).and("enable").is("2")), Patients.class); | |
314 | + if(patients == null) { | |
315 | + return RespBuilder.buildErro(ResponseCode.NEED_ADD_PATIENT_WEIGHT); | |
316 | + } | |
317 | + patientWeight.setPatientId(patients.getId()); | |
318 | + pw = mongoTemplate.findOne(Query.query(Criteria.where("patientId").is(patients.getId()).and("hospitalId").is(hospitalId)), PatientWeight.class);*/ | |
313 | 319 | return RespBuilder.buildErro(ResponseCode.NEED_ADD_PATIENT_WEIGHT); |
314 | 320 | } |
315 | 321 | if(pw != null && StringUtils.isNotEmpty(patientWeight.getBeforeWeight())) { |