Commit 36e299cfe31c9b1cb5b73bad7ff6e1d24a422882

Authored by liquanyu
1 parent 1f69b69d03

update

Showing 2 changed files with 10 additions and 2 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 36e299c
... ... @@ -6673,7 +6673,7 @@
6673 6673 String cardNo = "";
6674 6674 if (blNo.equals("123456"))
6675 6675 {
6676   - cardNo = "513901199410061121";
  6676 + cardNo = "513436199011104246";
6677 6677 }
6678 6678 System.out.println("query qhd cardno " + cardNo);
6679 6679 if (StringUtils.isEmpty(cardNo))
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/DefectiveChildServiceImpl.java View file @ 36e299c
... ... @@ -68,8 +68,16 @@
68 68 */
69 69 @Override
70 70 public BaseResponse add(DefectiveChildRequest param,Integer userId) {
  71 + String hospitalId = autoMatchFacade.getHospitalId(userId);
  72 + List<DefectiveChildModel> defectiveChildModels = mongoTemplate.find(Query.query(Criteria.where("inHospitalNo").is(param.getInHospitalNo()).
  73 + and("hospitalId").is(hospitalId)), DefectiveChildModel.class);
  74 + if (CollectionUtils.isNotEmpty(defectiveChildModels))
  75 + {
  76 + new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("住院号已经存在");
  77 + }
  78 +
71 79 DefectiveChildModel model = param;
72   - model.setHospitalId(autoMatchFacade.getHospitalId(userId));
  80 + model.setHospitalId(hospitalId);
73 81 mongoTemplate.insert(model);
74 82 return new BaseResponse();
75 83 }