Commit f81eae2ed60529525bc6e5bf6772d0ad8befca4d
1 parent
b05f498abb
Exists in
master
and in
6 other branches
a
Showing 1 changed file with 5 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TempFacade.java
View file @
f81eae2
| ... | ... | @@ -237,6 +237,10 @@ |
| 237 | 237 | LinkedHashMap data = temp == null ? new LinkedHashMap<String, Double>() : temp.getTempList(); |
| 238 | 238 | data.put(DateUtil.getYyyyMmDd(new Date()), Double.valueOf(tempModel.getNow())); |
| 239 | 239 | tempModel.setTempList(data); |
| 240 | + Patients patients = mongoTemplate.findById(tempModel.getParentId(), Patients.class); | |
| 241 | + if (patients != null) { | |
| 242 | + tempModel.setPid(patients.getPid()); | |
| 243 | + } | |
| 240 | 244 | if (temp != null) { |
| 241 | 245 | temp.setNow(tempModel.getNow()); |
| 242 | 246 | temp.setTempList(data); |
| ... | ... | @@ -246,10 +250,7 @@ |
| 246 | 250 | tempModel.setYn(YnEnums.YES.getId()); |
| 247 | 251 | tempModel.setCreated(date); |
| 248 | 252 | tempModel.setCreatedTime(DateUtil.getyyyy_MM_dd(date)); |
| 249 | - Patients patients = mongoTemplate.findById(tempModel.getParentId(), Patients.class); | |
| 250 | - if (patients != null) { | |
| 251 | - tempModel.setPid(patients.getPid()); | |
| 252 | - } | |
| 253 | + | |
| 253 | 254 | tempModel.setCreated(new Date()); |
| 254 | 255 | tempModel.setModified(new Date()); |
| 255 | 256 | mongoTemplate.save(tempModel); |