|
@@ -181,17 +181,18 @@ public class LogAspect {
|
|
|
*
|
|
|
* @param outMap
|
|
|
* @Return void
|
|
|
- */private void initOutMap(Map<String, Object> outMap) {
|
|
|
+ */
|
|
|
+ private void initOutMap(Map<String, Object> outMap) {
|
|
|
//添加excelName:获取前端要导出的文件名
|
|
|
- if(StringUtil.isNotBlank(SysUserUtils.getExcelName())){
|
|
|
+ if (StringUtil.isNotBlank(SysUserUtils.getExcelName())) {
|
|
|
try {
|
|
|
- outMap.put("#excelName", URLDecoder.decode(SysUserUtils.getExcelName(),"UTF-8"));
|
|
|
+ outMap.put("#excelName", URLDecoder.decode(SysUserUtils.getExcelName(), "UTF-8"));
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
- if(StringUtil.isNotBlank(SysUserUtils.getIsPlacefile())){
|
|
|
- outMap.put("#isPlacefile",SysUserUtils.getIsPlacefile());
|
|
|
+ if (StringUtil.isNotBlank(SysUserUtils.getIsPlacefile())) {
|
|
|
+ outMap.put("#isPlacefile", SysUserUtils.getIsPlacefile());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -213,10 +214,10 @@ public class LogAspect {
|
|
|
operationLog.setOperationId(SysUserUtils.getCurrentPrincipleID());
|
|
|
try {
|
|
|
SysUser sysUser = operationLogFacade.getSysUser(Long.parseLong(SysUserUtils.getCurrentPrincipleID()));
|
|
|
- if(sysUser!=null){
|
|
|
+ if (sysUser != null) {
|
|
|
operationLog.setOperationName(sysUser.getLinkman());
|
|
|
}
|
|
|
- }catch (Exception e){
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
String ip = HttpUtils.getIpAddress();
|
|
@@ -626,7 +627,8 @@ public class LogAspect {
|
|
|
// 获取客户端浏览器
|
|
|
String browser = userAgent.getBrowser().getName();
|
|
|
loginLog.setLoginBrowser(browser);
|
|
|
- loginLog.setHospitalId(SysUserUtils.getCurrentHospitalID());
|
|
|
+ String hospitalId = claims.get("hosp_id").asString();
|
|
|
+ loginLog.setHospitalId(hospitalId == null ? "0" : hospitalId);
|
|
|
|
|
|
//插入登录日志
|
|
|
loginLogFacade.getBaseMapper().addLoginLog(loginLog);
|