添加病案浏览日志管理功能

master
jian.wang 2 years ago
parent ffff80d402
commit 9639e5a18c

@ -1,3 +1,19 @@
--commomtable
ALTER TABLE commomtable
ADD cycle_no varchar(50) NULL, -- 周期号(生殖科)
visit_time datetime NULL, -- 就诊日期(产前门诊)
pro_no varchar(50) NULL, -- 项目号(药学楼)
pro_name varchar(255) NULL, -- 项目名称(药学楼)
applicant varchar(255) NULL, -- 申办方(药学楼)
file_type varchar(50) NULL, -- 文件类型(药学楼)
subject_no varchar(50) NULL, -- 资料盒/受试者编号(药学楼)
hemodialysis_date datetime NULL,-- 血透时间(血透)
hemodialysis_id varchar(50) NULL,-- 血透id血透
radiotherapy_no varchar(50) NULL,-- 放疗号(放疗)
data_source varchar(50) NULL -- 数据来源 1.生殖科 2.产前门诊 3.药学楼
-- 增加任务清单主表 hcy 2024-05-13
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[Export_Task]') AND type IN ('U'))

@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@ -110,7 +111,9 @@ public class LoginController {
public String getSessionRemainingTime(HttpServletRequest request) throws Exception {
long lastAccessTime = 0L;
String sessionId = request.getSession().getId();
lastAccessTime = (long) request.getSession().getAttribute(sessionId);
if(!ObjectUtils.isEmpty(request.getSession().getAttribute(sessionId))){
lastAccessTime = (long) request.getSession().getAttribute(sessionId);
}
return JSON.toJSONString(TOKEN_EXPIRE_TIME - (System.currentTimeMillis() - lastAccessTime));
}
}

@ -64,6 +64,16 @@ public class BackDatabaseController {
return "otherManage/backupDatabase";
}
/**
*
* @return
*/
@RequiresPermissions("/otherManage/recordLogList")
@RequestMapping("recordLogList")
public String recordLogList(){
return "otherManage/recordLogList";
}
/**
*
* @return
@ -236,7 +246,7 @@ public class BackDatabaseController {
public void exportExcel(HttpServletResponse response, Emr_Log log, String startTime, String endTime,String checks){
String tableThNames = "操作人,日志主题,日志内容,备注,操作时间,ip地址";
String fieldCns = "creater,logTitle,logContent,remark,createDate,ip";
List<Emr_Log> logs = new ArrayList<>();
List<Emr_Log> logs;
try {
//构造excel的数据
if(StringUtils.isNotBlank(checks)){
@ -256,4 +266,39 @@ public class BackDatabaseController {
e.printStackTrace();
}
}
/**
* excel
* @param response
* @param log
* @param startTime
* @param endTime
* @param checks
*/
@RequiresPermissions("/otherManage/exportRecordExcel")
@RequestMapping(value="exportRecordExcel",produces = {"text/json;charset=UTF-8"})
@ResponseBody
public void exportRecordExcel(HttpServletResponse response, Emr_Log log, String startTime, String endTime,String checks){
String tableThNames = "操作人账号,日志主题,日志内容,病案号,操作时间";
String fieldCns = "creater,logTitle,logContent,remark,createDate";
List<Emr_Log> logs;
try {
//构造excel的数据
if(StringUtils.isNotBlank(checks)){
logs = logMapper.selectAllByIds(checks);
}else{
//构造excel的数据
logs = logMapper.selectAll(log, startTime, endTime);
}
//文件名
String fileName = "病案浏览日志导出数据(" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,logs,fileName,response);
}catch (Exception e){
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
}

Loading…
Cancel
Save