|
@@ -231,21 +231,6 @@ public class UserController {
|
|
|
if ( isCheckLoginName ( userDTO.getOldLoginName ( ),userDTO.getId(), userDTO.getLoginName ( ) ) ) {
|
|
|
return ResponseEntity.badRequest ( ).body ( "保存用户'" + userDTO.getLoginName ( ) + "'失败,登录名已存在!" );
|
|
|
}
|
|
|
- //对管理部门做查询操作,根据名称查询部门id信息
|
|
|
- if(StringUtils.isNotBlank(userDTO.getManageOfficeIds())){
|
|
|
- List<String> officeIdList = Lists.newLinkedList();
|
|
|
- //获取当前人管理的部门名称
|
|
|
- List<String> manageOfficeNameList=Arrays.asList(userDTO.getManageOfficeIds().split(","));
|
|
|
- if(manageOfficeNameList.size()>0){
|
|
|
- //查询这些部门信息
|
|
|
- officeIdList = officeService.getOfficeIdByNames(manageOfficeNameList);
|
|
|
- if(officeIdList.size()>0){
|
|
|
- String officeIds = String.join(",", officeIdList);
|
|
|
- userDTO.setManageOfficeIds(officeIds);
|
|
|
- }
|
|
|
- }
|
|
|
- userService.updateUserManageOffice(officeIdList,userDTO);
|
|
|
- }
|
|
|
// 保存用户信息
|
|
|
userService.saveOrUpdate ( userDTO );
|
|
|
return ResponseEntity.ok ( "保存用户'" + userDTO.getLoginName ( ) + "'成功!" );
|