Commit 33030cf6a5e1e0712e679efebe80b2d15b436351

Authored by liquanyu
1 parent d7eff4120b

update code

Showing 2 changed files with 30 additions and 32 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 33030cf
... ... @@ -5633,44 +5633,42 @@
5633 5633 {
5634 5634 riskList.addAll(li);
5635 5635 }
5636   -
5637 5636 excAddRequest.setHighrisk(riskList);
5638 5637 excAddRequest.setParentId(autoRisk.getPatientId());
5639 5638 addOneAnetExChu(excAddRequest, userId);
5640 5639 }
5641   - else if (autoRisk.getType() == 2)
  5640 + }
  5641 + else if (autoRisk.getType() == 2)
  5642 + {
  5643 + AntExQuery antExQuery = new AntExQuery();
  5644 + antExQuery.setId(autoRisk.getFid());
  5645 + antExQuery.setYn(YnEnums.YES.getId());
  5646 + List<AntenatalExaminationModel> examinationModelList = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.ASC, "created"));
  5647 + if (CollectionUtils.isNotEmpty(examinationModelList))
5642 5648 {
5643   -
5644   - AntExQuery antExQuery = new AntExQuery();
5645   - antExQuery.setId(autoRisk.getFid());
5646   - antExQuery.setYn(YnEnums.YES.getId());
5647   - List<AntenatalExaminationModel> examinationModelList = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.ASC, "created"));
5648   - if (CollectionUtils.isNotEmpty(examinationModelList))
  5649 + AntenatalExaminationModel model = examinationModelList.get(0);
  5650 + AntExAddRequest excAddRequest = new AntExAddRequest();
  5651 + excAddRequest.setId(model.getId());
  5652 + List li = null;
  5653 + try {
  5654 + li = JsonUtil.toList(model.getRiskFactor(), List.class);
  5655 + } catch (Exception e) {
  5656 + }
  5657 + List<String> riskList = autoRisk.gethRisk();
  5658 + if (CollectionUtils.isNotEmpty(li))
5649 5659 {
5650   - AntenatalExaminationModel model = examinationModelList.get(0);
5651   - AntExAddRequest excAddRequest = new AntExAddRequest();
5652   - excAddRequest.setId(model.getId());
5653   - List li = null;
5654   - try {
5655   - li = JsonUtil.toList(model.getRiskFactor(), List.class);
5656   - } catch (Exception e) {
5657   - }
5658   - List<String> riskList = autoRisk.gethRisk();
5659   - if (CollectionUtils.isNotEmpty(li))
5660   - {
5661   - riskList.addAll(li);
5662   - }
5663   - excAddRequest.setRiskFactor(riskList);
5664   - excAddRequest.setParentId(autoRisk.getPatientId());
5665   - addOneAntEx(excAddRequest,userId);
  5660 + riskList.addAll(li);
5666 5661 }
  5662 + excAddRequest.setRiskFactor(riskList);
  5663 + excAddRequest.setParentId(autoRisk.getPatientId());
  5664 + addOneAntEx(excAddRequest,userId);
5667 5665 }
5668   - Query updateQuery = Query.query(Criteria.where("_id").is(autoRisk.getId()));
5669   - autoRisk.setStatus(1); //设置为已确诊
5670   - Update update = MongoConvertHelper
5671   - .convertToNativeUpdate(ReflectionUtils.getUpdateField(autoRisk));
5672   - mongoTemplate.updateFirst(updateQuery, update, AutoRiskRecord.class);
5673 5666 }
  5667 + Query updateQuery = Query.query(Criteria.where("_id").is(autoRisk.getId()));
  5668 + autoRisk.setStatus(1); //设置为已确诊
  5669 + Update update = MongoConvertHelper
  5670 + .convertToNativeUpdate(ReflectionUtils.getUpdateField(autoRisk));
  5671 + mongoTemplate.updateFirst(updateQuery, update, AutoRiskRecord.class);
5674 5672 }
5675 5673 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
5676 5674 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExManagerQueryRequest.java View file @ 33030cf
... ... @@ -90,13 +90,13 @@
90 90 private String autoTime;
91 91  
92 92 // 0 未诊断 1已诊断
93   - private String status;
  93 + private Integer status;
94 94  
95   - public String getStatus() {
  95 + public Integer getStatus() {
96 96 return status;
97 97 }
98 98  
99   - public void setStatus(String status) {
  99 + public void setStatus(Integer status) {
100 100 this.status = status;
101 101 }
102 102