批量审批增加清空表单,批量申请改一条sql语句批量修改,修改申请列表提交申请置空审核信息

master
zengwh 6 years ago
parent 1c7bca3c98
commit 69855dba97

@ -315,6 +315,13 @@ public class ApproveController {
Integer id = applyApprove.getId(); Integer id = applyApprove.getId();
//存在则更新,不存在新增 //存在则更新,不存在新增
if(id != null){ if(id != null){
//若是确认提交,将审核信息置空
if("2".equals(applyApprove.getApplyState())){
applyApprove.setApprover("");
applyApprove.setApproveTime("");
applyApprove.setApproveState("");
applyApprove.setApproveNotes("");
}
applyApproveService.updateEmrApplyApprove(applyApprove); applyApproveService.updateEmrApplyApprove(applyApprove);
}else{ }else{
boolean flag = FormTokenFlagUtil.isFlag(request); boolean flag = FormTokenFlagUtil.isFlag(request);
@ -370,6 +377,13 @@ public class ApproveController {
Integer id = applyApprove.getId(); Integer id = applyApprove.getId();
//存在则更新,不存在新增 //存在则更新,不存在新增
if(id != null){ if(id != null){
//若是确认提交,将审核信息置空
if("2".equals(applyApprove.getApplyState())){
applyApprove.setApprover("");
applyApprove.setApproveTime("");
applyApprove.setApproveState("");
applyApprove.setApproveNotes("");
}
applyApproveService.updateEmrApplyApprove(applyApprove); applyApproveService.updateEmrApplyApprove(applyApprove);
}else{ }else{
boolean flag = FormTokenFlagUtil.isFlag(request); boolean flag = FormTokenFlagUtil.isFlag(request);
@ -705,7 +719,7 @@ public class ApproveController {
*/ */
@RequiresPermissions("/approve/updateApprove") @RequiresPermissions("/approve/updateApprove")
@OptionalLog(module = "保存",methods = "批注借阅审批申请") @OptionalLog(module = "保存",methods = "批注借阅审批申请")
@RequestMapping("updateApprove") @RequestMapping(value = "updateApprove")
@ResponseBody @ResponseBody
public ResultUtil updateApprove(Emr_Apply_Approve applyApprove,HttpServletRequest request){ public ResultUtil updateApprove(Emr_Apply_Approve applyApprove,HttpServletRequest request){
try{ try{
@ -730,15 +744,25 @@ public class ApproveController {
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER"); Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
String userName = user.getUserName(); String userName = user.getUserName();
if (null != ids || ids.length > 0){ if (null != ids || ids.length > 0){
for (String id : ids){ String idsStr = "";
Emr_Apply_Approve applyApprove = applyApproveMapper.selectByPrimaryKey(Integer.valueOf(id)); for (int i = 0; i < ids.length; i++) {
if(i != ids.length - 1) {
idsStr += ids[i] + ",";
}else {
idsStr += ids[i];
}
}
Emr_Apply_Approve applyApprove = new Emr_Apply_Approve();
applyApprove.setApprover(userName); applyApprove.setApprover(userName);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
applyApprove.setApproveTime(sdf.format(new Date())); applyApprove.setApproveTime(sdf.format(new Date()));
applyApprove.setApproveState(state); applyApprove.setApproveState(state);
applyApprove.setApproveNotes(note); applyApprove.setApproveNotes(note);
applyApproveService.updateEmrApplyApprove(applyApprove); //驳回时提交状态置为保存未提交
if("2".equals(state)){
applyApprove.setApplyState("1");
} }
applyApproveService.SimpleUpdate(applyApprove,idsStr);
} }
return ResultUtil.ok(); return ResultUtil.ok();
} }

@ -56,5 +56,8 @@ public interface Emr_Apply_ApproveMapper {
int selectIsPowerByUser(@Param("userName")String userName,@Param("patientId")String patientId, int selectIsPowerByUser(@Param("userName")String userName,@Param("patientId")String patientId,
@Param("applyType")Integer applyType); @Param("applyType")Integer applyType);
/**
*
* */
int SimpleUpdate(@Param("record")Emr_Apply_Approve record,@Param("idsStr")String idsStr);
} }

@ -158,4 +158,9 @@ public class AppleApproveServiceImpl implements ApplyApproveService{
public int SimpleInsert(List<Emr_Apply_Approve> list) { public int SimpleInsert(List<Emr_Apply_Approve> list) {
return applyApproveMapper.SimpleInsert(list); return applyApproveMapper.SimpleInsert(list);
} }
@Override
public int SimpleUpdate(Emr_Apply_Approve record, String idsStr) {
return applyApproveMapper.SimpleUpdate(record,idsStr);
}
} }

@ -1,6 +1,7 @@
package com.emr.service.approve; package com.emr.service.approve;
import com.emr.entity.approve.Emr_Apply_Approve; import com.emr.entity.approve.Emr_Apply_Approve;
import org.apache.ibatis.annotations.Param;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
@ -20,4 +21,6 @@ public interface ApplyApproveService {
String startTime2, String endTime2,HttpServletRequest request) throws Exception; String startTime2, String endTime2,HttpServletRequest request) throws Exception;
int SimpleInsert(List<Emr_Apply_Approve> list); int SimpleInsert(List<Emr_Apply_Approve> list);
int SimpleUpdate(Emr_Apply_Approve record,String idsStr);
} }

@ -157,8 +157,9 @@ public class Jpg2PdfUtil {
document.open(); document.open();
PdfReader reader = new PdfReader(file); PdfReader reader = new PdfReader(file);
n = reader.getNumberOfPages(); n = reader.getNumberOfPages();
if (n != 0) if (n != 0) {
flag1 = true; flag1 = true;
}
document.close(); document.close();
} }
} catch (Exception e) { } catch (Exception e) {
@ -238,8 +239,9 @@ public class Jpg2PdfUtil {
content = stamper.getUnderContent(i); content = stamper.getUnderContent(i);
//加文字水印 //加文字水印
if(StringUtils.isNotBlank(waterMarkName)) { if(StringUtils.isNotBlank(waterMarkName)) {
gs.setFillOpacity(0.2f); gs.setFillOpacity(0.3f);
gs.setStrokeOpacity(0.2f); gs.setStrokeOpacity(0.3f);
content.setGState(gs);
content.beginText(); content.beginText();
content.setColorFill(Color.LIGHT_GRAY); content.setColorFill(Color.LIGHT_GRAY);
content.setFontAndSize(base, 50); content.setFontAndSize(base, 50);

@ -594,4 +594,59 @@
</otherwise> </otherwise>
</choose> </choose>
</select> </select>
<!--批量更新-->
<update id="SimpleUpdate">
update emr_apply_approve
<set >
<if test="record.applyer != null" >
applyer = #{record.applyer,jdbcType=NVARCHAR},
</if>
<if test="record.applyTime != null" >
apply_time = #{record.applyTime,jdbcType=NCHAR},
</if>
<if test="record.effeTime != null" >
effe_time = #{record.effeTime,jdbcType=NCHAR},
</if>
<if test="record.effeDays != null" >
effe_days = #{record.effeDays,jdbcType=INTEGER},
</if>
<if test="record.applyType != null" >
apply_type = #{record.applyType,jdbcType=NVARCHAR},
</if>
<if test="record.applyReason != null" >
apply_reason = #{record.applyReason,jdbcType=NVARCHAR},
</if>
<if test="record.applyState != null" >
apply_state = #{record.applyState,jdbcType=NVARCHAR},
</if>
<if test="record.approver != null" >
approver = #{record.approver,jdbcType=NVARCHAR},
</if>
<if test="record.approveTime != null" >
approve_time = #{record.approveTime,jdbcType=NCHAR},
</if>
<if test="record.approveState != null" >
approve_state = #{record.approveState,jdbcType=NVARCHAR},
</if>
<if test="record.approveNotes != null" >
approve_notes = #{record.approveNotes,jdbcType=NVARCHAR},
</if>
<if test="record.patientId != null" >
patient_id = #{record.patientId,jdbcType=VARCHAR},
</if>
<if test="record.admissId != null" >
admiss_id = #{record.admissId,jdbcType=CHAR},
</if>
<if test="record.inpatientNo != null" >
inpatient_no = #{record.inpatientNo,jdbcType=CHAR},
</if>
<if test="record.admissTimes != null" >
admiss_times = #{record.admissTimes,jdbcType=SMALLINT},
</if>
<if test="record.disDate != null" >
dis_date = #{record.disDate,jdbcType=TIMESTAMP},
</if>
</set>
where id in (${idsStr})
</update>
</mapper> </mapper>

@ -435,7 +435,7 @@
<div class="modal-content" style="width:80%"> <div class="modal-content" style="width:80%">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times; <font size="30">&times;</font>
</button> </button>
<h4 class="modal-title" style="font-weight: bold"> <h4 class="modal-title" style="font-weight: bold">
申请信息 申请信息

@ -220,7 +220,7 @@
<div class="modal-content" style="width:80%"> <div class="modal-content" style="width:80%">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times; <font size="30">&times;</font>
</button> </button>
<h4 class="modal-title" style="font-weight: bold"> <h4 class="modal-title" style="font-weight: bold">
审批信息 审批信息
@ -344,7 +344,7 @@
<div class="modal-content" style="width:80%"> <div class="modal-content" style="width:80%">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times; <font size="30">&times;</font>
</button> </button>
<h4 class="modal-title" style="font-weight: bold"> <h4 class="modal-title" style="font-weight: bold">
批量审批信息 批量审批信息

@ -22,12 +22,10 @@
<style type="text/css"> <style type="text/css">
.leftDiv{ .leftDiv{
width:25%; width:25%;
height: 100%;
background-color:#fff background-color:#fff
} }
.rightDiv{ .rightDiv{
width:74%; width:74%;
height:100%;
margin-left:1%; margin-left:1%;
background-color:#fff background-color:#fff
} }

@ -22,12 +22,10 @@
<style type="text/css"> <style type="text/css">
.leftDiv{ .leftDiv{
width:25%; width:25%;
height: 100%;
background-color:#fff background-color:#fff
} }
.rightDiv{ .rightDiv{
width:74%; width:74%;
height:100%;
margin-left:1%; margin-left:1%;
background-color:#fff background-color:#fff
} }

@ -168,7 +168,7 @@
</div> </div>
</div> </div>
<div class="btnsDiv"> <div class="btnsDiv">
<shiro:hasPermission name="/printInfoList/export"> <shiro:hasPermission name="/emrLock/unLock">
<button type="button" class="btn btn-sm btn-primary btns" onclick="unlocks()">批量解锁</button> <button type="button" class="btn btn-sm btn-primary btns" onclick="unlocks()">批量解锁</button>
</shiro:hasPermission> </shiro:hasPermission>
</div> </div>

@ -122,7 +122,7 @@
.table-hover > tbody > tr:hover > th { .table-hover > tbody > tr:hover > th {
cursor: pointer; cursor: pointer;
} }
.fht-cell{width:70px!important;} .fht-cell{width:85px!important;}
</style> </style>
</head> </head>
<body> <body>
@ -175,7 +175,7 @@
<!--表格头--> <!--表格头-->
<input type="hidden" id="tableThNames" value="病案号,ID号,住院次数,姓名,终审时间,性别,年龄_岁,年龄_月,联系地址,入院日期,出院日期,出院科室,出院主诊断,转归情况,住院天数,主治医生,是否有手术"> <input type="hidden" id="tableThNames" value="病案号,ID号,住院次数,姓名,终审时间,性别,年龄_岁,年龄_月,联系地址,入院日期,出院日期,出院科室,出院主诊断,转归情况,住院天数,主治医生,是否有手术">
<!--查询字段--> <!--查询字段-->
<input type="hidden" id="englishFields" value="commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.home_addr,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.is_oper"> <input type="hidden" id="englishFields" value="commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,archive_master.checked_datetime,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.home_addr,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.is_oper">
<!--数据字段--> <!--数据字段-->
<input type="hidden" id="fields" value="inpatientNo,admissId,admissTimes,name,checkedDatetime,sex,age,ageMonth,homeAddr,admissDate,disDate,disDept,mainDiagName,mainDisThing,admissDays,attending,isOper"> <input type="hidden" id="fields" value="inpatientNo,admissId,admissTimes,name,checkedDatetime,sex,age,ageMonth,homeAddr,admissDate,disDate,disDept,mainDiagName,mainDisThing,admissDays,attending,isOper">
<!--显示字段--> <!--显示字段-->

@ -11,6 +11,7 @@ function add(){
//封装模态框保存公共方法applyState:提交状态1保存未提交2已提交.msg:操作后提示信息 //封装模态框保存公共方法applyState:提交状态1保存未提交2已提交.msg:操作后提示信息
function saveMethod(applyState){ function saveMethod(applyState){
debugger
var inpatientNo = $("#inpatientNo").val(); var inpatientNo = $("#inpatientNo").val();
var name = $("#name").val(); var name = $("#name").val();
if($("#effeTime").val() != ''){ if($("#effeTime").val() != ''){

@ -329,6 +329,7 @@ function addApprovesMore() {
loadSelect(path+ '/approve/loadAnnoModle','moreParentId',''); loadSelect(path+ '/approve/loadAnnoModle','moreParentId','');
$('#addApprovesMore').attr("data-toggle", "modal"); $('#addApprovesMore').attr("data-toggle", "modal");
$('#addApprovesMore').attr("data-target", "#myModal2"); $('#addApprovesMore').attr("data-target", "#myModal2");
$("#form2")[0].reset();
} else { } else {
toastr.warning("至少选中一条!"); toastr.warning("至少选中一条!");
} }

@ -123,6 +123,8 @@ function freshTable(){
//console.log(sql) //console.log(sql)
//生成用户数据 //生成用户数据
$('#mytab').bootstrapTable({ $('#mytab').bootstrapTable({
method: 'post',
contentType:'application/x-www-form-urlencoded; charset=UTF-8',
toolbar: '#toolbar', //工具按钮用哪个容器 toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色 striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性* cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
@ -325,6 +327,7 @@ function AddFunctionAlty(value, row, index) {
str += '<button type="button" class="btn btn-primary TableView btn-sm" onclick="borrowing('+patientId+')" data-toggle="modal" data-target="#myModal1">借阅申请</button>'; str += '<button type="button" class="btn btn-primary TableView btn-sm" onclick="borrowing('+patientId+')" data-toggle="modal" data-target="#myModal1">借阅申请</button>';
} }
} }
debugger
//判断可否下载 //判断可否下载
if((null != isDownload && isDownload == 1) || downloadRecord == '1'){ if((null != isDownload && isDownload == 1) || downloadRecord == '1'){
str += '<button type="button" class="btn btn-sm btn-info TableView btn-sm" onclick="downloadPdf('+patientId+')">下载PDF</button>'; str += '<button type="button" class="btn btn-sm btn-info TableView btn-sm" onclick="downloadPdf('+patientId+')">下载PDF</button>';

@ -133,6 +133,8 @@ function freshTable(){
} }
//生成用户数据 //生成用户数据
$('#mytab').bootstrapTable({ $('#mytab').bootstrapTable({
method: 'post',
contentType:'application/x-www-form-urlencoded; charset=UTF-8',
toolbar: '#toolbar', //工具按钮用哪个容器 toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色 striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性* cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*

@ -137,6 +137,8 @@ function freshTable(){
//sql += orderBys; //sql += orderBys;
//生成用户数据 //生成用户数据
$('#mytab').bootstrapTable({ $('#mytab').bootstrapTable({
method: 'post',
contentType:'application/x-www-form-urlencoded; charset=UTF-8',
toolbar: '#toolbar', //工具按钮用哪个容器 toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色 striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性* cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*

@ -87,7 +87,6 @@ function freshTable(){
field:'patientId', field:'patientId',
visible:false visible:false
}) })
debugger
var tableThNames = $("#tableThNames").val(); var tableThNames = $("#tableThNames").val();
if(tableThNames != ''){ if(tableThNames != ''){
var fieldCns = ''; var fieldCns = '';
@ -161,7 +160,7 @@ function freshTable(){
height: 400,//高度调整 //行高如果没有设置height属性表格自动根据记录条数觉得表格高度 height: 400,//高度调整 //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
buttonsAlign: "left",//按钮对齐方式 buttonsAlign: "left",//按钮对齐方式
columns:columns, columns:columns,
fixedColumns: true,//固定列 fixedColumns: mixFlag,//固定列
fixedNumber:5,//固定前七列 fixedNumber:5,//固定前七列
locale:'zh-CN',//中文支持, locale:'zh-CN',//中文支持,
url:path+'/template/cutomSearchTable',//排序方式 url:path+'/template/cutomSearchTable',//排序方式

Loading…
Cancel
Save