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 @@ + 确认封存概述: