其他文档接口页面增加删除功能

master
zengwh 5 years ago
parent ca8280e813
commit 4e12475536

@ -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<ArchiveOtherExtVo> list = archiveOtherExtMapper.selectListBySysFlagAndJzh(-100,jzh,null,null,filePath);
List<ArchiveOtherExtVo> 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<ArchiveOtherExtVo> list = new ArrayList<>();
//assortIds等于协商的全查的分类id全查
try {
list = archiveOtherExtMapper.selectListBySysFlagAndJzh(-100,jzh,startDateTo,endDateTo,null);
list = archiveOtherExtService.selectListBySysFlagAndJzh(-100,jzh,startDateTo,endDateTo,null);
List<String> 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();
}
}

@ -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);
}

@ -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<ArchiveOtherExt> selectNotCompleteMidList(){
return archiveOtherExtMapper.selectNotCompleteMidList();
}
public List<ArchiveOtherExtVo> 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);
}
}

@ -642,6 +642,7 @@
C1
from archive_other_ext
<where>
statusFlag != -1
<if test="sysFlag != null">
and sysFlag = #{sysFlag}
</if>
@ -663,10 +664,24 @@
and sysUpdateTime &lt;= #{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
</where>
<if test="jzh != null and jzh != ''">
ORDER BY sysUpdateTime desc
</if>
</select>
<!--批量删除将sysFlag置为-1-->
<update id="updateOtherDomForStatusFlag">
update archive_other_ext set statusFlag = -1
<where>
<if test="sysFlag != null">
and sysFlag = #{sysFlag}
</if>
<if test="jzh != null and jzh != ''">
and zyh = #{jzh}
</if>
<if test="filePath != null and filePath != ''">
and SycObj in (${filePath})
</if>
</where>
</update>
</mapper>

@ -111,9 +111,9 @@
<div class="row rowDiv">
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">就诊日期</label>
<label class="col-sm-5 control-label labelDiv">姓名</label>
<div class="col-sm-7">
<input type="text" readonly class="form-control input input-sm input" value="${record.sysupdatetimeStr}"/>
<input type="text" readonly class="form-control input-sm input" value="${record.c4}"/>
</div>
</div>
</div>
@ -135,9 +135,9 @@
</div>
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">姓名</label>
<label class="col-sm-5 control-label labelDiv">就诊日期</label>
<div class="col-sm-7">
<input type="text" readonly class="form-control input-sm input" value="${record.c4}"/>
<input type="text" readonly class="form-control input input-sm input" value="${record.sysupdatetimeStr}"/>
</div>
</div>
</div>

@ -3,6 +3,7 @@
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ 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"%>
<!DOCTYPE html>
<html lang="en">
@ -68,12 +69,13 @@
<div class="row" style="margin-top: 5px">
<div class="col-md-4">
</div>
<div class="col-md-4" style="padding:0 2px;" >
<button type="button" class="btn btn-xs btn-primary" style="display: none" onclick="flashPdf()" id="freshBtnDiv">刷新</button>
</div>
<div class="col-md-4" style="padding:0 2px">
<button type="button" class="btn btn-xs btn-primary" onclick="onloadPdf()">加载PDF</button>
</div>
<div class="col-md-4" style="padding:0 2px;" >
<button type="button" class="btn btn-xs btn-primary" style="display: none" onclick="flashPdf()" id="freshBtnDiv">刷新</button>
<button type="button" class="btn btn-xs btn-danger" style="display: none" id="delBtnDiv">删除</button>
</div>
</div>
<div class="row">
<div class="col-md-12">

@ -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();
}
})
}
}
})
})

Loading…
Cancel
Save