| | |
| | | |
| | | for (SysDept dept : depts) { |
| | | if ("0".equals(dept.getStatus()) && "0".equals(dept.getDelFlag())) { |
| | | Long count = sysUserDeptMapper.selectCount(new LambdaQueryWrapper<SysUserDept>() |
| | | .eq(SysUserDept::getDeptId, dept.getDeptId())); |
| | | if (count > 0) { |
| | | Long count = staffOnJobMapper.selectCount(new QueryWrapper<StaffOnJob>() |
| | | .eq("sys_dept_id", dept.getDeptId()).eq("staff_state", 1)); |
| | | if (count != null && count > 0) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("name", dept.getDeptName()); |
| | | map.put("count", count); |
| | |
| | | } |
| | | |
| | | private Long countStaff(LocalDateTime dateTime) { |
| | | Long sysUserCount = sysUserMapper.selectCount(new LambdaQueryWrapper<SysUser>() |
| | | .eq(SysUser::getDelFlag, "0") |
| | | .le(SysUser::getCreateTime, dateTime)); |
| | | Long staffCountItem = staffOnJobMapper.selectCount(new LambdaQueryWrapper<StaffOnJob>() |
| | | .isNotNull(StaffOnJob::getStaffState) |
| | | .eq(StaffOnJob::getStaffState, 1) |
| | | .le(StaffOnJob::getCreateTime, dateTime)); |
| | | return sysUserCount + staffCountItem; |
| | | return staffCountItem; |
| | | } |
| | | |
| | | private Long countCustomers(LocalDateTime dateTime) { |