From 4e1247553646a5d3ee8f603c3c988ddb9f246697 Mon Sep 17 00:00:00 2001 From: zengwh <81383286@qq.com> Date: Tue, 29 Dec 2020 18:02:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B6=E4=BB=96=E6=96=87=E6=A1=A3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/emr/controller/FontController.java | 32 +++++++++++----- .../com/emr/dao/ArchiveOtherExtMapper.java | 2 + .../service/ipml/ArchiveOtherExtService.java | 11 ++++++ .../mapper/ArchiveOtherExtMapper.xml | 17 ++++++++- .../WEB-INF/views/font/showRecordByOpId.jsp | 8 ++-- .../WEB-INF/views/font/showRecordIframe.jsp | 8 ++-- .../static/js/showRecord/showRecordIframe.js | 38 ++++++++++++++++++- 7 files changed, 96 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/emr/controller/FontController.java b/src/main/java/com/emr/controller/FontController.java index 18f5679..bde6d96 100644 --- a/src/main/java/com/emr/controller/FontController.java +++ b/src/main/java/com/emr/controller/FontController.java @@ -6,17 +6,13 @@ import com.emr.dao.Emr_DictionaryMapper; import com.emr.entity.*; import com.emr.service.Archive_DetailService; import com.emr.service.Archive_MasterService; -import com.emr.service.ipml.ArchiveFlowInfoService; -import com.emr.service.ipml.ArchiveOtherService; -import com.emr.service.ipml.TPrintinfoService; -import com.emr.service.ipml.ZdAssortService; +import com.emr.service.ipml.*; import com.emr.util.DateUtil; import com.emr.util.ExceptionPrintUtil; import com.emr.util.Msg; import com.emr.vo.ArchiveFlowInfoVo; import com.emr.vo.ArchiveOtherExtVo; import net.sf.json.JSONObject; -import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; @@ -65,7 +61,7 @@ public class FontController { @Autowired private ArchiveFlowInfoService archiveFlowInfoService; @Autowired - private ArchiveOtherExtMapper archiveOtherExtMapper; + private ArchiveOtherExtService archiveOtherExtService; @RequestMapping("selectIsPrintByPatienId") @ResponseBody @@ -142,7 +138,7 @@ public class FontController { return retrunErrorPage(model,checkUserName); } //判断门诊号是否存在 - list = archiveOtherExtMapper.selectListBySysFlagAndJzh(-100,opID,null,null,null); + list = archiveOtherExtService.selectListBySysFlagAndJzh(-100,opID,null,null,null); if(null == list || list.isEmpty()){ return retrunErrorPage(model,"门诊号不存在!"); } @@ -280,7 +276,7 @@ public class FontController { @RequestMapping(value = "/getRecordByFilePath") public String getRecordByFilePath(String filePath,String jzh){ try { - List list = archiveOtherExtMapper.selectListBySysFlagAndJzh(-100,jzh,null,null,filePath); + List list = archiveOtherExtService.selectListBySysFlagAndJzh(-100,jzh,null,null,filePath); if(!CollectionUtils.isEmpty(list)){ return JSON.toJSONString(list.get(0)); }else{ @@ -444,7 +440,7 @@ public class FontController { List list = new ArrayList<>(); //assortIds等于协商的全查的分类id,全查 try { - list = archiveOtherExtMapper.selectListBySysFlagAndJzh(-100,jzh,startDateTo,endDateTo,null); + list = archiveOtherExtService.selectListBySysFlagAndJzh(-100,jzh,startDateTo,endDateTo,null); List dateList = new ArrayList<>(); if(!CollectionUtils.isEmpty(list)) { //开始时间为空时,取集合最后一个时间 @@ -671,5 +667,21 @@ public class FontController { return Msg.success().add("list",list); } - + /** + * 其他档案接口删除功能,将statusFlag 赋值-1 + * @return + * @throws Exception + */ + @RequestMapping(value="updateOtherDomForStatusFlag",method = RequestMethod.POST) + @ResponseBody + public Msg updateOtherDomForStatusFlag(String jzh,String detailIds) throws Exception{ + if(StringUtils.isBlank(jzh)){ + return Msg.fail("门诊号不能为空"); + } + if(StringUtils.isBlank(detailIds)){ + return Msg.fail("文档对象不能为空"); + } + archiveOtherExtService.updateOtherDomForStatusFlag(jzh,detailIds); + return Msg.success(); + } } diff --git a/src/main/java/com/emr/dao/ArchiveOtherExtMapper.java b/src/main/java/com/emr/dao/ArchiveOtherExtMapper.java index c8303f2..9f3e655 100644 --- a/src/main/java/com/emr/dao/ArchiveOtherExtMapper.java +++ b/src/main/java/com/emr/dao/ArchiveOtherExtMapper.java @@ -65,4 +65,6 @@ public interface ArchiveOtherExtMapper { @Param("startDateTo")String startDateTo, @Param("endDateTo")String endDateTo, @Param("filePath")String filePath); + + void updateOtherDomForStatusFlag( @Param("jzh")String jzh, @Param("filePath")String filePath,@Param("sysFlag")Integer sysFlag); } \ No newline at end of file diff --git a/src/main/java/com/emr/service/ipml/ArchiveOtherExtService.java b/src/main/java/com/emr/service/ipml/ArchiveOtherExtService.java index ec3ce26..4c65176 100644 --- a/src/main/java/com/emr/service/ipml/ArchiveOtherExtService.java +++ b/src/main/java/com/emr/service/ipml/ArchiveOtherExtService.java @@ -11,6 +11,7 @@ import com.emr.vo.ArchiveOtherExtVo; import com.emr.vo.KeyValue; import net.sf.json.JSONArray; import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.annotations.Param; import org.apache.shiro.util.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -366,4 +367,14 @@ public class ArchiveOtherExtService { public List selectNotCompleteMidList(){ return archiveOtherExtMapper.selectNotCompleteMidList(); } + + public List selectListBySysFlagAndJzh(Integer sysFlag,String jzh, + String startDateTo,String endDateTo, + String filePath) { + return archiveOtherExtMapper.selectListBySysFlagAndJzh(sysFlag,jzh,startDateTo,endDateTo,filePath); + } + + public void updateOtherDomForStatusFlag(String jzh, String detailIds) { + archiveOtherExtMapper.updateOtherDomForStatusFlag(jzh,detailIds,-100); + } } diff --git a/src/main/resources/mapper/ArchiveOtherExtMapper.xml b/src/main/resources/mapper/ArchiveOtherExtMapper.xml index 40b39bb..55242d9 100644 --- a/src/main/resources/mapper/ArchiveOtherExtMapper.xml +++ b/src/main/resources/mapper/ArchiveOtherExtMapper.xml @@ -642,6 +642,7 @@ C1 from archive_other_ext + statusFlag != -1 and sysFlag = #{sysFlag} @@ -663,10 +664,24 @@ and sysUpdateTime <= #{endDateTo,jdbcType=NCHAR}+ ' 23:59:59' - ORDER BY sysUpdateTime desc + + + update archive_other_ext set statusFlag = -1 + + + and sysFlag = #{sysFlag} + + + and zyh = #{jzh} + + + and SycObj in (${filePath}) + + + diff --git a/src/main/webapp/WEB-INF/views/font/showRecordByOpId.jsp b/src/main/webapp/WEB-INF/views/font/showRecordByOpId.jsp index 3f2df6d..9520687 100644 --- a/src/main/webapp/WEB-INF/views/font/showRecordByOpId.jsp +++ b/src/main/webapp/WEB-INF/views/font/showRecordByOpId.jsp @@ -111,9 +111,9 @@
- +
- +
@@ -135,9 +135,9 @@
- +
- +
diff --git a/src/main/webapp/WEB-INF/views/font/showRecordIframe.jsp b/src/main/webapp/WEB-INF/views/font/showRecordIframe.jsp index d06b31a..1ea3b40 100644 --- a/src/main/webapp/WEB-INF/views/font/showRecordIframe.jsp +++ b/src/main/webapp/WEB-INF/views/font/showRecordIframe.jsp @@ -3,6 +3,7 @@ <%@ include file="/WEB-INF/jspf/comm.jspf" %> <%@ include file="/WEB-INF/jspf/ztreeCommom.jsp" %> +<%@ include file="/WEB-INF/jspf/confirmJsp.jspf" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> @@ -68,12 +69,13 @@
-
- -
+
+ + +
diff --git a/src/main/webapp/static/js/showRecord/showRecordIframe.js b/src/main/webapp/static/js/showRecord/showRecordIframe.js index f666e9a..eace2fe 100644 --- a/src/main/webapp/static/js/showRecord/showRecordIframe.js +++ b/src/main/webapp/static/js/showRecord/showRecordIframe.js @@ -61,17 +61,19 @@ var menu = { $("#detailIds").val(detailIds); } }) + //加载pdf + onloadPdf(); } }; //加载树 $().ready(function(data){ menu.loadMenuTree(); - //加载pdf - onloadPdf(); //判断是否是护理按需采集,是显示刷新按钮 var typeFlag = parent.$("#typeFlag").val(); if(typeFlag == 1){ $("#freshBtnDiv").show(); + }else if(typeFlag == 2){ + $("#delBtnDiv").show(); } }); @@ -230,3 +232,35 @@ function flashPdf(){ } }) } + +//其他档案接口删除按钮功能 +$("#delBtnDiv").click(function () { + var detailIds = $("#detailIds").val(); + if(detailIds == ''){ + toastr.warning("请至少选中一个文档"); + return false; + } + Common.confirm({ + title: "提示", + message: "确认将左侧树选中的文档删除?", + operate: function (reselt) { + if (reselt) { + var jzh = parent.$("#jzh").val(); + var detailIds = $("#detailIds").val(); + $.ajax({ + type: 'post', + url: path + '/font/updateOtherDomForStatusFlag', + data: {jzh: jzh, detailIds:detailIds}, + dataType: 'json', + success: function (data) { + if (data.code == 0) { + toastr.success("删除成功!"); + } + //重新加载 + menu.loadMenuTree(); + } + }) + } + } + }) +})