更新版本20201111

master
zengwh 5 years ago
parent bb0af95c6b
commit e62c4d708c

Binary file not shown.

@ -1,7 +1,6 @@
package com.emr.controller;
import com.emr.entity.ArchiveOther;
import com.emr.entity.ArchiveOtherExtSubmittime;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.ipml.ArchiveOtherExtService;
import com.emr.service.ipml.ArchiveOtherService;
@ -64,13 +63,18 @@ public class ArchiveOtherExtController {
/**
*
* @param ids
* @param ids ext_id
* @param notNursingIds ext_idext_id
* @param detailIds detailid
* @param jzh
* @param masterId masterid
* @param sysFlag ext
* @return
* @throws Exception
*/
@RequestMapping("submitUpdate")
@ResponseBody
public Msg submitUpdate(String ids,String notNursingIds,String jzh,String masterId,Integer sysFlag) throws Exception{
public Msg submitUpdate(String ids,String notNursingIds,String detailIds,String jzh,String masterId,Integer sysFlag) throws Exception{
if(StringUtils.isBlank(ids)){
return Msg.fail("至少选中一个!");
}
@ -82,7 +86,7 @@ public class ArchiveOtherExtController {
return Msg.fail("masterId不能为空!");
}
}
archiveOtherExtService.updateSubmit(ids,notNursingIds,jzh,masterId,sysFlag);
archiveOtherExtService.updateSubmit(ids,notNursingIds,detailIds,jzh,masterId,sysFlag);
return Msg.success();
}

@ -0,0 +1,42 @@
package com.emr.controller;
import com.emr.entity.Power_User;
import com.emr.service.ipml.SendMessageService;
import com.emr.util.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
/**
* @ProjectName:
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2020/11/10 14:19
* @UpdateUser:
* @UpdateDate: 2020/11/10 14:19
* @UpdateRemark:
* @Version: 1.0
*/
@Controller
@RequestMapping("sendMessage")
public class SendMessageController {
@Autowired
private SendMessageService sendMessageService;
/**
*
* @return
*/
@RequestMapping(value="sendMessageForSubmit")
@ResponseBody
public Msg sendMessageForSubmit(HttpServletRequest request) throws Exception{
sendMessageService.sendMessageForSubmit(request);
return Msg.success();
}
}

@ -13,6 +13,7 @@ import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import com.emr.service.ipml.ArchiveFlowInfoService;
import com.emr.service.ipml.EmrOvertimeSetService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import com.emr.util.Msg;
@ -37,6 +38,8 @@ import java.util.List;
@Controller
@RequestMapping("/beHosp")
public class beHospitaledController {
@Value("${overDateSet}")
private String overDateSet;
@Autowired
private Archive_MasterService archiveMasterService;
@Value("${HomepageDictionary}")
@ -47,8 +50,19 @@ public class beHospitaledController {
private ArchiveFlowRoleMapper flowRoleMapper;
@Autowired
private ArchiveFlowInfoService flowInfoService;
@Autowired
private EmrOvertimeSetService emrOvertimeSetService;
@RequestMapping(value = "/beHosps")
public String inHospitals(){
public String inHospitals(Integer flag,Model model){
if(null != flag){
model.addAttribute("flag",flag);
model.addAttribute("overDateSet",overDateSet);
//获取超期提醒日期
String remindDate = emrOvertimeSetService.getRemindDate();
if(StringUtils.isNotBlank(remindDate)){
model.addAttribute("remindDate",remindDate);
}
}
return "beHospitaledDir/beHospList";
}

@ -11,11 +11,15 @@ import com.emr.service.Archive_MasterService;
import com.emr.service.Emr_Fault_DetailService;
import com.emr.service.Emr_Fault_TypeService;
import com.emr.service.ipml.Archive_DetailServiceImpl;
import com.emr.service.ipml.EmrOvertimeSetService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import com.emr.util.Msg;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@ -27,6 +31,8 @@ import java.util.List;
@Controller
@RequestMapping("lastVerify")
public class lastVerifyController {
@Value("${overDateSet}")
private String overDateSet;
@Autowired
private Archive_MasterService archiveMasterService;
@ -39,8 +45,20 @@ public class lastVerifyController {
@Autowired
private Archive_DetailServiceImpl archiveDetailService;
@Autowired
private EmrOvertimeSetService emrOvertimeSetService;
@RequestMapping(value = "/lastVerifys")
public String faults(){
public String faults(Integer flag, Model model){
if(null != flag){
model.addAttribute("flag",flag);
model.addAttribute("overDateSet",overDateSet);
//获取超期提醒日期
String remindDate = emrOvertimeSetService.getRemindDate();
if(StringUtils.isNotBlank(remindDate)){
model.addAttribute("remindDate",remindDate);
}
}
return "lastVerifyDir/lastVerifyList";
}

@ -20,7 +20,7 @@ public interface ArchiveOtherExtSubmittimeMapper {
List<ArchiveOtherExtSubmittime> selectAllByExtId(@Param("ids")String ids);
int createInfo(@Param("ids") String ids);
int createInfo(@Param("list") List<ArchiveOtherExtSubmittime> list);
int updateInfo(@Param("ids") String ids);
int updateInfo(@Param("list") List<ArchiveOtherExtSubmittime> list);
}

@ -31,4 +31,8 @@ public interface EmrHolidaySetMapper {
int selectColByTableName(@Param("tableName")String tableName);
int selectHolidayByDate(@Param("startDate") Date startDate);
List<EmrHolidaySet> selectWorkDayByDate(@Param("startDate")String startDate,
@Param("endDate")String endDate,
@Param("order")String order);
}

@ -20,4 +20,6 @@ public interface RecordMapper {
List<SubmitRecordStatistics> selectCountWithDate(RecordSearch recordSearch);
List<Archive_Master_Vo> selectRecordGroupDeptAndRole(RecordSearch recordSearch);
int selectCountOverTimeByRoleId(RecordSearch recordSearch);
}

@ -7,6 +7,7 @@ import com.emr.dao.RecordMapper;
import com.emr.entity.*;
import com.emr.service.ipml.CommomService;
import com.emr.service.ipml.EmrOvertimeSetService;
import com.emr.service.ipml.SendMessageService;
import com.emr.service.ipml.StatisticsService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.IDHelper;
@ -17,6 +18,7 @@ import com.emr.vo.User;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.apache.shiro.util.CollectionUtils;
import org.aspectj.weaver.ast.Var;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@ -39,8 +41,6 @@ import java.util.*;
@Component
public class Task1 {
private static Logger log = Logger.getLogger("myMsg");
@Value("${overDateSet}")
private String overDateSet;
@Autowired
private RecordMapper recordMapper;
@Autowired
@ -50,23 +50,16 @@ public class Task1 {
@Autowired
private StatisticsService statisticsService;
@Autowired
private EmrOvertimeSetService overtimeSetService;
@Autowired
private CommomService commomService;
@Autowired
private ArchiveRemindDeptUserInfoMapper remindDeptUserInfoMapper;
@Autowired
private SendMessageService sendMessageService;
//@Scheduled(cron="#{@getCronValue}")
public void task1(){
try {
long start = System.currentTimeMillis();
RecordSearch recordSearch = new RecordSearch();
//设置查询超期标识
recordSearch.setFlag(2);
//设置起始时间
recordSearch.setStartDate(overDateSet);
//设置提前提醒天数
EmrOvertimeSet emrOvertimeSet = overtimeSetService.selectByPrimaryKey(1);
recordSearch.setSurplus(emrOvertimeSet.getSurplusDays());
RecordSearch recordSearch = sendMessageService.selectRecordSearch();
//查询超期记录
List<SubmitRecord> list = recordMapper.selectUnCountGroupDept(recordSearch);
log.info(list);
@ -74,7 +67,7 @@ public class Task1 {
//定义添加记录集合
List<ArchiveRemindDeptUserInfo> remindList = new ArrayList<>();
//获取用户集合
List<User> userListTemp = statisticsService.getUserList("admin");
List<User> userListTemp = commomService.getUserList("admin");
//查询科室取消提醒集合
List<ArchiveRemindcancleDept> cancleDeptList = remindcancleDeptMapper.selectAll();
//查询科室取消单独开启的用户
@ -355,46 +348,11 @@ public class Task1 {
}
//设置姓名
obj.setName(name);
//定义审核角色
String roleBranchName = "";
//定义待审核状态
String roleStatus = "";
switch (obj.getRoleId()){
case 1:
roleBranchName = "医生";
roleStatus = "医生待审核";
break;
case 5:
roleBranchName = "医生";
roleStatus = "质控员待审核";
break;
case 6:
roleBranchName = "主任";
roleStatus = "科主任待审核";
break;
case 2:
roleBranchName = "护士";
roleStatus = "护士待审核";
break;
case 8:
roleBranchName = "护士";
roleStatus = "质控员待审核";
break;
case 7:
roleBranchName = "护士长";
roleStatus = "护士长待审核";
break;
case 3:
roleBranchName = "病案室人员";
roleStatus = "病案室人员待审核";
break;
default:
roleBranchName = "无效角色";
roleStatus = "无效角色待审核";
}
obj.setStr1(roleStatus);
//根据角色Id获取角色名称和角色称呼 list.get(0) = 角色名称 list.get(1) = 角色称呼
List<String> roleList = sendMessageService.selectInfoIdAndRoleName(obj.getRoleId());
obj.setStr1(roleList.get(1));
//设置发送内容 ***医生,你有多少份病历是质控员待审核状态,请及时查阅
String sendContext = name + roleBranchName + ",您有"+count+"份病历是"+roleStatus+"状态,请及时查阅";
String sendContext = sendMessageService.selectContentByRole(name,count,roleList);
obj.setSendContext(sendContext);
return obj;
}

@ -38,8 +38,6 @@ public class ArchiveTransferDeptUserService {
@Autowired
private Emr_DictionaryService dictionaryService;
@Autowired
private StatisticsService statisticsService;
@Autowired
private ArchiveTransferDeptUserMapper transferDeptUserMapper;
@Autowired
private CommomService commomService;
@ -49,7 +47,7 @@ public class ArchiveTransferDeptUserService {
List<CommomTree> list = new ArrayList<>();
if(!CollectionUtils.isEmpty(dictionaries)){
//查询用户信息
List<User> userList = statisticsService.getUserList();
List<User> userList = commomService.getUserList();
if(!CollectionUtils.isEmpty(userList)){
//查询有选中的用户
List<ArchiveTransferDeptUser> transferDeptUsers = transferDeptUserMapper.selectAllByMasterId(masterId);

@ -49,7 +49,7 @@ public class ArchiveCallbackInfoService {
@Autowired
private ArchiveFlowInfoService archiveFlowInfoService;
@Autowired
private StatisticsService statisticsService;
private CommomService commomService;
@Autowired
private ArchiveFlowRoleMapper flowRoleMapper;
/**
@ -129,7 +129,7 @@ public class ArchiveCallbackInfoService {
if (!CollectionUtils.isEmpty(list)) {
//转换状态
//计算属于哪种审核角色
List<User> userList = statisticsService.getUserList();
List<User> userList = commomService.getUserList();
for (ArchiveCallbackInfoVo callbackInfoVo1 : list) {
String archivestate = callbackInfoVo1.getArchivestate();
if (StringUtils.isNotBlank(archivestate)) {

@ -42,7 +42,7 @@ public class ArchiveFlowInfoService {
@Autowired
private Archive_MasterMapper archiveMasterMapper;
@Autowired
private StatisticsService statisticsService;
private CommomService commomService;
@Autowired
private Emr_Fault_TypeService faultTypeService;
@Autowired
@ -268,7 +268,7 @@ public class ArchiveFlowInfoService {
Emr_Fault_Type obj = new Emr_Fault_Type();
obj.setEffective(1);
List<Emr_Fault_Type> typeList = faultTypeService.selectByCol(obj);
List<User> userList = statisticsService.getUserList();
List<User> userList = commomService.getUserList();
//替换姓名
if (!CollectionUtils.isEmpty(userList)) {
for (ArchiveFlowInfoVo infoVo : list) {
@ -314,7 +314,7 @@ public class ArchiveFlowInfoService {
String checkName = flowInfoVo.getUserName();
if(StringUtils.isNoneBlank(checkName)){
//转换姓名
List<User> userList = statisticsService.getUserList();
List<User> userList = commomService.getUserList();
StringBuilder checkNames = new StringBuilder();
for(User user:userList){
if(StringUtils.isNoneBlank(user.getName()) && user.getName().contains(checkName)){
@ -331,7 +331,7 @@ public class ArchiveFlowInfoService {
List<ArchiveFlowInfoVo> list = flowInfoMapper.selectFlowInfoList(flowInfoVo,sql);
//替换姓名
if(!CollectionUtils.isEmpty(list)) {
List<User> userList = statisticsService.getUserList();
List<User> userList = commomService.getUserList();
if (!CollectionUtils.isEmpty(userList)) {
for (ArchiveFlowInfoVo infoVo : list) {
//转换姓名

@ -17,7 +17,9 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
@ -118,7 +120,7 @@ public class ArchiveOtherExtService {
* @param masterId
* @param sysFlag
*/
public void updateSubmit(String ids,String notNursingIds, String jzh, String masterId, Integer sysFlag) throws Exception{
public void updateSubmit(String ids,String notNursingIds, String detailIds,String jzh, String masterId, Integer sysFlag) throws Exception{
String idsStr = splitString2String(ids);
String idsTemp = idsStr;
//存在护理记录则调用护理按需采集功能
@ -133,10 +135,9 @@ public class ArchiveOtherExtService {
//ext表更新非护理记录
if(StringUtils.isNotBlank(notNursingIds)){
updateCommomSubmit(idsTemp);
//archiveOtherExtMapper.updateSubmit(idsTemp);
}
//操作提交信息表
operOtherExtSubmitInfo(ids, idsStr);
operOtherExtSubmitInfo(ids,idsStr,detailIds);
}
/**
@ -235,18 +236,32 @@ public class ArchiveOtherExtService {
/**
*
* @param ids
* @param idsStr
* @param ids ext_id
* @param idsStr ext_id
*/
private void operOtherExtSubmitInfo(String ids, String idsStr) {
private void operOtherExtSubmitInfo(String ids,String idsStr,String detailIds) {
//查询ext_id在ext_info表中是否存在
List<ArchiveOtherExtSubmittime> infoList = archiveOtherExtSubmittimeMapper.selectAllByExtId(idsStr);
//定义需要新增的id集合
StringBuilder createStr = new StringBuilder();
//定义需要更新的id集合
StringBuilder updateStr = new StringBuilder();
//定义需要新增的集合
List<ArchiveOtherExtSubmittime> createList = new ArrayList<>();
//定义需要更新的集合
List<ArchiveOtherExtSubmittime> updateList = new ArrayList<>();
//获取id集合
String[] idArr = ids.split(",");
for(String id : idArr){
//获取detailId集合
String[] detailIdArr = detailIds.split(",");
//获取当前时间
Date date = new Date();
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
for(int i = 0;i < idArr.length;i++){
//定义需求操作的对象
String id = idArr[i];
ArchiveOtherExtSubmittime objTemp = new ArchiveOtherExtSubmittime();
objTemp.setCreateTime(fmt.format(date));
objTemp.setOtherExtId(id);
if(StringUtils.isNoneBlank(detailIdArr[i]) && !"null".equals(detailIdArr[i])) {
objTemp.setStr1(detailIdArr[i]);
}
if(StringUtils.isNotBlank(id)) {
//定义是否存在
boolean flag = false;
@ -255,6 +270,8 @@ public class ArchiveOtherExtService {
for(ArchiveOtherExtSubmittime obj : infoList){
String otherExtId = obj.getOtherExtId();
if(id.equals(otherExtId)){
//存在赋值id
objTemp.setId(obj.getId());
flag = true;
break;
}
@ -262,25 +279,19 @@ public class ArchiveOtherExtService {
}
//存在添加进updateStr,不存在添加进createStr
if(flag){
if (StringUtils.isNotBlank(updateStr)) {
updateStr.append(",");
}
updateStr.append("'").append(id).append("'");
updateList.add(objTemp);
}else{
if (StringUtils.isNotBlank(createStr)) {
createStr.append(",");
}
createStr.append(id);
createList.add(objTemp);
}
}
}
//存在则批量更新
if(StringUtils.isNotBlank(updateStr)){
archiveOtherExtSubmittimeMapper.updateInfo(updateStr.toString());
if(!CollectionUtils.isEmpty(updateList)){
archiveOtherExtSubmittimeMapper.updateInfo(updateList);
}
//存在则批量新增
if(StringUtils.isNotBlank(createStr)){
archiveOtherExtSubmittimeMapper.createInfo(createStr.toString());
//存在则批量新增
if(!CollectionUtils.isEmpty(createList)){
archiveOtherExtSubmittimeMapper.createInfo(createList);
}
}
}

@ -131,7 +131,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
}
//如果成功匹配个数和需校验分类个数相等,全部匹配
//特殊情况验证完整性婴儿带B的住院号少验证类:病案首页、入(出、死亡)院记录
//特殊情况验证完整性婴儿带B的住院号少验证类:病案首页、入(出、死亡)院记录
int verificationCount = 0;
String inpNo = master.getInpNo();
if(StringUtils.isNotBlank(inpNo)){
@ -215,7 +215,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
List<Emr_Dictionary> dictionaries = dictionaryMapper.dicByTypeCode(dictionary);
for (Archive_Master_Vo masterVo : list) {
//科室名称编码转名称
DeptNameCode2Name(dictionaries, masterVo);
deptNameCode2Name(dictionaries, masterVo);
//状态均为护士长已质控,取出一个对象,转换中文状态
Integer status = Integer.valueOf(masterVo.getArchivestate());
if(status.equals(EnumVerify.DocState.HeadNurseCheck.getCode())){
@ -310,10 +310,11 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
@Override
public List<Archive_Master_Vo> selectByColumn(Archive_Master_Vo archiveMasterVo,HttpServletRequest request) {
setMaxRoleId(archiveMasterVo);
//设置查询条件审核角色
setInfoId(archiveMasterVo);
//设置登录用户
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
if(user.getRoleId() == 1 && user.getRoleId() != -100){
if(user.getRoleId() != 1 && user.getRoleId() != -100 && user.getRoleId() != 0){
archiveMasterVo.setUserName(user.getUserName());
}
List<Archive_Master_Vo> list = archiveMasterMapper.selectByColumn(archiveMasterVo);
@ -346,6 +347,36 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
return list;
}
/**
*
* @param archiveMasterVo
*/
private void setInfoId(Archive_Master_Vo archiveMasterVo) {
String status = archiveMasterVo.getStatus();
//取最大值
String archivestate = archiveMasterVo.getArchivestate();
if(StringUtils.isNotBlank(status) && StringUtils.isNotBlank(archivestate)){
if ("1".equals(archivestate)){
//已审核,取最大
Integer maxStatus = 0;
String[] statusArr = status.split(",");
for (String statu : statusArr) {
if (StringUtils.isNotBlank(statu)) {
Integer integer = Integer.valueOf(statu);
if (maxStatus < integer) {
//重新赋值
maxStatus = integer;
}
}
}
archiveMasterVo.setStatus(maxStatus+"");
}else{
//待审核,取带逗号的字符串的数
archiveMasterVo.setStatus(status);
}
}
}
/**
*
*
@ -375,7 +406,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
vo.setD1(new BigDecimal(0));
}
//科室名称编码转名称
DeptNameCode2Name(dictionaries, vo);
deptNameCode2Name(dictionaries, vo);
//赋值出院天数
if(!CollectionUtils.isEmpty(selectDays)){
for(Archive_Master_Vo days : selectDays){
@ -394,7 +425,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
* @param dictionaries
* @param vo
*/
private void DeptNameCode2Name(List<Emr_Dictionary> dictionaries, Archive_Master_Vo vo) {
private void deptNameCode2Name(List<Emr_Dictionary> dictionaries, Archive_Master_Vo vo) {
if(!CollectionUtils.isEmpty(dictionaries)) {
//在院科室
String deptAdmissionTo = vo.getDeptAdmissionTo();
@ -1045,7 +1076,6 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
int genegrateRole = 0;
//拼接有权限的code
StringBuilder powerCode = new StringBuilder();
Integer role = 0;
//遍历判断拥有权限拥有护士长权限立即返回4拥有医生支线赋值doctorRole=1,拥有护士支线赋值nurseRole=1
for (String menu : menus) {
if(StringUtils.isNotBlank(menu)){

@ -1,9 +1,23 @@
package com.emr.service.ipml;
import com.alibaba.fastjson.JSON;
import com.emr.dao.CommomMapper;
import com.emr.entity.Power_User;
import com.emr.vo.User;
import net.sf.json.JSONObject;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
@ -22,6 +36,10 @@ import java.util.List;
@Service
@Transactional
public class CommomService {
@Value("${POWER_URLHEAD}")
private String POWER_URLHEAD;
@Autowired
private StatisticsService statisticsService;
/**
*
* @param tableName
@ -49,4 +67,78 @@ public class CommomService {
}
}
}
/**
* session
* @return
* @throws Exception
*/
public List<User> getUserList() throws Exception{
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
List<User> userList = (List<User>)request.getSession().getAttribute("USER_LIST");
if(null == userList || userList.isEmpty()){
String userName = (String) request.getSession().getAttribute("userSession");
//调用接口查询
String resultString = "";
// 创建uri
String url = POWER_URLHEAD+"/font/getUserList?userName="+userName;
// 执行请求
CloseableHttpResponse response = HttpClients.createDefault().execute(new HttpGet(url));
// 判断返回状态是否为200
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
JSONObject jsonObject = JSONObject.fromObject(resultString);
String extend = jsonObject.getString("extend");
JSONObject extendObject = JSONObject.fromObject(extend);
String userList1 = extendObject.getString("userList");
userList = JSON.parseArray(userList1,User.class);
//设置进session
request.getSession().setAttribute("USER_LIST",userList);
}
return userList;
}
/**
* session
* @return
* @throws Exception
*/
public List<User> getUserList(String userName) throws Exception{
//调用接口查询
String resultString = "";
// 创建uri
String url = POWER_URLHEAD+"/font/getUserList?userName="+userName;
// 执行请求
CloseableHttpResponse response = HttpClients.createDefault().execute(new HttpGet(url));
// 判断返回状态是否为200
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
JSONObject jsonObject = JSONObject.fromObject(resultString);
String extend = jsonObject.getString("extend");
JSONObject extendObject = JSONObject.fromObject(extend);
String userList1 = extendObject.getString("userList");
List<User> userList = JSON.parseArray(userList1,User.class);
//设置进session
return userList;
}
/**
* sessiondeptCode
* @param userName
* @return
* @throws Exception
*/
public String selectDeptCodeByUser(String userName) throws Exception {
List<User> userList = getUserList();
if(!CollectionUtils.isEmpty(userList)){
for(User user : userList){
if(user.getUserName().equals(userName)){
return user.getDeptCode();
}
}
}
return null;
}
}

@ -1,10 +1,7 @@
package com.emr.service.ipml;
import com.alibaba.fastjson.JSON;
import com.emr.dao.ArchiveRemindDeptUserMapper;
import com.emr.dao.ArchiveRemindcancleDeptMapper;
import com.emr.dao.ArchiveTransferDeptUserMapper;
import com.emr.dao.EmrOvertimeSetMapper;
import com.emr.dao.*;
import com.emr.entity.*;
import com.emr.quart.DynamicScheduleTaskSecond;
import com.emr.service.Emr_DictionaryService;
@ -13,10 +10,13 @@ import com.emr.vo.User;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -34,13 +34,13 @@ import java.util.List;
@Service
@Transactional
public class EmrOvertimeSetService {
@Value("${overDateSet}")
private String overDateSet;
@Autowired
private EmrOvertimeSetMapper overtimeSetMapper;
@Autowired
private Emr_DictionaryService dictionaryService;
@Autowired
private StatisticsService statisticsService;
@Autowired
private ArchiveRemindcancleDeptMapper remindcancleDeptMapper;
@Autowired
private ArchiveRemindDeptUserMapper remindDeptUserMapper;
@ -49,7 +49,7 @@ public class EmrOvertimeSetService {
@Autowired
private DynamicScheduleTaskSecond dynamicScheduleTaskSecond;
@Autowired
private ArchiveTransferDeptUserMapper transferDeptUserMapper;
private EmrHolidaySetMapper holidaySetMapper;
/**
*
* @return
@ -113,7 +113,7 @@ public class EmrOvertimeSetService {
List<CommomTree> list = new ArrayList<>();
if(!CollectionUtils.isEmpty(dictionaries)){
//查询用户信息
List<User> userList = statisticsService.getUserList();
List<User> userList = commomService.getUserList();
if(!CollectionUtils.isEmpty(userList)){
//查询取消科室提醒单独提醒的用户
List<ArchiveRemindDeptUser> remindDeptUsers = remindDeptUserMapper.selectAll();
@ -237,4 +237,24 @@ public class EmrOvertimeSetService {
//批量插入
commomService.insertBatch("archive_remind_dept_user",list,remindDeptUserMapper);
}
/**
*
* @return
*/
public String getRemindDate(){
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
//获取工作日集合
List<EmrHolidaySet> workDateList = holidaySetMapper.selectWorkDayByDate(overDateSet, fmt.format(new Date()), "date desc");
if(!CollectionUtils.isEmpty(workDateList)){
//查询超期设置参数
EmrOvertimeSet emrOvertimeSet = overtimeSetMapper.selectByPrimaryKey(1);
//获取提前超期天数
Integer surplusDays = emrOvertimeSet.getSurplusDays();
if(workDateList.size() >= surplusDays){
return workDateList.get(surplusDays).getDate();
}
}
return null;
}
}

@ -40,7 +40,7 @@ public class Emr_Fault_DetailServiceImpl implements Emr_Fault_DetailService {
@Autowired
private Archive_MasterService archiveMasterService;
@Autowired
private StatisticsService statisticsService;
private CommomService commomService;
/**
*
* 退
@ -66,7 +66,7 @@ public class Emr_Fault_DetailServiceImpl implements Emr_Fault_DetailService {
obj.setEffective(1);
List<Emr_Fault_Type> typeLis = emrFaultTypeService.selectByCol(obj);
Msg role = archiveMasterService.getRole();
List<User> userList = statisticsService.getUserList();
List<User> userList = commomService.getUserList();
if(null != role) {
for (Emr_Fault_Vo emr_fault_vo : list) {
//根据状态code转换状态及判断显示按钮

@ -21,7 +21,7 @@ public class RecordService {
@Autowired
private Emr_DictionaryMapper dictionaryMapper;
@Autowired
private StatisticsService statisticsService;
private CommomService commomService;
@Autowired
private Archive_MasterService archiveMasterService;
/**
@ -203,7 +203,7 @@ public class RecordService {
public List<Archive_Master_Vo> selectRecordGroupDeptAndRole(RecordSearch recordSearch) throws Exception{
List<Archive_Master_Vo> list = recordMapper.selectRecordGroupDeptAndRole(recordSearch);
if(!CollectionUtils.isEmpty(list)){
List<User> userList = statisticsService.getUserList();
List<User> userList = commomService.getUserList();
for (Archive_Master_Vo obj : list) {
//转换工号
if(!CollectionUtils.isEmpty(userList)) {

@ -0,0 +1,176 @@
package com.emr.service.ipml;
import com.emr.dao.RecordMapper;
import com.emr.entity.EmrOvertimeSet;
import com.emr.entity.Power_User;
import com.emr.util.HttpClientUtils;
import com.emr.vo.RecordSearch;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
/**
* @ProjectName:
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2020/11/10 14:20
* @UpdateUser:
* @UpdateDate: 2020/11/10 14:20
* @UpdateRemark:
* @Version: 1.0
*/
@Service
public class SendMessageService {
@Value("${overDateSet}")
private String overDateSet;
@Value("${POWER_URLHEAD}")
private String POWER_URLHEAD;
@Autowired
private EmrOvertimeSetService overtimeSetService;
@Autowired
private RecordMapper recordMapper;
@Autowired
private CommomService commomService;
/**
* Id
* @param roleId
* @return list list.get(0) = list.get(1) = list.get(2) = infoId
*/
public List<String> selectInfoIdAndRoleName(int roleId) {
//roleId:1:医生,2:护士3:病案室人员,5:医生质控员6:科主任7:护士长,8:护士质控员
//infoId:2医生3医生质控员4科主任5护士6护士质控员;7护士长8病案室人员
List<String> list = new LinkedList<>();
switch (roleId){
case 1:
list.add("医生");
list.add("医生待审核");
list.add("2");
break;
case 5:
list.add("医生");
list.add("质控员待审核");
list.add("3");
break;
case 6:
list.add("主任");
list.add("科主任待审核");
list.add("4");
break;
case 2:
list.add("护士");
list.add("护士待审核");
list.add("5");
break;
case 8:
list.add("护士");
list.add("质控员待审核");
list.add("6");
break;
case 7:
list.add("护士长");
list.add("护士长待审核");
list.add("7");
break;
case 3:
list.add("病案室人员");
list.add("病案室人员待审核");
list.add("8");
break;
default:
list.add("无效角色");
list.add("无效角色待审核");
list.add("1");
}
return list;
}
/**
*
* @param name
* @param count
* @param roleList Id list list.get(0) = list.get(1) =
* @return
*/
public String selectContentByRole(String name,Integer count,List<String> roleList){
return name + roleList.get(0) + ",您有"+count+"份病历是"+roleList.get(1)+"状态,请及时查阅";
}
/**
*
* @param userId Id
* @param content
*/
public void sendMessage(Integer userId, String content,String typeFlag) {
Map<String, String> map = new HashMap<>();
map.put("title", "待审核病历即将超期通知");
map.put("content", content);
map.put("sysFlag", "emr_medical_record");
map.put("userId", userId + "");
map.put("typeFlag", typeFlag);
//请求power系统发送信息
HttpClientUtils.doGet(POWER_URLHEAD + "/font/sendMessage", map);
}
/**
*
* @param request
*/
public void sendMessageForSubmit(HttpServletRequest request) throws Exception {
//获取登录用户
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
//定义需要发送通知的角色id集合
Integer[] roleIdArr = {1,2,3,5,6,7,8};
int roleId = user.getRoleId();
//判断是否需要发送通知
int flag = Arrays.binarySearch(roleIdArr,roleId);
if(flag >= 0) {
//获取deptCode
String deptCode = commomService.selectDeptCodeByUser(user.getUserName());
if(StringUtils.isNoneBlank(deptCode) && !"1".equals(deptCode)) {
//组织即将到期的待审核病历数的查询条件
RecordSearch recordSearch = selectRecordSearch();
//非病案室人员根据科室查
if(user.getRoleId() != 3) {
recordSearch.setDeptName(deptCode);
}
//是医生的话明细到主管医生份数
if(user.getRoleId().equals(1)){
recordSearch.setDoctorInCharge(user.getUserPosition());
}
//获取角色名称与角色称呼、infoId
List<String> roleList = selectInfoIdAndRoleName(user.getRoleId());
recordSearch.setInfoId(Integer.valueOf(roleList.get(2)));
//查询该用户即将到期的待审核病历数
int count = recordMapper.selectCountOverTimeByRoleId(recordSearch);
if(count > 0) {
//组织通知内容 XXX医生或护士您有X份病历是XX角色待审核状态请及时查阅
String content = selectContentByRole(user.getUserPosition(), count, roleList);
//调用权限系统发送消息接口
sendMessage(user.getUserId(), content,"sendOverTimeMessage");
}
}
}
}
/**
*
* @return
*/
public RecordSearch selectRecordSearch(){
RecordSearch recordSearch = new RecordSearch();
//设置查询超期标识
recordSearch.setFlag(2);
//设置起始时间
recordSearch.setStartDate(overDateSet);
//设置提前提醒天数
EmrOvertimeSet emrOvertimeSet = overtimeSetService.selectByPrimaryKey(1);
recordSearch.setSurplus(emrOvertimeSet.getSurplusDays());
return recordSearch;
}
}

@ -45,8 +45,6 @@ import java.util.List;
@Service
@Transactional
public class StatisticsService {
@Value("${POWER_URLHEAD}")
private String POWER_URLHEAD;
@Autowired
private StatisticsMapper statisticsMapper;
@Autowired
@ -55,6 +53,8 @@ public class StatisticsService {
private TUuInfoMapper uuInfoMapper;
@Autowired
private RecordStatisticsMapper recordStatisticsMapper;
@Autowired
private CommomService commomService;
//终审按天统计
public List<FinalAndFirstStatistics> getFinalStatistics(Integer offset, Integer limit, String startDate, String endDate,String sql) throws Exception{
if(null != offset && null != limit){
@ -62,7 +62,7 @@ public class StatisticsService {
}
List<FinalAndFirstStatistics> list = statisticsMapper.finalStatistics(startDate, endDate,sql);
//转换姓名
List<User> userList = getUserList();
List<User> userList = commomService.getUserList();
if(!CollectionUtils.isEmpty(list) && !CollectionUtils.isEmpty(userList)) {
for (FinalAndFirstStatistics statistics : list) {
for (User user : userList) {
@ -84,7 +84,7 @@ public class StatisticsService {
}
List<FinalAndFirstStatistics> list = statisticsMapper.firstStatistics(startDate, endDate,sql);
//转换姓名
List<User> userList = getUserList();
List<User> userList = commomService.getUserList();
if(!CollectionUtils.isEmpty(list) && !CollectionUtils.isEmpty(userList)) {
for (FinalAndFirstStatistics statistics : list) {
for (User user : userList) {
@ -117,7 +117,7 @@ public class StatisticsService {
public List<Archive_Master_Vo> getDetailList(String disStartDate, String disEndDate, Archive_Master_Vo archiveMasterVo,Integer flag,String sql) throws Exception{
//转换姓名
List<User> userList = getUserList();
List<User> userList = commomService.getUserList();
String checkDoctor = archiveMasterVo.getCheckDoctor();
//模糊搜索审核姓名转换工号
if(StringUtils.isNoneBlank(checkDoctor)){
@ -178,51 +178,6 @@ public class StatisticsService {
return uuInfoMapper.getScanInfo(search);
}
public List<User> getUserList() throws Exception{
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
List<User> userList = (List<User>)request.getSession().getAttribute("USER_LIST");
if(null == userList || userList.isEmpty()){
String userName = (String) request.getSession().getAttribute("userSession");
//调用接口查询
String resultString = "";
// 创建uri
String url = POWER_URLHEAD+"/font/getUserList?userName="+userName;
// 执行请求
CloseableHttpResponse response = HttpClients.createDefault().execute(new HttpGet(url));
// 判断返回状态是否为200
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
JSONObject jsonObject = JSONObject.fromObject(resultString);
String extend = jsonObject.getString("extend");
JSONObject extendObject = JSONObject.fromObject(extend);
String userList1 = extendObject.getString("userList");
userList = JSON.parseArray(userList1,User.class);
//设置进session
request.getSession().setAttribute("USER_LIST",userList);
}
return userList;
}
public List<User> getUserList(String userName) throws Exception{
//调用接口查询
String resultString = "";
// 创建uri
String url = POWER_URLHEAD+"/font/getUserList?userName="+userName;
// 执行请求
CloseableHttpResponse response = HttpClients.createDefault().execute(new HttpGet(url));
// 判断返回状态是否为200
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
JSONObject jsonObject = JSONObject.fromObject(resultString);
String extend = jsonObject.getString("extend");
JSONObject extendObject = JSONObject.fromObject(extend);
String userList1 = extendObject.getString("userList");
List<User> userList = JSON.parseArray(userList1,User.class);
//设置进session
return userList;
}
/**
*
* @param recordStatistics

@ -1,7 +1,9 @@
package com.emr.shiro;
import com.alibaba.fastjson.JSONObject;
import com.emr.entity.Power_User;
import com.emr.util.HttpClientUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
@ -10,22 +12,18 @@ import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.PrincipalCollection;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.HashSet;
import java.util.Set;
/**
* @author HJL
* @create 2019/4/29
*/
public class MyRealm extends AuthorizingRealm {
//获取权限列表
/*@Autowired
private PermissionService permissionService;
//获取用户
@Autowired
private UserService userService;
////获取用户角色
@Autowired
private RoleService roleService;*/
@Value("${powerUrl}")
private String powerUrl;
@ -35,16 +33,26 @@ public class MyRealm extends AuthorizingRealm {
*/
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
//获取登录时输入的用户名
String username = (String) principalCollection.getPrimaryPrincipal();
if (username != null) {
if (user != null) {
Set<String> menus = user.getMenus();
// 用户权限列表
Set<String> permsSet = new HashSet<String>();
if(null != menus && !menus.isEmpty()){
for(String menu : menus){
if(StringUtils.isNoneBlank(menu)){
permsSet.add(menu);
}
}
}
SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
info.addStringPermission("/login");
info.addStringPermission("index");
info.addRole("0");
info.setStringPermissions(permsSet);
return info;
}else{
return null;
}
return null;
}
/**

@ -0,0 +1,55 @@
package com.emr.vo;
/**
* @ProjectName:
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2020/11/9 15:30
* @UpdateUser:
* @UpdateDate: 2020/11/9 15:30
* @UpdateRemark:
* @Version: 1.0
*/
public class Message {
private Integer userId;
private String sysFlag;
private String title;
private String content;
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getSysFlag() {
return sysFlag;
}
public void setSysFlag(String sysFlag) {
this.sysFlag = sysFlag;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}

@ -39,14 +39,30 @@
<property name="url" value="${jdbc.url}"/> <!--数据库地址-->
<property name="username" value="${jdbc.username}"/> <!--用户名-->
<property name="password" value="${jdbc.password}"/> <!--密码-->
<property name="maxActive" value="40"/> <!-- 最大连接数-->
<property name="minIdle" value="1"/> <!--最小连接数-->
<property name="initialSize" value="10"/> <!-- 初始化连接池内的数据库连接-->
<property name="validationQuery" value="select 1"/><!--验证连接是否可用使用的SQL语句-->
<property name="testOnBorrow" value="false"/><!--借出连接时不要测试,否则很影响性能-->
<property name="testWhileIdle" value="true"/><!-- 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除.-->
<property name="minEvictableIdleTimeMillis" value="1800000"/><!-- 池中的连接空闲30分钟后被回收,默认值就是30分钟-->
<property name="maxWait" value="${maxWait}"/>
<property name = "filters" value = "${filters}" />
<!-- 最大并发连接数 -->
<property name = "maxActive" value = "${maxActive}" />
<!-- 初始化连接数量 -->
<property name = "initialSize" value = "${initialSize}" />
<!-- 配置获取连接等待超时的时间 -->
<property name = "maxWait" value = "${maxWait}" />
<!-- 最小空闲连接数 -->
<property name = "minIdle" value = "${minIdle}" />
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property name = "timeBetweenEvictionRunsMillis" value ="${timeBetweenEvictionRunsMillis}" />
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property name = "minEvictableIdleTimeMillis" value ="${minEvictableIdleTimeMillis}" />
<property name = "validationQuery" value = "${validationQuery}" />
<property name = "testWhileIdle" value = "${testWhileIdle}" />
<property name = "testOnBorrow" value = "${testOnBorrow}" />
<property name = "testOnReturn" value = "${testOnReturn}" />
<property name = "maxOpenPreparedStatements" value ="${maxOpenPreparedStatements}" />
<!-- 打开 removeAbandoned 功能 -->
<property name = "removeAbandoned" value = "${removeAbandoned}" />
<!-- 1800 秒,也就是 30 分钟 -->
<property name = "removeAbandonedTimeout" value ="${removeAbandonedTimeout}" />
<!-- 关闭 abanded 连接时输出错误日志 -->
<property name = "logAbandoned" value = "${logAbandoned}" />
</bean>

@ -1,6 +1,6 @@
#power\u6743\u9650\u7CFB\u7EDFIP\u548C\u7AEF\u53E3
#POWER_IP = localhost
#POWER_PORT = 8080
#POWER_IP = 192.168.1.3
#POWER_PORT = 8081
POWER_IP = 200.100.104.40
POWER_PORT = 8081
@ -17,10 +17,8 @@ powerUrl=${POWER_URLHEAD}/font/getMenusByUserIdAndSysFlag
#\u6821\u9A8C\u5B8C\u6574\u6027webService\u670D\u52A1\u63A5\u53E3
#\u6821\u9A8C\u5B8C\u6574\u6027IP
#CHECKSUCCESS_IP = 200.100.104.40
CHECKSUCCESS_IP = ${POWER_IP}
#\u6821\u9A8C\u5B8C\u6574\u6027\u7AEF\u53E3
#CHECKSUCCESS_PORT = 8081
CHECKSUCCESS_PORT = ${POWER_PORT}
HomepageDictionary=http://${CHECKSUCCESS_IP}:${CHECKSUCCESS_PORT}/WholeCheckInterface/services/HomepageDictionary?wsdl
HomepageMethod=CheckData

@ -1,13 +1,37 @@
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
#jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=gm_record
#jdbc.username=sa
#jdbc.password=docus702
#\u6570\u636E\u5E93IP
#dataBaseIp=localhost
##\u6570\u636E\u5E93\u540D\u79F0
#dataBaseName=gm_record
##\u6570\u636E\u5E93\u5BC6\u7801
#dataBasePassword=docus702
#\u6570\u636E\u5E93IP
dataBaseIp=200.100.104.40
#\u6570\u636E\u5E93\u540D\u79F0
dataBaseName=emr_record
#\u6570\u636E\u5E93\u5BC6\u7801
dataBasePassword=AbcXyz123
jdbc.url=jdbc\:sqlserver\://200.100.104.40:1433;databaseName=emr_record
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc\:sqlserver\://${dataBaseIp}:1433;databaseName=${dataBaseName}
jdbc.username=sa
jdbc.password=AbcXyz123
filters=stat
maxWait=60000
jdbc.password=${dataBasePassword}
filters: stat
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 10
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
maxOpenPreparedStatements: 20
removeAbandoned: true
removeAbandonedTimeout: 1800
logAbandoned: true

@ -138,7 +138,7 @@
</update>
<!--批量查询-->
<select id="selectAllByExtId" resultMap="BaseResultMap">
select other_ext_id from archive_other_ext_submitTime
select id,other_ext_id from archive_other_ext_submitTime
<where>
<if test="ids != null and ids != ''">
and other_ext_id in (${ids})
@ -148,17 +148,30 @@
<!--批量添加-->
<insert id="createInfo">
insert into
archive_other_ext_submitTime(other_ext_id,create_time)
archive_other_ext_submitTime(other_ext_id, create_time,
int1, int2, int3, str1,str2, str3)
values
<foreach collection="ids.split(',')" item="id" separator=",">
<foreach collection="list" item="item" separator=",">
(
${id}, CONVERT(varchar(19),GETDATE(),120)
#{item.otherExtId,jdbcType=VARCHAR}, #{item.createTime,jdbcType=VARCHAR},
#{item.int1,jdbcType=INTEGER}, #{item.int2,jdbcType=INTEGER}, #{item.int3,jdbcType=INTEGER}, #{item.str1,jdbcType=NVARCHAR},
#{item.str2,jdbcType=NVARCHAR}, #{item.str3,jdbcType=NVARCHAR}
)
</foreach>
</insert>
<!--批量更新-->
<update id="updateInfo">
update archive_other_ext_submitTime set create_time = CONVERT(varchar(19),GETDATE(),120)
where other_ext_id in (${ids})
<foreach collection="list" item="item" separator=";">
update archive_other_ext_submitTime
set other_ext_id = #{item.otherExtId,jdbcType=VARCHAR},
create_time = #{item.createTime,jdbcType=VARCHAR},
int1 = #{item.int1,jdbcType=INTEGER},
int2 = #{item.int2,jdbcType=INTEGER},
int3 = #{item.int3,jdbcType=INTEGER},
str1 = #{item.str1,jdbcType=NVARCHAR},
str2 = #{item.str2,jdbcType=NVARCHAR},
str3 = #{item.str3,jdbcType=NVARCHAR}
where id = #{item.id,jdbcType=INTEGER}
</foreach>
</update>
</mapper>

@ -112,16 +112,13 @@
<!--分段详情文件列表-->
<select id="detailByClo" resultMap="BaseResultMap2" parameterType="com.emr.entity.Archive_Detail_Vo">
select
t.MasterID,t.id,t.PDF_PATH,t.Source,t.UpLoadDateTime,t.SubAssort,t.Title,t.flag,z.assort_id,z.assort_name,z.assort_sort,z.print_flag,isnull(t.PageCount,0) pageCounts,t.id ids,t.PDF_PATH pdfPaths,CONVERT(varchar(19),archive_other_ext.eTime,120) eTimeStr,archive_other_ext_submitTime.create_time
t.MasterID,t.id,t.PDF_PATH,t.Source,t.UpLoadDateTime,t.SubAssort,t.Title,t.flag,z.assort_id,z.assort_name,z.assort_sort,z.print_flag,isnull(t.PageCount,0) pageCounts,t.id ids,t.PDF_PATH pdfPaths,archive_other_ext_submitTime.create_time
from zd_assort z
left join archive_detail t
on z.assort_id=t.AssortID
left join
archive_other_ext
on t.id = archive_other_ext.DID
left join
archive_other_ext_submitTime
on archive_other_ext_submitTime.other_ext_id = archive_other_ext.id
on archive_other_ext_submitTime.str1 = t.id
where 1=1
<if test="patientId != null">
and t.MasterID=#{patientId,jdbcType=VARCHAR}
@ -404,11 +401,12 @@
archive_detail.AssortID = zd_assort.assort_id AND zd_assort.is_check = 1
WHERE
MasterID IN (${masterIds})
AND archive_detail.flag = 0
GROUP BY
AssortID,
MasterID
</select>
<!--按masterId分组查询是否缺少检验检查报告MID集合-->
<!--按masterId分组查询是否缺少检验检查报告MID集合 有记录就是缺失-->
<select id="selectNotInspectionList" resultMap="BaseResultMap">
SELECT
MID AS MasterID

@ -181,6 +181,10 @@
<!--带科室出院浏览公共查询条件-->
<sql id="beHospitalSeach">
and ArchiveState != '1024' and ArchiveState != '128' and YEAR(discharge_date_time) != '1801'
/**根据待审核节点查询*/
<include refid="selectByInfo"></include>
/**根据审核状态查询*/
<include refid="selectByStatus"></include>
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
@ -285,32 +289,31 @@
WHERE
<choose>
<when test="isSuccess == 1">
ISNULL( count, 0 ) = (
SELECT
COUNT( assort_id )
FROM
zd_assort
WHERE
print_flag = 0
AND is_check = 1)
AND inspectionCount is null
inspectionCount is null
AND count = (
CASE
WHEN substring(
m.inp_no,
LEN ( m.inp_no ),
LEN ( m.inp_no )) = 'B' THEN
(( SELECT count( assort_id ) FROM zd_assort WHERE is_check = 1 ) - 2 ) ELSE ( SELECT count( assort_id ) FROM zd_assort WHERE is_check = 1 ) END)
</when>
<otherwise>
ISNULL( count, 0 ) != (
SELECT
COUNT( assort_id )
FROM
zd_assort
WHERE
print_flag = 0
AND is_check = 1)
OR inspectionCount is not null
inspectionCount is not null
OR count is null
OR count != (
CASE
WHEN substring(
m.inp_no,
LEN ( m.inp_no ),
LEN ( m.inp_no )) = 'B' THEN
(( SELECT count( assort_id ) FROM zd_assort WHERE is_check = 1 ) - 2 ) ELSE ( SELECT count( assort_id ) FROM zd_assort WHERE is_check = 1 ) END)
</otherwise>
</choose>
<include refid="beHospitalSeach"></include>
</sql>
<!--带审核节点查询-->
<!--&lt;!&ndash;待审核节点查询&ndash;&gt;
<sql id="selectByApproveRole">
<if test="infoId != null">
<if test="infoId == 1">
@ -350,7 +353,106 @@
ON m.id = temp1.master_id
</if>
</if>
</sql>-->
<!--按待审核节点-->
<sql id="selectByInfo">
<if test="infoId != null">
<choose>
<!--医生-->
<when test="infoId == 2">
AND ArchiveState IN ('1','16','48','512','256','272','304','768')
</when>
<when test="infoId == 3">
AND ArchiveState IN ('2','18','50','514')
</when>
<when test="infoId == 4">
AND ArchiveState IN ('6','22','54','518')
</when>
<when test="infoId == 5">
AND ArchiveState IN ('1','2','6','14','256','512','514','518','526','768')
</when>
<when test="infoId == 6">
AND ArchiveState IN ('16','18','22','30','272')
</when>
<when test="infoId == 7">
AND ArchiveState IN ('62')
</when>
<when test="infoId == 8">
AND ArchiveState IN ('64','1024')
</when>
</choose>
</if>
</sql>
<!--按已审核节点-->
<sql id="selectYesByInfo">
<if test="status != null and status != ''">
<choose>
<!--医生-->
<when test="status == 2">
AND ArchiveState IN ('2','18','50','514','6','22','54','518','14','30','526','64','1024')
</when>
<when test="status == 3">
AND ArchiveState IN ('6','22','54','518','14','30','526','64','1024')
</when>
<when test="status == 4">
AND ArchiveState IN ('14','30','526','64','1024')
</when>
<when test="status == 5">
AND ArchiveState IN ('16','18','22','40','528','48','50','54','304','64','1024')
</when>
<when test="status == 6">
AND ArchiveState IN ('48','50','54','304','64','1024')
</when>
<when test="status == 7">
AND ArchiveState IN ('64')
</when>
<when test="status == 8">
AND ArchiveState IN ('128')
</when>
</choose>
</if>
</sql>
<!--按审核状态查询-->
<sql id="selectByStatus">
<if test="archivestate != null and archivestate != ''">
<choose>
<when test="archivestate == 1">
<!--已审核-->
<include refid="selectYesByInfo"></include>
</when>
<otherwise>
<!--未审核-->
AND
(
<foreach collection="status.split(',')" item="item" separator="or">
<choose>
<when test="item == 2">
ArchiveState IN ('1','16','48','512','256','272','304','768')
</when>
<when test="item == 3">
ArchiveState IN ('2','18',
'50','514')
</when>
<when test="item == 4">
ArchiveState IN ('6','22','54','518')
</when>
<when test="item == 5">
ArchiveState IN ('1','2','6','14','256','512','514','518','526','768')
</when>
<when test="item == 6">
ArchiveState IN ('16','18','22','30','272')
</when>
<when test="item == 7">
ArchiveState IN ('62')
</when>
</choose>
</foreach>
)
</otherwise>
</choose>
</if>
</sql>
<!--公共查询字段-->
<sql id="selectColumms">
m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,m.
dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,m.
@ -366,105 +468,16 @@
INNER JOIN (<include refid="searchSuccessForMasterIdList"></include>) temp
ON m.id = temp.id
</if>
/**带状态查询*/
<if test="archivestate != null and archivestate != ''">
/**待审批*/
<if test="archivestate == 0">
inner join
(select archive_flow_info.master_id from archive_flow_info
inner join
(
<if test="role != 4">
select MAX(createtime) createtime,master_id from archive_flow_info
<if test="operRole != null">
where oper_role = ${operRole}
</if>
group by master_id) temp
on archive_flow_info.master_id = temp.master_id and archive_flow_info.createtime = temp.createtime and
archive_flow_info.target_step_id in (${status})) archive_flow_info
on archive_flow_info.master_id = m.id
</if>
/**护士长*/
<if test="role == 4">
SELECT master_id,MAX( createtime ) createtime FROM archive_flow_info group by master_id,oper_role) temp
on archive_flow_info.master_id = temp.master_id and archive_flow_info.createtime = temp.createtime
where archive_flow_info.target_step_id = 7
group by archive_flow_info.master_id having(COUNT( archive_flow_info.master_id)) = 2
) archive_flow_info
on archive_flow_info.master_id = m.id and m.ArchiveState != '64'
</if>
</if>
/**已审批*/
<if test="archivestate == 1">
INNER JOIN
(
SELECT
archive_flow_info.master_id
FROM
archive_flow_info
INNER JOIN (
SELECT
MAX(createtime) createtime,
master_id
FROM
archive_flow_info
<if test="operRole != null">
where oper_role = ${operRole}
</if>
GROUP BY
master_id
) temp ON archive_flow_info.master_id = temp.master_id
AND archive_flow_info.createtime = temp.createtime
AND start_step_id >= ${status}
and target_step_id != 9 and target_step_id != 10
) archive_flow_info
on archive_flow_info.master_id = m.id
</if>
</if>
/**根据审核节点查询*/
<include refid="selectByApproveRole"></include>
where 1=1
<if test="infoId != null and infoId == 1">
AND temp3.approveCount IS NULL
</if>
<include refid="beHospitalSeach"></include>
<if test="archivestate != null and archivestate != '' and archivestate == 0 and role == 1">
UNION ALL
select <include refid="selectColumms"></include>
from archive_master m
/**带状态查询*/
left join (select archive_flow_info.master_id from archive_flow_info
inner join
(select MAX(createtime) createtime,master_id from archive_flow_info
<if test="operRole != null">
where oper_role = ${operRole}
</if>
group by master_id) temp
on archive_flow_info.master_id = temp.master_id and archive_flow_info.createtime = temp.createtime where target_step_id != 9 and target_step_id != 10)
archive_flow_info
on m.id = archive_flow_info.master_id
/**带完整性查询*/
<if test="isSuccess != null and isSuccess != ''">
INNER JOIN (<include refid="searchSuccessForMasterIdList"></include>) temp
ON m.id = temp.id
</if>
/**根据审核节点查询*/
<include refid="selectByApproveRole"></include>
where 1=1
<if test="infoId != null and infoId == 1">
AND temp3.approveCount IS NULL
</if>
and archive_flow_info.master_id is null
<include refid="beHospitalSeach"></include>
</if>
<if test="userName != null and userName != ''">
union all
select <include refid="selectColumms"></include> from archive_transfer_dept_user
inner join
archive_master m
on m.id = archive_transfer_dept_user.master_id
where user_name = #{userName}
<include refid="beHospitalSeach1"></include>
union all
select <include refid="selectColumms"></include> from archive_transfer_dept_user
inner join
archive_master m
on m.id = archive_transfer_dept_user.master_id
where user_name = #{userName}
<include refid="beHospitalSeach1"></include>
</if>
) m
ORDER BY m.discharge_date_time desc

@ -149,4 +149,21 @@
AND GETDATE ()
AND flag = 2
</select>
<!--查询日期时间段内的工作日集合-->
<select id="selectWorkDayByDate" resultMap="BaseResultMap">
select * from emr_holiday_set
where flag = 1
and date between #{startDate} and
<choose>
<when test="endDate != null and endDate != ''">
#{endDate}
</when>
<otherwise>
GETDATE()
</otherwise>
</choose>
<if test="order != null and order != ''">
order by ${order}
</if>
</select>
</mapper>

@ -11,7 +11,7 @@
<if test="flag != null and flag == 2">
<include refid="overTimeWhereSql"></include>
<if test="doctorInCharge != null and doctorInCharge != ''">
AND archive_master.DOCTOR_IN_CHARGE in (${doctorInCharge})
AND archive_master.DOCTOR_IN_CHARGE in (#{doctorInCharge})
</if>
<!--提醒通知过滤归档-->
<if test="surplus != null">
@ -429,4 +429,12 @@
</where>
order by archive_master.DOCTOR_IN_CHARGE
</select>
<!--根据角色id查询预超期多少份-->
<select id="selectCountOverTimeByRoleId" resultType="java.lang.Integer">
select COUNT(id) count from archive_master
<where>
<include refid="selectByInfo"></include>
<include refid="selectByDate"></include>
</where>
</select>
</mapper>

@ -3,7 +3,8 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>
<%
Date d = new Date();

@ -45,7 +45,20 @@
window.location.href = url;
}
}
//跳转到出院浏览待审核页面
function returnUnSubmitPage(){
var url = '';
//获取登录者角色id
var roleId = $("#roleId").val();
if(roleId == 3){
//病案室跳转终审页面
url = path + "/lastVerify/lastVerifys?flag=1";
}else{
//其余跳转出院浏览
url = path + "/beHosp/beHosps?flag=1";
}
$("#iFrame1").prop("src",url);
}
/*******************************webSocket***********************************/
var userId = $("#userId").val();
var webSocketUrl = $("#webSocketUrl").val();
@ -70,7 +83,7 @@
console.log('连接失败');
}
function narn (type,title,text,noticeId) {
function narn (type,title,text,typeFlag) {
naranja()[type]({
title: title,
text: text,
@ -78,7 +91,13 @@
buttons: [{
text: '查看详情',
click: function (e) {
noticeManage1(noticeId)
if(typeFlag == 'sendOverTimeMessage') {
//跳转归档系统待审核页面
returnUnSubmitPage();
}else{
//跳转权限系统读取通知页面
noticeManage1(typeFlag);
}
}
}]
})

@ -126,9 +126,16 @@
</style>
<script>
var path = "${path}";
var selectPower = '<shiro:hasPermission name="/beHosp/beHospList">1</shiro:hasPermission>';
var showFlowPower = '<shiro:hasPermission name="/beHosp/showFlow">1</shiro:hasPermission>';
var otherPower = '<shiro:hasPermission name="/beHosp/other">1</shiro:hasPermission>';
</script>
</head>
<body>
<!--是否是通知跳转这里-->
<input type="hidden" id="flag" value="${flag}">
<!--姓名-->
<input type="hidden" id="currentName" value="${CURRENT_USER.userPosition}">
<!--隐藏是否是初始化-->
<input type="hidden" id="isSearch" value="1">
<!--拥有的审核角色的id-->
@ -181,10 +188,9 @@
<label>出院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDateTo"
maxlength="10" autocomplete="off"/>
maxlength="10" autocomplete="off" value="${overDateSet}"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10"
autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10" autocomplete="off" value="${remindDate}"/>
</div>
</div>
<div class="form-group divCss">
@ -201,20 +207,27 @@
<option value="0">否</option>
</select>
</div>
<div class="form-group divCss">
<%--<div class="form-group divCss">
<label>审核状态:</label>
<select class="input-sm form-control" id="archivestate1">
<option value="">全部</option>
<option value="0">待审核</option>
<option value="0" <c:if test="${flag == 1}">selected</c:if>>待审核</option>
<option value="1">已审核</option>
</select>
</div>
<div class="form-group divCss">
<label>审核节点:</label>
<select class="input-sm form-control" id="infoId">
<label>审核节点:</label>
<select class="form-control input-sm" id="infoId">
<option value="">全部</option>
<option value="2">医生提交</option>
<option value="3">医生质控员质控</option>
<option value="4">科主任审核</option>
<option value="5">护士提交</option>
<option value="6">护士质控员质控</option>
<option value="7">护士长审核</option>
<option value="8">病案室审核</option>
</select>
</div>
</div>--%>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>
<button type="button" class="btn btn-info btn-sm divCss" id="excelBtn">条件导出</button>
<button type="button" class="btn btn-primary btn-sm divCss" id="approvesBtn">批量审核</button>
@ -812,7 +825,7 @@
</div>
</div>
</body>
<script src="${path}/static/js/beHospList/beHospList.js?time=2020-11-09"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-09"></script>
<script src="${path}/static/js/beHospList/beHospList.js?time=2020-11-11"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-11"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
</html>

@ -448,5 +448,5 @@
</script>
<script src="${path}/static/js/inHospList/inHospList.js?time=2020-10-16"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-03"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-11"></script>
</html>

@ -1,5 +1,4 @@

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>
<html>
@ -14,52 +13,42 @@
<%@ include file="/WEB-INF/jspf/comm.jspf" %>
<script type="text/javascript" src="${path}/static/js/menu.js?time=2020-09-14_1"></script>
<style>
.hidden-xs {
.hidden-xs{
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.indexSelected {
.indexSelected{
background-color: #1E2D3B;
color: #fff !important;
color: #fff!important;
}
.modleSelected {
font-weight: bold;
font-size: 16px;
}
.sidebar-mini:not(.sidebar-collapse) #indexTreeMenu:hover {
.sidebar-mini:not(.sidebar-collapse) #indexTreeMenu:hover{
overflow-y: auto;
overflow-x: hidden;
}
.sidebar-mini:not(.sidebar-collapse) #indexTreeMenu::-webkit-scrollbar {
.sidebar-mini:not(.sidebar-collapse) #indexTreeMenu::-webkit-scrollbar{
display: none;
}
.navbar-custom-menu {
padding-right: 17px;
.navbar-custom-menu{
padding-right:17px;
}
.row-fluid {
.row-fluid{
overflow-y: hidden;
}
.sidebar-mini.sidebar-collapse #indexTreeMenu li > a {
.sidebar-mini.sidebar-collapse #indexTreeMenu li>a{
height: 44px;
}
.sidebar-mini.sidebar-collapse #indexTreeMenu .pull-right-container {
margin-top: 0;
.sidebar-mini.sidebar-collapse #indexTreeMenu .pull-right-container{
margin-top:0;
}
.sidebar-mini.sidebar-collapse #indexTreeMenu .modleSelected .pull-right-container {
.sidebar-mini.sidebar-collapse #indexTreeMenu .modleSelected .pull-right-container{
margin-top: -6px;
}
@media (min-width: 768px) {
.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right), .sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
display: block !important;
@ -68,11 +57,7 @@
left: 50px;
}
}
.home-menu:hover .dropdown-menu {
display: block;
}
.home-menu:hover .dropdown-menu {display: block;}
.sidebar {
padding-bottom: 0;
}
@ -81,14 +66,15 @@
var path = "${path}";
</script>
</head>
<script type="text/javascript">
function uniq(array) {
function uniq(array){
var temp = [];
var index = [];
var l = array.length;
for (var i = 0; i < l; i++) {
for (var j = i + 1; j < l; j++) {
if (array[i] === array[j]) {
for(var i = 0; i < l; i++) {
for(var j = i + 1; j < l; j++){
if (array[i] === array[j]){
i++;
j = i;
}
@ -98,71 +84,70 @@
}
return temp;
}
$(function () {
function ajaxJsonFun() {
//拥有的功能
var str = "";
//所属科室
var depts = "";
if (${menuList == null}) {
if (${menuList == null}){
$('#exampleModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
return;
} else if (${menuList != null}) {
return ;
}else if (${menuList != null}) {
var menuList = <%=session.getAttribute("menuList")%>;//${menuList == null} ? window.location.href = "login.jsp" :${menuList};
if (menuList != "") {
if (menuList.code == 100) {
var roleId = '';
var list = menuList.extend.list;
if (list != null && list.length > 0) {
if (list != null && list.length > 1) {
var sysUL;
var count = 100000;
var deptArr = [];
roleId = list[0].roleId;
//roleId等于0或-100不受科室限制
if (roleId != -100 && roleId != 0 && list[0].deptCode != 1) {
if(roleId != -100 && roleId != 0 && list[0].deptCode != 1) {
for (var i = 0; i < list.length; i++) {
if (list[i].deptCode != '') {
deptArr.push(list[i].deptCode);
}
}
} else {
}else{
deptArr = [];
}
var deptList = '';
if (deptArr != '') {
if(deptArr != ''){
deptList = uniq(deptArr);
}
var depts = '';
if (deptList != '') {
if(deptList != ''){
for (var i = 0; i < deptList.length; i++) {
if (i != deptList.length - 1) {
if(i != deptList.length-1){
depts += deptList[i] + ",";
} else {
}else{
depts += deptList[i];
}
}
}
localStorage.setItem($("#userId").val() + "_depts", depts);
localStorage.setItem($("#userId").val()+"_depts",depts);
for (var i = 0; i < list.length; i++) {
if (list[0].deptId == list[i].deptId) {
if (list[i].methodParent != 0 && (list[i].menuUrl == "#" || list[i].menuUrl == "" || list[i].menuUrl == null)) {
var mulLi = '';
if (list.length > 1 && i == 1) {
if(list.length > 1 && i == 1){
mulLi = newLiFun(true);
} else {
}else{
mulLi = newLiFun(false);
}
var mulA = '';
//是第一个默认选中
if (i == 1) {
mulA = newAFun(list[i].menuName, list[i].menuIcon, true);
} else {
mulA = newAFun(list[i].menuName, list[i].menuIcon, false);
if(i == 1){
mulA = newAFun(list[i].menuName, list[i].menuIcon,true);
}else{
mulA = newAFun(list[i].menuName, list[i].menuIcon,false);
}
mulLi.append(mulA);
var menuAUL = newUlFun();
@ -183,24 +168,24 @@
if (str.indexOf("undefined") != -1) {
str = "";
}
if (count > list[j].methodSort) {
if(count > list[j].methodSort){
count = list[j].methodSort;
sysUL = path + list[j].menuUrl + "?num=" + str + "&depts=" + depts;
}
var menuALi = '';
var menuUrl = path + list[j].menuUrl + "?num=" + str + "&depts=" + depts;
if (i == 1) {
if(i == 1){
//默认选中第一个
faultModleSelected = true;
defaultUrl = menuUrl;
}
menuALi = newAliFun(list[j].menuName, list[j].menuIcon, menuUrl, faultModleSelected, list[j].menuId);
menuALi = newAliFun(list[j].menuName, list[j].menuIcon, menuUrl,faultModleSelected,list[j].menuId);
menuAUL.append(menuALi);
mulLi.append(menuAUL);
}
}
}
$("#iFrame1").prop('src', sysUL);
$("#iFrame1").prop('src',sysUL);
$('#indexTreeMenu').append(mulLi);
}
}
@ -224,6 +209,7 @@
<input type="hidden" id="webSocketUrl" value="${WEBSOCKET_URLHEAD}">
<input type="hidden" id="strSplit" value="${STR_SPLIT}">
<input type="hidden" id="userId" value="${CURRENT_USER.userId}">
<input type="hidden" id="roleId" value="${CURRENT_USER.roleId}">
<div class="wrapper">
<header class="main-header">
@ -251,33 +237,26 @@
</li>
<li class="user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="${path}/static/bootstrap-3.3.7/bower_components/bootstrap/dist/img/user2-160x160.jpg"
class="user-image"
<img src="${path}/static/bootstrap-3.3.7/bower_components/bootstrap/dist/img/user2-160x160.jpg" class="user-image"
alt="User Image">
<c:choose>
<c:when test="${CURRENT_USER.remark == '' || CURRENT_USER.remark == null || CURRENT_USER.remark == 'null'}">
<c:choose>
<c:when test="${CURRENT_USER.userPosition != null && CURRENT_USER.userPosition != '' && CURRENT_USER.userPosition != 'null'}">
<div class="hidden-xs"
title="${CURRENT_USER.userPosition}">${CURRENT_USER.userPosition}</div>
<div class="hidden-xs" title="${CURRENT_USER.userPosition}">${CURRENT_USER.userPosition}</div>
</c:when>
<c:otherwise>
<div class="hidden-xs"
title="${CURRENT_USER.userName}">${CURRENT_USER.userName}</div>
<div class="hidden-xs" title="${CURRENT_USER.userName}">${CURRENT_USER.userName}</div>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${CURRENT_USER.userPosition != null && CURRENT_USER.userPosition != '' && CURRENT_USER.userPosition != 'null'}">
<div class="hidden-xs"
title="${CURRENT_USER.userPosition}(${CURRENT_USER.remark})">${CURRENT_USER.userPosition}(${CURRENT_USER.remark})
</div>
<div class="hidden-xs" title="${CURRENT_USER.userPosition}(${CURRENT_USER.remark})">${CURRENT_USER.userPosition}(${CURRENT_USER.remark})</div>
</c:when>
<c:otherwise>
<div class="hidden-xs"
title="${CURRENT_USER.userName}(${CURRENT_USER.remark})">${CURRENT_USER.userName}(${CURRENT_USER.remark})
</div>
<div class="hidden-xs" title="${CURRENT_USER.userName}(${CURRENT_USER.remark})">${CURRENT_USER.userName}(${CURRENT_USER.remark})</div>
</c:otherwise>
</c:choose>
</c:otherwise>
@ -285,8 +264,7 @@
</a>
</li>
<li class="home-menu">
<a href="${POWER_URLHEAD}/gatewayPage"><i class="fa fa-home" style="font-size: 20px"
title="点击返回主页"></i></a>
<a href="${POWER_URLHEAD}/gatewayPage"><i class="fa fa-home" style="font-size: 20px" title="点击返回主页"></i></a>
<ul class="dropdown-menu" role="menu">
<li><a href="${POWER_URLHEAD}/gatewayPage">返回主页</a></li>
<li class="divider"></li>
@ -373,12 +351,11 @@
<div class="content-wrapper">
<iframe style="width:100%; overflow-x:hidden;overflow-y:scroll" id="iFrame1" name="iFrame1"
frameborder="0"></iframe>
<iframe style="width:100%; overflow-x:hidden;overflow-y:scroll" id="iFrame1" name="iFrame1" frameborder="0"></iframe>
</div>
<footer class="main-footer">
<div class="pull-right">
<b>Version</b> 20201102
<b>Version</b> 20201111
</div>
<strong>Copyright &copy; 2019-2090 厦门嘉时软件.</strong> All rights
reserved.
@ -423,6 +400,6 @@
</div>
</div>
<%@ include file="/WEB-INF/jspf/webSocket.jspf" %>
<script src="${path}/static/js/index.js"></script>
<script src="${path}/static/js/index.js?time=2020-11-10"></script>
</body>
</html>

@ -113,6 +113,10 @@
</style>
<script>
var path = "${path}";
var selectPower = '<shiro:hasPermission name="/lastVerify/lastVerifyList">1</shiro:hasPermission>';
var showFlowPower = '<shiro:hasPermission name="/lastVerify/showFlow">1</shiro:hasPermission>';
var backToPower = '<shiro:hasPermission name="/lastVerify/updateDetailByArchivId">1</shiro:hasPermission>';
var udpatePower = '<shiro:hasPermission name="/beHosp/updateStateByArchivId">1</shiro:hasPermission>';
</script>
</head>
@ -162,10 +166,9 @@
<label>出院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDateTo"
maxlength="10" autocomplete="off"/>
maxlength="10" autocomplete="off" value="${overDateSet}"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10"
autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10" autocomplete="off" value="${remindDate}"/>
</div>
</div>
<div class="form-group divCss">
@ -644,7 +647,7 @@
</div>
</body>
<script src="${path}/static/js/lastVerifyList/lastVerifyList.js?time=2020-10-13"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-03"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-11"></script>
<script src="${path}/static/js/statistics/getDeptCommom.js"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
</html>

@ -588,6 +588,6 @@
var path = "${path}";
</script>
<script src="${path}/static/js/unfileMedicalList/unfileMedicalList.js?time=2020-10-13"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-03"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-11"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
</html>

@ -50,7 +50,28 @@
<filter-name>shiroFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 连接池 启用 Web 监控统计功能 start-->
<filter>
<filter-name>DruidWebStatFilter</filter-name>
<filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
<init-param>
<param-name>exclusions</param-name>
<param-value>*. js ,*. gif ,*. jpg ,*. png ,*. css ,*. ico ,/ druid /*</param-value>
</init-param>
</filter>
<filter-mapping >
<filter-name>DruidWebStatFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet >
<servlet-name>DruidStatView</servlet-name>
<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DruidStatView</servlet-name>
<url-pattern>/druid/*</url-pattern>
</servlet-mapping >
<!-- 连接池 启用 Web 监控统计功能 end-->
<!-- 启动spring的容器 -->
<context-param>
<param-name>contextConfigLocation</param-name>
@ -83,5 +104,4 @@
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>

@ -155,16 +155,16 @@ function initTable() {
var url = window.location.href;
var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", "");
var html = "";
if (index != null && index.indexOf("select") !== -1) {
if (selectPower == 1) {
html += '<button type="button" class="btn btn-danger btn-sm selInfo" title="查看">查看</button>';
}
if (row.btns != '' && row.btns != null) {
html += row.btns;
}
if (index != null && index.indexOf("showFlow") !== -1) {
if (showFlowPower == 1) {
html += '<button type="button" class="btn btn-sm btn-success showFlowInfo" title="查看流程">查看流程</button>'
}
if (index != null && index.indexOf("other") !== -1) {
if (otherPower == 1) {
html += '<button type="button" class="btn btn-sm btn-info showTransferDeptUser" title="跨科查阅">跨科查阅</button>'
}
return html;
@ -422,7 +422,6 @@ function paramsMatter(value, row) {
value = '<p title="'+value+'">'+result+value+'</p>';
return value;
}
//审核弹窗 单个审批①
function verifyInfo(role,archivestate,roleCode,masterId){
//生成表单token,防止表单重复提交
@ -579,7 +578,6 @@ $("#sureBtn").click(function(){
$('#verifyModal').modal('hide');
save(successCount,failSelects);
})
//提交后台审核
function save(successCount,failSelects){
$("#sureModal").modal('hide');
@ -672,7 +670,7 @@ function getCurrentCodes() {
$.ajaxSettings.async = true;
}
}
//加载审核节点
/*//加载审核节点
function getApproveRoles() {
//只做一次查询赋值
$.get(path+"/beHosp/getFlowRole",function(data){
@ -710,7 +708,7 @@ function getApproveRoles() {
toastr.error(data.msg);
}
},'json')
}
}*/
//监听审核节点查询的变更事件,记录属于支线
$("#infoId").change(function(){
@ -723,8 +721,6 @@ $("#infoId").change(function(){
})
$(function () {
//加载主管医生列表
loadDoctorInCharge();
//加载权限科室
getPowerDept();
//赋值审核角色
@ -732,7 +728,9 @@ $(function () {
//加载当前角色
getCurrentCodes();
//加载审核节点
getApproveRoles();
//getApproveRoles();
//加载主管医生列表
loadDoctorInCharge();
var url = window.location.href;
var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", "");
if (index != null && index != "" && index.indexOf("excel") != -1) {

@ -20,6 +20,7 @@ function loadDoctorInCharge(){
$.ajax({
type:'get',
url:path+'/beHosp/loadDoctorInCharge',
async:false,
data:{deptName:deptName},
success:function(data){
$("#doctorInCharge").empty();
@ -31,7 +32,16 @@ function loadDoctorInCharge(){
var name = list[i].doctorInCharge;
var py = makePy(name);
var pingyin = ConvertPinyin(name);
html += '<option data-tokens="' + name + '|' + py[0] + '|' + pingyin + '" value="' + name + '">' + name + '</option>';
var selected = '';
//判断是否需要选中
var flag = $("#flag").val();
var currentRole = $("#currentRole").val();
if(flag == 1 && currentRole == 1){
if($("#currentName").val() == name){
selected = 'selected';
}
}
html += '<option data-tokens="' + name + '|' + py[0] + '|' + pingyin + '" value="' + name + '" '+selected+'>' + name + '</option>';
}
}
$("#doctorInCharge").append(html);
@ -630,7 +640,7 @@ function initTable2() {
valign: 'middle'
},
{
title: '最近更新',
title: '采集完成时间',
field: 'uploaddatetime',
align: 'left',
valign: 'middle',
@ -640,7 +650,7 @@ function initTable2() {
//是否同步过
var createTime = row.createTime;
if(createTime != null){
return selectTimeColor(createTime,row.etimeStr);
return selectTimeColor(createTime,row.uploaddatetime,2);
}else{
return value;
}
@ -1031,6 +1041,8 @@ $("#saveBtn").click(function () {
});
});
$("#workDetail").click(function(){
//隐藏加载控件
$("#loading").hide();
$("#workDetailModal").modal({
show: true//弹出对话框
});
@ -1182,7 +1194,7 @@ function initTable5(data,sidePagination) {
sysflag = '';
notNursingIds = id;
}
submitUpdate(id,notNursingIds,sysflag);
submitUpdate(id,notNursingIds,row.did,sysflag);
}
}
},
@ -1205,7 +1217,7 @@ function initTable5(data,sidePagination) {
valign: 'middle',
sortable: true,
formatter: function (value, row, index) {
return selectTimeColor(value,row.etimeStr);
return selectTimeColor(value,row.etimeStr,1);
}
},
{
@ -1286,13 +1298,23 @@ function initTable5(data,sidePagination) {
$("#table5").bootstrapTable(option);
}
//对比结束时间方法
function selectTimeColor(time,etimeStr){
/**
* @param time 真实的时间
* @param etimeStr 最后更新的时间
* @param type 区别type=1显示time值type=2显示最新更新的时间
* @returns {*}
*/
function selectTimeColor(time,etimeStr,type){
if(time != null){
var color = 'red';
if(etimeStr != null && etimeStr > time){
color = 'green';
}
return '<span style="color: '+color+'">'+time+'</span>';
if(type == 1) {
return '<span style="color: ' + color + '">' + time + '</span>';
}else{
return '<span style="color: ' + color + '">' + etimeStr + '</span>';
}
}else{
return time;
}
@ -1306,13 +1328,13 @@ var times = 5;
$("#loading").css("background","url("+path+"/static/img/load.gif) no-repeat 10px 50%");
//同步更新
var timeInterval;
function submitUpdate(ids,notNursingIds,sysFlag) {
function submitUpdate(ids,notNursingIds,detailIds,sysFlag) {
var idsArr = ids.split(",");
var jzh = $("#patientId").val();
$.ajax({
type:'post',
url:path+'/archiveExt/submitUpdate',
data:{ids:ids,notNursingIds:notNursingIds,jzh:jzh,masterId:$("#idLab").text(),sysFlag:sysFlag},
data:{ids:ids,notNursingIds:notNursingIds,detailIds:detailIds,jzh:jzh,masterId:$("#idLab").text(),sysFlag:sysFlag},
dataType:'json',
success:function (data) {
if(data.code == 100){
@ -1393,22 +1415,36 @@ $("#searchBtn6").click(function(){
var ids = '';
var sysflag = '';
var notNursingIds = '';
var detailIds = '';
for (var i = 0; i < data.length; i++) {
var id = data[i].idTemp;
var detailId = data[i].did;
if(detailId == ''){
//占位
detailId = null;
}
//拼接detailId
if(detailIds != ''){
detailIds += ',';
}
detailIds += detailId;
//拼接id
if(ids != ''){
ids += ',';
}
ids += id;
if(data[i].sysflag == 1){
//判断包含护理
sysflag = 1;
}else{
//拼接不包含护理的id
if(notNursingIds != ''){
notNursingIds += ',';
}
notNursingIds += id;
}
}
submitUpdate(ids,notNursingIds,sysflag);
submitUpdate(ids,notNursingIds,detailIds,sysflag);
}
})

@ -1,4 +1,6 @@
$(document).ready(function () {
//请求后台查询即将过期的待审核份数
//sendMessageForSubmit();
var headerHeight = $(".main-header").height() || 0;
var footerHeight = ($(".main-footer").height() || 0) + 31;
var windowHeight = $(window).height();
@ -38,4 +40,9 @@ function deleteLocalStorge(){
}
}
}
}
//请求后台查询即将过期的待审核份数
function sendMessageForSubmit(){
$.get(path+"/sendMessage/sendMessageForSubmit",function(response){
});
}

@ -186,19 +186,17 @@ function initTable() {
valign: 'middle',
width: 100, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
var url = window.location.href;
var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", "");
var html = "";
if (index != null && index != "" && index.indexOf("select") != -1) {
if (selectPower == 1) {
html = '<button type="button" class="btn btn-danger btn-sm selInfo" title="查看">查看</button>';
}
if (index != null && index != "" && index.indexOf("last") != -1) {
if (udpatePower == 1) {
html += '<button type="button" class="btn btn-sm btn-primary verifyInfo" title="审核">审核</button>';
}
if (index != null && index != "" && index.indexOf("back") != -1) {
if (backToPower == 1) {
html += '<button type="button" class="btn btn-warning btn-sm returnInfo" title="退回">退回</button>';
}
if (index != null && index != "" && index.indexOf("showFlow") != -1) {
if (showFlowPower == 1) {
html += '<button type="button" class="btn btn-sm btn-success showFlowInfo" title="查看流程">查看流程</button>'
}
return html;

Loading…
Cancel
Save