Commit a1f3c9ff7e679c7b41f6817c8543a6f236c5c0c4
1 parent
c5afa8a89a
Exists in
master
and in
1 other branch
改同步逻辑
Showing 1 changed file with 11 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
a1f3c9f
| ... | ... | @@ -344,8 +344,6 @@ |
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | if(StringUtils.isEmpty(patientWeight.getId()) && patients != null) { |
| 347 | -// patientWeight.setId(UUID.randomUUID().toString().replaceAll("-", "")); | |
| 348 | - | |
| 349 | 347 | patientWeight.setCreated(new Date()); |
| 350 | 348 | patientWeight.setHospitalId(patients.getHospitalId()); |
| 351 | 349 | if(StringUtils.isNotBlank(patientWeight.getBeforeWeight()) && patientWeight.getBeforeHeight() != null) { |
| ... | ... | @@ -358,8 +356,17 @@ |
| 358 | 356 | } else { |
| 359 | 357 | // Update update = MongoConvertHelper.convertToNativeUpdate(ReflectionUtils.getUpdateField(patientWeight)); |
| 360 | 358 | // mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(patientWeight.getId())), update, PatientWeight.class); |
| 361 | - patientWeightService2.update(Query.query(Criteria.where("id").is(patientWeight.getId())), patientWeight); | |
| 362 | - return RespBuilder.buildSuccess(patientWeight.getId()); | |
| 359 | + /* patientWeightService2.update(Query.query(Criteria.where("id").is(patientWeight.getId())), patientWeight); | |
| 360 | + return RespBuilder.buildSuccess(patientWeight.getId());*/ | |
| 361 | + patientWeight.setCreated(new Date()); | |
| 362 | + patientWeight.setHospitalId(patients.getHospitalId()); | |
| 363 | + if(StringUtils.isNotBlank(patientWeight.getBeforeWeight()) && patientWeight.getBeforeHeight() != null) { | |
| 364 | + patientWeight.setBmi(getBmi(patientWeight.getBeforeWeight(), patientWeight.getBeforeHeight())); | |
| 365 | + } | |
| 366 | + patientWeight.setYn("1"); | |
| 367 | + patientWeight.setPid(patients.getPid()); | |
| 368 | + patientWeightService2.add(patientWeight); | |
| 369 | + return RespBuilder.buildSuccess(patientWeight); | |
| 363 | 370 | } |
| 364 | 371 | } |
| 365 | 372 |