diff --git a/doc/gm_record.bak b/doc/gm_record.bak index 88e5a7a..7751b5e 100644 Binary files a/doc/gm_record.bak and b/doc/gm_record.bak differ diff --git a/doc/归档系统备忘.txt b/doc/归档系统备忘.txt index dfc6736..05be11a 100644 --- a/doc/归档系统备忘.txt +++ b/doc/归档系统备忘.txt @@ -10,4 +10,27 @@ END #ѯϷ select * from sys.sql_modules where definition like '%FUNCTION%' + + +#################################################################################################### +#ҽArchiveStateֵ +'1','16','48','512','256','272','304','768' + +#ҽʿԱArchiveStateֵ +'2','18','50','514' + +#δArchiveStateֵ +'6','22','54','518' + +#ʿArchiveStateֵ +'1','2','6','14','256','512','514','518','526','768' + +#ʿʿԱArchiveStateֵ +'16','18','22','30','272' + +#ʿArchiveStateֵ +'62' + +#ҴArchiveStateֵ +'64','1024' diff --git a/src/main/java/com/emr/config/CronValueConfig.java b/src/main/java/com/emr/config/CronValueConfig.java new file mode 100644 index 0000000..0c61fc5 --- /dev/null +++ b/src/main/java/com/emr/config/CronValueConfig.java @@ -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; + } +} diff --git a/src/main/java/com/emr/controller/OverTimeSetController.java b/src/main/java/com/emr/controller/OverTimeSetController.java new file mode 100644 index 0000000..f5e34e4 --- /dev/null +++ b/src/main/java/com/emr/controller/OverTimeSetController.java @@ -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 selectRemindDeptTree(){ + try { + return overtimeSetService.selectRemindDeptTree(); + } catch (Exception e) { + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + return null; + } + } + + /** + * 查询取消提醒科室用户树 + * @return + */ + @RequestMapping("selectRemindDeptUserTree") + @ResponseBody + public List selectRemindDeptUserTree(){ + try { + return overtimeSetService.selectRemindDeptUserTree(); + } catch (Exception e) { + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + return null; + } + } +} diff --git a/src/main/java/com/emr/controller/RecordController.java b/src/main/java/com/emr/controller/RecordController.java index 3244435..3acc29e 100644 --- a/src/main/java/com/emr/controller/RecordController.java +++ b/src/main/java/com/emr/controller/RecordController.java @@ -47,7 +47,7 @@ public class RecordController { if(offset != null && limit != null) { PageHelper.offsetPage(offset, limit); } - List submitRecords = recordService.selectCountGroupDept(recordSearch); + List submitRecords = recordService.selectUnCountGroupDept(recordSearch); return new OffsetLimitPage((Page) submitRecords); } @@ -83,7 +83,7 @@ public class RecordController { "headNurseCount,unHeadNurseCount,headNursePercent"; //构造excel的数据 try { - List list = recordService.selectCountGroupDept(recordSearch); + List list = recordService.selectUnCountGroupDept(recordSearch); //文件名 String fileName = "病案提交统计" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls"; //ExportExcelUtil @@ -152,7 +152,7 @@ public class RecordController { "unNurseSubmitCount,unNurseCheckCount,unHeadNurseCount,headNurseCount"; //构造excel的数据 try { - List list = recordService.selectCountGroupDept(recordSearch); + List list = recordService.selectUnCountGroupDept(recordSearch); //文件名 String fileName = "科室病案超期" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls"; //ExportExcelUtil diff --git a/src/main/java/com/emr/controller/beHospitaledController.java b/src/main/java/com/emr/controller/beHospitaledController.java index ca67cbe..d0cf992 100644 --- a/src/main/java/com/emr/controller/beHospitaledController.java +++ b/src/main/java/com/emr/controller/beHospitaledController.java @@ -7,7 +7,6 @@ package com.emr.controller; import com.emr.dao.ArchiveFlowRoleMapper; -import com.emr.dao.ArchiveRemindInfoMapper; import com.emr.entity.*; import com.emr.service.Archive_MasterService; import com.emr.service.ipml.ArchiveFlowInfoService; @@ -19,7 +18,6 @@ import com.emr.vo.ArchiveFlowInfoVo; import org.apache.commons.lang3.StringUtils; import org.apache.cxf.endpoint.Client; import org.apache.shiro.SecurityUtils; -import org.apache.shiro.util.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; @@ -46,8 +44,6 @@ public class beHospitaledController { private ArchiveFlowRoleMapper flowRoleMapper; @Autowired private ArchiveFlowInfoService flowInfoService; - @Autowired - private ArchiveRemindInfoMapper remindInfoMapper; @RequestMapping(value = "/beHosps") public String inHospitals(){ return "beHospitaledDir/beHospList"; @@ -267,23 +263,6 @@ public class beHospitaledController { List list = archiveMasterService.loadOverTimeDoctorInCharge(); return Msg.success().add("list",list); } - - /** - * 通知 - * @param deptName - * @return - */ - @RequestMapping("remind") - @ResponseBody - public Msg remind(String deptName,HttpServletRequest request){ - //查询是否今天是否通知过 - List list = remindInfoMapper.selectAllByDeptName(deptName); - if(!CollectionUtils.isEmpty(list)){ - return Msg.fail("该科室今天已通知过!"); - } - archiveMasterService.remind(deptName,request); - return Msg.success(); - } } diff --git a/src/main/java/com/emr/dao/ArchiveRemindDeptUserMapper.java b/src/main/java/com/emr/dao/ArchiveRemindDeptUserMapper.java new file mode 100644 index 0000000..5e860ac --- /dev/null +++ b/src/main/java/com/emr/dao/ArchiveRemindDeptUserMapper.java @@ -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 selectAll(); +} \ No newline at end of file diff --git a/src/main/java/com/emr/dao/ArchiveRemindInfoMapper.java b/src/main/java/com/emr/dao/ArchiveRemindInfoMapper.java deleted file mode 100644 index e71a42c..0000000 --- a/src/main/java/com/emr/dao/ArchiveRemindInfoMapper.java +++ /dev/null @@ -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 selectAllByDeptName(@Param("deptName")String deptName); -} \ No newline at end of file diff --git a/src/main/java/com/emr/dao/ArchiveRemindcancleDeptMapper.java b/src/main/java/com/emr/dao/ArchiveRemindcancleDeptMapper.java new file mode 100644 index 0000000..9e4d208 --- /dev/null +++ b/src/main/java/com/emr/dao/ArchiveRemindcancleDeptMapper.java @@ -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 selectAll(); +} \ No newline at end of file diff --git a/src/main/java/com/emr/dao/RecordMapper.java b/src/main/java/com/emr/dao/RecordMapper.java index dcac056..fd3610c 100644 --- a/src/main/java/com/emr/dao/RecordMapper.java +++ b/src/main/java/com/emr/dao/RecordMapper.java @@ -8,8 +8,8 @@ import com.emr.vo.SubmitRecordStatistics; import java.util.List; public interface RecordMapper { - //查询分组科室数量 - List selectCountGroupDept(RecordSearch recordSearch); + //查询分组科室各角色待审核数量 + List selectUnCountGroupDept(RecordSearch recordSearch); //根据审核角色id和分组科室查询该科室完成份数 List selectCountByRoleAndDeptName(RecordSearch recordSearch); //根据科室分组查询护士长审核份数 diff --git a/src/main/java/com/emr/entity/ArchiveRemindDeptUser.java b/src/main/java/com/emr/entity/ArchiveRemindDeptUser.java new file mode 100644 index 0000000..f3387f4 --- /dev/null +++ b/src/main/java/com/emr/entity/ArchiveRemindDeptUser.java @@ -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(); + } +} \ No newline at end of file diff --git a/src/main/java/com/emr/entity/ArchiveRemindInfo.java b/src/main/java/com/emr/entity/ArchiveRemindInfo.java deleted file mode 100644 index 35960c6..0000000 --- a/src/main/java/com/emr/entity/ArchiveRemindInfo.java +++ /dev/null @@ -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(); - } -} \ No newline at end of file diff --git a/src/main/java/com/emr/entity/ArchiveRemindcancleDept.java b/src/main/java/com/emr/entity/ArchiveRemindcancleDept.java new file mode 100644 index 0000000..9acbdec --- /dev/null +++ b/src/main/java/com/emr/entity/ArchiveRemindcancleDept.java @@ -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(); + } +} \ No newline at end of file diff --git a/src/main/java/com/emr/entity/EmrOvertimeSet.java b/src/main/java/com/emr/entity/EmrOvertimeSet.java index c0634a0..cf84f30 100644 --- a/src/main/java/com/emr/entity/EmrOvertimeSet.java +++ b/src/main/java/com/emr/entity/EmrOvertimeSet.java @@ -7,6 +7,20 @@ public class EmrOvertimeSet implements Serializable { private Integer days; + private Integer deadDays; + + private Integer surplusDays; + + private String remindTime; + + private Integer int1; + + private String str1; + + private Integer int2; + + private String str2; + private static final long serialVersionUID = 1L; public Integer getId() { @@ -25,6 +39,62 @@ public class EmrOvertimeSet implements Serializable { this.days = days; } + public Integer getDeadDays() { + return deadDays; + } + + public void setDeadDays(Integer deadDays) { + this.deadDays = deadDays; + } + + public Integer getSurplusDays() { + return surplusDays; + } + + public void setSurplusDays(Integer surplusDays) { + this.surplusDays = surplusDays; + } + + public String getRemindTime() { + return remindTime; + } + + public void setRemindTime(String remindTime) { + this.remindTime = remindTime == null ? null : remindTime.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(); @@ -33,6 +103,13 @@ public class EmrOvertimeSet implements Serializable { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", days=").append(days); + sb.append(", deadDays=").append(deadDays); + sb.append(", surplusDays=").append(surplusDays); + sb.append(", remindTime=").append(remindTime); + 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(); } diff --git a/src/main/java/com/emr/quart/Task1.java b/src/main/java/com/emr/quart/Task1.java new file mode 100644 index 0000000..1326c1f --- /dev/null +++ b/src/main/java/com/emr/quart/Task1.java @@ -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 userList = statisticsService.getUserList("admin"); + RecordSearch recordSearch = new RecordSearch(); + //查询超期记录 + //List submitRecords = recordService.selectRecordGroupDeptAndRole(recordSearch); + /*if(!CollectionUtils.isEmpty(submitRecords)){ + //查询科室取消提醒集合 + List cancleDeptList = remindcancleDeptMapper.selectAll(); + //查询科室取消单独开启的用户 + List deptUsers = remindDeptUserMapper.selectAll(); + //获取用户集合 + List userList = statisticsService.getUserList(); + for(Archive_Master_Vo vo : submitRecords){ + //通知医生 + + //通知医生质控员 + + } + }*/ + }catch (Exception e){ + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/emr/service/Archive_MasterService.java b/src/main/java/com/emr/service/Archive_MasterService.java index b3e5d5e..3969cf3 100644 --- a/src/main/java/com/emr/service/Archive_MasterService.java +++ b/src/main/java/com/emr/service/Archive_MasterService.java @@ -121,8 +121,6 @@ public interface Archive_MasterService { List loadDoctorInCharge(String deptName); List loadOverTimeDoctorInCharge(); - - void remind(String deptName, HttpServletRequest request); } diff --git a/src/main/java/com/emr/service/ipml/ArchiveFlowInfoService.java b/src/main/java/com/emr/service/ipml/ArchiveFlowInfoService.java index 3024ee2..0c1cfe4 100644 --- a/src/main/java/com/emr/service/ipml/ArchiveFlowInfoService.java +++ b/src/main/java/com/emr/service/ipml/ArchiveFlowInfoService.java @@ -268,7 +268,7 @@ public class ArchiveFlowInfoService { Emr_Fault_Type obj = new Emr_Fault_Type(); obj.setEffective(1); List typeList = faultTypeService.selectByCol(obj); - List userList = statisticsService.getUserList(userNameTemp); + List userList = statisticsService.getUserList(); //替换姓名 if (!CollectionUtils.isEmpty(userList)) { for (ArchiveFlowInfoVo infoVo : list) { diff --git a/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java b/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java index 5aaac09..c86d1a4 100644 --- a/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java +++ b/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java @@ -55,8 +55,6 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { private Zd_AssortMapper assortMapper; @Autowired private Emr_DictionaryMapper dictionaryMapper; - @Autowired - private ArchiveRemindInfoMapper remindInfoMapper; /** * 在院列表 * */ @@ -1085,47 +1083,6 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { } return null; } - - /** - * 通知 - * @param deptName - */ - @Override - public void remind(String deptName,HttpServletRequest request) { - //通知第三方平台 - remindOtherSystem(deptName); - //通知该平台 - remindThisSystem(deptName); - //插入科室通知记录表 - insertRemindInfoData(deptName,request); - } - - /** - * 插入科室通知记录表 - * @param deptName - */ - private void insertRemindInfoData(String deptName,HttpServletRequest request) { - ArchiveRemindInfo remindInfo = new ArchiveRemindInfo(); - remindInfo.setDeptName(deptName); - remindInfo.setCreateTime(new Date()); - Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER"); - remindInfo.setCreateUser(user.getUserName()); - remindInfoMapper.insert(remindInfo); - } - - /** - * 通知该平台 - * @param deptName - */ - private void remindThisSystem(String deptName) { - } - - /** - * 通知第三方平台 - * @param deptName - */ - private void remindOtherSystem(String deptName) { - } } diff --git a/src/main/java/com/emr/service/ipml/EmrOvertimeSetService.java b/src/main/java/com/emr/service/ipml/EmrOvertimeSetService.java new file mode 100644 index 0000000..7966c48 --- /dev/null +++ b/src/main/java/com/emr/service/ipml/EmrOvertimeSetService.java @@ -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 selectRemindDeptTree() throws Exception { + List list = new ArrayList<>(); + //查询科室 + List dictionaries = dictionaryService.dicByClo(new Emr_Dictionary()); + if(!CollectionUtils.isEmpty(dictionaries)){ + //查询取消科室 + List 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 selectRemindDeptUserTree() throws Exception { + //查询科室 + List dictionaries = dictionaryService.dicByClo(new Emr_Dictionary()); + List list = new ArrayList<>(); + if(!CollectionUtils.isEmpty(dictionaries)){ + //查询用户信息 + List userList = statisticsService.getUserList(); + if(!CollectionUtils.isEmpty(userList)){ + //查询取消科室提醒单独提醒的用户 + List 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; + } +} diff --git a/src/main/java/com/emr/service/ipml/RecordService.java b/src/main/java/com/emr/service/ipml/RecordService.java index b4301b8..78417b6 100644 --- a/src/main/java/com/emr/service/ipml/RecordService.java +++ b/src/main/java/com/emr/service/ipml/RecordService.java @@ -28,7 +28,7 @@ public class RecordService { * 病案提交统计 * @return */ - public List selectCountGroupDept(RecordSearch recordSearch){ + public List selectUnCountGroupDept(RecordSearch recordSearch){ Integer infoId = recordSearch.getInfoId(); if(null != infoId){ //有按审核角色查询 @@ -43,151 +43,58 @@ public class RecordService { } } //按科室查询总出院人数 - List submitRecords = recordMapper.selectCountGroupDept(recordSearch); - if(!CollectionUtils.isEmpty(submitRecords)) { - //获取科室集合 - String deptNames = getDepts(submitRecords); - recordSearch.setDeptName(deptNames); - //查询医生该科室审核份数 - int roleId = 2; - String backRoleId = "9"; - recordSearch.setRoleId(roleId); - recordSearch.setBackRoleId(backRoleId); - List doctorSubmitList = recordMapper.selectCountByRoleAndDeptName(recordSearch); - //查询医生质控员该科室审核份数 - roleId = 3; - recordSearch.setRoleId(roleId); - List doctorCheckList = recordMapper.selectCountByRoleAndDeptName(recordSearch); - //查询科主任该科室审核份数 - roleId = 4; - recordSearch.setRoleId(roleId); - List directorCheckList = recordMapper.selectCountByRoleAndDeptName(recordSearch); - //查询护士审核份数 - roleId = 5; - backRoleId = "10"; - recordSearch.setRoleId(roleId); - recordSearch.setBackRoleId(backRoleId); - List nurseList = recordMapper.selectCountByRoleAndDeptName(recordSearch); - //查询护士质控员审核份数 - roleId = 6; - recordSearch.setRoleId(roleId); - List nurseCheckList = recordMapper.selectCountByRoleAndDeptName(recordSearch); - //护士长 - roleId = 7; - backRoleId = "'9','10'"; - recordSearch.setRoleId(roleId); - recordSearch.setBackRoleId(backRoleId); - List headNurseList = recordMapper.selectCountByRoleAndDeptName(recordSearch); - //填充各个角色数据 - selectList(submitRecords,doctorSubmitList,doctorCheckList,directorCheckList,nurseList,nurseCheckList,headNurseList); - } - return submitRecords; + List unSubmitRecords = recordMapper.selectUnCountGroupDept(recordSearch); + //填充各个角色数据 + selectList(unSubmitRecords); + return unSubmitRecords; } /** * 填充集合数据 - * @param submitRecords - * @param doctorSubmitList - * @param doctorCheckList - * @param directorCheckList - * @param nurseList - * @param nurseCheckList - * @param headNurseList - */ - private void selectList(List submitRecords, List doctorSubmitList, - List doctorCheckList, - List directorCheckList, - List nurseList, - List nurseCheckList, - List headNurseList) { - for (SubmitRecord obj:submitRecords) { - String deptName = obj.getDeptName(); - int count = obj.getCount(); - if(count > 0) { - //医生提交 - int doctorSubmitCount = getSubmitOrUnSubmit(doctorSubmitList, deptName); - obj.setUnDoctorSubmitCount(count - doctorSubmitCount); - obj.setDoctorSubmitCount(doctorSubmitCount); - obj.setDoctorSubmitPercent(Math.round(doctorSubmitCount * 100 / count) + "%"); - - - //医生质控员提交 - int doctorCheckCount = getSubmitOrUnSubmit(doctorCheckList, deptName); - obj.setUnDoctorCheckCount(doctorSubmitCount - doctorCheckCount); - obj.setDoctorCheckCount(doctorCheckCount); - obj.setDoctorCheckPercent(Math.round(doctorCheckCount * 100 / count) + "%"); - - //科主任提交 - int directorCheckCount = getSubmitOrUnSubmit(directorCheckList, deptName); - obj.setUnDirectorCheckCount(doctorCheckCount - directorCheckCount); - obj.setDirectorCheckCount(directorCheckCount); - obj.setDirectorCheckPercent(Math.round(directorCheckCount * 100 / count) + "%"); - - //护士未提交 - //护士提交 - int nurseSubmitCount = getSubmitOrUnSubmit(nurseList, deptName); - obj.setUnNurseSubmitCount(count - nurseSubmitCount); - obj.setNurseSubmitCount(nurseSubmitCount); - obj.setNurseSubmitPercent(Math.round(nurseSubmitCount * 100 / count) + "%"); - - //护士质控员提交 - int nurseCheckCount = getSubmitOrUnSubmit(nurseCheckList, deptName); - obj.setUnNurseCheckCount(nurseSubmitCount - nurseCheckCount); - obj.setNurseCheckCount(nurseCheckCount); - obj.setNurseCheckPercent(Math.round(nurseCheckCount * 100 / count) + "%"); - - //护士长提交 - int headNurseCount = getSubmitOrUnSubmit(headNurseList, deptName); - //定义护士长前提交数量,医生和护士之前的最后一个节点都提交的数量。取科主任和护士质控员中小的值 - int beforeHeadNurse = 0; - if(directorCheckCount < nurseCheckCount){ - beforeHeadNurse = directorCheckCount; - }else{ - beforeHeadNurse = nurseCheckCount; - } - //护士长未提交等于提交上来的减去护士上长自己提交的 - obj.setUnHeadNurseCount(beforeHeadNurse - headNurseCount); - obj.setHeadNurseCount(headNurseCount); - obj.setHeadNursePercent(Math.round(headNurseCount * 100 / count) + "%"); - } - } - } - - /** - * 获取各个审核角色提交的份数 - * @param list - * @param deptName - * @return - */ - private int getSubmitOrUnSubmit(List list,String deptName){ - int submitCount = 0; - if(!CollectionUtils.isEmpty(list)) { - for (SubmitRecord objTemp : list) { - if (deptName.equals(objTemp.getDeptName())) { - return objTemp.getCount(); - } - } - } - return submitCount; - } - - /** - * 组织出院科室code以逗号隔开的字符串形式 - * @param list - * @return + * @param unSubmitRecords */ - private String getDepts(List list) { - StringBuilder depeNames = new StringBuilder(); - for (SubmitRecord obj:list) { - if(StringUtils.isNotBlank(obj.getDeptName())) { - if (StringUtils.isNoneBlank(depeNames)) { - depeNames.append(",").append(obj.getDeptName()); - } else { - depeNames.append(obj.getDeptName()); + private void selectList( List unSubmitRecords) { + if(!CollectionUtils.isEmpty(unSubmitRecords)) { + for (SubmitRecord obj : unSubmitRecords) { + int count = obj.getCount(); + if (count > 0) { + //医生提交== 总数 - 医生未提交 + int doctorSubmitCount = count - obj.getUnDoctorSubmitCount(); + obj.setDoctorSubmitCount(doctorSubmitCount); + obj.setDoctorSubmitPercent(Math.round(doctorSubmitCount * 100 / count) + "%"); + + + //医生质控员提交= 医生提交 - 医生质控员未提交 + int doctorCheckCount = doctorSubmitCount - obj.getUnDoctorCheckCount(); + obj.setDoctorCheckCount(doctorCheckCount); + obj.setDoctorCheckPercent(Math.round(doctorCheckCount * 100 / count) + "%"); + + //科主任提交= 医生质控员提交 - 主任未提交 + int directorCheckCount = doctorCheckCount - obj.getUnDirectorCheckCount(); + obj.setDirectorCheckCount(directorCheckCount); + obj.setDirectorCheckPercent(Math.round(directorCheckCount * 100 / count) + "%"); + + //护士提交= 总数 - 护士未提交 + int nurseSubmitCount = count - obj.getUnNurseSubmitCount(); + obj.setNurseSubmitCount(nurseSubmitCount); + obj.setNurseSubmitPercent(Math.round(nurseSubmitCount * 100 / count) + "%"); + + //护士质控员提交= 护士提交-护士质控员未提交 + int nurseCheckCount = nurseSubmitCount - obj.getUnNurseCheckCount(); + obj.setUnNurseCheckCount(nurseSubmitCount - nurseCheckCount); + obj.setNurseCheckCount(nurseCheckCount); + obj.setNurseCheckPercent(Math.round(nurseCheckCount * 100 / count) + "%"); + + //护士长提交= 科主任或护士质控员提交的数 - 护士长未提交 + //定义护士长前提交数量,医生和护士之前的最后一个节点都提交的数量。取科主任和护士质控员中小的值 + int beforeHeadNurse = directorCheckCount < nurseCheckCount ? directorCheckCount : nurseCheckCount; + int headNurseCount = beforeHeadNurse - obj.getUnHeadNurseCount(); + //护士长未提交等于提交上来的减去护士上长自己提交的 + obj.setHeadNurseCount(headNurseCount); + obj.setHeadNursePercent(Math.round(headNurseCount * 100 / count) + "%"); } } } - return depeNames.toString(); } /** @@ -229,7 +136,7 @@ public class RecordService { } /** - * 计算百分比并赋值 + * 设置提交报表百分比并赋值 * @param record */ private void SetStatisticsPercent(SubmitRecordStatistics record) { @@ -245,9 +152,14 @@ public class RecordService { } } + /** + * 设置超期列表提交率 + * @param recordSearch + * @return + */ public SubmitRecordStatistics selectOvertimeCount(RecordSearch recordSearch) { //查询超期记录数 - List submitRecords = selectCountGroupDept(recordSearch); + List submitRecords = selectUnCountGroupDept(recordSearch); //定义接收返回对象 SubmitRecordStatistics recordStatistics = new SubmitRecordStatistics(); if(!CollectionUtils.isEmpty(submitRecords)){ @@ -280,7 +192,6 @@ public class RecordService { int count7 = allCount - count6; recordStatistics.setCount7Percent(Math.round(count7 * 100 / allCount) + "%"); } - return recordStatistics; } diff --git a/src/main/java/com/emr/service/ipml/StatisticsService.java b/src/main/java/com/emr/service/ipml/StatisticsService.java index 236c229..6240f9d 100644 --- a/src/main/java/com/emr/service/ipml/StatisticsService.java +++ b/src/main/java/com/emr/service/ipml/StatisticsService.java @@ -205,27 +205,22 @@ public class StatisticsService { } public List getUserList(String userName) throws Exception{ - HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); - List userList = (List)request.getSession().getAttribute("USER_LIST"); - if(null == userList || userList.isEmpty()){ - //调用接口查询 - 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); + //调用接口查询 + 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 userList = JSON.parseArray(userList1,User.class); + //设置进session return userList; } /** diff --git a/src/main/java/com/emr/vo/CommomTree.java b/src/main/java/com/emr/vo/CommomTree.java new file mode 100644 index 0000000..0490f86 --- /dev/null +++ b/src/main/java/com/emr/vo/CommomTree.java @@ -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; +} diff --git a/src/main/java/com/emr/vo/User.java b/src/main/java/com/emr/vo/User.java index dd28e49..7d1d562 100644 --- a/src/main/java/com/emr/vo/User.java +++ b/src/main/java/com/emr/vo/User.java @@ -25,6 +25,16 @@ public class User { private String name; + private String deptCode; + + public String getDeptCode() { + return deptCode; + } + + public void setDeptCode(String deptCode) { + this.deptCode = deptCode; + } + public String getName() { return name; } diff --git a/src/main/resources/config/config.properties b/src/main/resources/config/config.properties index b2bfb82..e545ae7 100644 --- a/src/main/resources/config/config.properties +++ b/src/main/resources/config/config.properties @@ -52,4 +52,4 @@ allAddortIds = 00000000 nurseAssortIds = 'C70E8C427A3648B79BE80798C08F4D12','85DAE73A87D047D28C222E878C78C670' #\u7528\u4E8E\u8D85\u671F\u901A\u77E5\uFF0C\u53EA\u901A\u77E5\u8BE5\u65E5\u671F\u4EE5\u540E\u7684\u51FA\u9662\u8D85\u671F\u7684\u8BB0\u5F55 -overDateSet = 2020-10-29 +overDateSet = 2020-10-26 diff --git a/src/main/resources/config/jdbc.properties b/src/main/resources/config/jdbc.properties index cb6c173..8d5f5b2 100644 --- a/src/main/resources/config/jdbc.properties +++ b/src/main/resources/config/jdbc.properties @@ -1,11 +1,11 @@ jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver -#jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=gm_record -#jdbc.username=sa -#jdbc.password=docus702 - -jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=emr_record +jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=gm_record jdbc.username=sa -jdbc.password=AbcXyz123 +jdbc.password=docus702 + +#jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=emr_record +#jdbc.username=sa +#jdbc.password=AbcXyz123 filters=stat maxWait=60000 diff --git a/src/main/resources/mapper/ArchiveRemindDeptUserMapper.xml b/src/main/resources/mapper/ArchiveRemindDeptUserMapper.xml new file mode 100644 index 0000000..031c5b5 --- /dev/null +++ b/src/main/resources/mapper/ArchiveRemindDeptUserMapper.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + id, dept_code, user_name, role_id, int1, str1, int2, str2 + + + + delete from archive_remind_dept_user + where id = #{id,jdbcType=INTEGER} + + + 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 into archive_remind_dept_user + + + id, + + + dept_code, + + + user_name, + + + role_id, + + + int1, + + + str1, + + + int2, + + + str2, + + + + + #{id,jdbcType=INTEGER}, + + + #{deptCode,jdbcType=VARCHAR}, + + + #{userName,jdbcType=NVARCHAR}, + + + #{roleId,jdbcType=INTEGER}, + + + #{int1,jdbcType=INTEGER}, + + + #{str1,jdbcType=NVARCHAR}, + + + #{int2,jdbcType=INTEGER}, + + + #{str2,jdbcType=NVARCHAR}, + + + + + update archive_remind_dept_user + + + 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 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} + + + \ No newline at end of file diff --git a/src/main/resources/mapper/ArchiveRemindInfoMapper.xml b/src/main/resources/mapper/ArchiveRemindInfoMapper.xml deleted file mode 100644 index 6fec32d..0000000 --- a/src/main/resources/mapper/ArchiveRemindInfoMapper.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - id, dept_name, create_time, create_user - - - - delete from archive_remind_info - where id = #{id,jdbcType=INTEGER} - - - insert into archive_remind_info (dept_name, create_time, - create_user) - values (#{deptName,jdbcType=NVARCHAR}, #{createTime,jdbcType=TIMESTAMP}, - #{createUser,jdbcType=NVARCHAR}) - - - insert into archive_remind_info - - - id, - - - dept_name, - - - create_time, - - - create_user, - - - - - #{id,jdbcType=INTEGER}, - - - #{deptName,jdbcType=NVARCHAR}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{createUser,jdbcType=NVARCHAR}, - - - - - update archive_remind_info - - - dept_name = #{deptName,jdbcType=NVARCHAR}, - - - create_time = #{createTime,jdbcType=TIMESTAMP}, - - - create_user = #{createUser,jdbcType=NVARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - 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} - - - \ No newline at end of file diff --git a/src/main/resources/mapper/ArchiveRemindcancleDeptMapper.xml b/src/main/resources/mapper/ArchiveRemindcancleDeptMapper.xml new file mode 100644 index 0000000..4c110f0 --- /dev/null +++ b/src/main/resources/mapper/ArchiveRemindcancleDeptMapper.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + id, dept_code, int1, str1, int2, str2 + + + + delete from archive_remindcancle_dept + where id = #{id,jdbcType=INTEGER} + + + 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 into archive_remindcancle_dept + + + id, + + + dept_code, + + + int1, + + + str1, + + + int2, + + + str2, + + + + + #{id,jdbcType=INTEGER}, + + + #{deptCode,jdbcType=VARCHAR}, + + + #{int1,jdbcType=INTEGER}, + + + #{str1,jdbcType=NVARCHAR}, + + + #{int2,jdbcType=INTEGER}, + + + #{str2,jdbcType=NVARCHAR}, + + + + + update archive_remindcancle_dept + + + 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 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} + + + \ No newline at end of file diff --git a/src/main/resources/mapper/EmrOvertimeSetMapper.xml b/src/main/resources/mapper/EmrOvertimeSetMapper.xml index 35c74a6..1f312cd 100644 --- a/src/main/resources/mapper/EmrOvertimeSetMapper.xml +++ b/src/main/resources/mapper/EmrOvertimeSetMapper.xml @@ -4,12 +4,19 @@ + + + + + + + - id, days + id, days, dead_days, surplus_days, remind_time, int1, str1, int2, str2 - SELECT - dept_name deptName, - COUNT( archive_master.id ) count, - emr_dictionary.NAME deptNameCn - FROM - archive_master - INNER JOIN emr_dictionary ON archive_master.dept_name = emr_dictionary.CODE - AND emr_dictionary.parent_id = 'dept_code' - + + @@ -154,9 +202,9 @@ LEFT JOIN ( SELECT master_id, MAX( createtime ) createtime FROM archive_flow_info WHERE target_step_id in (${backRoleId}) GROUP BY master_id ) t2 ON t1.master_id = t2.master_id INNER JOIN archive_master ON t1.master_id = archive_master.id - - - + + + GROUP BY dept_name @@ -164,155 +212,31 @@ - - - INNER JOIN ( - SELECT - archive_master.id - FROM - archive_master - LEFT JOIN ( - SELECT - master_id, - start_step_id - FROM - archive_flow_info - WHERE - start_step_id = #{infoId} - GROUP BY - master_id, - start_step_id - ) archive_flow_info ON archive_master.id = archive_flow_info.master_id - WHERE - archive_flow_info.start_step_id IS NULL - - - UNION ALL - SELECT - archive_flow_info.master_id id - FROM - archive_flow_info - INNER JOIN ( - SELECT - master_id, - MAX(createtime) createtime - FROM - archive_flow_info - WHERE - oper_role = #{operRole} - GROUP BY - master_id - ) archive_flow_info1 ON archive_flow_info.master_id = archive_flow_info1.master_id - AND archive_flow_info.createtime = archive_flow_info1.createtime - WHERE - archive_flow_info.target_step_id = - 9 - 10 - ) temp ON archive_master.id = temp.id + + + AND archive_master.ArchiveState IN ('1','16','48','512','256','272','304','768') + + + AND archive_master.ArchiveState IN ('2','18','50','514') + + + AND archive_master.ArchiveState IN ('6','22','54','518') + + + AND archive_master.ArchiveState IN ('1','2','6','14','256','512','514','518','526','768') + + + AND archive_master.ArchiveState IN ('16','18','22','30','272') - - INNER JOIN ( - SELECT - archive_flow_info.master_id - FROM - archive_flow_info - INNER JOIN ( - 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 = archive_master.id - AND archive_master.ArchiveState != '64' + AND archive_master.ArchiveState IN ('62') + + + AND archive_master.ArchiveState IN ('64','1024') - - - INNER JOIN ( - SELECT - archive_flow_info.master_id - FROM - archive_flow_info - INNER JOIN ( - SELECT - master_id, - MAX(createtime) createtime - FROM - archive_flow_info - WHERE - oper_role = #{operRole} - GROUP BY - master_id - ) archive_flow_info1 ON archive_flow_info.master_id = archive_flow_info1.master_id - AND archive_flow_info.createtime = archive_flow_info1.createtime - AND archive_flow_info.target_step_id = #{infoId} - ) t3 ON archive_master.id = t3.master_id - - - - - +
diff --git a/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp b/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp index c9c52ee..724fd74 100644 --- a/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp +++ b/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp @@ -96,10 +96,7 @@
-
diff --git a/src/main/webapp/WEB-INF/views/flowInfo/flowInfoList.jsp b/src/main/webapp/WEB-INF/views/flowInfo/flowInfoList.jsp index 80d64db..370c91f 100644 --- a/src/main/webapp/WEB-INF/views/flowInfo/flowInfoList.jsp +++ b/src/main/webapp/WEB-INF/views/flowInfo/flowInfoList.jsp @@ -72,10 +72,7 @@
-
diff --git a/src/main/webapp/WEB-INF/views/inHospitalDir/inHositalList.jsp b/src/main/webapp/WEB-INF/views/inHospitalDir/inHositalList.jsp index bde22f0..d4fa1dd 100644 --- a/src/main/webapp/WEB-INF/views/inHospitalDir/inHositalList.jsp +++ b/src/main/webapp/WEB-INF/views/inHospitalDir/inHositalList.jsp @@ -136,9 +136,7 @@
-
diff --git a/src/main/webapp/WEB-INF/views/lastVerifyDir/lastVerifyList.jsp b/src/main/webapp/WEB-INF/views/lastVerifyDir/lastVerifyList.jsp index 3a940d2..5c0d96b 100644 --- a/src/main/webapp/WEB-INF/views/lastVerifyDir/lastVerifyList.jsp +++ b/src/main/webapp/WEB-INF/views/lastVerifyDir/lastVerifyList.jsp @@ -154,10 +154,7 @@
-
diff --git a/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp b/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp index feba2a7..ee2b996 100644 --- a/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp +++ b/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp @@ -87,9 +87,7 @@ --%>
-
diff --git a/src/main/webapp/WEB-INF/views/overtimeSet/overtimeSet.jsp b/src/main/webapp/WEB-INF/views/overtimeSet/overtimeSet.jsp new file mode 100644 index 0000000..d83aa17 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/overtimeSet/overtimeSet.jsp @@ -0,0 +1,384 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + 字典列表 + + <%@include file="../../jspf/comm.jspf" %> + <%@ include file="../../jspf/ztreeCommom.jsp" %> + + + + + +
+
+ +
+
+
+

基础信息设置

+
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+

不接收提醒科室设置

+
+
+
+ + +
+
+ + +
+
+ +
+
+
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    关闭科室提醒单独提醒科室用户设置

    +
    +
    +
    + + +
    +
    + + +
    +
    + +
    +
    +
      +
      +
      +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/record/deptOverTimeInfo.jsp b/src/main/webapp/WEB-INF/views/record/deptOverTimeInfo.jsp index 65f9d7e..7b5bbde 100644 --- a/src/main/webapp/WEB-INF/views/record/deptOverTimeInfo.jsp +++ b/src/main/webapp/WEB-INF/views/record/deptOverTimeInfo.jsp @@ -76,13 +76,11 @@
      -
      - + +
      diff --git a/src/main/webapp/WEB-INF/views/record/submitRecord.jsp b/src/main/webapp/WEB-INF/views/record/submitRecord.jsp index 8924636..a37b25e 100644 --- a/src/main/webapp/WEB-INF/views/record/submitRecord.jsp +++ b/src/main/webapp/WEB-INF/views/record/submitRecord.jsp @@ -117,10 +117,7 @@
      -
      <%--
      diff --git a/src/main/webapp/WEB-INF/views/statistics/finalStatisticsDetail.jsp b/src/main/webapp/WEB-INF/views/statistics/finalStatisticsDetail.jsp index 296620c..4e266f7 100644 --- a/src/main/webapp/WEB-INF/views/statistics/finalStatisticsDetail.jsp +++ b/src/main/webapp/WEB-INF/views/statistics/finalStatisticsDetail.jsp @@ -72,10 +72,7 @@
      -
      diff --git a/src/main/webapp/WEB-INF/views/statistics/recordStatistics.jsp b/src/main/webapp/WEB-INF/views/statistics/recordStatistics.jsp index bd21e98..fe74027 100644 --- a/src/main/webapp/WEB-INF/views/statistics/recordStatistics.jsp +++ b/src/main/webapp/WEB-INF/views/statistics/recordStatistics.jsp @@ -96,10 +96,7 @@
      -
      diff --git a/src/main/webapp/WEB-INF/views/statistics/statisticsDetail.jsp b/src/main/webapp/WEB-INF/views/statistics/statisticsDetail.jsp index a1b2467..f0a6bc6 100644 --- a/src/main/webapp/WEB-INF/views/statistics/statisticsDetail.jsp +++ b/src/main/webapp/WEB-INF/views/statistics/statisticsDetail.jsp @@ -72,10 +72,7 @@
      -
      diff --git a/src/main/webapp/WEB-INF/views/unfileMedicalDir/unfileMedicalList.jsp b/src/main/webapp/WEB-INF/views/unfileMedicalDir/unfileMedicalList.jsp index 1859b3f..017d398 100644 --- a/src/main/webapp/WEB-INF/views/unfileMedicalDir/unfileMedicalList.jsp +++ b/src/main/webapp/WEB-INF/views/unfileMedicalDir/unfileMedicalList.jsp @@ -147,9 +147,7 @@
      -
      @@ -164,10 +162,7 @@
      -
      diff --git a/src/main/webapp/WEB-INF/views/vCountDir/doctorFileList.jsp b/src/main/webapp/WEB-INF/views/vCountDir/doctorFileList.jsp index f6290cc..5a87f99 100644 --- a/src/main/webapp/WEB-INF/views/vCountDir/doctorFileList.jsp +++ b/src/main/webapp/WEB-INF/views/vCountDir/doctorFileList.jsp @@ -64,10 +64,7 @@
      -
      diff --git a/src/main/webapp/WEB-INF/views/vCountDir/vCountList.jsp b/src/main/webapp/WEB-INF/views/vCountDir/vCountList.jsp index 2387e97..160a24b 100644 --- a/src/main/webapp/WEB-INF/views/vCountDir/vCountList.jsp +++ b/src/main/webapp/WEB-INF/views/vCountDir/vCountList.jsp @@ -79,9 +79,7 @@
      -
      diff --git a/src/main/webapp/static/js/beHospList/beHospList.js b/src/main/webapp/static/js/beHospList/beHospList.js index df655e4..79f0468 100644 --- a/src/main/webapp/static/js/beHospList/beHospList.js +++ b/src/main/webapp/static/js/beHospList/beHospList.js @@ -155,9 +155,6 @@ function initTable() { var url = window.location.href; var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", ""); var html = ""; - if (index != null && index.indexOf("remind") !== -1) { - html += ''; - } if (index != null && index.indexOf("select") !== -1) { html += ''; } @@ -252,22 +249,6 @@ function initTable() { var dischargeDateTime = row.dischargeDateTime; $("#showFlowInfoIframe").prop("src",path+"/beHosp/toShowFlowInfo?id="+masterId+"&name="+name+"&inpNo="+inpNo+"&visitId="+visitId+"&dischargeDateTime="+dischargeDateTime+"&role="+$("#checker").val()); }, - //提醒 - 'click .remind': function (e, value, row) { - $.ajax({ - type:'get', - url:path+'/beHosp/remind', - data:{deptName:row.deptName}, - dataType:'json', - success:function(data){ - if(data.code == 100){ - toastr.success("通知成功!"); - }else{ - toastr.error(data.msg); - } - } - }) - } }, cellStyle: function () { return {classes: 'success'} diff --git a/src/main/webapp/static/js/record/deptOverTimeInfo.js b/src/main/webapp/static/js/record/deptOverTimeInfo.js index ba3133b..8663db4 100644 --- a/src/main/webapp/static/js/record/deptOverTimeInfo.js +++ b/src/main/webapp/static/js/record/deptOverTimeInfo.js @@ -73,14 +73,26 @@ function selectOvertimeCount(){ success:function(data){ if(data.code == 100){ var record = data.extend.record; - $("#allCount").text(record.allCount); - setSubmitPercent('count1Percent',record.count1Percent); - setSubmitPercent('count2Percent',record.count2Percent); - setSubmitPercent('count3Percent',record.count3Percent); - setSubmitPercent('count4Percent',record.count4Percent); - setSubmitPercent('count5Percent',record.count5Percent); - setSubmitPercent('count6Percent',record.count6Percent); - setSubmitPercent('count7Percent',record.count7Percent); + var allCount = record.allCount; + if(allCount != null) { + $("#allCount").text(allCount); + setSubmitPercent('count1Percent', record.count1Percent); + setSubmitPercent('count2Percent', record.count2Percent); + setSubmitPercent('count3Percent', record.count3Percent); + setSubmitPercent('count4Percent', record.count4Percent); + setSubmitPercent('count5Percent', record.count5Percent); + setSubmitPercent('count6Percent', record.count6Percent); + setSubmitPercent('count7Percent', record.count7Percent); + }else{ + $("#allCount").text(0); + setSubmitPercent('count1Percent', '0%'); + setSubmitPercent('count2Percent', '0%'); + setSubmitPercent('count3Percent', '0%'); + setSubmitPercent('count4Percent', '0%'); + setSubmitPercent('count5Percent', '0%'); + setSubmitPercent('count6Percent', '0%'); + setSubmitPercent('count7Percent', '0%'); + } }else{ toastr.error(data.msg); } @@ -237,7 +249,7 @@ function initTable() { }, { title: '病案室未提交', - field: 'headNurseCount', + field: 'unRecordRoomCount', align: 'center' }, ]],