Commit f98d6020711f88c7c88dd9cfb684409dd34f9165

Authored by wtt
1 parent 63b92531c4

update

Showing 1 changed file with 3 additions and 1 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java View file @ f98d602
... ... @@ -132,7 +132,9 @@
132 132 String nowWeight = patientWeight.getNowWeight();
133 133 Patients patients = mongoTemplate.findById(patientWeight.getPatientId(), Patients.class);
134 134 // PatientWeight pw = mongoTemplate.findOne(Query.query(Criteria.where("patientId").is(patientWeight.getPatientId()).and("hospitalId").is(hospitalId)), PatientWeight.class);
135   - PatientWeight pw = mongoTemplate.findOne(Query.query(Criteria.where("patientId").is(patientWeight.getPatientId())), PatientWeight.class);
  135 +// PatientWeight pw = mongoTemplate.findOne(Query.query(Criteria.where("patientId").is(patientWeight.getPatientId())), PatientWeight.class);
  136 + PatientWeight pw = mongoTemplate.findOne(Query.query(Criteria.where("type").is(1)
  137 + .and("pid").is(patients.getPid()).and("yn").is("1")), PatientWeight.class);
136 138 if (pw == null && StringUtils.isEmpty(patientWeight.getBeforeWeight())) {
137 139 patients = mongoTemplate.findOne(Query.query(Criteria.where("source").is(patientWeight.getPatientId()).and("hospitalId").is(hospitalId).and("enable").is("2")), Patients.class);
138 140 if (patients == null) {