无纸化归档功能修改,查询当前登录用户方法统一

master
xuhx 4 years ago
parent 4b456a3dd2
commit 6d3823cb5a

@ -8,6 +8,7 @@ package com.emr.controller;
import com.emr.entity.Emr_Dictionary;
import com.emr.entity.Emr_Fault_Type;
import com.emr.entity.Power_User;
import com.emr.service.Emr_DictionaryService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
@ -61,9 +62,8 @@ public class DictionaryController {
int bol=0;
Emr_Dictionary dic2 = new Emr_Dictionary();
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());

@ -1,6 +1,7 @@
package com.emr.controller;
import com.emr.annotation.OptionalLog;
import com.emr.entity.Emr_Log;
import com.emr.entity.Power_User;
import com.emr.service.LogService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
@ -43,10 +44,8 @@ public class LogAopAction {
//日志实体对象
Emr_Log logBo = new Emr_Log();
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
logBo.setCreater(username);
// 获取系统当前时间
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm");

@ -103,10 +103,9 @@ public class MedicalRecallController {
@RequestMapping(value = "/updateState")
public int updateState(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) throws UnsupportedEncodingException {
response.setCharacterEncoding("utf-8");
//request.setCharacterEncoding("utf-8");
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
String username = user.getUserName();//获取登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
emrFaultDetail.setUpdater(username);
@ -134,8 +133,6 @@ public class MedicalRecallController {
}
//2021-01-30 初审成功日志
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
//following表中添加病案室审核操作记录

@ -118,9 +118,8 @@ public class beHospitaledController {
public String updateStateByArchivId(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) {
response.setCharacterEncoding("utf-8");
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
String result = "";
@ -173,7 +172,6 @@ public class beHospitaledController {
bol = emrFaultDetailService.insertSel(emrFaultDetail);
//初审成功日志
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
@ -209,9 +207,8 @@ public class beHospitaledController {
public String forceWZ(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) {
response.setCharacterEncoding("utf-8");
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
@ -237,7 +234,6 @@ public class beHospitaledController {
bol = emrFaultDetailService.insertSel(emrFaultDetail);
}
//初审成功日志
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
@ -269,10 +265,8 @@ public class beHospitaledController {
public String cmtDoctorOrNurs(HttpServletRequest request, HttpServletResponse response, Archive_Master_Vo archiveMasterVo) throws Exception {
response.setCharacterEncoding("utf-8");
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
String handleName = user.getUserPosition();
Archive_Master archiveMaster=new Archive_Master();
archiveMaster.setId(archiveMasterVo.getId());
@ -531,6 +525,7 @@ public class beHospitaledController {
signList.setSysFlag(1);
signList.setMasterID(master.get(0).getId());
signList.setPid(master.get(0).getPatientId());
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
signList.setC1((String) session.getAttribute("userSession"));

@ -104,9 +104,8 @@ public class commitController {
//修改复审内容
if (bol == 1) {
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
//参数输入
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

@ -142,9 +142,8 @@ public class faultController {
String result = "";
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
@ -322,9 +321,8 @@ public class faultController {
String result = "";
int bol =0;
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());

@ -674,11 +674,10 @@ public class inHospitalController {
path2 = path2 + masterID + "\\";
}
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
// 从session获取用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();
//类循环
if (fileObj != null && fileObj.size() > 0) {
for (int x = 0; x < fileObj.size(); x++) {
@ -993,9 +992,8 @@ public class inHospitalController {
entity.setMaxPicture(".." + path2 + trueFileName);
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//工号
entity.setUpdater(username);
@ -1339,9 +1337,8 @@ public class inHospitalController {
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat format2 = new SimpleDateFormat("yyyyMMddHHmmss");
String nowTime = format1.format(new Date());
@ -1377,9 +1374,8 @@ public class inHospitalController {
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat format2 = new SimpleDateFormat("yyyyMMddHHmmss");
String nowTime = format2.format(new Date());
@ -1704,9 +1700,8 @@ public class inHospitalController {
resp.setCharacterEncoding("utf-8");
request.setCharacterEncoding("utf-8");
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
String parentId = request.getParameter("parentId");
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat format2 = new SimpleDateFormat("yyyyMMddHHmmss");

@ -132,15 +132,13 @@ public class lastVerifyController {
int nurseFlagNum=0;
if(list!=null && list.size()>0){
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
String username = user.getUserName();//工号
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//2021-01-30
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
if (emrFaultDetail.getState().equals("主任退回")) {
@ -229,9 +227,9 @@ public class lastVerifyController {
//添加初审内容
if (bol == 1) {
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
String username = user.getUserName();//工号
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
@ -254,8 +252,6 @@ public class lastVerifyController {
}
//初审成功日志
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
//following表中添加病案室审核操作记录
@ -283,9 +279,8 @@ public class lastVerifyController {
archiveMaster=list.get(0);
if(archiveMaster.getIsSign()!=isSign) {
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
//参数输入
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@ -318,7 +313,6 @@ public class lastVerifyController {
followingType="14";
}
//2021-05-13 following表中添加签收操作记录
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(archiveMaster.getId());

@ -123,9 +123,9 @@ public class signListController {
signList.setMasterID(master.get(0).getId());
signList.setPid(master.get(0).getPatientId());
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
signList.setC1((String) session.getAttribute("userSession"));
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();
signList.setC1(username);
signList.setC5("1");
signList.setId(IDHelper.NewID());
@ -172,9 +172,9 @@ public class signListController {
signList.setSysFlag(1);
signList.setMasterID(master.get(0).getId());
signList.setPid(master.get(0).getPatientId());
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
signList.setC1((String) session.getAttribute("userSession"));
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();
signList.setC1(username);
signList.setC5("1");
signList.setId(IDHelper.NewID());
signList.setCreatedtime(sdf.format(new Date()));
@ -249,16 +249,13 @@ public class signListController {
int doctorFlagNum = 0;
int nurseFlagNum = 0;
if (list != null && list.size() > 0) {
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//2021-01-30
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
String username = user.getUserName();//获取前面登录的用户名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
if (emrFaultDetail.getState().equals("主任退回")) {
@ -347,9 +344,8 @@ public class signListController {
//添加初审内容
if (bol == 1) {
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
@ -372,7 +368,6 @@ public class signListController {
}
//初审成功日志
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
@ -401,9 +396,8 @@ public class signListController {
archiveMaster = list.get(0);
if (archiveMaster.getIsSign() != isSign) {
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName(); //获取前面登录的用户名
//参数输入
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@ -436,8 +430,7 @@ public class signListController {
followingType = "14";
}
//2021-05-13 following表中添加签收操作记录
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
String handleName = user.getUserPosition();//姓名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(archiveMaster.getId());
archive_master_following.setFollowingType(followingType);
@ -661,8 +654,8 @@ public class signListController {
response.setCharacterEncoding("utf-8");
request.setCharacterEncoding("utf-8");
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//工号
String result = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@ -704,7 +697,7 @@ public class signListController {
}else{
signList.setId(IDHelper.NewID());
signList.setCreatedtime(sdf.format(new Date()));
signList.setC1((String) session.getAttribute("userSession"));
signList.setC1(username);
signList.setIsFullText("0");
signListService.insertSignList(signList);
return "采集计划已生成!";

@ -82,9 +82,9 @@ public class storageController {
request.setCharacterEncoding("utf-8");
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
String username = user.getUserName();//获取前面登录的用户名
emrFaultDetail.setUpdater(username);
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());

Loading…
Cancel
Save