Compare commits

...

6 Commits

Author SHA1 Message Date
411812d35b 根据公司ID,查询该公司下的所有用户。 2025-07-10 17:38:42 +08:00
4cd4d8b4ca 根据公司ID,查询该公司下的所有用户。 2025-07-10 17:37:01 +08:00
ce1b43836c 根据公司ID,查询该公司下的所有用户。 2025-07-10 17:07:26 +08:00
aikai
881ec2af9a fix(smartfactory): 修复员工性别统计错误
- 将男性员工的性别标识从 0 修改为 1
- 将女性员工的性别标识从 1 修改为 2
2025-07-10 17:05:16 +08:00
ac437a314c 根据公司ID,查询该公司下的所有用户。 2025-07-10 16:41:09 +08:00
a4b640f28c 根据公司ID,查询该公司下的所有用户。 2025-07-10 16:13:23 +08:00
4 changed files with 26 additions and 5 deletions

View File

@ -65,7 +65,6 @@ public class BpmOAExpensesController {
@Operation(summary = "获得生产开支申请分页") @Operation(summary = "获得生产开支申请分页")
@DataPermission(enable = false) @DataPermission(enable = false)
public CommonResult<PageResult<BpmOAExpensesPageRespVO>> getExpensesPage(BpmOAExpensesPageReqVO pageReqVO) { public CommonResult<PageResult<BpmOAExpensesPageRespVO>> getExpensesPage(BpmOAExpensesPageReqVO pageReqVO) {
PageResult<BpmOAExpensesPageRespVO> respVO = expensesService.getExpensesPage(pageReqVO); PageResult<BpmOAExpensesPageRespVO> respVO = expensesService.getExpensesPage(pageReqVO);
return success(respVO); return success(respVO);
} }
@ -107,4 +106,4 @@ public class BpmOAExpensesController {
expensesService.oneClickPayment(month); expensesService.oneClickPayment(month);
return success(true); return success(true);
} }
} }

View File

@ -91,4 +91,4 @@ public class LoanController {
return success(result); return success(result);
} }
} }

View File

@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.system.controller.admin.user;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
@ -471,4 +472,25 @@ public class UserController {
return postName; return postName;
} }
@GetMapping("/getUserBycompanyId")
@Operation(summary = "根据公司ID 此公司ID需要查询到对应的部门ID,查询该部门下的用户")
@Parameter(name = "companyId", description = "公司ID", required = true, example = "10000083")
@DataPermission(enable = false)
public CommonResult<List<UserSimpleRespVO>> getUserBycompanyId(@RequestParam("companyId") Long companyId) {
//1 = 113 中鼐智能科技江西有限公司, 10000083 = 136 世瑞华科技(深圳)有限公司 10000061 = 166 中鼐智能科技(江西)有限公司(高安)
if(companyId == 1L) {
companyId = 113L;
}else if(companyId == 10000083L) {
companyId = 136L;
}else if(companyId == 10000061L ){
companyId = 166L ;
}
List<DeptDO> deptDOS = deptService.getChildDept(companyId);
if(deptDOS == null){
throw new ServiceException(500, "公司ID未查询到数据");
}
List<AdminUserDO> userDOS = userService.getUserListByDeptIds(convertList(deptDOS, DeptDO::getId), CommonStatusEnum.ENABLE.getStatus());
return success(BeanUtils.toBean(userDOS, UserSimpleRespVO.class));
}
} }

View File

@ -139,8 +139,8 @@ public class StaffServiceImpl implements StaffService {
}); });
vo.setTotal(dos.size()); vo.setTotal(dos.size());
vo.setMaleTotal((int) dos.stream().filter(a -> a.getSex() != null && a.getSex() == 0).count()); vo.setMaleTotal((int) dos.stream().filter(a -> a.getSex() != null && a.getSex() == 1).count());
vo.setFemaleTotal((int) dos.stream().filter(a -> a.getSex() != null && a.getSex() == 1).count()); vo.setFemaleTotal((int) dos.stream().filter(a -> a.getSex() != null && a.getSex() == 2).count());
vo.setStaffInfos(dos); vo.setStaffInfos(dos);
return vo; return vo;
} }