Commit 8e3f38a84c4ad226cf519986a74288d0b39b973c
1 parent
305e0edc6f
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 5 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ApplyOrderController.java
View file @
8e3f38a
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
8e3f38a
| ... | ... | @@ -30,6 +30,7 @@ |
| 30 | 30 | import org.slf4j.Logger; |
| 31 | 31 | import org.slf4j.LoggerFactory; |
| 32 | 32 | import org.springframework.beans.factory.annotation.Autowired; |
| 33 | +import org.springframework.data.domain.Sort; | |
| 33 | 34 | import org.springframework.data.mongodb.core.MongoTemplate; |
| 34 | 35 | import org.springframework.data.mongodb.core.query.Criteria; |
| 35 | 36 | import org.springframework.data.mongodb.core.query.Query; |
| 36 | 37 | |
| ... | ... | @@ -1624,9 +1625,10 @@ |
| 1624 | 1625 | Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("cardNo").is(cardId)), Patients.class); |
| 1625 | 1626 | if (patients != null) { |
| 1626 | 1627 | String patientsId = patients.getId(); |
| 1627 | - SieveResultModel sieveResultModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(patientsId)), SieveResultModel.class); | |
| 1628 | 1628 | SieveResultModel model = getSieveResultModel(huadaCallbackModel, patientsId); |
| 1629 | - if (sieveResultModel != null) { | |
| 1629 | + List<SieveResultModel> sieveResultModels = mongoTemplate.find(Query.query(Criteria.where("sampleReportId").is(model.getSampleReportId())).with(new Sort(Sort.Direction.DESC, "resultTime")), SieveResultModel.class); | |
| 1630 | + if (CollectionUtils.isNotEmpty(sieveResultModels)) { | |
| 1631 | + SieveResultModel sieveResultModel = sieveResultModels.get(0); | |
| 1630 | 1632 | Update update = new Update(); |
| 1631 | 1633 | Map<String, Object> object = BeanUtils.objectToObjectMap(model); |
| 1632 | 1634 | Set<Map.Entry<String, Object>> entries = object.entrySet(); |