bug修复

This commit is contained in:
18792927508
2024-04-25 18:15:59 +08:00
parent 3637a7d65d
commit bda663a740
8 changed files with 177 additions and 54 deletions
@@ -28,10 +28,14 @@ public class CaseLogUtils
* @param caseNode 案件节点,不能为空
* @param notes 备注
*/
public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode,String caseStatusName, String notes ){
public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode,String caseStatusName, String notes ){
MsCaseLogRecord operLog = new MsCaseLogRecord();
// 获取当前的用户
LoginUser loginUser = SecurityUtils.getLoginUser();
LoginUser loginUser=null;
try {
loginUser = SecurityUtils.getLoginUser();
} catch (Exception e) {
loginUser=null;
}
if(loginUser!=null) {
SysUser sysUser = userMapper.selectUserById(loginUser.getUserId());
operLog.setCreateBy(sysUser.getUserName());
@@ -49,4 +53,24 @@ public class CaseLogUtils
operLog.setCreateTime(new Date());
caseLogRecordMapper.insert(operLog);
}
/**
* 新增案件日志
* @param caseAppliId 案件id,不能为空
* @param caseNode 案件节点,不能为空
* @param notes 备注
*/
public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode,String caseStatusName, String notes,Long userId ){
if(userId==null)
return;
MsCaseLogRecord operLog = new MsCaseLogRecord();
SysUser sysUser = userMapper.selectUserById(userId);
operLog.setCreateBy(sysUser.getUserName());
operLog.setCreateNickName(sysUser.getNickName());
operLog.setCaseStatusName(caseStatusName);
operLog.setCaseAppliId(caseAppliId);
operLog.setCaseNode(caseNode);
operLog.setNotes(notes);
operLog.setCreateTime(new Date());
caseLogRecordMapper.insert(operLog);
}
}