佛山3院单点登录功能
commit
2ac4b1d254
@ -0,0 +1,211 @@
|
||||
package com.emr.controller;
|
||||
|
||||
import com.emr.dao.ServerMachineMapper;
|
||||
import com.emr.entity.Archive_Master_Vo;
|
||||
import com.emr.entity.OffsetLimitPage;
|
||||
import com.emr.service.ipml.RecordService;
|
||||
import com.emr.service.ipml.WorkHomeService;
|
||||
import com.emr.util.ExceptionPrintUtil;
|
||||
import com.emr.util.ExportExcelUtil;
|
||||
import com.emr.vo.NotSubmitRecordVo;
|
||||
import com.emr.vo.RecordSearch;
|
||||
import com.emr.vo.ServerMachineVo;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
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 javax.servlet.http.HttpServletResponse;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2021/7/23 13:23
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2021/7/23 13:23
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("workHome")
|
||||
public class WorkHomeController {
|
||||
@Autowired
|
||||
private WorkHomeService workHomeService;
|
||||
@Autowired
|
||||
private RecordService recordService;
|
||||
@Autowired
|
||||
private ServerMachineMapper serverMachineMapper;
|
||||
/**
|
||||
* 工作看板
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("workHomeList")
|
||||
public String workHomeList(){
|
||||
return "workHome/workHomeList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 工作看板内容
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("workHomeIframe")
|
||||
public String workHomeIframe(){
|
||||
return "workHome/workHomeIframe";
|
||||
}
|
||||
|
||||
/**
|
||||
* 病案数据
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("recordData")
|
||||
public String recordData(){
|
||||
return "workHome/recordData";
|
||||
}
|
||||
|
||||
/**
|
||||
* 病案数据第一层表格
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("recordDataOneTable")
|
||||
@ResponseBody
|
||||
public OffsetLimitPage recordDataOneTable(String startDateTo,String endDateTo) throws Exception{
|
||||
return workHomeService.recordDateOneTable(startDateTo,endDateTo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 病案数据第二层表格
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("recordDataTwoTable")
|
||||
@ResponseBody
|
||||
public OffsetLimitPage recordDataTwoTable(Integer offset, Integer limit,String startDateTo,String endDateTo) throws Exception{
|
||||
return workHomeService.recordDataTwoTable(offset,limit,startDateTo,endDateTo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 病案数据第三层表格
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("recordDataThreeTable")
|
||||
@ResponseBody
|
||||
public List<NotSubmitRecordVo> recordDataThreeTable(RecordSearch recordSearch) throws Exception{
|
||||
return workHomeService.recordDataThreeTable(recordSearch);
|
||||
}
|
||||
|
||||
/**
|
||||
* 病案数据待审核详情页面
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("notSubmitRecord")
|
||||
public String notSubmitRecord(RecordSearch recordSearch, Model model) throws Exception{
|
||||
model.addAttribute("obj",recordSearch);
|
||||
return "workHome/notSubmitRecord";
|
||||
}
|
||||
|
||||
/**
|
||||
* 病案数据未提交报表导出
|
||||
* @param response
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "exportExcelNotSubmit")
|
||||
public void exportExcelNotSubmit(HttpServletResponse response,
|
||||
RecordSearch recordSearch){
|
||||
String tableThNames = "主管医生,医生工号,超期份数,出院科室,患者姓名,住院号,"+
|
||||
"住院次数,出院日期,超期天数,状态,完整性";
|
||||
String fieldCns = "doctorInCharge,doctorInChargeCode,overTimeCounts,deptName,name," +
|
||||
"inpNo,visitId,dischargeDateTime,overtimeDays,status,lockInfo";
|
||||
//构造excel的数据
|
||||
try {
|
||||
List<Archive_Master_Vo> list = recordService.selectRecordGroupDeptAndRole(recordSearch);
|
||||
//文件名
|
||||
String fileName = "病案未提交报表" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
|
||||
//ExportExcelUtil
|
||||
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
|
||||
//导出excel的操作
|
||||
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
|
||||
}catch (Exception e){
|
||||
ExceptionPrintUtil.printException(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 病案室管理
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("medicalRoomManage")
|
||||
public String medicalRoomManage(){
|
||||
return "workHome/medicalRoomManage";
|
||||
}
|
||||
|
||||
/**
|
||||
* 病案室管理数据监控
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("medicalRoomManageData")
|
||||
@ResponseBody
|
||||
public Map<String,String> medicalRoomManageData(String startDateTo, String endDateTo) throws Exception{
|
||||
return workHomeService.medicalRoomManageData(startDateTo,endDateTo);
|
||||
}
|
||||
|
||||
/**
|
||||
* HIS退回病案统计
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("callBackStatistics")
|
||||
public String callBackStatistics(){
|
||||
return "workHome/callBackStatistics";
|
||||
}
|
||||
|
||||
/**
|
||||
* HIS退回病案统计数据
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("callBackStatisticsData")
|
||||
@ResponseBody
|
||||
public OffsetLimitPage callBackStatisticsData(Integer offset, Integer limit,String startDateTo,String endDateTo) throws Exception{
|
||||
return workHomeService.callBackStatisticsData(offset,limit,startDateTo,endDateTo);
|
||||
}
|
||||
|
||||
/**
|
||||
* HIS退回病案统计数据详情
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("callBackStatisticsDetail")
|
||||
@ResponseBody
|
||||
public OffsetLimitPage callBackStatisticsDetail(Integer offset, Integer limit,String time,String startDateTo,String endDateTo) throws Exception{
|
||||
return workHomeService.callBackStatisticsDetail(offset,limit,time,startDateTo,endDateTo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 采集器状态
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("collectList")
|
||||
public String collectList(){
|
||||
return "workHome/collectList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 采集器状态列表
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("collectListData")
|
||||
@ResponseBody
|
||||
public OffsetLimitPage collectListData(Integer offset, Integer limit) throws Exception{
|
||||
PageHelper.offsetPage(offset, limit);
|
||||
List<ServerMachineVo> list = serverMachineMapper.selectAll();
|
||||
return new OffsetLimitPage((Page) list);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.emr.dao;
|
||||
|
||||
import com.emr.entity.ServerMachine;
|
||||
import com.emr.vo.ServerMachineVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ServerMachineMapper {
|
||||
int deleteByPrimaryKey(String servername);
|
||||
|
||||
int insert(ServerMachine record);
|
||||
|
||||
int insertSelective(ServerMachine record);
|
||||
|
||||
ServerMachine selectByPrimaryKey(String servername);
|
||||
|
||||
int updateByPrimaryKeySelective(ServerMachine record);
|
||||
|
||||
int updateByPrimaryKey(ServerMachine record);
|
||||
|
||||
List<ServerMachineVo> selectAll();
|
||||
}
|
@ -0,0 +1,261 @@
|
||||
package com.emr.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class ServerMachine implements Serializable {
|
||||
private String servername;
|
||||
|
||||
private Date lastonlinetime;
|
||||
|
||||
private Integer state;
|
||||
|
||||
private String loginuser;
|
||||
|
||||
private String loginpwd;
|
||||
|
||||
private Long doccount;
|
||||
|
||||
private Long infocount;
|
||||
|
||||
private Long warningcount;
|
||||
|
||||
private Long errorcount;
|
||||
|
||||
private Long donecount;
|
||||
|
||||
private Date lastupdatetime;
|
||||
|
||||
private String c1;
|
||||
|
||||
private String c2;
|
||||
|
||||
private String c3;
|
||||
|
||||
private String c4;
|
||||
|
||||
private String c5;
|
||||
|
||||
private BigDecimal n1;
|
||||
|
||||
private BigDecimal n2;
|
||||
|
||||
private BigDecimal n3;
|
||||
|
||||
private Date t1;
|
||||
|
||||
private Date t2;
|
||||
|
||||
private Date t3;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public String getServername() {
|
||||
return servername;
|
||||
}
|
||||
|
||||
public void setServername(String servername) {
|
||||
this.servername = servername == null ? null : servername.trim();
|
||||
}
|
||||
|
||||
public Date getLastonlinetime() {
|
||||
return lastonlinetime;
|
||||
}
|
||||
|
||||
public void setLastonlinetime(Date lastonlinetime) {
|
||||
this.lastonlinetime = lastonlinetime;
|
||||
}
|
||||
|
||||
public Integer getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(Integer state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getLoginuser() {
|
||||
return loginuser;
|
||||
}
|
||||
|
||||
public void setLoginuser(String loginuser) {
|
||||
this.loginuser = loginuser == null ? null : loginuser.trim();
|
||||
}
|
||||
|
||||
public String getLoginpwd() {
|
||||
return loginpwd;
|
||||
}
|
||||
|
||||
public void setLoginpwd(String loginpwd) {
|
||||
this.loginpwd = loginpwd == null ? null : loginpwd.trim();
|
||||
}
|
||||
|
||||
public Long getDoccount() {
|
||||
return doccount;
|
||||
}
|
||||
|
||||
public void setDoccount(Long doccount) {
|
||||
this.doccount = doccount;
|
||||
}
|
||||
|
||||
public Long getInfocount() {
|
||||
return infocount;
|
||||
}
|
||||
|
||||
public void setInfocount(Long infocount) {
|
||||
this.infocount = infocount;
|
||||
}
|
||||
|
||||
public Long getWarningcount() {
|
||||
return warningcount;
|
||||
}
|
||||
|
||||
public void setWarningcount(Long warningcount) {
|
||||
this.warningcount = warningcount;
|
||||
}
|
||||
|
||||
public Long getErrorcount() {
|
||||
return errorcount;
|
||||
}
|
||||
|
||||
public void setErrorcount(Long errorcount) {
|
||||
this.errorcount = errorcount;
|
||||
}
|
||||
|
||||
public Long getDonecount() {
|
||||
return donecount;
|
||||
}
|
||||
|
||||
public void setDonecount(Long donecount) {
|
||||
this.donecount = donecount;
|
||||
}
|
||||
|
||||
public Date getLastupdatetime() {
|
||||
return lastupdatetime;
|
||||
}
|
||||
|
||||
public void setLastupdatetime(Date lastupdatetime) {
|
||||
this.lastupdatetime = lastupdatetime;
|
||||
}
|
||||
|
||||
public String getC1() {
|
||||
return c1;
|
||||
}
|
||||
|
||||
public void setC1(String c1) {
|
||||
this.c1 = c1 == null ? null : c1.trim();
|
||||
}
|
||||
|
||||
public String getC2() {
|
||||
return c2;
|
||||
}
|
||||
|
||||
public void setC2(String c2) {
|
||||
this.c2 = c2 == null ? null : c2.trim();
|
||||
}
|
||||
|
||||
public String getC3() {
|
||||
return c3;
|
||||
}
|
||||
|
||||
public void setC3(String c3) {
|
||||
this.c3 = c3 == null ? null : c3.trim();
|
||||
}
|
||||
|
||||
public String getC4() {
|
||||
return c4;
|
||||
}
|
||||
|
||||
public void setC4(String c4) {
|
||||
this.c4 = c4 == null ? null : c4.trim();
|
||||
}
|
||||
|
||||
public String getC5() {
|
||||
return c5;
|
||||
}
|
||||
|
||||
public void setC5(String c5) {
|
||||
this.c5 = c5 == null ? null : c5.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getN1() {
|
||||
return n1;
|
||||
}
|
||||
|
||||
public void setN1(BigDecimal n1) {
|
||||
this.n1 = n1;
|
||||
}
|
||||
|
||||
public BigDecimal getN2() {
|
||||
return n2;
|
||||
}
|
||||
|
||||
public void setN2(BigDecimal n2) {
|
||||
this.n2 = n2;
|
||||
}
|
||||
|
||||
public BigDecimal getN3() {
|
||||
return n3;
|
||||
}
|
||||
|
||||
public void setN3(BigDecimal n3) {
|
||||
this.n3 = n3;
|
||||
}
|
||||
|
||||
public Date getT1() {
|
||||
return t1;
|
||||
}
|
||||
|
||||
public void setT1(Date t1) {
|
||||
this.t1 = t1;
|
||||
}
|
||||
|
||||
public Date getT2() {
|
||||
return t2;
|
||||
}
|
||||
|
||||
public void setT2(Date t2) {
|
||||
this.t2 = t2;
|
||||
}
|
||||
|
||||
public Date getT3() {
|
||||
return t3;
|
||||
}
|
||||
|
||||
public void setT3(Date t3) {
|
||||
this.t3 = t3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", servername=").append(servername);
|
||||
sb.append(", lastonlinetime=").append(lastonlinetime);
|
||||
sb.append(", state=").append(state);
|
||||
sb.append(", loginuser=").append(loginuser);
|
||||
sb.append(", loginpwd=").append(loginpwd);
|
||||
sb.append(", doccount=").append(doccount);
|
||||
sb.append(", infocount=").append(infocount);
|
||||
sb.append(", warningcount=").append(warningcount);
|
||||
sb.append(", errorcount=").append(errorcount);
|
||||
sb.append(", donecount=").append(donecount);
|
||||
sb.append(", lastupdatetime=").append(lastupdatetime);
|
||||
sb.append(", c1=").append(c1);
|
||||
sb.append(", c2=").append(c2);
|
||||
sb.append(", c3=").append(c3);
|
||||
sb.append(", c4=").append(c4);
|
||||
sb.append(", c5=").append(c5);
|
||||
sb.append(", n1=").append(n1);
|
||||
sb.append(", n2=").append(n2);
|
||||
sb.append(", n3=").append(n3);
|
||||
sb.append(", t1=").append(t1);
|
||||
sb.append(", t2=").append(t2);
|
||||
sb.append(", t3=").append(t3);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,530 @@
|
||||
package com.emr.service.ipml;
|
||||
|
||||
import com.emr.dao.*;
|
||||
import com.emr.entity.*;
|
||||
import com.emr.vo.*;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.shiro.util.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2021/7/28 14:22
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2021/7/28 14:22
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class WorkHomeService {
|
||||
@Autowired
|
||||
private Archive_MasterMapper archiveMasterMapper;
|
||||
@Autowired
|
||||
private Emr_DictionaryMapper dictionaryMapper;
|
||||
@Autowired
|
||||
private RecordMapper recordMapper;
|
||||
@Autowired
|
||||
private EmrOvertimeSetService overtimeSetService;
|
||||
@Autowired
|
||||
private EmrHolidaySetMapper holidaySetMapper;
|
||||
@Autowired
|
||||
private Archive_DetailMapper archiveDetailMapper;
|
||||
@Autowired
|
||||
private ArchiveOtherExtMapper archiveOtherExtMapper;
|
||||
/**
|
||||
* 病案数据第一层表格
|
||||
* @param startDateTo
|
||||
* @param endDateTo
|
||||
* @return
|
||||
*/
|
||||
public OffsetLimitPage recordDateOneTable(String startDateTo, String endDateTo) {
|
||||
//查询全部出院日期和状态
|
||||
List<Archive_Master> list= archiveMasterMapper.recordDateOneTable(startDateTo,endDateTo,null);
|
||||
//定义返回集合
|
||||
List<RecordStatisticsHome> returnList = new Page<>();
|
||||
//定义接收对象
|
||||
RecordStatisticsHome obj = new RecordStatisticsHome();
|
||||
obj.setName("全院");
|
||||
//定义出院人数
|
||||
int disCount = 0;
|
||||
//定义入院人数
|
||||
int admissCount = 0;
|
||||
//定义出科数量
|
||||
int sumbitCount = 0;
|
||||
//定义归档数量
|
||||
int recordCount = 0;
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
for(Archive_Master archiveMaster : list){
|
||||
//判断出院、入院
|
||||
String disDate = archiveMaster.getDischargeDateTime();
|
||||
if(StringUtils.isNotBlank(disDate) && !"1801".equals(disDate.substring(0,4))){
|
||||
disCount++;
|
||||
}else{
|
||||
admissCount++;
|
||||
}
|
||||
//判断出科
|
||||
String archivestate = archiveMaster.getArchivestate();
|
||||
if(StringUtils.isNotBlank(archivestate)) {
|
||||
String t1 = archiveMaster.getT1();
|
||||
if ("64".equals(archivestate) || "128".equals(archivestate)) {
|
||||
sumbitCount++;
|
||||
}
|
||||
//判断归档 待终审且已签收+已归档
|
||||
if ("128".equals(archivestate) || ("64".equals(archivestate) && StringUtils.isNotBlank(t1) && !"1801-02-03".equals(t1.substring(0,10)))) {
|
||||
recordCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
obj.setName("全院");
|
||||
obj.setDisCount(disCount);
|
||||
obj.setAdmissCount(admissCount);
|
||||
obj.setSumbitCount(sumbitCount);
|
||||
obj.setRecordCount(recordCount);
|
||||
if(disCount != 0) {
|
||||
obj.setRecordRate((recordCount * 100 / disCount) + "%");
|
||||
}
|
||||
returnList.add(obj);
|
||||
return new OffsetLimitPage((Page) returnList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 病案数据第二层表格
|
||||
* @param offset
|
||||
* @param limit
|
||||
* @param startDateTo
|
||||
* @param endDateTo
|
||||
* @return
|
||||
*/
|
||||
public OffsetLimitPage recordDataTwoTable(Integer offset, Integer limit, String startDateTo, String endDateTo) {
|
||||
PageHelper.offsetPage(offset, limit);
|
||||
//查询科室归档数量排名
|
||||
List<RecordStatisticsHome> returnList = archiveMasterMapper.recordDataTwoTable(startDateTo,endDateTo);
|
||||
if(!CollectionUtils.isEmpty(returnList)){
|
||||
//定义科室编号集合
|
||||
StringBuilder deptCodes = new StringBuilder();
|
||||
//查询科室集合
|
||||
Emr_Dictionary dictionary = new Emr_Dictionary();
|
||||
dictionary.setTypecode("dept_code");
|
||||
List<Emr_Dictionary> dictionaries = dictionaryMapper.dicByTypeCode(dictionary);
|
||||
for(RecordStatisticsHome obj : returnList){
|
||||
if(StringUtils.isNotBlank(deptCodes)){
|
||||
deptCodes.append(",");
|
||||
}
|
||||
//出院科室
|
||||
String deptName = obj.getDeptName();
|
||||
deptCodes.append(deptName);
|
||||
}
|
||||
//查询全部出院日期和状态
|
||||
List<Archive_Master> list = archiveMasterMapper.recordDateOneTable(startDateTo,endDateTo,deptCodes.toString());
|
||||
for(RecordStatisticsHome vo : returnList){
|
||||
//出院科室
|
||||
String deptName = vo.getDeptName();
|
||||
//定义出院人数
|
||||
int disCount = 0;
|
||||
//定义入院人数
|
||||
int admissCount = 0;
|
||||
//定义归档数量
|
||||
int recordCount = 0;
|
||||
//定义出科数量
|
||||
int sumbitCount = 0;
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
for(Archive_Master archiveMaster : list){
|
||||
if(StringUtils.isNotBlank(archiveMaster.getDeptName()) && archiveMaster.getDeptName().equals(deptName)){
|
||||
//判断出院、入院
|
||||
String disDate = archiveMaster.getDischargeDateTime();
|
||||
if(StringUtils.isNotBlank(disDate) && !"1801".equals(disDate.substring(0,4))){
|
||||
disCount++;
|
||||
}else{
|
||||
admissCount++;
|
||||
}
|
||||
String archivestate = archiveMaster.getArchivestate();
|
||||
String t1 = archiveMaster.getT1();
|
||||
//判断归档 待终审且已签收+已终审
|
||||
if ("128".equals(archivestate) || ("64".equals(archivestate) && StringUtils.isNotBlank(t1) && !"1801-02-03".equals(t1.substring(0,10)))) {
|
||||
recordCount++;
|
||||
}
|
||||
//判断出科
|
||||
if ("128".equals(archivestate) || "64".equals(archivestate)) {
|
||||
sumbitCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
vo.setDisCount(disCount);
|
||||
vo.setRecordCount(recordCount);
|
||||
vo.setAdmissCount(admissCount);
|
||||
vo.setSumbitCount(sumbitCount);
|
||||
//转换科室
|
||||
for (Emr_Dictionary dictionaryTemp : dictionaries) {
|
||||
String name = dictionaryTemp.getName();
|
||||
if (StringUtils.isNotBlank(deptName) && deptName.equals(dictionaryTemp.getCode())) {
|
||||
vo.setName(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return new OffsetLimitPage((Page) returnList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 病案数据第三层表格
|
||||
* @param recordSearch
|
||||
* @return
|
||||
*/
|
||||
public List<NotSubmitRecordVo> recordDataThreeTable(RecordSearch recordSearch) {
|
||||
List<SubmitRecord> list = recordMapper.selectUnCountGroupDeptForRemind(recordSearch);
|
||||
List<NotSubmitRecordVo> returnList = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
SubmitRecord obj = list.get(0);
|
||||
//获取科室编号
|
||||
String deptName = obj.getDeptName();
|
||||
//获取科室名称
|
||||
String deptNameCn = obj.getDeptNameCn();
|
||||
int count2 = obj.getUnDoctorSubmitCount();
|
||||
if(count2 > 0){
|
||||
NotSubmitRecordVo vo = new NotSubmitRecordVo(deptName,deptNameCn,2,"医生未提交",count2);
|
||||
returnList.add(vo);
|
||||
}
|
||||
int count3 = obj.getUnDoctorCheckCount();
|
||||
if(count3 > 0){
|
||||
NotSubmitRecordVo vo = new NotSubmitRecordVo(deptName,deptNameCn,3,"医生质控员未提交",count3);
|
||||
returnList.add(vo);
|
||||
}
|
||||
int count4 = obj.getUnDirectorCheckCount();
|
||||
if(count4 > 0){
|
||||
NotSubmitRecordVo vo = new NotSubmitRecordVo(deptName,deptNameCn,4,"科主任未提交",count4);
|
||||
returnList.add(vo);
|
||||
}
|
||||
int count5 = obj.getUnNurseSubmitCount();
|
||||
if(count5 > 0){
|
||||
NotSubmitRecordVo vo = new NotSubmitRecordVo(deptName,deptNameCn,5,"护士未提交",count5);
|
||||
returnList.add(vo);
|
||||
}
|
||||
int count6 = obj.getUnNurseCheckCount();
|
||||
if(count6 > 0){
|
||||
NotSubmitRecordVo vo = new NotSubmitRecordVo(deptName,deptNameCn,6,"护士质控员未提交",count6);
|
||||
returnList.add(vo);
|
||||
}
|
||||
int count7 = obj.getUnHeadNurseCount();
|
||||
if(count7 > 0){
|
||||
NotSubmitRecordVo vo = new NotSubmitRecordVo(deptName,deptNameCn,7,"护士长未提交",count7);
|
||||
returnList.add(vo);
|
||||
}
|
||||
int count8 = obj.getUnRecordRoomCount();
|
||||
if(count8 > 0){
|
||||
NotSubmitRecordVo vo = new NotSubmitRecordVo(deptName,deptNameCn,8,"病案室未提交",count8);
|
||||
returnList.add(vo);
|
||||
}
|
||||
}
|
||||
return returnList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 病案室管理数据监控
|
||||
* @param startDateTo
|
||||
* @param endDateTo
|
||||
*/
|
||||
public Map<String,String> medicalRoomManageData(String startDateTo, String endDateTo) throws Exception{
|
||||
//查询总数据 1.出院人数 2.待终审数量 3.已终审数量 4.已签收数量 5.已扫描数量 6.待终审已签收
|
||||
List<Integer> list = archiveMasterMapper.selectStatisticsCount(startDateTo, endDateTo);
|
||||
//组织返回数据
|
||||
//定义出院人数
|
||||
int disCount = 0;
|
||||
//定义待终审数量
|
||||
int headNurseCount = 0;
|
||||
//定义归档数量 已终审+待终审已签收
|
||||
int recordCount = 0;
|
||||
//定义签收数量
|
||||
int signCount = 0;
|
||||
//已扫描数量
|
||||
int isScanCount = 0;
|
||||
//超期病历
|
||||
int overTimeCount = 0;
|
||||
//预超期病历
|
||||
int reOverTimeCount = 0;
|
||||
//归档率 归档数量/出院人数
|
||||
int recordRate = 0;
|
||||
//签收率 已签收/总出院人数
|
||||
int signRate = 0;
|
||||
//扫描率 已扫描/已签收
|
||||
int scanRate = 0;
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
disCount = list.get(0);
|
||||
headNurseCount = list.get(1);
|
||||
recordCount = list.get(2) + list.get(5);
|
||||
signCount = list.get(3);
|
||||
isScanCount = list.get(4);
|
||||
//查询超期参数
|
||||
EmrOvertimeSet overtimeSet = overtimeSetService.selectByPrimaryKey(1);
|
||||
//获取未超期列表
|
||||
List<EmrHolidaySet> unHolidays = holidaySetMapper.selectNotHolidayList();
|
||||
//获取非死亡工作日
|
||||
String date = unHolidays.get(overtimeSet.getDays()).getDate();
|
||||
//获取死亡工作日
|
||||
String deadDate = unHolidays.get(overtimeSet.getDeadDays()).getDate();
|
||||
//获取预超期非死亡工作日
|
||||
String reDate = unHolidays.get(overtimeSet.getDays() - overtimeSet.getSurplusDays()).getDate();
|
||||
//获取预超期死亡工作日
|
||||
String reDeadDate = unHolidays.get(overtimeSet.getDeadDays() - overtimeSet.getSurplusDays()).getDate();
|
||||
//查询超期与预超期数量集合 1.超期数量 2.预超期数量
|
||||
List<Integer> overTimeAndReOverTimeCountList = archiveMasterMapper.overTimeAndReOverTimeCount(date,deadDate,reDate,reDeadDate,startDateTo, endDateTo);
|
||||
overTimeCount = getOverTimeCount(startDateTo,endDateTo);
|
||||
reOverTimeCount = overTimeAndReOverTimeCountList.get(1);
|
||||
}
|
||||
//归档率 归档数量/出院人数
|
||||
if(disCount != 0){
|
||||
recordRate = recordCount * 100 / disCount;
|
||||
}
|
||||
map.put("recordRate",recordRate + "%");
|
||||
//归档数量
|
||||
map.put("recordCount", recordCount + "");
|
||||
//待终审数量
|
||||
map.put("headNurseCount", headNurseCount + "");
|
||||
//出科数量 待终审数量+终审数量
|
||||
map.put("submitCount", (list.get(2) + headNurseCount) + "");
|
||||
//签收数量
|
||||
map.put("signCount", signCount + "");
|
||||
//待签收数量 总出院人数-已签收数量
|
||||
map.put("notSignCount", (disCount - signCount) + "");
|
||||
//签收率 已签收/总出院人数
|
||||
if(disCount != 0){
|
||||
signRate = signCount * 100 / disCount;
|
||||
}
|
||||
map.put("signRate",signRate + "%");
|
||||
//超期数量
|
||||
map.put("overTimeCount", overTimeCount + "");
|
||||
//预超期数量
|
||||
map.put("reOverTimeCount",reOverTimeCount + "");
|
||||
//已扫描数量
|
||||
map.put("isScanCount",isScanCount + "");
|
||||
//未扫描数量 已签收-已扫描
|
||||
map.put("notScanCount",(signCount - isScanCount) + "");
|
||||
//扫描率
|
||||
if(disCount != 0 && signCount != 0){
|
||||
scanRate = (isScanCount * 100 / signCount);
|
||||
}
|
||||
map.put("scanRate",scanRate + "%");
|
||||
return map;
|
||||
}
|
||||
|
||||
private int getOverTimeCount(String startDateTo, String endDateTo) throws Exception{
|
||||
RecordSearch recordSearch = new RecordSearch();
|
||||
recordSearch.setStartDate(startDateTo);
|
||||
recordSearch.setEndDate(endDateTo);
|
||||
int count = 0;
|
||||
List<SubmitRecord> unSubmitRecords = recordMapper.selectUnCountGroupDept(recordSearch);
|
||||
if (!CollectionUtils.isEmpty(unSubmitRecords)) {
|
||||
unSubmitRecords = selectOvertimeRecord(unSubmitRecords);
|
||||
if(!CollectionUtils.isEmpty(unSubmitRecords)){
|
||||
count = unSubmitRecords.size();
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤未过期的
|
||||
* @param unSubmitRecords
|
||||
* @return
|
||||
*/
|
||||
private List<SubmitRecord> selectOvertimeRecord(List<SubmitRecord> unSubmitRecords) throws Exception{
|
||||
//查询超期参数
|
||||
EmrOvertimeSet overtimeSet = overtimeSetService.selectByPrimaryKey(1);
|
||||
//获取未超期列表
|
||||
List<EmrHolidaySet> unHolidays = holidaySetMapper.selectNotHolidayList();
|
||||
Iterator<SubmitRecord> iterator = unSubmitRecords.iterator();
|
||||
//获取非死亡工作日
|
||||
String date = unHolidays.get(overtimeSet.getDays()).getDate();
|
||||
//获取非死亡工作日
|
||||
String deadDate = unHolidays.get(overtimeSet.getDeadDays()).getDate();
|
||||
//定义格式化日期
|
||||
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
||||
while (iterator.hasNext()) {
|
||||
SubmitRecord record = (SubmitRecord) iterator.next();
|
||||
//获取是否死亡
|
||||
String dischargeDisposition = record.getDischargeDisposition();
|
||||
String dischargeDateTime = record.getDischargeDateTime();
|
||||
long time = fmt.parse(dischargeDateTime).getTime();
|
||||
if(StringUtils.isNotBlank(dischargeDisposition) && "5".equals(dischargeDisposition)){
|
||||
//死亡
|
||||
if(time >= fmt.parse(deadDate).getTime()){
|
||||
iterator.remove();
|
||||
}
|
||||
}else{
|
||||
//非死亡
|
||||
if(time >= fmt.parse(date).getTime()){
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
return unSubmitRecords;
|
||||
}
|
||||
|
||||
/*
|
||||
public Map<String,String> medicalRoomManageData(String startDateTo, String endDateTo) throws Exception{
|
||||
//查询总数据
|
||||
List<Archive_Master> list = archiveMasterMapper.recordDateOneTable(startDateTo, endDateTo, null);
|
||||
//组织返回数据
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
//查询超期参数
|
||||
EmrOvertimeSet overtimeSet = overtimeSetService.selectByPrimaryKey(1);
|
||||
//获取未超期列表
|
||||
List<EmrHolidaySet> unHolidays = holidaySetMapper.selectNotHolidayList();
|
||||
//获取非死亡工作日
|
||||
String date = unHolidays.get(overtimeSet.getDays()).getDate();
|
||||
//获取死亡工作日
|
||||
String deadDate = unHolidays.get(overtimeSet.getDeadDays()).getDate();
|
||||
//获取预超期非死亡工作日
|
||||
String reDate = unHolidays.get(overtimeSet.getDays() - overtimeSet.getSurplusDays()).getDate();
|
||||
//获取预超期死亡工作日
|
||||
String reDeadDate = unHolidays.get(overtimeSet.getDeadDays() - overtimeSet.getSurplusDays()).getDate();
|
||||
//定义出院人数
|
||||
int disCount = 0;
|
||||
//定义待终审数量
|
||||
int headNurseCount = 0;
|
||||
//定义归档数量
|
||||
int recordCount = 0;
|
||||
//定义签收数量
|
||||
int signCount = 0;
|
||||
//超期病历
|
||||
int overTimeCount = 0;
|
||||
//预超期病历
|
||||
int reOverTimeCount = 0;
|
||||
//未扫描数量
|
||||
int notScanCount = 0;
|
||||
//定义格式化日期
|
||||
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
||||
//查询已纸质扫描的MasterId
|
||||
List<Archive_Detail> archiveDetails = archiveDetailMapper.selectIsScanByDate(startDateTo, endDateTo);
|
||||
for (Archive_Master obj : list) {
|
||||
//获取出院日期
|
||||
String dischargeDateTime = obj.getDischargeDateTime();
|
||||
//获取状态
|
||||
String archivestate = obj.getArchivestate();
|
||||
//获取签收时间
|
||||
String t1 = obj.getT1();
|
||||
//判断出院人数
|
||||
if (StringUtils.isNotBlank(dischargeDateTime) && !"1801".equals(dischargeDateTime.substring(0, 4))) {
|
||||
disCount++;
|
||||
//获取死亡状态
|
||||
String dischargeDisposition = obj.getDischargeDisposition();
|
||||
long time = fmt.parse(dischargeDateTime).getTime();
|
||||
if(StringUtils.isNotBlank(dischargeDisposition) && "5".equals(dischargeDisposition)){
|
||||
//死亡病历
|
||||
if(time <= fmt.parse(deadDate).getTime()){
|
||||
//超期
|
||||
overTimeCount++;
|
||||
}
|
||||
if(time > fmt.parse(deadDate).getTime() && time <= fmt.parse(reDeadDate).getTime()){
|
||||
//预超期
|
||||
reOverTimeCount++;
|
||||
}
|
||||
}else{
|
||||
//非死亡病历
|
||||
if(time <= fmt.parse(date).getTime()){
|
||||
//超期
|
||||
overTimeCount++;
|
||||
}
|
||||
if(time > fmt.parse(date).getTime() && time <= fmt.parse(reDate).getTime()){
|
||||
//预超期
|
||||
reOverTimeCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
//判断待终审数量
|
||||
if ("64".equals(archivestate)) {
|
||||
headNurseCount++;
|
||||
//判断是否纸质扫描
|
||||
boolean isScanFlag = false;
|
||||
if(!CollectionUtils.isEmpty(archiveDetails)){
|
||||
for(Archive_Detail detail : archiveDetails){
|
||||
if(detail.getMasterid().equals(obj.getId())){
|
||||
isScanFlag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!isScanFlag){
|
||||
notScanCount++;
|
||||
}
|
||||
}
|
||||
//判断归档数量
|
||||
if ("128".equals(archivestate)) {
|
||||
recordCount++;
|
||||
}
|
||||
//判断签收数量
|
||||
if (StringUtils.isNotBlank(t1) && !"1801".equals(t1.substring(0, 4))) {
|
||||
signCount++;
|
||||
}
|
||||
}
|
||||
//归档率 归档数量/出院人数
|
||||
map.put("recordRate", (recordCount * 100 / disCount) + "%");
|
||||
//终审数量
|
||||
map.put("recordCount", recordCount + "");
|
||||
//待终审数量
|
||||
map.put("headNurseCount", headNurseCount + "");
|
||||
//出科数量 待终审数量+终审数量
|
||||
map.put("submitCount", (recordCount + headNurseCount) + "");
|
||||
//签收数量
|
||||
map.put("signCount", signCount + "");
|
||||
//待签收数量 总出院人数-已签收数量
|
||||
map.put("notSignCount", (disCount - signCount) + "");
|
||||
//签收率 已签收/总出院人数
|
||||
map.put("signRate", (signCount * 100 / disCount) + "%");
|
||||
//超期数量
|
||||
map.put("overTimeCount", overTimeCount + "");
|
||||
//预超期数量
|
||||
map.put("reOverTimeCount",reOverTimeCount + "");
|
||||
//已扫描数量
|
||||
map.put("isScanCount",archiveDetails.size() + "");
|
||||
//预超期数量
|
||||
map.put("notScanCount",notScanCount + "");
|
||||
//扫描率
|
||||
map.put("scanRate",(archiveDetails.size() * 100 / disCount) + "%");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* HIS退回病案统计数据
|
||||
* @param offset
|
||||
* @param limit
|
||||
* @param startDateTo
|
||||
* @param endDateTo
|
||||
* @return
|
||||
*/
|
||||
public OffsetLimitPage callBackStatisticsData(Integer offset, Integer limit, String startDateTo, String endDateTo) {
|
||||
PageHelper.offsetPage(offset, limit);
|
||||
List<RecordCommonVo> list = archiveMasterMapper.callBackStatisticsData(startDateTo, endDateTo);
|
||||
return new OffsetLimitPage((Page) list);
|
||||
}
|
||||
|
||||
/**
|
||||
* HIS退回病案统计数据详情
|
||||
* @param offset
|
||||
* @param limit
|
||||
* @param time
|
||||
* @return
|
||||
*/
|
||||
public OffsetLimitPage callBackStatisticsDetail(Integer offset, Integer limit, String time,String startDateTo,String endDateTo) {
|
||||
PageHelper.offsetPage(offset, limit);
|
||||
List<ArchiveOtherExtVo> list = archiveOtherExtMapper.callBackStatisticsDetail(time,startDateTo,endDateTo);
|
||||
return new OffsetLimitPage((Page) list);
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.emr.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2021/7/29 9:45
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2021/7/29 9:45
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class NotSubmitRecordVo {
|
||||
private String deptCode;
|
||||
private String deptNameCn;
|
||||
private Integer infoId;
|
||||
private String role;
|
||||
private Integer unCount;
|
||||
|
||||
public NotSubmitRecordVo(String deptCode, String deptNameCn, Integer infoId, String role, Integer unCount) {
|
||||
this.deptCode = deptCode;
|
||||
this.deptNameCn = deptNameCn;
|
||||
this.infoId = infoId;
|
||||
this.role = role;
|
||||
this.unCount = unCount;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.emr.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2021/7/30 10:04
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2021/7/30 10:04
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class RecordCommonVo {
|
||||
private String time;
|
||||
|
||||
private Integer count;
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.emr.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2021/7/28 14:18
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2021/7/28 14:18
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class RecordStatisticsHome {
|
||||
private String deptName;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer disCount;
|
||||
|
||||
private Integer admissCount;
|
||||
|
||||
private Integer sumbitCount;
|
||||
|
||||
private Integer recordCount;
|
||||
|
||||
private String recordRate;
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
package com.emr.vo;
|
||||
|
||||
import com.emr.entity.ServerMachine;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2021/7/30 11:00
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2021/7/30 11:00
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ServerMachineVo extends ServerMachine {
|
||||
private String lastOnlintTimeStr;
|
||||
|
||||
private String stateStr;
|
||||
}
|
@ -0,0 +1,308 @@
|
||||
<?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.ServerMachineMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.emr.entity.ServerMachine" >
|
||||
<id column="ServerName" property="servername" jdbcType="NVARCHAR" />
|
||||
<result column="LastOnlineTime" property="lastonlinetime" jdbcType="TIMESTAMP" />
|
||||
<result column="State" property="state" jdbcType="INTEGER" />
|
||||
<result column="LoginUser" property="loginuser" jdbcType="NVARCHAR" />
|
||||
<result column="LoginPwd" property="loginpwd" jdbcType="NVARCHAR" />
|
||||
<result column="DocCount" property="doccount" jdbcType="BIGINT" />
|
||||
<result column="InfoCount" property="infocount" jdbcType="BIGINT" />
|
||||
<result column="WarningCount" property="warningcount" jdbcType="BIGINT" />
|
||||
<result column="ErrorCount" property="errorcount" jdbcType="BIGINT" />
|
||||
<result column="DoneCount" property="donecount" jdbcType="BIGINT" />
|
||||
<result column="LastUpdateTime" property="lastupdatetime" jdbcType="TIMESTAMP" />
|
||||
<result column="C1" property="c1" jdbcType="NVARCHAR" />
|
||||
<result column="C2" property="c2" jdbcType="NVARCHAR" />
|
||||
<result column="C3" property="c3" jdbcType="NVARCHAR" />
|
||||
<result column="C4" property="c4" jdbcType="NVARCHAR" />
|
||||
<result column="C5" property="c5" jdbcType="NVARCHAR" />
|
||||
<result column="N1" property="n1" jdbcType="DECIMAL" />
|
||||
<result column="N2" property="n2" jdbcType="DECIMAL" />
|
||||
<result column="N3" property="n3" jdbcType="DECIMAL" />
|
||||
<result column="T1" property="t1" jdbcType="TIMESTAMP" />
|
||||
<result column="T2" property="t2" jdbcType="TIMESTAMP" />
|
||||
<result column="T3" property="t3" jdbcType="TIMESTAMP" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
ServerName, LastOnlineTime, State, LoginUser, LoginPwd, DocCount, InfoCount, WarningCount,
|
||||
ErrorCount, DoneCount, LastUpdateTime, C1, C2, C3, C4, C5, N1, N2, N3, T1, T2, T3
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from Server_Machine
|
||||
where ServerName = #{servername,jdbcType=NVARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
||||
delete from Server_Machine
|
||||
where ServerName = #{servername,jdbcType=NVARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.emr.entity.ServerMachine" >
|
||||
insert into Server_Machine (ServerName, LastOnlineTime, State,
|
||||
LoginUser, LoginPwd, DocCount,
|
||||
InfoCount, WarningCount, ErrorCount,
|
||||
DoneCount, LastUpdateTime, C1,
|
||||
C2, C3, C4, C5,
|
||||
N1, N2, N3, T1,
|
||||
T2, T3)
|
||||
values (#{servername,jdbcType=NVARCHAR}, #{lastonlinetime,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER},
|
||||
#{loginuser,jdbcType=NVARCHAR}, #{loginpwd,jdbcType=NVARCHAR}, #{doccount,jdbcType=BIGINT},
|
||||
#{infocount,jdbcType=BIGINT}, #{warningcount,jdbcType=BIGINT}, #{errorcount,jdbcType=BIGINT},
|
||||
#{donecount,jdbcType=BIGINT}, #{lastupdatetime,jdbcType=TIMESTAMP}, #{c1,jdbcType=NVARCHAR},
|
||||
#{c2,jdbcType=NVARCHAR}, #{c3,jdbcType=NVARCHAR}, #{c4,jdbcType=NVARCHAR}, #{c5,jdbcType=NVARCHAR},
|
||||
#{n1,jdbcType=DECIMAL}, #{n2,jdbcType=DECIMAL}, #{n3,jdbcType=DECIMAL}, #{t1,jdbcType=TIMESTAMP},
|
||||
#{t2,jdbcType=TIMESTAMP}, #{t3,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.emr.entity.ServerMachine" >
|
||||
insert into Server_Machine
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="servername != null" >
|
||||
ServerName,
|
||||
</if>
|
||||
<if test="lastonlinetime != null" >
|
||||
LastOnlineTime,
|
||||
</if>
|
||||
<if test="state != null" >
|
||||
State,
|
||||
</if>
|
||||
<if test="loginuser != null" >
|
||||
LoginUser,
|
||||
</if>
|
||||
<if test="loginpwd != null" >
|
||||
LoginPwd,
|
||||
</if>
|
||||
<if test="doccount != null" >
|
||||
DocCount,
|
||||
</if>
|
||||
<if test="infocount != null" >
|
||||
InfoCount,
|
||||
</if>
|
||||
<if test="warningcount != null" >
|
||||
WarningCount,
|
||||
</if>
|
||||
<if test="errorcount != null" >
|
||||
ErrorCount,
|
||||
</if>
|
||||
<if test="donecount != null" >
|
||||
DoneCount,
|
||||
</if>
|
||||
<if test="lastupdatetime != null" >
|
||||
LastUpdateTime,
|
||||
</if>
|
||||
<if test="c1 != null" >
|
||||
C1,
|
||||
</if>
|
||||
<if test="c2 != null" >
|
||||
C2,
|
||||
</if>
|
||||
<if test="c3 != null" >
|
||||
C3,
|
||||
</if>
|
||||
<if test="c4 != null" >
|
||||
C4,
|
||||
</if>
|
||||
<if test="c5 != null" >
|
||||
C5,
|
||||
</if>
|
||||
<if test="n1 != null" >
|
||||
N1,
|
||||
</if>
|
||||
<if test="n2 != null" >
|
||||
N2,
|
||||
</if>
|
||||
<if test="n3 != null" >
|
||||
N3,
|
||||
</if>
|
||||
<if test="t1 != null" >
|
||||
T1,
|
||||
</if>
|
||||
<if test="t2 != null" >
|
||||
T2,
|
||||
</if>
|
||||
<if test="t3 != null" >
|
||||
T3,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="servername != null" >
|
||||
#{servername,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="lastonlinetime != null" >
|
||||
#{lastonlinetime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="state != null" >
|
||||
#{state,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="loginuser != null" >
|
||||
#{loginuser,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="loginpwd != null" >
|
||||
#{loginpwd,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="doccount != null" >
|
||||
#{doccount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="infocount != null" >
|
||||
#{infocount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="warningcount != null" >
|
||||
#{warningcount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="errorcount != null" >
|
||||
#{errorcount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="donecount != null" >
|
||||
#{donecount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="lastupdatetime != null" >
|
||||
#{lastupdatetime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="c1 != null" >
|
||||
#{c1,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="c2 != null" >
|
||||
#{c2,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="c3 != null" >
|
||||
#{c3,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="c4 != null" >
|
||||
#{c4,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="c5 != null" >
|
||||
#{c5,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="n1 != null" >
|
||||
#{n1,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="n2 != null" >
|
||||
#{n2,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="n3 != null" >
|
||||
#{n3,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="t1 != null" >
|
||||
#{t1,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="t2 != null" >
|
||||
#{t2,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="t3 != null" >
|
||||
#{t3,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.ServerMachine" >
|
||||
update Server_Machine
|
||||
<set >
|
||||
<if test="lastonlinetime != null" >
|
||||
LastOnlineTime = #{lastonlinetime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="state != null" >
|
||||
State = #{state,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="loginuser != null" >
|
||||
LoginUser = #{loginuser,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="loginpwd != null" >
|
||||
LoginPwd = #{loginpwd,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="doccount != null" >
|
||||
DocCount = #{doccount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="infocount != null" >
|
||||
InfoCount = #{infocount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="warningcount != null" >
|
||||
WarningCount = #{warningcount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="errorcount != null" >
|
||||
ErrorCount = #{errorcount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="donecount != null" >
|
||||
DoneCount = #{donecount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="lastupdatetime != null" >
|
||||
LastUpdateTime = #{lastupdatetime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="c1 != null" >
|
||||
C1 = #{c1,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="c2 != null" >
|
||||
C2 = #{c2,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="c3 != null" >
|
||||
C3 = #{c3,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="c4 != null" >
|
||||
C4 = #{c4,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="c5 != null" >
|
||||
C5 = #{c5,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="n1 != null" >
|
||||
N1 = #{n1,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="n2 != null" >
|
||||
N2 = #{n2,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="n3 != null" >
|
||||
N3 = #{n3,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="t1 != null" >
|
||||
T1 = #{t1,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="t2 != null" >
|
||||
T2 = #{t2,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="t3 != null" >
|
||||
T3 = #{t3,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where ServerName = #{servername,jdbcType=NVARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.emr.entity.ServerMachine" >
|
||||
update Server_Machine
|
||||
set LastOnlineTime = #{lastonlinetime,jdbcType=TIMESTAMP},
|
||||
State = #{state,jdbcType=INTEGER},
|
||||
LoginUser = #{loginuser,jdbcType=NVARCHAR},
|
||||
LoginPwd = #{loginpwd,jdbcType=NVARCHAR},
|
||||
DocCount = #{doccount,jdbcType=BIGINT},
|
||||
InfoCount = #{infocount,jdbcType=BIGINT},
|
||||
WarningCount = #{warningcount,jdbcType=BIGINT},
|
||||
ErrorCount = #{errorcount,jdbcType=BIGINT},
|
||||
DoneCount = #{donecount,jdbcType=BIGINT},
|
||||
LastUpdateTime = #{lastupdatetime,jdbcType=TIMESTAMP},
|
||||
C1 = #{c1,jdbcType=NVARCHAR},
|
||||
C2 = #{c2,jdbcType=NVARCHAR},
|
||||
C3 = #{c3,jdbcType=NVARCHAR},
|
||||
C4 = #{c4,jdbcType=NVARCHAR},
|
||||
C5 = #{c5,jdbcType=NVARCHAR},
|
||||
N1 = #{n1,jdbcType=DECIMAL},
|
||||
N2 = #{n2,jdbcType=DECIMAL},
|
||||
N3 = #{n3,jdbcType=DECIMAL},
|
||||
T1 = #{t1,jdbcType=TIMESTAMP},
|
||||
T2 = #{t2,jdbcType=TIMESTAMP},
|
||||
T3 = #{t3,jdbcType=TIMESTAMP}
|
||||
where ServerName = #{servername,jdbcType=NVARCHAR}
|
||||
</update>
|
||||
<!--查询列表-->
|
||||
<select id="selectAll" resultType="com.emr.vo.ServerMachineVo">
|
||||
SELECT
|
||||
ServerName,
|
||||
c2,
|
||||
CONVERT ( VARCHAR ( 120 ), LastOnlineTime, 120 ) lastOnlintTimeStr,
|
||||
CASE
|
||||
WHEN State = 1 THEN
|
||||
'在线'
|
||||
WHEN state = 2 THEN
|
||||
'离线' ELSE '未知'
|
||||
END stateStr
|
||||
FROM
|
||||
Server_Machine
|
||||
ORDER BY
|
||||
State
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,210 @@
|
||||
/*
|
||||
* Author: Abdullah A Almsaeed
|
||||
* Date: 4 Jan 2014
|
||||
* Description:
|
||||
* This is a demo file used only for the main dashboard (index.html)
|
||||
**/
|
||||
|
||||
$(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
// Make the dashboard widgets sortable Using jquery UI
|
||||
$('.connectedSortable').sortable({
|
||||
placeholder : 'sort-highlight',
|
||||
connectWith : '.connectedSortable',
|
||||
handle : '.box-header, .nav-tabs',
|
||||
forcePlaceholderSize: true,
|
||||
zIndex : 999999
|
||||
});
|
||||
$('.connectedSortable .box-header, .connectedSortable .nav-tabs-custom').css('cursor', 'move');
|
||||
|
||||
// jQuery UI sortable for the todo list
|
||||
$('.todo-list').sortable({
|
||||
placeholder : 'sort-highlight',
|
||||
handle : '.handle',
|
||||
forcePlaceholderSize: true,
|
||||
zIndex : 999999
|
||||
});
|
||||
|
||||
// bootstrap WYSIHTML5 - text editor
|
||||
//$('.textarea').wysihtml5();
|
||||
|
||||
$('.daterange').daterangepicker({
|
||||
ranges : {
|
||||
'Today' : [moment(), moment()],
|
||||
'Yesterday' : [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'Last 7 Days' : [moment().subtract(6, 'days'), moment()],
|
||||
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
||||
'This Month' : [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month' : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
startDate: moment().subtract(29, 'days'),
|
||||
endDate : moment()
|
||||
}, function (start, end) {
|
||||
window.alert('You chose: ' + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
|
||||
});
|
||||
|
||||
/* jQueryKnob */
|
||||
$('.knob').knob();
|
||||
|
||||
// jvectormap data
|
||||
var visitorsData = {
|
||||
US: 398, // USA
|
||||
SA: 400, // Saudi Arabia
|
||||
CA: 1000, // Canada
|
||||
DE: 500, // Germany
|
||||
FR: 760, // France
|
||||
CN: 300, // China
|
||||
AU: 700, // Australia
|
||||
BR: 600, // Brazil
|
||||
IN: 800, // India
|
||||
GB: 320, // Great Britain
|
||||
RU: 3000 // Russia
|
||||
};
|
||||
// World map by jvectormap
|
||||
$('#world-map').vectorMap({
|
||||
map : 'world_mill_en',
|
||||
backgroundColor : 'transparent',
|
||||
regionStyle : {
|
||||
initial: {
|
||||
fill : '#e4e4e4',
|
||||
'fill-opacity' : 1,
|
||||
stroke : 'none',
|
||||
'stroke-width' : 0,
|
||||
'stroke-opacity': 1
|
||||
}
|
||||
},
|
||||
series : {
|
||||
regions: [
|
||||
{
|
||||
values : visitorsData,
|
||||
scale : ['#92c1dc', '#ebf4f9'],
|
||||
normalizeFunction: 'polynomial'
|
||||
}
|
||||
]
|
||||
},
|
||||
onRegionLabelShow: function (e, el, code) {
|
||||
if (typeof visitorsData[code] != 'undefined')
|
||||
el.html(el.html() + ': ' + visitorsData[code] + ' new visitors');
|
||||
}
|
||||
});
|
||||
|
||||
// Sparkline charts
|
||||
var myvalues = [1000, 1200, 920, 927, 931, 1027, 819, 930, 1021];
|
||||
$('#sparkline-1').sparkline(myvalues, {
|
||||
type : 'line',
|
||||
lineColor: '#92c1dc',
|
||||
fillColor: '#ebf4f9',
|
||||
height : '50',
|
||||
width : '80'
|
||||
});
|
||||
myvalues = [515, 519, 520, 522, 652, 810, 370, 627, 319, 630, 921];
|
||||
$('#sparkline-2').sparkline(myvalues, {
|
||||
type : 'line',
|
||||
lineColor: '#92c1dc',
|
||||
fillColor: '#ebf4f9',
|
||||
height : '50',
|
||||
width : '80'
|
||||
});
|
||||
myvalues = [15, 19, 20, 22, 33, 27, 31, 27, 19, 30, 21];
|
||||
$('#sparkline-3').sparkline(myvalues, {
|
||||
type : 'line',
|
||||
lineColor: '#92c1dc',
|
||||
fillColor: '#ebf4f9',
|
||||
height : '50',
|
||||
width : '80'
|
||||
});
|
||||
|
||||
// The Calender
|
||||
$('#calendar').datepicker();
|
||||
|
||||
// SLIMSCROLL FOR CHAT WIDGET
|
||||
$('#chat-box').slimScroll({
|
||||
height: '250px'
|
||||
});
|
||||
|
||||
/* Morris.js Charts */
|
||||
// Sales chart
|
||||
var area = new Morris.Area({
|
||||
element : 'revenue-chart',
|
||||
resize : true,
|
||||
data : [
|
||||
{ y: '2011 Q1', item1: 2666, item2: 2666 },
|
||||
{ y: '2011 Q2', item1: 2778, item2: 2294 },
|
||||
{ y: '2011 Q3', item1: 4912, item2: 1969 },
|
||||
{ y: '2011 Q4', item1: 3767, item2: 3597 },
|
||||
{ y: '2012 Q1', item1: 6810, item2: 1914 },
|
||||
{ y: '2012 Q2', item1: 5670, item2: 4293 },
|
||||
{ y: '2012 Q3', item1: 4820, item2: 3795 },
|
||||
{ y: '2012 Q4', item1: 15073, item2: 5967 },
|
||||
{ y: '2013 Q1', item1: 10687, item2: 4460 },
|
||||
{ y: '2013 Q2', item1: 8432, item2: 5713 }
|
||||
],
|
||||
xkey : 'y',
|
||||
ykeys : ['item1', 'item2'],
|
||||
labels : ['Item 1', 'Item 2'],
|
||||
lineColors: ['#a0d0e0', '#3c8dbc'],
|
||||
hideHover : 'auto'
|
||||
});
|
||||
var line = new Morris.Line({
|
||||
element : 'line-chart',
|
||||
resize : true,
|
||||
data : [
|
||||
{ y: '2011 Q1', item1: 2666 },
|
||||
{ y: '2011 Q2', item1: 2778 },
|
||||
{ y: '2011 Q3', item1: 4912 },
|
||||
{ y: '2011 Q4', item1: 3767 },
|
||||
{ y: '2012 Q1', item1: 6810 },
|
||||
{ y: '2012 Q2', item1: 5670 },
|
||||
{ y: '2012 Q3', item1: 4820 },
|
||||
{ y: '2012 Q4', item1: 15073 },
|
||||
{ y: '2013 Q1', item1: 10687 },
|
||||
{ y: '2013 Q2', item1: 8432 }
|
||||
],
|
||||
xkey : 'y',
|
||||
ykeys : ['item1'],
|
||||
labels : ['Item 1'],
|
||||
lineColors : ['#efefef'],
|
||||
lineWidth : 2,
|
||||
hideHover : 'auto',
|
||||
gridTextColor : '#fff',
|
||||
gridStrokeWidth : 0.4,
|
||||
pointSize : 4,
|
||||
pointStrokeColors: ['#efefef'],
|
||||
gridLineColor : '#efefef',
|
||||
gridTextFamily : 'Open Sans',
|
||||
gridTextSize : 10
|
||||
});
|
||||
|
||||
// Donut Chart
|
||||
var donut = new Morris.Donut({
|
||||
element : 'sales-chart',
|
||||
resize : true,
|
||||
colors : ['#3c8dbc', '#f56954', '#00a65a'],
|
||||
data : [
|
||||
{ label: 'Download Sales', value: 12 },
|
||||
{ label: 'In-Store Sales', value: 30 },
|
||||
{ label: 'Mail-Order Sales', value: 20 }
|
||||
],
|
||||
hideHover: 'auto'
|
||||
});
|
||||
|
||||
// Fix for charts under tabs
|
||||
$('.box ul.nav a').on('shown.bs.tab', function () {
|
||||
area.redraw();
|
||||
donut.redraw();
|
||||
line.redraw();
|
||||
});
|
||||
|
||||
/* The todo list plugin */
|
||||
$('.todo-list').todoList({
|
||||
onCheck : function () {
|
||||
window.console.log($(this), 'The element has been checked');
|
||||
},
|
||||
onUnCheck: function () {
|
||||
window.console.log($(this), 'The element has been unchecked');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in New Issue