Commit bd78952f22c7823b1afb7e7330505ef6cce846e3
1 parent
73c7aa8fa0
Exists in
master
and in
6 other branches
体重
Showing 1 changed file with 3 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
bd78952
... | ... | @@ -154,10 +154,9 @@ |
154 | 154 | pw = mongoTemplate.findOne(Query.query(Criteria.where("patientId").is(patients.getId()).and("hospitalId").is(hospitalId)), PatientWeight.class); |
155 | 155 | } |
156 | 156 | if (patients != null) {// 隐藏建档 |
157 | - if (patients.getSource() != null) | |
158 | - { | |
159 | - patients = mongoTemplate.findOne(Query.query(Criteria.where("source").is(patients.getId()).and("hospitalId").is(hospitalId).and("enable").is("2")), Patients.class); | |
160 | - } | |
157 | + patients = mongoTemplate.findOne(Query.query(Criteria.where("source").is( | |
158 | + patients.getSource() != null ? patients.getSource() : patients.getId() | |
159 | + ).and("hospitalId").is(hospitalId).and("enable").is("2")), Patients.class); | |
161 | 160 | if (!hospitalId.equals(patients.getHospitalId())) |
162 | 161 | { |
163 | 162 | patients.setId(null); |