新增病案锁定管理,取消常用查询病案号限制,增加判断无查看打印简要表格启用固定列,自定义选择保存成功提示改右下角

master
zengwh 6 years ago
parent 00c885386f
commit c6469e38b1

@ -214,7 +214,7 @@ public class FontController {
Object localObject2 = null;
URL paramURL = Utilities.toURL(filePath);
try {
if (paramURL.getProtocol().equals("file")) {
if ("file".equals(paramURL.getProtocol())) {
localObject2 = paramURL.getFile();
localObject2 = Utilities
.unEscapeURL((String) localObject2);
@ -233,13 +233,15 @@ public class FontController {
image = (Image) localObject2;
}
}
if (localObject1 != null)
if (localObject1 != null) {
((RandomAccessFileOrArray) localObject1).close();
}
} finally {
if (localObject1 != null)
if (localObject1 != null) {
((RandomAccessFileOrArray) localObject1).close();
}
}
} else if (file1.getName().endsWith(".png")
|| file1.getName().endsWith(".jpg")
|| file1.getName().endsWith(".gif")
@ -343,7 +345,7 @@ public class FontController {
Object localObject2 = null;
URL paramURL = Utilities.toURL(filePath);
try {
if (paramURL.getProtocol().equals("file")) {
if ("file".equals(paramURL.getProtocol())) {
localObject2 = paramURL.getFile();
localObject2 = Utilities
.unEscapeURL((String) localObject2);
@ -362,13 +364,15 @@ public class FontController {
image = (Image) localObject2;
}
}
if (localObject1 != null)
if (localObject1 != null) {
((RandomAccessFileOrArray) localObject1).close();
}
} finally {
if (localObject1 != null)
if (localObject1 != null) {
((RandomAccessFileOrArray) localObject1).close();
}
}
} else if (file1.getName().endsWith(".png")
|| file1.getName().endsWith(".jpg")
|| file1.getName().endsWith(".gif")
@ -423,9 +427,6 @@ public class FontController {
BeanUtils.copyProperties(scanAssortVos.get(j), vo1);
scanAssortVos1.add(vo1);
}
// if (imgIsexist == 0) {
// return Msg.fail("图片不存在!");
// }
} else {
return Msg.fail("查询无该记录!");
}

@ -1,9 +1,15 @@
package com.emr.controller.emrLock;
import com.emr.annotation.OptionalLog;
import com.emr.dao.recordLock.Emr_LockMapper;
import com.emr.entity.recordLock.Emr_Lock;
import com.emr.service.emrLock.EmrLockServiceImpl;
import com.emr.vo.EmrLockVo;
import com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo;
import com.emr.vo.FontVo.LockVo;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@ -27,7 +33,56 @@ import java.util.List;
@RequestMapping("emrLock/")
public class EmrLockController {
@Autowired
Emr_LockMapper lockMapper;
private EmrLockServiceImpl emrLockService;
/**
* @MethodName lockList
* @Description:
* @Param
* @Returnt
* @Author:
* @CreateDate: 2020-04-14
* @UpdateUser:
* @UpdateDate: 2020-04-14
* @UpdateRemark:
* @Version: 1.0
*/
@RequestMapping("lockList")
public String lockList(){
return "otherManage/lockList";
}
/**
* @ProjectName:getLockList
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2020-04-14
* @UpdateUser:
* @UpdateDate: 2020-04-14
* @UpdateRemark:
* @Version: 1.0
*/
@RequiresPermissions("/emrLock/select")
@RequestMapping("getLockList")
@ResponseBody
public String getLockList(Integer page, Integer limit, EmrLockVo lockVo){
try{
if(null != page && null != limit){
PageHelper.startPage(page, limit);
}
//查询
List<EmrLockVo> list = emrLockService.getLockList(lockVo);
PageInfo pageInfo = new PageInfo<>(list);
ObjectMapper mapper = new ObjectMapper();
String json = mapper.writeValueAsString(pageInfo);
return json;
}catch (Exception e){
e.printStackTrace();
return null;
}
}
/**
* @MethodName getLoctPatientIds
* @Description: patientId
@ -45,7 +100,8 @@ public class EmrLockController {
public String getLoctPatientIds(){
//锁定的集合
try {
List<Emr_Lock> emr_locks = lockMapper.selectLockListByStatus(1);
Integer status = 1;
List<Emr_Lock> emr_locks = emrLockService.selectLockListByStatus(status);
if(null != emr_locks && !emr_locks.isEmpty()){
String locks = "";
for (int i = 0; i < emr_locks.size(); i++) {

@ -24,7 +24,7 @@ import com.emr.entity.templateSearch.Emr_Modle;
import com.emr.entity.templateSearch.Emr_Modle_Check;
import com.emr.service.CommomService;
import com.emr.service.emrFunGroupDistribution.FunGroupDistributionService;
import com.emr.service.emrLock.EmrLockService;
import com.emr.service.emrLock.EmrLockServiceImpl;
import com.emr.service.emrPrintOrDownLoadInfo.PrintOrDownLoadInfoService;
import com.emr.service.templateSearch.TemplateSearchService;
import com.emr.util.*;
@ -84,7 +84,7 @@ public class TemplateSearchController {
@Autowired
private ScanPathMapper scanPathMapper;
@Autowired
private EmrLockService lockService;
private EmrLockServiceImpl lockService;
@Autowired
private Emr_LockMapper lockMapper;
@Autowired
@ -573,11 +573,11 @@ public class TemplateSearchController {
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
String creater = user.getUserId().toString();
Emr_Modle emr_modle = emrModleMapper.checkModleFlag(creater, modle.getModleFlag());
if(null != emr_modle && emr_modle.getId() != modle.getId()){
if(null != emr_modle && !emr_modle.getId().equals(modle.getId())){
return ResultUtil.error("该模板标志已存在!");
}
Emr_Modle emr_modle1 = emrModleMapper.checkModleName(creater, modle.getModleName());
if(null != emr_modle1 && emr_modle1.getId() != modle.getId()){
if(null != emr_modle1 && !emr_modle1.getId().equals(modle.getId())){
return ResultUtil.error("该模板名称已存在!");
}
templateSearchService.updateTemplateSelect(modle, selectFlagId,request);

@ -1,6 +1,7 @@
package com.emr.dao.recordLock;
import com.emr.entity.recordLock.Emr_Lock;
import com.emr.vo.EmrLockVo;
import com.emr.vo.FontVo.LockVo;
import com.emr.vo.commomSearch.CommomVo;
import org.apache.ibatis.annotations.Param;
@ -25,4 +26,6 @@ public interface Emr_LockMapper {
int udpateLockByPatientIds(@Param("list") List<CommomVo> list,@Param("record") Emr_Lock record);
int SimpleInsert(@Param("list") List<Emr_Lock> list);
List<EmrLockVo> getLockList(EmrLockVo record);
}

@ -1,20 +0,0 @@
package com.emr.service.emrLock;
import com.emr.entity.recordLock.Emr_Lock;
import com.emr.vo.commomSearch.CommomVo;
import org.apache.ibatis.annotations.Param;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
public interface EmrLockService {
void insert(List<CommomVo> commomtables, HttpServletRequest request);
void udpate(Emr_Lock lock,HttpServletRequest request);
List<Emr_Lock> selectLockListByStatus(Integer lockStatus);
void udpateUnlockByPatients(String patientIds,HttpServletRequest request);
}

@ -4,6 +4,8 @@ import com.emr.dao.CommomMapper;
import com.emr.dao.recordLock.Emr_LockMapper;
import com.emr.entity.Power_User;
import com.emr.entity.recordLock.Emr_Lock;
import com.emr.vo.EmrLockVo;
import com.emr.vo.FontVo.LockVo;
import com.emr.vo.commomSearch.CommomVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -18,12 +20,12 @@ import java.util.List;
@Service
@Transactional
public class EmrLockServiceImpl implements EmrLockService{
public class EmrLockServiceImpl{
@Autowired
private Emr_LockMapper lockMapper;
@Autowired
private CommomMapper commomMapper;
@Override
public void insert(List<CommomVo> commomtables, HttpServletRequest request) {
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
Integer userId = user.getUserId();
@ -77,7 +79,6 @@ public class EmrLockServiceImpl implements EmrLockService{
}
}
@Override
public void udpate(Emr_Lock lock,HttpServletRequest request) {
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@ -93,12 +94,10 @@ public class EmrLockServiceImpl implements EmrLockService{
lockMapper.updateByPrimaryKeySelective(lock);
}
@Override
public List<Emr_Lock> selectLockListByStatus(Integer lockStatus) {
return lockMapper.selectLockListByStatus(lockStatus);
}
@Override
public void udpateUnlockByPatients(String patientIds,HttpServletRequest request) {
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
String userName = user.getUserName();
@ -106,4 +105,10 @@ public class EmrLockServiceImpl implements EmrLockService{
String unlockeTime = fmt.format(new Date());
lockMapper.udpateUnlockByPatients(patientIds,userName,unlockeTime);
}
public List<EmrLockVo> getLockList(EmrLockVo lockVo){
List<EmrLockVo> lockVos = lockMapper.getLockList(lockVo);
return lockVos;
}
}

@ -0,0 +1,29 @@
package com.emr.vo;
import com.emr.entity.recordLock.Emr_Lock;
import lombok.Data;
/**
* @ProjectName:
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2020/4/14 10:34
* @UpdateUser:
* @UpdateDate: 2020/4/14 10:34
* @UpdateRemark:
* @Version: 1.0
*/
@Data
public class EmrLockVo extends Emr_Lock {
private String name;
private String startTime1;
private String endTime1;
private String startTime2;
private String endTime2;
}

@ -14,6 +14,20 @@
<result column="unlocke_time" property="unlockeTime" jdbcType="NCHAR" />
<result column="remarke" property="remarke" jdbcType="NVARCHAR" />
</resultMap>
<resultMap id="BaseResultMap1" type="com.emr.vo.EmrLockVo" >
<result column="id" property="id" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="patient_id" property="patientId" jdbcType="NVARCHAR" />
<result column="admiss_times" property="admissTimes" jdbcType="NCHAR" />
<result column="inpatient_no" property="inpatientNo" jdbcType="NCHAR" />
<result column="lock_state" property="lockState" jdbcType="INTEGER" />
<result column="locker" property="locker" jdbcType="NVARCHAR" />
<result column="locke_time" property="lockeTime" jdbcType="NCHAR" />
<result column="unlocker" property="unlocker" jdbcType="NVARCHAR" />
<result column="unlocke_time" property="unlockeTime" jdbcType="NCHAR" />
<result column="remarke" property="remarke" jdbcType="NVARCHAR" />
<result column="name" property="name" jdbcType="NVARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.emr.entity.recordLock.Emr_Lock" >
insert into emr_lock (user_id, patient_id,
admiss_times, inpatient_no, lock_state,
@ -24,79 +38,6 @@
#{locker,jdbcType=NVARCHAR}, #{lockeTime,jdbcType=NCHAR}, #{unlocker,jdbcType=NVARCHAR},
#{unlockeTime,jdbcType=NCHAR}, #{remarke,jdbcType=NVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.emr.entity.recordLock.Emr_Lock" >
insert into emr_lock
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="userId != null" >
user_id,
</if>
<if test="patientId != null" >
patient_id,
</if>
<if test="admissTimes != null" >
admiss_times,
</if>
<if test="inpatientNo != null" >
inpatient_no,
</if>
<if test="lockState != null" >
lock_state,
</if>
<if test="locker != null" >
locker,
</if>
<if test="lockeTime != null" >
locke_time,
</if>
<if test="unlocker != null" >
unlocker,
</if>
<if test="unlockeTime != null" >
unlocke_time,
</if>
<if test="remarke != null" >
remarke,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="userId != null" >
#{userId,jdbcType=INTEGER},
</if>
<if test="patientId != null" >
#{patientId,jdbcType=NVARCHAR},
</if>
<if test="admissTimes != null" >
#{admissTimes,jdbcType=NCHAR},
</if>
<if test="inpatientNo != null" >
#{inpatientNo,jdbcType=NCHAR},
</if>
<if test="lockState != null" >
#{lockState,jdbcType=INTEGER},
</if>
<if test="locker != null" >
#{locker,jdbcType=NVARCHAR},
</if>
<if test="lockeTime != null" >
#{lockeTime,jdbcType=NCHAR},
</if>
<if test="unlocker != null" >
#{unlocker,jdbcType=NVARCHAR},
</if>
<if test="unlockeTime != null" >
#{unlockeTime,jdbcType=NCHAR},
</if>
<if test="remarke != null" >
#{remarke,jdbcType=NVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.recordLock.Emr_Lock" >
update emr_lock
<set >
@ -244,4 +185,47 @@
#{item.unlockeTime,jdbcType=NCHAR}, #{item.remarke,jdbcType=NVARCHAR}
</foreach>
</insert>
<!--锁定列表-->
<select id="getLockList" resultMap="BaseResultMap1" parameterType="com.emr.vo.EmrLockVo">
SELECT
emr_lock.patient_id,
emr_lock.lock_state,
emr_lock.locker,
emr_lock.locke_time,
emr_lock.unlocker,
emr_lock.unlocke_time,
commomtable.name,
commomtable.admiss_times,
commomtable.inpatient_no
FROM
emr_lock
LEFT JOIN commomtable ON emr_lock.patient_id = commomtable.patient_id
<where>
<if test="name != null and name != ''">
AND commomtable.name LIKE '%${name}%'
</if>
<if test="inpatientNo != null and inpatientNo != ''">
AND commomtable.inpatient_no LIKE '%${inpatientNo}%'
</if>
<if test="lockState != null">
AND emr_lock.lock_state = #{lockState}
</if>
<if test="locker != null and locker != ''">
AND emr_lock.locker LIKE '%${locker}%'
</if>
<if test="unlocker != null and unlocker != ''">
AND emr_lock.unlocker LIKE '%${unlocker}%'
</if>
<if test="startTime1 != null and startTime1 != '' and endTime1 != null and endTime1 != ''">
<if test="startTime1 != null and startTime1 != ''">
AND emr_lock.locke_time between '${startTime1} 00:00:00' and '${endTime1} 23:59:59'
</if>
</if>
<if test="startTime2 != null and startTime2 != '' and endTime2 != null and endTime2 != ''">
<if test="startTime2 != null and startTime2 != ''">
AND emr_lock.unlocke_time between '${startTime2} 00:00:00' and '${endTime2} 23:59:59'
</if>
</if>
</where>
</select>
</mapper>

@ -0,0 +1,187 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>病案锁定管理</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<!--[if lt IE 9]>
<script type="text/javascript" src="${path}/static/js/html5shiv.min.js"></script>
<script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
<![endif]-->
<script>
var path = "${path}";
</script>
<style type="text/css">
body {
margin-right: -15px;
margin-bottom: -15px;
}
.mainDiv{
background-color: #fff;
}
/**搜索区*/
.searchDiv {
padding-top: 10px;
width:100%;
height: 30px;
}
.dateSearchDiv{
width:29%;
}
.dateSearchInput{
width:30%;
margin-left:2%;
}
.dateLabelDiv{
width: 30%;
text-align: right;
}
.searchInput{
width:21%;
margin-left: 5px;
}
.searchElement{
text-align: right;
width:40%;
}
.searchInputElement{
width:60%;
}
.labelDiv{
padding-top:4%;
margin-left: 2%;
}
/**查询按钮组*/
.btnsDiv{
margin-top: 0.4%;
height:35px;
text-align: right;
margin-right: 25px;
}
.btns{
margin-left: 2%;
}
.pagination{
margin:0!important;
}
/**表格div*/
.tableDiv{
margin-left: 1%;
margin-right: 1%;
}
.hidden-xs{
max-width: 250px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
</head>
<body>
<div class="main">
<div class="headDiv">
<div class="headSpanDiv">
<span class="headspan">
病案锁定管理
</span>
</div>
</div>
<div class="mainDiv">
<div class="searchDiv">
<div class="searchInput left">
<div class="searchElement left">
<label class="labelDiv">姓名:</label>
</div>
<div class="searchInputElement left">
<input type="text" class="form-control input-sm" id="name">
</div>
</div>
<div class="searchInput left">
<div class="searchElement left">
<label class="labelDiv">病案号:</label>
</div>
<div class="searchInputElement left">
<input type="text" class="form-control input-sm" id="inpatientNo">
</div>
</div>
<div class="searchInput left">
<div class="searchElement left">
<label class="labelDiv">锁定状态:</label>
</div>
<div class="searchInputElement left">
<select class="form-control input-sm" id="lockState">
<option value="">全部</option>
<option value="1">已锁定</option>
<option value="0">已解锁</option>
</select>
</div>
</div>
<div class="searchInput left">
<div class="searchElement left">
<label class="labelDiv">锁定人:</label>
</div>
<div class="searchInputElement left">
<input type="text" class="form-control input-sm" id="locker">
</div>
</div>
</div>
<div class="searchDiv" style="margin-top: 0.4%">
<div class="dateSearchDiv left">
<div class="dateLabelDiv left">
<label class="labelDiv">锁定时间:</label>
</div>
<div class="dateSearchInput left">
<input type="text" class="form-control input-sm" id="startTime1" placeholder="开始时间">
</div>
<div class="dateSearchInput left">
<input type="text" class="form-control input-sm" id="endTime1" placeholder="结束时间">
</div>
</div>
<div class="searchInput left">
<div class="searchElement left">
<label class="labelDiv">解锁人:</label>
</div>
<div class="searchInputElement left">
<input type="text" class="form-control input-sm" id="unlocker">
</div>
</div>
<div class="dateSearchDiv left">
<div class="dateLabelDiv left">
<label class="labelDiv">解锁时间:</label>
</div>
<div class="dateSearchInput left">
<input type="text" class="form-control input-sm" id="startTime2" placeholder="开始时间">
</div>
<div class="dateSearchInput left">
<input type="text" class="form-control input-sm" id="endTime2" placeholder="结束时间">
</div>
</div>
<div class="left">
<button type="button" class="btn btn-sm btn-primary" onclick="refreshTable()">查询</button>
</div>
</div>
<div class="btnsDiv">
<shiro:hasPermission name="/printInfoList/export">
<button type="button" class="btn btn-sm btn-primary btns" onclick="unlocks()">批量解锁</button>
</shiro:hasPermission>
</div>
<!--数据表格-->
<div id="tableDiv" class="tableDiv">
<input type="hidden" id="checks">
<table id="mytab" class="table text-nowrap table-bordered">
</table>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="${path}/static/js/otherManage/lockList.js"></script>
<script type="text/javascript" src="${path}/static/js/dateUtil.js"></script>
</body>
</html>

@ -53,10 +53,9 @@
}*/
/*按钮组*/
.btns {
width: 102%;
background-color: #fff;
text-align: right;
margin-top: 5px;
margin-top: -15px;
margin-bottom: 5px;
}
@ -148,12 +147,12 @@
/**固定列样式*/
.fixed-table-body-columns {
top: 336px !important;
top:48%!important;
/*height:226px!important;*/
}
.fht-cell {
width: 18px !important;
width: 75px !important;
}
.table-hover > tbody > tr:hover > td,
@ -457,7 +456,7 @@
<input type="text" class="form-control input-sm otherTable operTable inputValue"
id="operate_name" onkeyup="getOperateNameContents('operate_name')"
onfocus="getOperateNameContents('operate_name')"
onblur="clearContent('operate_name')" maxlength="16">\
onblur="clearContent('operate_name')" maxlength="16">
<div id="operate_nameDiv" style="position: absolute;z-index: 2000">
<table id="operate_nameContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0">
@ -544,7 +543,7 @@
</div>
</div>
</div>
<div class=" btns">
<div class="btns">
<div class="btn">
<button type="button" class="btn btn-sm btn-primary" onclick="search()">开始搜索</button>
</div>

@ -0,0 +1,229 @@
$(function () {
//加载日期控件
initDateInput(1);
initDateInput(2);
})
var pageNumber;
$('#mytab').bootstrapTable({
toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
pagination: true, //是否显示分页(*
sidePagination: "server", //分页方式client客户端分页server服务端分页*
paginationPreText : '上一页',
paginationNextText : '下一页',
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*
pageList: [5,10,15,20,50,1000],//可供选择的每页的行数(*
height: 1100, //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
columns:[
{
title:'全选',
field:'select',
checkbox:true,
width:25,
align:'center',
valign:'middle'
},
{
field:'ids',
visible: false
},
{
field: 'no',
title: '序号',
sortable: true,
formatter: function (value, row, index) {
//获取每页显示的数量
var pageSize=$('#mytab').bootstrapTable('getOptions').pageSize;
//获取当前是第几页
var pageNumber=$('#mytab').bootstrapTable('getOptions').pageNumber;
//返回序号注意index是从0开始的所以要加上1
return pageSize * (pageNumber - 1) + index + 1;
}
},
{
title:'姓名',
field:'name',
},
{
title:'病案号',
field:'inpatientNo',
},
{
title:'住院次数',
field:'admissTimes',
},
{
title:'锁定状态',
field:'lockState',
formatter: function(value,row,index){
var lockState = row.lockState;
if(lockState == 1){
return "锁定";
}else{
return "已解锁";
}
}
},
{
title:'锁定人',
field:'locker',
},
{
title:'最近锁定时间',
field:'lockeTime',
},
{
title:'解锁人',
field:'unlocker',
},
{
title:'最近解锁时间',
field:'unlockeTime',
},
{
title:'操作',
formatter: function(value,row,index){
var lockState = row.lockState;
var patientId = "'" + row.patientId + "'";
if(lockState == 1){
var editanddrop = '<button type="button" onclick="unlock('+patientId+')" class="btn btn-sm btn-success">解锁</button>';
return editanddrop;
}
}
}
],
locale:'zh-CN',//中文支持,
url:path+'/emrLock/getLockList',//排序方式
queryParams: function (params) {
return{
limit : params.limit, // 每页显示数量
offset : params.offset, // SQL语句起始索引
page : (params.offset / params.limit) + 1, //当前页码,
startTime1:$("#startTime1").val(),
endTime1:$("#endTime1").val(),
startTime2:$("#startTime2").val(),
endTime2:$("#endTime2").val(),
name:$("#name").val(),
inpatientNo:$("#inpatientNo").val(),
lockState:$("#lockState").val(),
locker:$("#locker").val(),
unlocker:$("#unlocker").val(),
}
},
//选中单个复选框
onCheck:function(row){
var checks = $("#checks").val();
$("#checks").val(checks+="'" + row.patientId + "',");
},
//取消单个复选框
onUncheck:function(row){
var checks = $("#checks").val();
checks = checks.replace("'" + row.patientId + "',",'');
$("#checks").val(checks);
},
//全选
onCheckAll:function(rows){
$("#checks").val("");
var checks = '';
for(var i=0;i<rows.length;i++)
{
checks += "'" + rows[i].patientId + "',"
}
$("#checks").val(checks);
},
//全不选
onUncheckAll: function (rows) {
$("#checks").val("");
},
responseHandler:function(res){
//在ajax获取到数据渲染表格之前修改数据源
var nres = [];
nres.push({total:res.total,rows:res.list});
return nres[0];
},
onLoadSuccess:function(){
$(".page-list").show();
$(".fixed-table-body").css("overflow","auto");
},
//监听分页点击事件
onPageChange: function(num, type) {
pageNumber = num;
}
})
//查询按钮
function refreshTable(){
if($("#startTime1").val() != '' || $("#endTime1").val() != ''){
if(($("#startTime1").val() != '' && $("#endTime1").val() == '') || ($("#startTime1").val() == '' && $("#endTime1").val() != '')){
toastr.warning("请输入完整的锁定日期时间段");
return false;
}
}
if($("#startTime2").val() != '' || $("#endTime2").val() != ''){
if(($("#startTime2").val() != '' && $("#endTime2").val() == '') || ($("#startTime2").val() == '' && $("#endTime2").val() != '')){
toastr.warning("请输入完整的解锁日期时间段");
return false;
}
}
$("#checks").val("");
$('#mytab').bootstrapTable('refresh',{
url : path+'/emrLock/getLockList'
})
$('#mytab').bootstrapTable('selectPage', pageNumber);
}
//解锁
function unlock(patientId){
$.ajax({
type:'post',
url:path+'/template/updateLockByPatientId?patientId='+patientId,
dataType:'json',
success:function(data){
if(data.code == 0){
toastr.success("解锁成功!");
refreshTable();
}else{
toastr.error("解锁失败!")
}
}
})
}
//批量解锁
function unlocks(){
var checks = $("#checks").val();
if(checks != ''){
Common.confirm({
title: "提示",
message: "没有选中,您确定要按搜索栏条件批量解锁?",
operate: function (reselt) {
if (reselt) {
//去掉最后逗号
checks = checks.substring(0,checks.length-1);
unlocksMethods(checks)
}
}
})
}else{
toastr.error("请至少选择一个!");
}
}
//封装批量解锁方法
function unlocksMethods(patientIds){
$.ajax({
type:'post',
url:path+'/template/updateLockByPatientIds',
data:{patientIds:patientIds},
async:false,
dataType:'json',
success:function(data){
if(data.code == 0){
toastr.success("解锁成功!");
refreshTable();
}else{
toastr.error("解锁失败!")
}
}
})
}

@ -26,7 +26,6 @@ $(function () {
});
function permissionControlButton() {
debugger
var show = $("#showRecord").val();
var load = $("#downloadRecord").val();
//批量借阅申请权限判断
@ -497,7 +496,7 @@ function search() {
var age1 = $("#age1").val();
var age2 = $("#age2").val();
if ((age1 != '' && age2 == '') || (age1 == '' && age2 != '')) {
toastr.warning("请输入完整年龄时间段!");
toastr.warning("请输入完整年龄段!");
return false;
}
if ((startTime1 != '' && endTime1 == '') || (startTime1 == '' && endTime1 != '')) {

@ -5,7 +5,6 @@ $(function () {
//权限控制按钮
function permissionControlButton() {
debugger
var show = $("#showRecord").val();
var load = $("#downloadRecord").val();
//批量借阅申请权限判断
@ -74,52 +73,52 @@ function getSql() {
if (val == 't_diag.dis_thing') {
//转归情况
val = 't_dictionary_1.NAME AS dis_thing';
dictionaryConvertStr += " LEFT JOIN dbo.t_dictionary AS t_dictionary_1 ON dbo.t_diag.dis_thing = t_dictionary_1.CODE AND t_dictionary_1.typeCode = 'dis_diag_status'";
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_1 ON dbo.t_diag.dis_thing = t_dictionary_1.CODE AND t_dictionary_1.parent_id = 'dis_diag_status'";
}
if (val == 't_operate.operate_class') {
//手术级别
val = 't_dictionary_2.NAME AS operate_class';
dictionaryConvertStr += " LEFT JOIN dbo.t_dictionary AS t_dictionary_2 ON t_operate.operate_class = t_dictionary_2.CODE AND t_dictionary_2.typeCode = 'operate_class'";
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_2 ON t_operate.operate_class = t_dictionary_2.CODE AND t_dictionary_2.parent_id = 'operate_class'";
}
if (val == 't_operate.cut') {
//切口愈合等级
val = 't_dictionary_3.NAME AS cut';
dictionaryConvertStr += " LEFT JOIN dbo.t_dictionary AS t_dictionary_3 ON t_operate.cut = t_dictionary_3.CODE AND t_dictionary_3.typeCode = 'cut_heal_grade'";
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_3 ON t_operate.cut = t_dictionary_3.CODE AND t_dictionary_3.parent_id = 'cut_heal_grade'";
}
if (val == 't_operate.anaesthesia_type') {
//麻醉方式
val = 't_dictionary_4.NAME AS anaesthesia_type';
dictionaryConvertStr += " LEFT JOIN dbo.t_dictionary AS t_dictionary_4 ON t_operate.anaesthesia_type = t_dictionary_4.CODE AND t_dictionary_4.typeCode = 'anaesthesia'";
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_4 ON t_operate.anaesthesia_type = t_dictionary_4.CODE AND t_dictionary_4.parent_id = 'anaesthesia'";
}
if (val == 't_operate.ChosSurg') {
//是否择期手术
val = 't_dictionary_5.NAME AS chossurg';
dictionaryConvertStr += " LEFT JOIN dbo.t_dictionary AS t_dictionary_5 ON t_operate.ChosSurg = t_dictionary_5.CODE AND t_dictionary_5.typeCode = 'whether'";
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_5 ON t_operate.ChosSurg = t_dictionary_5.CODE AND t_dictionary_5.parent_id = 'whether'";
}
if (val == 't_baby.babySex') {
//婴儿性别
val = 't_dictionary_6.NAME AS babySex';
dictionaryConvertStr += " LEFT JOIN dbo.t_dictionary AS t_dictionary_6 ON t_baby.sex = t_dictionary_6.CODE AND t_dictionary_6.typeCode = 'sex_code'";
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_6 ON t_baby.sex = t_dictionary_6.CODE AND t_dictionary_6.parent_id = 'sex_code'";
}
if (val == 't_baby.childbirth_mothed') {
//分娩结果
val = 't_dictionary_7.NAME AS childbirthMothed';
dictionaryConvertStr += " LEFT JOIN dbo.t_dictionary AS t_dictionary_7 ON t_baby.childbirth_mothed = t_dictionary_7.CODE AND t_dictionary_7.typeCode = 'childbirthResult_code'";
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_7 ON t_baby.childbirth_mothed = t_dictionary_7.CODE AND t_dictionary_7.parent_id = 'childbirthResult_code'";
}
if (val == 't_baby.diag_type') {
//婴儿转归
val = 't_dictionary_8.NAME AS diagType';
dictionaryConvertStr += " LEFT JOIN dbo.t_dictionary AS t_dictionary_8 ON t_baby.diag_type = t_dictionary_8.CODE AND t_dictionary_8.typeCode = 'childStatus_code'";
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_8 ON t_baby.diag_type = t_dictionary_8.CODE AND t_dictionary_8.parent_id = 'childStatus_code'";
}
if (val == 't_baby.breathing') {
//婴儿呼吸
val = 't_dictionary_9.NAME AS breathing';
dictionaryConvertStr += " LEFT JOIN dbo.t_dictionary AS t_dictionary_9 ON t_baby.breathing = t_dictionary_9.CODE AND t_dictionary_9.typeCode = 'breath_code'";
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_9 ON t_baby.breathing = t_dictionary_9.CODE AND t_dictionary_9.parent_id = 'breath_code'";
}
if (val == 't_diag.diag_type') {
//诊断类型
val = 't_dictionary_10.NAME AS diagType';
dictionaryConvertStr += " LEFT JOIN dbo.t_dictionary AS t_dictionary_10 ON t_diag.diag_type = t_dictionary_10.CODE AND t_dictionary_10.typeCode = 'dis_diag_type'";
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_10 ON t_diag.diag_type = t_dictionary_10.CODE AND t_dictionary_10.parent_id = 'dis_diag_type'";
}
//拼接select语句
selectNames += val + ",";

@ -132,10 +132,13 @@ function freshTable(){
sql += orderBys;
//console.log(sql)
var flag = $("#showPrint").val();
//固定列标识
var mixFlag = false;
if(flag == 1){
flag = true;
}else{
flag = false;
mixFlag = true;
}
//生成用户数据
$('#mytab').bootstrapTable({
@ -155,7 +158,7 @@ function freshTable(){
height: 400,//高度调整 //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
buttonsAlign: "left",//按钮对齐方式
columns:columns,
//fixedColumns: true,//固定列
fixedColumns: mixFlag,//固定列
fixedNumber:5,//固定前五列
locale:'zh-CN',//中文支持,
url:path+'/template/cutomSearchTable',//排序方式

@ -1,3 +1,4 @@
toastr.options.positionClass = 'toast-bottom-right';
//bootstap时间插件
$('.datepicker').datepicker({
startDate:new Date(),

Loading…
Cancel
Save