|
@@ -244,6 +244,7 @@ public class NewPlatformApi {
|
|
|
userBypassAccount.setId(byId.getId());
|
|
|
userBypassAccount.setCreateTime(new Date());
|
|
|
userBypassAccount.setIsDelete(0);
|
|
|
+ userBypassAccount.setDepartmentId(userBypassAccount.getDepartment());
|
|
|
String realName = userBypassAccount.getRealName();
|
|
|
OrganizationDepartmentUser organizationDepartmentUser = organizationDepartmentUserService.getById(realName);
|
|
|
userBypassAccount.setRealName(organizationDepartmentUser.getName());
|
|
@@ -628,12 +629,7 @@ public class NewPlatformApi {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value = "平台端组织机构编辑")
|
|
|
- @RequestMapping(value = "/organizationEdit", method = RequestMethod.POST)
|
|
|
- public CommonResult<String> organizationEdit(@RequestBody @Validated OrganizationVO request) {
|
|
|
- organizationService.updateMain(request);
|
|
|
- return CommonResult.success("操作成功");
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 通过id查询
|
|
@@ -710,4 +706,39 @@ public class NewPlatformApi {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "平台端组织机构编辑-部门")
|
|
|
+ @RequestMapping(value = "/organizationDepartEdit", method = RequestMethod.POST)
|
|
|
+ public CommonResult<String> organizationDepartEdit(@RequestBody @Validated OrganizationDepartment request) {
|
|
|
+ organizationDepartmentService.organizationDepartEdit(request);
|
|
|
+
|
|
|
+ return CommonResult.success("操作成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "平台端组织机构编辑-用户")
|
|
|
+ @RequestMapping(value = "/organizationUserEdit", method = RequestMethod.POST)
|
|
|
+ public CommonResult<String> organizationUserEdit(@RequestBody @Validated OrganizationDepartmentUser request) {
|
|
|
+ String username = request.getName();
|
|
|
+ LambdaQueryWrapper<UserBypassAccount> userBypassAccountLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ userBypassAccountLambdaQueryWrapper.eq(UserBypassAccount::getRealName,username);
|
|
|
+ List<UserBypassAccount> list = userBypassAccountService.list(userBypassAccountLambdaQueryWrapper);
|
|
|
+ if (null!=list&&list.size()>0){
|
|
|
+ for (UserBypassAccount userBypassAccount : list) {
|
|
|
+ String name = request.getName();
|
|
|
+ userBypassAccount.setRealName(name);
|
|
|
+ userBypassAccountService.updateById(userBypassAccount);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ organizationDepartmentUserService.updateById(request);
|
|
|
+ return CommonResult.success("操作成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "平台端组织机构编辑")
|
|
|
+ @RequestMapping(value = "/organizationEdit", method = RequestMethod.POST)
|
|
|
+ public CommonResult<String> organizationEdit(@RequestBody @Validated OrganizationVO request) {
|
|
|
+
|
|
|
+ organizationService.updateMain(request);
|
|
|
+ return CommonResult.success("操作成功");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|