From a1fbb42f92dce372ba79ca1848aa68b78e47e995 Mon Sep 17 00:00:00 2001 From: cfl Date: Tue, 31 Oct 2023 14:35:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E8=AF=81=E5=8F=B7=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=E5=A4=84=E7=90=86=EF=BC=8C=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=97=B6=E9=BB=98=E8=AE=A4=E7=9A=84=E5=B0=B1?= =?UTF-8?q?=E8=AF=8A=E5=8D=A1=E5=8F=B7=E8=B5=8B=E5=80=BC=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=AF=81=E5=8F=B7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PatientController.java | 24 ++++++++++++++++++++++ .../service/impl/LymsHisInfoServiceImpl.java | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java index b229cf9..bc5ef4d 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java @@ -87,6 +87,9 @@ public class PatientController { @Autowired private LymsPushVisitRecordService lymsPushVisitRecordService; + @Autowired + private LymsHisInfoService lymsHisInfoService; + /** * 获取患者列表 * @@ -997,6 +1000,27 @@ public class PatientController { boolean f = lymsPatientService.save(patient); baseResponse.setErrorcode(f?0:1); baseResponse.setErrormsg(f?"注册成功!":"注册失败!"); + try{ + QueryWrapper query=new QueryWrapper(); + query.eq("name",patient.getPname()); + query.eq("phone",patient.getEnrolmentPhone()); + query.isNull("idCard"); + List list = lymsHisInfoService.list(query); + if(CollectionUtils.isNotEmpty(list)){ + for(LymsHisInfo hisInfo: list){ + LymsHisInfo info = new LymsHisInfo(); + info.setId(hisInfo.getId()); + info.setIdcard(patient.getIdno()); + lymsHisInfoService.updateById(info); + log.info("根据姓名和手机号更新his患者身份证号信息成功,{}",hisInfo); + } + } + + }catch (Exception e){ + log.error("更新his患者身份证号信息失败"); + } + + }else { baseResponse.setErrorcode(2); baseResponse.setErrormsg("身份证已注册!"); diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsHisInfoServiceImpl.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsHisInfoServiceImpl.java index 740825d..3aeea89 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsHisInfoServiceImpl.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsHisInfoServiceImpl.java @@ -195,7 +195,8 @@ public class LymsHisInfoServiceImpl extends ServiceImpl