From 9c0b5f8a467e641e45053ec7dfbbddad9265f281 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=87=E5=AE=99=E7=9A=AE=E7=9A=AE=E5=A8=83?=
<2964346877@qq.com>
Date: Thu, 20 Jun 2024 09:19:07 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=A2=9E=E5=8A=A0=E7=A6=BB?=
=?UTF-8?q?=E9=99=A2=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../collection/service/impl/TBasicServiceImpl.java | 9 ++++++++-
src/main/resources/mapper/TBasicMapper.xml | 7 +++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/docus/server/collection/service/impl/TBasicServiceImpl.java b/src/main/java/com/docus/server/collection/service/impl/TBasicServiceImpl.java
index 6b95cdd..d6f1d81 100644
--- a/src/main/java/com/docus/server/collection/service/impl/TBasicServiceImpl.java
+++ b/src/main/java/com/docus/server/collection/service/impl/TBasicServiceImpl.java
@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.docus.core.util.DateUtil;
import com.docus.core.util.Func;
import com.docus.infrastructure.core.exception.BaseException;
+import com.docus.infrastructure.core.utils.SpringUtil;
import com.docus.infrastructure.redis.service.IdService;
import com.docus.server.collection.dto.BedDoctorDto;
import com.docus.server.collection.dto.TBasicDto;
@@ -200,7 +201,11 @@ public class TBasicServiceImpl implements ITBasicService {
if ("死亡".equals(isDeadStr)) {
isDead = 1;
}
-
+ String leaveMethodStr = tBasicDto.getLeaveMethod();
+ Integer leaveMethod = null;
+ if (ObjectUtil.isNotEmpty(leaveMethodStr)&&NumberUtil.isInteger(leaveMethodStr)) {
+ leaveMethod=Integer.parseInt(leaveMethodStr);
+ }
//组装数据
TBasic tBasic = new TBasic();
@@ -240,6 +245,7 @@ public class TBasicServiceImpl implements ITBasicService {
tBasicExtend.setWardCode(tBasicDto.getWardCode());
tBasicExtend.setWardName(tBasicDto.getWardName());
tBasicExtend.setSdryIndex(sdryIndex == null ? null : sdryIndex.replace("z", "").replace("m", ""));
+ tBasicExtend.setLeaveMethod(leaveMethod);
//持久化
tBasicMapper.update(tBasic);
@@ -247,6 +253,7 @@ public class TBasicServiceImpl implements ITBasicService {
confirmAndUpdIcuRecordState(tBasic.getInpatientNo(), tBasic.getAdmissTimes());
}
+
@Override
public void cancelHospital(TBasicDto tBasicDto) throws Exception {
//判断jzh是否存在
diff --git a/src/main/resources/mapper/TBasicMapper.xml b/src/main/resources/mapper/TBasicMapper.xml
index 78d6c30..2ff81b9 100644
--- a/src/main/resources/mapper/TBasicMapper.xml
+++ b/src/main/resources/mapper/TBasicMapper.xml
@@ -183,12 +183,15 @@
INSERT INTO `docus_medicalrecord`.`t_basic_extend`
- (`patient_id`,`ward_code`,`ward_name`,`sdry_index`)
+ (`patient_id`,`ward_code`,`ward_name`,`sdry_index`,leave_method)
VALUES
- (#{tBasicExtend.patientId},#{tBasicExtend.wardCode},#{tBasicExtend.wardName},#{tBasicExtend.sdryIndex})
+ (#{tBasicExtend.patientId},#{tBasicExtend.wardCode},#{tBasicExtend.wardName},#{tBasicExtend.sdryIndex},#{tBasicExtend.leaveMethod})
on DUPLICATE KEY UPDATE
`ward_code`=#{tBasicExtend.wardCode},
`ward_name`=#{tBasicExtend.wardName},
+
+ leave_method=#{tBasicExtend.leaveMethod},
+
`sdry_index`=#{tBasicExtend.sdryIndex}