|
@@ -63,6 +63,7 @@ public class SysUserController extends BaseController {
|
|
* 获取用户列表
|
|
* 获取用户列表
|
|
*/
|
|
*/
|
|
//@PreAuthorize("@ss.hasPermi('system:user:list')")
|
|
//@PreAuthorize("@ss.hasPermi('system:user:list')")
|
|
|
|
+ @Log(title = "用户查询", businessType = BusinessType.SELECT)
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
public TableDataInfo list(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
public TableDataInfo list(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
// String tenantId = request.getHeader("tenantId");
|
|
// String tenantId = request.getHeader("tenantId");
|
|
@@ -72,6 +73,7 @@ public class SysUserController extends BaseController {
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
}
|
|
}
|
|
//包装线添加员工已经添加的不显示
|
|
//包装线添加员工已经添加的不显示
|
|
|
|
+ @Log(title = "用户查询,包装线添加员工", businessType = BusinessType.SELECT)
|
|
@GetMapping("/notHasAddList")
|
|
@GetMapping("/notHasAddList")
|
|
public TableDataInfo notHasAddList(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
public TableDataInfo notHasAddList(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
// String tenantId = request.getHeader("tenantId");
|
|
// String tenantId = request.getHeader("tenantId");
|
|
@@ -80,19 +82,21 @@ public class SysUserController extends BaseController {
|
|
List<SysUser> list = userService.selectNotAddList(user);
|
|
List<SysUser> list = userService.selectNotAddList(user);
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
}
|
|
}
|
|
|
|
+ @Log(title = "通过厂别查询用户", businessType = BusinessType.SELECT)
|
|
@GetMapping("/tenantList")
|
|
@GetMapping("/tenantList")
|
|
public TableDataInfo tenantList(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
public TableDataInfo tenantList(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
startPage();
|
|
startPage();
|
|
List<SysUser> list = userService.selectTenantList(user);
|
|
List<SysUser> list = userService.selectTenantList(user);
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
}
|
|
}
|
|
|
|
+ @Log(title = "用户名和用户账户查询用户", businessType = BusinessType.SELECT)
|
|
@GetMapping("/listByLikeNickNameOrUserName")
|
|
@GetMapping("/listByLikeNickNameOrUserName")
|
|
public TableDataInfo listByLikeNickNameOrUserName(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
public TableDataInfo listByLikeNickNameOrUserName(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
startPage();
|
|
startPage();
|
|
List<SysUser> userList = userService.listByLikeNickNameOrUserName(user);
|
|
List<SysUser> userList = userService.listByLikeNickNameOrUserName(user);
|
|
return getDataTable(userList);
|
|
return getDataTable(userList);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ @Log(title = "用户查询", businessType = BusinessType.SELECT)
|
|
@GetMapping("/listEmployee")
|
|
@GetMapping("/listEmployee")
|
|
public TableDataInfo listEmployee(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
public TableDataInfo listEmployee(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
startPage();
|
|
startPage();
|
|
@@ -101,12 +105,14 @@ public class SysUserController extends BaseController {
|
|
List<SysUser> list = userService.selectEmployeeList(user);
|
|
List<SysUser> list = userService.selectEmployeeList(user);
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
}
|
|
}
|
|
|
|
+ @Log(title = "通过用户id查询菜单权限", businessType = BusinessType.SELECT)
|
|
@PostMapping("/selectUserPermissionList")
|
|
@PostMapping("/selectUserPermissionList")
|
|
public AjaxResult selectUserPermissionList(@RequestBody SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
public AjaxResult selectUserPermissionList(@RequestBody SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
Long userId = SecurityUtils.getLoginUser().getUserId();
|
|
Long userId = SecurityUtils.getLoginUser().getUserId();
|
|
List<SysMenu> sysMenus = userService.selectUserPermissionList(userId);
|
|
List<SysMenu> sysMenus = userService.selectUserPermissionList(userId);
|
|
return success(sysMenus);
|
|
return success(sysMenus);
|
|
}
|
|
}
|
|
|
|
+ @Log(title = "用户查询", businessType = BusinessType.SELECT)
|
|
@GetMapping("/getUserList")
|
|
@GetMapping("/getUserList")
|
|
public TableDataInfo getUserList(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
public TableDataInfo getUserList(SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
startPage();
|
|
startPage();
|
|
@@ -119,6 +125,7 @@ public class SysUserController extends BaseController {
|
|
/**
|
|
/**
|
|
* 获取中间表信息
|
|
* 获取中间表信息
|
|
*/
|
|
*/
|
|
|
|
+ @Log(title = "查询工段下员工信息", businessType = BusinessType.SELECT)
|
|
@GetMapping("/deptUser")
|
|
@GetMapping("/deptUser")
|
|
public TableDataInfo deptUser(SysDeptUser deptUser) {
|
|
public TableDataInfo deptUser(SysDeptUser deptUser) {
|
|
// String tenantId = request.getHeader("tenantId");
|
|
// String tenantId = request.getHeader("tenantId");
|
|
@@ -135,6 +142,7 @@ public class SysUserController extends BaseController {
|
|
* 获取用户部门
|
|
* 获取用户部门
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
|
|
|
+ @Log(title = "工段下员工信息查询", businessType = BusinessType.SELECT)
|
|
@GetMapping("/getUsersByDeptId")
|
|
@GetMapping("/getUsersByDeptId")
|
|
public TableDataInfo getUsersByDeptId( SysDept data) {
|
|
public TableDataInfo getUsersByDeptId( SysDept data) {
|
|
Long deptId = data.getDeptId();
|
|
Long deptId = data.getDeptId();
|
|
@@ -161,6 +169,7 @@ public class SysUserController extends BaseController {
|
|
* 获取用户通过deptId
|
|
* 获取用户通过deptId
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
|
|
|
+ @Log(title = "通过工段查询工段下员工信息", businessType = BusinessType.SELECT)
|
|
@GetMapping("/getUsersItemByDeptId")
|
|
@GetMapping("/getUsersItemByDeptId")
|
|
public TableDataInfo getUsersItemByDeptId(SysDeptUser sysDeptUser) {
|
|
public TableDataInfo getUsersItemByDeptId(SysDeptUser sysDeptUser) {
|
|
String tenantId = request.getHeader("tenantId");
|
|
String tenantId = request.getHeader("tenantId");
|
|
@@ -169,6 +178,7 @@ public class SysUserController extends BaseController {
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
}
|
|
}
|
|
//获取用户详细通过deptId
|
|
//获取用户详细通过deptId
|
|
|
|
+ @Log(title = "过工段查询工段下员工信息", businessType = BusinessType.SELECT)
|
|
@PostMapping("/getUserInfoByDeptId")
|
|
@PostMapping("/getUserInfoByDeptId")
|
|
public TableDataInfo getUserInfoByDeptId(@RequestBody SysDeptUser sysDeptUser) {
|
|
public TableDataInfo getUserInfoByDeptId(@RequestBody SysDeptUser sysDeptUser) {
|
|
startPage();
|
|
startPage();
|
|
@@ -187,7 +197,7 @@ public class SysUserController extends BaseController {
|
|
}
|
|
}
|
|
return subDepartments;
|
|
return subDepartments;
|
|
}
|
|
}
|
|
- @Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
|
|
|
|
|
+ @Log(title = "用户管理导出", businessType = BusinessType.EXPORT)
|
|
@PreAuthorize("@ss.hasPermi('system:user:export')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:export')")
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
public void export(HttpServletResponse response, SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
public void export(HttpServletResponse response, SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
@@ -201,7 +211,7 @@ public class SysUserController extends BaseController {
|
|
util.exportExcel(response, list, "用户数据");
|
|
util.exportExcel(response, list, "用户数据");
|
|
}
|
|
}
|
|
|
|
|
|
- @Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
|
|
|
|
|
+ @Log(title = "用户管理导入", businessType = BusinessType.IMPORT)
|
|
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
|
@PostMapping("/importData")
|
|
@PostMapping("/importData")
|
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
|
@@ -211,7 +221,6 @@ public class SysUserController extends BaseController {
|
|
String message = userService.importUser(userList, updateSupport, operName);
|
|
String message = userService.importUser(userList, updateSupport, operName);
|
|
return success(message);
|
|
return success(message);
|
|
}
|
|
}
|
|
-
|
|
|
|
@PostMapping("/importTemplate")
|
|
@PostMapping("/importTemplate")
|
|
public void importTemplate(HttpServletResponse response) {
|
|
public void importTemplate(HttpServletResponse response) {
|
|
ExcelUtil<SysUser> util = new ExcelUtil<>(SysUser.class);
|
|
ExcelUtil<SysUser> util = new ExcelUtil<>(SysUser.class);
|
|
@@ -222,6 +231,7 @@ public class SysUserController extends BaseController {
|
|
* 根据用户编号获取详细信息
|
|
* 根据用户编号获取详细信息
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
|
|
|
+ @Log(title = "根据用户编号获取详细信息", businessType = BusinessType.IMPORT)
|
|
@GetMapping(value = { "/", "/{userId}" })
|
|
@GetMapping(value = { "/", "/{userId}" })
|
|
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId) {
|
|
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId) {
|
|
userService.checkUserDataScope(userId);
|
|
userService.checkUserDataScope(userId);
|
|
@@ -242,7 +252,7 @@ public class SysUserController extends BaseController {
|
|
* 新增用户
|
|
* 新增用户
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
- @Log(title = "用户管理", businessType = BusinessType.INSERT)
|
|
|
|
|
|
+ @Log(title = "用户管理新增", businessType = BusinessType.INSERT)
|
|
@PostMapping
|
|
@PostMapping
|
|
public AjaxResult add(@Validated @RequestBody SysUser user) {
|
|
public AjaxResult add(@Validated @RequestBody SysUser user) {
|
|
// String tenantId = request.getHeader("tenantId");
|
|
// String tenantId = request.getHeader("tenantId");
|
|
@@ -276,7 +286,7 @@ public class SysUserController extends BaseController {
|
|
* 新增管理员用户
|
|
* 新增管理员用户
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
- @Log(title = "用户管理", businessType = BusinessType.INSERT)
|
|
|
|
|
|
+ @Log(title = "用户管理新增管理员用户", businessType = BusinessType.INSERT)
|
|
@PostMapping("/saveAdmin")
|
|
@PostMapping("/saveAdmin")
|
|
public AjaxResult saveAdmin(@Validated @RequestBody SysUser user) {
|
|
public AjaxResult saveAdmin(@Validated @RequestBody SysUser user) {
|
|
if(user.getTenantId() == null) {
|
|
if(user.getTenantId() == null) {
|
|
@@ -313,7 +323,7 @@ public class SysUserController extends BaseController {
|
|
* 新增或修改用户
|
|
* 新增或修改用户
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
- @Log(title = "用户管理", businessType = BusinessType.INSERT)
|
|
|
|
|
|
+ @Log(title = "用户管理保存", businessType = BusinessType.INSERT)
|
|
@PostMapping(value = "save")
|
|
@PostMapping(value = "save")
|
|
@Transactional
|
|
@Transactional
|
|
public AjaxResult save(@Validated @RequestBody SysUser user) {
|
|
public AjaxResult save(@Validated @RequestBody SysUser user) {
|
|
@@ -355,7 +365,7 @@ public class SysUserController extends BaseController {
|
|
* 新增或修改中间表用户
|
|
* 新增或修改中间表用户
|
|
*/
|
|
*/
|
|
// @PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
// @PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
- @Log(title = "用户管理", businessType = BusinessType.INSERT)
|
|
|
|
|
|
+ @Log(title = "工段下员工信息保存", businessType = BusinessType.INSERT)
|
|
@PostMapping(value = "saveDeptUser")
|
|
@PostMapping(value = "saveDeptUser")
|
|
@Transactional
|
|
@Transactional
|
|
public AjaxResult saveDeptUser(@Validated @RequestBody List<SysDeptUser> deptUserList) {
|
|
public AjaxResult saveDeptUser(@Validated @RequestBody List<SysDeptUser> deptUserList) {
|
|
@@ -383,7 +393,7 @@ public class SysUserController extends BaseController {
|
|
* 修改中间表用户是否是工段长或调机或主管或调度
|
|
* 修改中间表用户是否是工段长或调机或主管或调度
|
|
*/
|
|
*/
|
|
// @PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
// @PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
- @Log(title = "用户管理", businessType = BusinessType.INSERT)
|
|
|
|
|
|
+ @Log(title = "工段下员工修改", businessType = BusinessType.INSERT)
|
|
@PutMapping("/updateDeptUser")
|
|
@PutMapping("/updateDeptUser")
|
|
@Transactional
|
|
@Transactional
|
|
public AjaxResult updateDeptUser(@RequestBody SysDeptUser data) {
|
|
public AjaxResult updateDeptUser(@RequestBody SysDeptUser data) {
|
|
@@ -396,7 +406,7 @@ public class SysUserController extends BaseController {
|
|
* 修改用户
|
|
* 修改用户
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
- @Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
|
+ @Log(title = "用户管理修改", businessType = BusinessType.UPDATE)
|
|
@PutMapping
|
|
@PutMapping
|
|
public AjaxResult edit(@Validated @RequestBody SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
public AjaxResult edit(@Validated @RequestBody SysUser user) throws NoSuchFieldException, IllegalAccessException {
|
|
userService.checkUserAllowed(user);
|
|
userService.checkUserAllowed(user);
|
|
@@ -423,7 +433,7 @@ public class SysUserController extends BaseController {
|
|
* 删除用户
|
|
* 删除用户
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:remove')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:remove')")
|
|
- @Log(title = "用户管理", businessType = BusinessType.DELETE)
|
|
|
|
|
|
+ @Log(title = "用户管理删除", businessType = BusinessType.DELETE)
|
|
@DeleteMapping("/{userIds}")
|
|
@DeleteMapping("/{userIds}")
|
|
public AjaxResult remove(@PathVariable List<Long> userIds) {
|
|
public AjaxResult remove(@PathVariable List<Long> userIds) {
|
|
if (userIds.contains(getUserId())) {
|
|
if (userIds.contains(getUserId())) {
|
|
@@ -433,7 +443,7 @@ public class SysUserController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:remove')")
|
|
// @PreAuthorize("@ss.hasPermi('system:user:remove')")
|
|
- @Log(title = "用户管理", businessType = BusinessType.DELETE)
|
|
|
|
|
|
+ @Log(title = "删除工段下员工信息", businessType = BusinessType.DELETE)
|
|
@PostMapping("/delDeptUser")
|
|
@PostMapping("/delDeptUser")
|
|
public AjaxResult delDeptUser(@RequestBody List<SysDeptUser> deptUsers) {
|
|
public AjaxResult delDeptUser(@RequestBody List<SysDeptUser> deptUsers) {
|
|
Long userId = SecurityUtils.getLoginUser().getUserId();
|
|
Long userId = SecurityUtils.getLoginUser().getUserId();
|
|
@@ -454,7 +464,7 @@ public class SysUserController extends BaseController {
|
|
* 重置密码
|
|
* 重置密码
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
|
|
- @Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
|
+ @Log(title = "用户管理重置密码", businessType = BusinessType.UPDATE)
|
|
@PutMapping("/resetPwd")
|
|
@PutMapping("/resetPwd")
|
|
public AjaxResult resetPwd(@RequestBody SysUser user) {
|
|
public AjaxResult resetPwd(@RequestBody SysUser user) {
|
|
userService.checkUserAllowed(user);
|
|
userService.checkUserAllowed(user);
|
|
@@ -468,7 +478,7 @@ public class SysUserController extends BaseController {
|
|
* 状态修改
|
|
* 状态修改
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
- @Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
|
+ @Log(title = "用户管理状态修改", businessType = BusinessType.UPDATE)
|
|
@PutMapping("/changeStatus")
|
|
@PutMapping("/changeStatus")
|
|
public AjaxResult changeStatus(@RequestBody SysUser user) {
|
|
public AjaxResult changeStatus(@RequestBody SysUser user) {
|
|
userService.checkUserAllowed(user);
|
|
userService.checkUserAllowed(user);
|
|
@@ -481,6 +491,7 @@ public class SysUserController extends BaseController {
|
|
* 根据用户编号获取授权角色
|
|
* 根据用户编号获取授权角色
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
|
|
|
+ @Log(title = "根据用户编号获取授权角色", businessType = BusinessType.UPDATE)
|
|
@GetMapping("/authRole/{userId}")
|
|
@GetMapping("/authRole/{userId}")
|
|
public AjaxResult authRole(@PathVariable("userId") Long userId) {
|
|
public AjaxResult authRole(@PathVariable("userId") Long userId) {
|
|
AjaxResult ajax = AjaxResult.success();
|
|
AjaxResult ajax = AjaxResult.success();
|
|
@@ -496,7 +507,7 @@ public class SysUserController extends BaseController {
|
|
* 用户授权角色
|
|
* 用户授权角色
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
- @Log(title = "用户管理", businessType = BusinessType.GRANT)
|
|
|
|
|
|
+ @Log(title = "用户管理授权角色", businessType = BusinessType.GRANT)
|
|
@PutMapping("/authRole")
|
|
@PutMapping("/authRole")
|
|
public AjaxResult insertAuthRole(Long userId, Long[] roleIds) {
|
|
public AjaxResult insertAuthRole(Long userId, Long[] roleIds) {
|
|
userService.checkUserDataScope(userId);
|
|
userService.checkUserDataScope(userId);
|
|
@@ -507,6 +518,7 @@ public class SysUserController extends BaseController {
|
|
/**
|
|
/**
|
|
* 获取部门树列表
|
|
* 获取部门树列表
|
|
*/
|
|
*/
|
|
|
|
+ @Log(title = "获取部门树列表", businessType = BusinessType.SELECT)
|
|
@GetMapping("/deptTree")
|
|
@GetMapping("/deptTree")
|
|
public AjaxResult deptTree(SysDept dept) throws NoSuchFieldException, IllegalAccessException {
|
|
public AjaxResult deptTree(SysDept dept) throws NoSuchFieldException, IllegalAccessException {
|
|
String tenantId = request.getHeader("tenantId");
|
|
String tenantId = request.getHeader("tenantId");
|
|
@@ -515,6 +527,7 @@ public class SysUserController extends BaseController {
|
|
dept.setTenantId(Long.valueOf(tenantId));
|
|
dept.setTenantId(Long.valueOf(tenantId));
|
|
return success(deptService.selectDeptTreeList(dept));
|
|
return success(deptService.selectDeptTreeList(dept));
|
|
}
|
|
}
|
|
|
|
+ @Log(title = "工段下内部周转用户", businessType = BusinessType.SELECT)
|
|
@GetMapping("/listInnerUserByDeptId")
|
|
@GetMapping("/listInnerUserByDeptId")
|
|
public TableDataInfo listInnerUserByDeptId(SysDept sysDept) {
|
|
public TableDataInfo listInnerUserByDeptId(SysDept sysDept) {
|
|
startPage();
|
|
startPage();
|
|
@@ -524,6 +537,7 @@ public class SysUserController extends BaseController {
|
|
* 根据userName获取id
|
|
* 根据userName获取id
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
|
|
|
+ @Log(title = "用户管理,根据userName获取id", businessType = BusinessType.SELECT)
|
|
@GetMapping("/getUserByCode")
|
|
@GetMapping("/getUserByCode")
|
|
public SysUser getUserByCode(String userName) {
|
|
public SysUser getUserByCode(String userName) {
|
|
|
|
|