增加超时统计列表和超时提醒参数设置页面
parent
86ec2bd8af
commit
0018491838
Binary file not shown.
@ -0,0 +1,31 @@
|
||||
package com.emr.config;
|
||||
|
||||
import com.emr.dao.EmrOvertimeSetMapper;
|
||||
import com.emr.dao.Emr_Commom_SetMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2020/10/27 15:47
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2020/10/27 15:47
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Configuration
|
||||
public class CronValueConfig {
|
||||
@Autowired
|
||||
private EmrOvertimeSetMapper overtimeSetMapper;
|
||||
@Bean
|
||||
public String getCronValue()
|
||||
{
|
||||
String remindTime = overtimeSetMapper.selectByPrimaryKey(1).getRemindTime();
|
||||
return remindTime;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package com.emr.controller;
|
||||
|
||||
import com.emr.dao.EmrOvertimeSetMapper;
|
||||
import com.emr.entity.EmrOvertimeSet;
|
||||
import com.emr.entity.Emr_Dictionary;
|
||||
import com.emr.service.ipml.EmrOvertimeSetService;
|
||||
import com.emr.util.ExceptionPrintUtil;
|
||||
import com.emr.util.Msg;
|
||||
import com.emr.vo.CommomTree;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2020/10/27 8:57
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2020/10/27 8:57
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("overtime")
|
||||
public class OverTimeSetController {
|
||||
@Autowired
|
||||
private EmrOvertimeSetService overtimeSetService;
|
||||
/**
|
||||
* 跳转到超期设置页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("overtimeSet")
|
||||
public String overtimeSet(Model model){
|
||||
EmrOvertimeSet overtimeSet = overtimeSetService.selectByPrimaryKey(1);
|
||||
model.addAttribute("overtimeSet",overtimeSet);
|
||||
return "overtimeSet/overtimeSet";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改超期基本信息设置
|
||||
* @param overtimeSet
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("updateOverTimeSet")
|
||||
@ResponseBody
|
||||
public Msg updateOverTimeSet(EmrOvertimeSet overtimeSet) throws Exception{
|
||||
overtimeSetService.updateOverTimeSet(overtimeSet);
|
||||
return Msg.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询取消提醒科室树
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("selectRemindDeptTree")
|
||||
@ResponseBody
|
||||
public List<CommomTree> selectRemindDeptTree(){
|
||||
try {
|
||||
return overtimeSetService.selectRemindDeptTree();
|
||||
} catch (Exception e) {
|
||||
ExceptionPrintUtil.printException(e);
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询取消提醒科室用户树
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("selectRemindDeptUserTree")
|
||||
@ResponseBody
|
||||
public List<CommomTree> selectRemindDeptUserTree(){
|
||||
try {
|
||||
return overtimeSetService.selectRemindDeptUserTree();
|
||||
} catch (Exception e) {
|
||||
ExceptionPrintUtil.printException(e);
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.emr.dao;
|
||||
|
||||
import com.emr.entity.ArchiveRemindDeptUser;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ArchiveRemindDeptUserMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ArchiveRemindDeptUser record);
|
||||
|
||||
int insertSelective(ArchiveRemindDeptUser record);
|
||||
|
||||
ArchiveRemindDeptUser selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ArchiveRemindDeptUser record);
|
||||
|
||||
int updateByPrimaryKey(ArchiveRemindDeptUser record);
|
||||
|
||||
List<ArchiveRemindDeptUser> selectAll();
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package com.emr.dao;
|
||||
|
||||
import com.emr.entity.ArchiveRemindInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ArchiveRemindInfoMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ArchiveRemindInfo record);
|
||||
|
||||
int insertSelective(ArchiveRemindInfo record);
|
||||
|
||||
ArchiveRemindInfo selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ArchiveRemindInfo record);
|
||||
|
||||
int updateByPrimaryKey(ArchiveRemindInfo record);
|
||||
|
||||
List<ArchiveRemindInfo> selectAllByDeptName(@Param("deptName")String deptName);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.emr.dao;
|
||||
|
||||
import com.emr.entity.ArchiveRemindcancleDept;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ArchiveRemindcancleDeptMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ArchiveRemindcancleDept record);
|
||||
|
||||
int insertSelective(ArchiveRemindcancleDept record);
|
||||
|
||||
ArchiveRemindcancleDept selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ArchiveRemindcancleDept record);
|
||||
|
||||
int updateByPrimaryKey(ArchiveRemindcancleDept record);
|
||||
|
||||
List<ArchiveRemindcancleDept> selectAll();
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.emr.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ArchiveRemindDeptUser implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String deptCode;
|
||||
|
||||
private String userName;
|
||||
|
||||
private Integer roleId;
|
||||
|
||||
private Integer int1;
|
||||
|
||||
private String str1;
|
||||
|
||||
private Integer int2;
|
||||
|
||||
private String str2;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDeptCode() {
|
||||
return deptCode;
|
||||
}
|
||||
|
||||
public void setDeptCode(String deptCode) {
|
||||
this.deptCode = deptCode == null ? null : deptCode.trim();
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName == null ? null : userName.trim();
|
||||
}
|
||||
|
||||
public Integer getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(Integer roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public Integer getInt1() {
|
||||
return int1;
|
||||
}
|
||||
|
||||
public void setInt1(Integer int1) {
|
||||
this.int1 = int1;
|
||||
}
|
||||
|
||||
public String getStr1() {
|
||||
return str1;
|
||||
}
|
||||
|
||||
public void setStr1(String str1) {
|
||||
this.str1 = str1 == null ? null : str1.trim();
|
||||
}
|
||||
|
||||
public Integer getInt2() {
|
||||
return int2;
|
||||
}
|
||||
|
||||
public void setInt2(Integer int2) {
|
||||
this.int2 = int2;
|
||||
}
|
||||
|
||||
public String getStr2() {
|
||||
return str2;
|
||||
}
|
||||
|
||||
public void setStr2(String str2) {
|
||||
this.str2 = str2 == null ? null : str2.trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", deptCode=").append(deptCode);
|
||||
sb.append(", userName=").append(userName);
|
||||
sb.append(", roleId=").append(roleId);
|
||||
sb.append(", int1=").append(int1);
|
||||
sb.append(", str1=").append(str1);
|
||||
sb.append(", int2=").append(int2);
|
||||
sb.append(", str2=").append(str2);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@ -1,62 +0,0 @@
|
||||
package com.emr.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class ArchiveRemindInfo implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String deptName;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName == null ? null : deptName.trim();
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser == null ? null : createUser.trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", deptName=").append(deptName);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", createUser=").append(createUser);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.emr.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ArchiveRemindcancleDept implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String deptCode;
|
||||
|
||||
private Integer int1;
|
||||
|
||||
private String str1;
|
||||
|
||||
private Integer int2;
|
||||
|
||||
private String str2;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDeptCode() {
|
||||
return deptCode;
|
||||
}
|
||||
|
||||
public void setDeptCode(String deptCode) {
|
||||
this.deptCode = deptCode == null ? null : deptCode.trim();
|
||||
}
|
||||
|
||||
public Integer getInt1() {
|
||||
return int1;
|
||||
}
|
||||
|
||||
public void setInt1(Integer int1) {
|
||||
this.int1 = int1;
|
||||
}
|
||||
|
||||
public String getStr1() {
|
||||
return str1;
|
||||
}
|
||||
|
||||
public void setStr1(String str1) {
|
||||
this.str1 = str1 == null ? null : str1.trim();
|
||||
}
|
||||
|
||||
public Integer getInt2() {
|
||||
return int2;
|
||||
}
|
||||
|
||||
public void setInt2(Integer int2) {
|
||||
this.int2 = int2;
|
||||
}
|
||||
|
||||
public String getStr2() {
|
||||
return str2;
|
||||
}
|
||||
|
||||
public void setStr2(String str2) {
|
||||
this.str2 = str2 == null ? null : str2.trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", deptCode=").append(deptCode);
|
||||
sb.append(", int1=").append(int1);
|
||||
sb.append(", str1=").append(str1);
|
||||
sb.append(", int2=").append(int2);
|
||||
sb.append(", str2=").append(str2);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.emr.quart;
|
||||
|
||||
import com.emr.dao.ArchiveRemindDeptUserMapper;
|
||||
import com.emr.dao.ArchiveRemindcancleDeptMapper;
|
||||
import com.emr.entity.ArchiveRemindDeptUser;
|
||||
import com.emr.entity.ArchiveRemindcancleDept;
|
||||
import com.emr.entity.Archive_Master_Vo;
|
||||
import com.emr.service.ipml.RecordService;
|
||||
import com.emr.service.ipml.StatisticsService;
|
||||
import com.emr.vo.RecordSearch;
|
||||
import com.emr.vo.User;
|
||||
import org.apache.shiro.util.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2020/10/27 15:49
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2020/10/27 15:49
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Component
|
||||
public class Task1 {
|
||||
@Value("${overDateSet}")
|
||||
private String overDateSet;
|
||||
@Autowired
|
||||
private RecordService recordService;
|
||||
@Autowired
|
||||
private ArchiveRemindcancleDeptMapper remindcancleDeptMapper;
|
||||
@Autowired
|
||||
private ArchiveRemindDeptUserMapper remindDeptUserMapper;
|
||||
@Autowired
|
||||
private StatisticsService statisticsService;
|
||||
@Scheduled(cron="#{@getCronValue}")
|
||||
public void task1(){
|
||||
try {
|
||||
List<User> userList = statisticsService.getUserList("admin");
|
||||
RecordSearch recordSearch = new RecordSearch();
|
||||
//查询超期记录
|
||||
//List<Archive_Master_Vo> submitRecords = recordService.selectRecordGroupDeptAndRole(recordSearch);
|
||||
/*if(!CollectionUtils.isEmpty(submitRecords)){
|
||||
//查询科室取消提醒集合
|
||||
List<ArchiveRemindcancleDept> cancleDeptList = remindcancleDeptMapper.selectAll();
|
||||
//查询科室取消单独开启的用户
|
||||
List<ArchiveRemindDeptUser> deptUsers = remindDeptUserMapper.selectAll();
|
||||
//获取用户集合
|
||||
List<User> userList = statisticsService.getUserList();
|
||||
for(Archive_Master_Vo vo : submitRecords){
|
||||
//通知医生
|
||||
|
||||
//通知医生质控员
|
||||
|
||||
}
|
||||
}*/
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,177 @@
|
||||
package com.emr.service.ipml;
|
||||
|
||||
import com.emr.dao.ArchiveRemindDeptUserMapper;
|
||||
import com.emr.dao.ArchiveRemindcancleDeptMapper;
|
||||
import com.emr.dao.EmrOvertimeSetMapper;
|
||||
import com.emr.entity.ArchiveRemindDeptUser;
|
||||
import com.emr.entity.ArchiveRemindcancleDept;
|
||||
import com.emr.entity.EmrOvertimeSet;
|
||||
import com.emr.entity.Emr_Dictionary;
|
||||
import com.emr.service.Emr_DictionaryService;
|
||||
import com.emr.vo.CommomTree;
|
||||
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.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2020/10/27 10:55
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2020/10/27 10:55
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class EmrOvertimeSetService {
|
||||
@Autowired
|
||||
private EmrOvertimeSetMapper overtimeSetMapper;
|
||||
@Autowired
|
||||
private Emr_DictionaryService dictionaryService;
|
||||
@Autowired
|
||||
private StatisticsService statisticsService;
|
||||
@Autowired
|
||||
private ArchiveRemindcancleDeptMapper remindcancleDeptMapper;
|
||||
@Autowired
|
||||
private ArchiveRemindDeptUserMapper remindDeptUserMapper;
|
||||
/**
|
||||
* 根据主键查询
|
||||
* @return
|
||||
*/
|
||||
public EmrOvertimeSet selectByPrimaryKey(Integer id){
|
||||
return overtimeSetMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新超期基础设置表
|
||||
* @param overtimeSet
|
||||
*/
|
||||
public void updateOverTimeSet(EmrOvertimeSet overtimeSet){
|
||||
overtimeSetMapper.updateByPrimaryKeySelective(overtimeSet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询取消提醒科室树
|
||||
* @return
|
||||
*/
|
||||
public List<CommomTree> selectRemindDeptTree() throws Exception {
|
||||
List<CommomTree> list = new ArrayList<>();
|
||||
//查询科室
|
||||
List<Emr_Dictionary> dictionaries = dictionaryService.dicByClo(new Emr_Dictionary());
|
||||
if(!CollectionUtils.isEmpty(dictionaries)){
|
||||
//查询取消科室
|
||||
List<ArchiveRemindcancleDept> archiveRemindcancleDepts = remindcancleDeptMapper.selectAll();
|
||||
for(Emr_Dictionary dictionary : dictionaries) {
|
||||
//获取编码
|
||||
String code = dictionary.getCode();
|
||||
if(StringUtils.isNotBlank(code)) {
|
||||
CommomTree tree1 = new CommomTree();
|
||||
tree1.setId(dictionary.getId());
|
||||
tree1.setCode(dictionary.getCode());
|
||||
tree1.setName(dictionary.getName());
|
||||
tree1.setParentId(0);
|
||||
//判断是否有对应取消提醒的科室选中
|
||||
if(!CollectionUtils.isEmpty(archiveRemindcancleDepts)){
|
||||
for(ArchiveRemindcancleDept obj : archiveRemindcancleDepts){
|
||||
if(obj.getDeptCode().equals(code)){
|
||||
tree1.setChecked("true");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
list.add(tree1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 查询取消科室提醒单独用户树
|
||||
* @return
|
||||
*/
|
||||
public List<CommomTree> selectRemindDeptUserTree() throws Exception {
|
||||
//查询科室
|
||||
List<Emr_Dictionary> dictionaries = dictionaryService.dicByClo(new Emr_Dictionary());
|
||||
List<CommomTree> list = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(dictionaries)){
|
||||
//查询用户信息
|
||||
List<User> userList = statisticsService.getUserList();
|
||||
if(!CollectionUtils.isEmpty(userList)){
|
||||
//查询取消科室提醒单独提醒的用户
|
||||
List<ArchiveRemindDeptUser> remindDeptUsers = remindDeptUserMapper.selectAll();
|
||||
//定义角色id集合
|
||||
Integer[] roleList = {1,2,3,5,6,7,8};
|
||||
//设定用户id从20000开始
|
||||
int id = 1;
|
||||
int twoParentId = 0;
|
||||
//组织用户
|
||||
for(Emr_Dictionary dictionary : dictionaries) {
|
||||
//获取编码
|
||||
String code = dictionary.getCode();
|
||||
if(StringUtils.isNotBlank(code)) {
|
||||
CommomTree tree1 = new CommomTree();
|
||||
tree1.setId(id);
|
||||
twoParentId = id;
|
||||
id++;
|
||||
tree1.setCode(dictionary.getCode());
|
||||
tree1.setName(dictionary.getName());
|
||||
tree1.setParentId(0);
|
||||
//过滤字典类别科室 科室code=null
|
||||
//定义存在用户的科室
|
||||
boolean flag = false;
|
||||
boolean checkedFlag = false;
|
||||
for (User user : userList) {
|
||||
//获取用户所属科室
|
||||
String deptCode = user.getDeptCode();
|
||||
//判断是否是审核角色
|
||||
boolean contains = Arrays.asList(roleList).contains(user.getRoleId());
|
||||
if (StringUtils.isNotBlank(deptCode) && deptCode.equals(code) && contains) {
|
||||
CommomTree tree2 = new CommomTree();
|
||||
tree2.setId(id);
|
||||
id++;
|
||||
tree2.setParentId(twoParentId);
|
||||
String name = user.getName();
|
||||
if(StringUtils.isNotBlank(name)){
|
||||
tree2.setName(user.getUserName() + "-" + name);
|
||||
}else{
|
||||
tree2.setName(user.getUserName());
|
||||
}
|
||||
//判断是否用户选中
|
||||
if(!CollectionUtils.isEmpty(remindDeptUsers)){
|
||||
for(ArchiveRemindDeptUser remindDeptUser : remindDeptUsers){
|
||||
if(remindDeptUser.getUserName().equals(user.getUserName())){
|
||||
tree2.setChecked("true");
|
||||
checkedFlag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
list.add(tree2);
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
//科室不存在用户则移除。不添加
|
||||
if(flag){
|
||||
if(checkedFlag) {
|
||||
tree1.setChecked("true");
|
||||
}
|
||||
list.add(tree1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.emr.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2020/10/27 14:29
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2020/10/27 14:29
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class CommomTree {
|
||||
private Integer id;
|
||||
|
||||
private Integer selfId;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer parentId;
|
||||
|
||||
private String checked;
|
||||
|
||||
private String code;
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.emr.dao.ArchiveRemindDeptUserMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.emr.entity.ArchiveRemindDeptUser" >
|
||||
<id column="id" property="id" jdbcType="INTEGER" />
|
||||
<result column="dept_code" property="deptCode" jdbcType="VARCHAR" />
|
||||
<result column="user_name" property="userName" jdbcType="NVARCHAR" />
|
||||
<result column="role_id" property="roleId" jdbcType="INTEGER" />
|
||||
<result column="int1" property="int1" jdbcType="INTEGER" />
|
||||
<result column="str1" property="str1" jdbcType="NVARCHAR" />
|
||||
<result column="int2" property="int2" jdbcType="INTEGER" />
|
||||
<result column="str2" property="str2" jdbcType="NVARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, dept_code, user_name, role_id, int1, str1, int2, str2
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from archive_remind_dept_user
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from archive_remind_dept_user
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.emr.entity.ArchiveRemindDeptUser" >
|
||||
insert into archive_remind_dept_user (id, dept_code, user_name,
|
||||
role_id, int1, str1,
|
||||
int2, str2)
|
||||
values (#{id,jdbcType=INTEGER}, #{deptCode,jdbcType=VARCHAR}, #{userName,jdbcType=NVARCHAR},
|
||||
#{roleId,jdbcType=INTEGER}, #{int1,jdbcType=INTEGER}, #{str1,jdbcType=NVARCHAR},
|
||||
#{int2,jdbcType=INTEGER}, #{str2,jdbcType=NVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.emr.entity.ArchiveRemindDeptUser" >
|
||||
insert into archive_remind_dept_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="deptCode != null" >
|
||||
dept_code,
|
||||
</if>
|
||||
<if test="userName != null" >
|
||||
user_name,
|
||||
</if>
|
||||
<if test="roleId != null" >
|
||||
role_id,
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
int1,
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
str1,
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
int2,
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
str2,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="deptCode != null" >
|
||||
#{deptCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userName != null" >
|
||||
#{userName,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="roleId != null" >
|
||||
#{roleId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
#{int1,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
#{str1,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
#{int2,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
#{str2,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.ArchiveRemindDeptUser" >
|
||||
update archive_remind_dept_user
|
||||
<set >
|
||||
<if test="deptCode != null" >
|
||||
dept_code = #{deptCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userName != null" >
|
||||
user_name = #{userName,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="roleId != null" >
|
||||
role_id = #{roleId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
int1 = #{int1,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
str1 = #{str1,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
int2 = #{int2,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
str2 = #{str2,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.emr.entity.ArchiveRemindDeptUser" >
|
||||
update archive_remind_dept_user
|
||||
set dept_code = #{deptCode,jdbcType=VARCHAR},
|
||||
user_name = #{userName,jdbcType=NVARCHAR},
|
||||
role_id = #{roleId,jdbcType=INTEGER},
|
||||
int1 = #{int1,jdbcType=INTEGER},
|
||||
str1 = #{str1,jdbcType=NVARCHAR},
|
||||
int2 = #{int2,jdbcType=INTEGER},
|
||||
str2 = #{str2,jdbcType=NVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<select id="selectAll" resultMap="BaseResultMap">
|
||||
select * from archive_remind_dept_user
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.emr.dao.ArchiveRemindInfoMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.emr.entity.ArchiveRemindInfo" >
|
||||
<id column="id" property="id" jdbcType="INTEGER" />
|
||||
<result column="dept_name" property="deptName" jdbcType="NVARCHAR" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="create_user" property="createUser" jdbcType="NVARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, dept_name, create_time, create_user
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from archive_remind_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from archive_remind_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.emr.entity.ArchiveRemindInfo" >
|
||||
insert into archive_remind_info (dept_name, create_time,
|
||||
create_user)
|
||||
values (#{deptName,jdbcType=NVARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{createUser,jdbcType=NVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.emr.entity.ArchiveRemindInfo" >
|
||||
insert into archive_remind_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="deptName != null" >
|
||||
dept_name,
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time,
|
||||
</if>
|
||||
<if test="createUser != null" >
|
||||
create_user,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="deptName != null" >
|
||||
#{deptName,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createUser != null" >
|
||||
#{createUser,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.ArchiveRemindInfo" >
|
||||
update archive_remind_info
|
||||
<set >
|
||||
<if test="deptName != null" >
|
||||
dept_name = #{deptName,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createUser != null" >
|
||||
create_user = #{createUser,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.emr.entity.ArchiveRemindInfo" >
|
||||
update archive_remind_info
|
||||
set dept_name = #{deptName,jdbcType=NVARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
create_user = #{createUser,jdbcType=NVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<select id="selectAllByDeptName" resultMap="BaseResultMap">
|
||||
select * from archive_remind_info
|
||||
<where>
|
||||
<if test="deptName != null and deptName != ''">
|
||||
and dept_name = #{deptName}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.emr.dao.ArchiveRemindcancleDeptMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.emr.entity.ArchiveRemindcancleDept" >
|
||||
<id column="id" property="id" jdbcType="INTEGER" />
|
||||
<result column="dept_code" property="deptCode" jdbcType="VARCHAR" />
|
||||
<result column="int1" property="int1" jdbcType="INTEGER" />
|
||||
<result column="str1" property="str1" jdbcType="NVARCHAR" />
|
||||
<result column="int2" property="int2" jdbcType="INTEGER" />
|
||||
<result column="str2" property="str2" jdbcType="NVARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, dept_code, int1, str1, int2, str2
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from archive_remindcancle_dept
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from archive_remindcancle_dept
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.emr.entity.ArchiveRemindcancleDept" >
|
||||
insert into archive_remindcancle_dept (id, dept_code, int1,
|
||||
str1, int2, str2)
|
||||
values (#{id,jdbcType=INTEGER}, #{deptCode,jdbcType=VARCHAR}, #{int1,jdbcType=INTEGER},
|
||||
#{str1,jdbcType=NVARCHAR}, #{int2,jdbcType=INTEGER}, #{str2,jdbcType=NVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.emr.entity.ArchiveRemindcancleDept" >
|
||||
insert into archive_remindcancle_dept
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="deptCode != null" >
|
||||
dept_code,
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
int1,
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
str1,
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
int2,
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
str2,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="deptCode != null" >
|
||||
#{deptCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
#{int1,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
#{str1,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
#{int2,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
#{str2,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.ArchiveRemindcancleDept" >
|
||||
update archive_remindcancle_dept
|
||||
<set >
|
||||
<if test="deptCode != null" >
|
||||
dept_code = #{deptCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
int1 = #{int1,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
str1 = #{str1,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
int2 = #{int2,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
str2 = #{str2,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.emr.entity.ArchiveRemindcancleDept" >
|
||||
update archive_remindcancle_dept
|
||||
set dept_code = #{deptCode,jdbcType=VARCHAR},
|
||||
int1 = #{int1,jdbcType=INTEGER},
|
||||
str1 = #{str1,jdbcType=NVARCHAR},
|
||||
int2 = #{int2,jdbcType=INTEGER},
|
||||
str2 = #{str2,jdbcType=NVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<select id="selectAll" resultMap="BaseResultMap">
|
||||
select * from archive_remindcancle_dept
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue