|
@@ -264,7 +264,7 @@ public class NewFrontApi {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- queryWrapper2.eq(UserBypassAccount::getEnterpriseId, id);
|
|
|
+ queryWrapper2.eq(UserBypassAccount::getEnterpriseId, id);
|
|
|
|
|
|
if (!department.equals("")) {
|
|
|
String[] departments = department.split(",");
|
|
@@ -533,18 +533,8 @@ public class NewFrontApi {
|
|
|
public CommonResult<?> departUser(@RequestParam(name = "departmentId", required = false) String departmentId,
|
|
|
@RequestParam(name = "organizationId", required = false) String organizationId
|
|
|
) {
|
|
|
- List<UserBypassAccount> list = new ArrayList<>();
|
|
|
- if (StringUtils.isNotBlank(organizationId)) {
|
|
|
- LambdaQueryWrapper<UserEnterprise> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper.eq(UserEnterprise::getOrganizationId, organizationId);
|
|
|
- UserEnterprise userEnterprise = userEnterpriseService.getOne(queryWrapper);
|
|
|
- Integer id = userEnterprise.getId();
|
|
|
- LambdaQueryWrapper<UserBypassAccount> queryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper2.eq(UserBypassAccount::getEnterpriseId, id);
|
|
|
- queryWrapper2.eq(UserBypassAccount::getIsDelete, 0);
|
|
|
- list = userBypassAccountService.list(queryWrapper2);
|
|
|
- }
|
|
|
if (StringUtils.isNotBlank(departmentId)) {
|
|
|
+ List<UserBypassAccount> list = new ArrayList<>();
|
|
|
String[] split = departmentId.split(",");
|
|
|
LambdaQueryWrapper<OrganizationDepartment> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.in(OrganizationDepartment::getId, split);
|
|
@@ -564,10 +554,24 @@ public class NewFrontApi {
|
|
|
for (UserBypassAccount userBypassAccount : list1) {
|
|
|
list.add(userBypassAccount);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
+ return CommonResult.success(list);
|
|
|
}
|
|
|
- return CommonResult.success(list);
|
|
|
+ else if (StringUtils.isNotBlank(organizationId)) {
|
|
|
+ LambdaQueryWrapper<UserEnterprise> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(UserEnterprise::getOrganizationId, organizationId);
|
|
|
+ UserEnterprise userEnterprise = userEnterpriseService.getOne(queryWrapper);
|
|
|
+ Integer id = userEnterprise.getId();
|
|
|
+ LambdaQueryWrapper<UserBypassAccount> queryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper2.eq(UserBypassAccount::getEnterpriseId, id);
|
|
|
+ queryWrapper2.eq(UserBypassAccount::getIsDelete, 0);
|
|
|
+ List<UserBypassAccount> list1 = userBypassAccountService.list(queryWrapper2);
|
|
|
+ return CommonResult.success(list1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
+ return CommonResult.success("部门下用户为空");
|
|
|
}
|
|
|
}
|