diff --git a/src/main/java/com/keyware/htey/controller/Department/DepartmentController.java b/src/main/java/com/keyware/htey/controller/Department/DepartmentController.java index 559aafb..46d921e 100644 --- a/src/main/java/com/keyware/htey/controller/Department/DepartmentController.java +++ b/src/main/java/com/keyware/htey/controller/Department/DepartmentController.java @@ -150,20 +150,16 @@ public class DepartmentController { department.setProjectSource(Constant.projectName); List departmentList = this.departmentService.selectByDeparmentInfo(department); - //List parentNameList = new ArrayList(); - - //Department vo; - //for (Iterator var5 = departmentList.iterator(); var5.hasNext(); parentNameList.add(vo)) { - // vo = (Department)var5.next(); - // Integer selectUserCountByDeptId = this.userService.selectUserCountByDeptId(vo.getId()); - // if (selectUserCountByDeptId != null) { + //List parentNameList = new ArrayList(); + //for(Department vo : departmentList){ + // Integer selectUserCountByDeptId = userService.selectUserCountByDeptId(vo.getId()); + // if(selectUserCountByDeptId != null) // vo.setUserCount(selectUserCountByDeptId); - // } - // - // Department selectByPrimaryKey = this.departmentService.selectByPrimaryKey(vo.getParentId()); - // if (selectByPrimaryKey != null) { + // Department selectByPrimaryKey = departmentService.selectByPrimaryKey(vo.getParentId()); + // if(selectByPrimaryKey != null) // vo.setParentName(selectByPrimaryKey.getDeptName()); - // } + // parentNameList.add(vo); + // //} String logName = "查询部门列表"; String logNameType = "部门管理"; diff --git a/src/main/java/com/keyware/htey/controller/user/UserController.java b/src/main/java/com/keyware/htey/controller/user/UserController.java index da7b146..33c933b 100644 --- a/src/main/java/com/keyware/htey/controller/user/UserController.java +++ b/src/main/java/com/keyware/htey/controller/user/UserController.java @@ -470,11 +470,47 @@ public class UserController { @ApiResponse(responseCode = "200", description = "成功用户列表信息") public List selectByUserInfo17suo(User user, @RequestParam(defaultValue = "0") int pageNum, @RequestParam(defaultValue = "10") int pageSize) { + //String user_idFormSession = this.getUser_idFormSession("userId"); + //if ("sysadmin".equals(user_idFormSession)) { + // user.setIsSys("sysadmin"); + //} + + if ("请输入姓名...".equals(user.getUserNameForSerch())) { + user.setUserNameForSerch(null); + } + + String searchInfo = ""; + if (org.springframework.util.StringUtils.hasText(user.getUserNameForSerch())) { + searchInfo = searchInfo + "姓名关键字为" + user.getUserNameForSerch() + ","; + } + + if (org.springframework.util.StringUtils.hasText(user.getDepartId())) { + Department department = this.departmentService.selectByPrimaryKey(user.getDepartId()); + searchInfo = searchInfo + "部门为" + department.getDeptName(); + } + + if (org.springframework.util.StringUtils.hasText(user.getPost())) { + searchInfo = searchInfo + "职务为" + user.getPost(); + } + + user.setUserStatus(1L); + user.setProjectSource(Constant.projectName); user.setProjectSource(Constant.projectName); user.setUserStatus(1L); user.setPageSize(pageSize); user.setPageNum(pageNum); - return userService.selectByUserInfo17suo(user); + List userList = userService.selectByUserInfo17suo(user); + AuditLog auditLog = new AuditLog(); + String logName = "查询用户列表"; + String logNameType = "用户管理"; + //todo 登录人的用户名 userName + // String comments = this.getUser_idFormSession("userName") + "查询用户列表,查询条件为:" + searchInfo; + String comments = "查询用户列表,查询条件为:" + searchInfo; + auditLog.setLogName(logName); + auditLog.setLogNameType(logNameType); + auditLog.setComments(comments); + auditLogService.addAuditLog(auditLog); + return userList; } /** @@ -681,8 +717,7 @@ public class UserController { String contentType = request.getContentType(); String comments; if (contentType != null && contentType.toLowerCase().startsWith("multipart/")) { - MultipartHttpServletRequest multipartRequest - = (MultipartHttpServletRequest)WebUtils.getNativeRequest(request, + MultipartHttpServletRequest multipartRequest = WebUtils.getNativeRequest(request, MultipartHttpServletRequest.class); MultipartFile file = multipartRequest.getFile("multipartfile"); comments = request.getParameter("changeFlg");