Commit a1fbb42f92dce372ba79ca1848aa68b78e47e995

Authored by cfl
1 parent 83eb40bee2
Exists in dev

身份证号为空时处理,去掉上传时默认的就诊卡号赋值身份证号功能

Showing 2 changed files with 26 additions and 1 deletions

talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java View file @ a1fbb42
... ... @@ -87,6 +87,9 @@
87 87 @Autowired
88 88 private LymsPushVisitRecordService lymsPushVisitRecordService;
89 89  
  90 + @Autowired
  91 + private LymsHisInfoService lymsHisInfoService;
  92 +
90 93 /**
91 94 * 获取患者列表
92 95 *
... ... @@ -997,6 +1000,27 @@
997 1000 boolean f = lymsPatientService.save(patient);
998 1001 baseResponse.setErrorcode(f?0:1);
999 1002 baseResponse.setErrormsg(f?"注册成功!":"注册失败!");
  1003 + try{
  1004 + QueryWrapper<LymsHisInfo> query=new QueryWrapper();
  1005 + query.eq("name",patient.getPname());
  1006 + query.eq("phone",patient.getEnrolmentPhone());
  1007 + query.isNull("idCard");
  1008 + List<LymsHisInfo> list = lymsHisInfoService.list(query);
  1009 + if(CollectionUtils.isNotEmpty(list)){
  1010 + for(LymsHisInfo hisInfo: list){
  1011 + LymsHisInfo info = new LymsHisInfo();
  1012 + info.setId(hisInfo.getId());
  1013 + info.setIdcard(patient.getIdno());
  1014 + lymsHisInfoService.updateById(info);
  1015 + log.info("根据姓名和手机号更新his患者身份证号信息成功,{}",hisInfo);
  1016 + }
  1017 + }
  1018 +
  1019 + }catch (Exception e){
  1020 + log.error("更新his患者身份证号信息失败");
  1021 + }
  1022 +
  1023 +
1000 1024 }else {
1001 1025 baseResponse.setErrorcode(2);
1002 1026 baseResponse.setErrormsg("身份证已注册!");
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsHisInfoServiceImpl.java View file @ a1fbb42
... ... @@ -195,7 +195,8 @@
195 195 //患者(身份证)
196 196 String idCard = lymsHisInfo.getIdcard();
197 197 if (StringUtil.isEmpty(idCard)) {
198   - idCard=lymsHisInfo.getVccardno();
  198 + return "患者身份证号不存在,请等待患者注册补全身份证信息后再上传。";
  199 + //idCard=lymsHisInfo.getVccardno();
199 200 }
200 201 //判断患者是否存在
201 202 LymsPatient patientQuery = new LymsPatient();