From a8beac35a389a27632af10ebc25aa0cb4427e23f Mon Sep 17 00:00:00 2001 From: linjj <850658129@qq.com> Date: Fri, 18 Oct 2024 15:28:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=81=E5=AD=98=E5=90=8E=E8=A7=A3=E5=B0=81?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=B0=81=E5=AD=98=E5=89=8D=E7=9A=84=E7=97=85?= =?UTF-8?q?=E5=8E=86=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/emr/controller/storageController.java | 20 ++++++++++++++----- .../emr/entity/Archive_Master_Following.java | 10 ++++++++++ .../java/com/emr/entity/Emr_Fault_Detail.java | 10 ++++++++++ .../mapper/Archive_Master_FollowingMapper.xml | 6 ++++++ .../MedicalRecordStorage.jsp | 8 ++++++-- 5 files changed, 47 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/emr/controller/storageController.java b/src/main/java/com/emr/controller/storageController.java index cec9afaa..63c5676b 100644 --- a/src/main/java/com/emr/controller/storageController.java +++ b/src/main/java/com/emr/controller/storageController.java @@ -7,6 +7,7 @@ import com.emr.entity.*; import com.emr.service.*; import com.emr.util.Logger; import com.emr.util.ThreadExcelUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.cxf.endpoint.Client; import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; @@ -151,6 +152,7 @@ public class storageController { archiveMasterFollowing.setHandleName(handleName); archiveMasterFollowing.setSafekeepingName(emrFaultDetail.getSafekeepingName()); archiveMasterFollowing.setRemark(emrFaultDetail.getRecallReason()); + archiveMasterFollowing.setRecallReason(emrFaultDetail.getSealedState()); bol = archiveMasterFollowingService.insertSelective(archiveMasterFollowing); //向电子病历发送封存消息 pushStorageDto.setPATIENT_STATUS(1); @@ -171,6 +173,17 @@ public class storageController { archiveMasterFollowing.setHandleId(username); archiveMasterFollowing.setHandleName(handleName); archiveMasterFollowing.setRemark(emrFaultDetail.getRecallReason()); + //取消封存恢复封存前病历状态 + Archive_Master_Following following = new Archive_Master_Following(); + following.setFollowingType("11"); + following.setMasterId(emrFaultDetail.getArchiveDetailId()); + List list = archiveMasterFollowingService.selLastByType(following); + if (list.size()>0){ + if (StringUtils.isNotBlank(list.get(0).getRecallReason())){ + archiveMaster.setArchivestate(list.get(0).getRecallReason()); + archiveMasterService.updateByClo(archiveMaster); + } + } bol = archiveMasterFollowingService.insertSelective(archiveMasterFollowing); //向电子病历发送取消封存消息 pushStorageDto.setPATIENT_STATUS(0); @@ -227,12 +240,9 @@ public class storageController { ""; String endpoint = MedicalRecordUrl; String method = MedicalRecordSealingName; - logger.log("endpoint:"+endpoint); - logger.log("method:"+method); - logger.log("xmlContent:"+xmlContent); JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); - Client client = dcf.createClient(endpoint); - Object[] res = null; + Client client = dcf.createClient(endpoint); + Object[] res = null; res = client.invoke(method, xmlContent); logger.log("封存返回:"+res); diff --git a/src/main/java/com/emr/entity/Archive_Master_Following.java b/src/main/java/com/emr/entity/Archive_Master_Following.java index 40d043e9..6e1f2901 100644 --- a/src/main/java/com/emr/entity/Archive_Master_Following.java +++ b/src/main/java/com/emr/entity/Archive_Master_Following.java @@ -29,6 +29,16 @@ public class Archive_Master_Following { private String remark; + private String recallReason; + + public String getRecallReason() { + return recallReason; + } + + public void setRecallReason(String recallReason) { + this.recallReason = recallReason; + } + public String getId() { return id; } diff --git a/src/main/java/com/emr/entity/Emr_Fault_Detail.java b/src/main/java/com/emr/entity/Emr_Fault_Detail.java index 94436eb4..2be7d9c3 100644 --- a/src/main/java/com/emr/entity/Emr_Fault_Detail.java +++ b/src/main/java/com/emr/entity/Emr_Fault_Detail.java @@ -23,6 +23,16 @@ public class Emr_Fault_Detail { private String patientId; private String StateFlag; + private String sealedState; + + public String getSealedState() { + return sealedState; + } + + public void setSealedState(String sealedState) { + this.sealedState = sealedState; + } + public String getSafekeepingName() { return safekeepingName; } diff --git a/src/main/resources/mapper/Archive_Master_FollowingMapper.xml b/src/main/resources/mapper/Archive_Master_FollowingMapper.xml index c6666ef3..688e5b39 100644 --- a/src/main/resources/mapper/Archive_Master_FollowingMapper.xml +++ b/src/main/resources/mapper/Archive_Master_FollowingMapper.xml @@ -63,6 +63,9 @@ safekeepingName, + + recallReason, + @@ -92,6 +95,9 @@ #{safekeepingName,jdbcType=NVARCHAR}, + + #{recallReason,jdbcType=NVARCHAR}, + diff --git a/src/main/webapp/WEB-INF/views/medicalRecordStorageDir/MedicalRecordStorage.jsp b/src/main/webapp/WEB-INF/views/medicalRecordStorageDir/MedicalRecordStorage.jsp index ddff6c95..8def99cb 100644 --- a/src/main/webapp/WEB-INF/views/medicalRecordStorageDir/MedicalRecordStorage.jsp +++ b/src/main/webapp/WEB-INF/views/medicalRecordStorageDir/MedicalRecordStorage.jsp @@ -206,6 +206,7 @@ + 确认封存概述: