lipenghui 2 mesiacov pred
rodič
commit
01c353377e

+ 13 - 4
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java

@@ -16,6 +16,7 @@ import cn.iocoder.yudao.framework.datapermission.core.util.DataPermissionUtils;
 import cn.iocoder.yudao.module.infra.api.config.ConfigApi;
 import cn.iocoder.yudao.module.infra.api.file.FileApi;
 import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthRegisterReqVO;
+import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptListReqVO;
 import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdatePasswordReqVO;
 import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdateReqVO;
 import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserImportExcelVO;
@@ -97,7 +98,11 @@ public class AdminUserServiceImpl implements AdminUserService {
 
     @Override
     public List<Pms.deptStat> selectCountByDeptId(Long deptId) {
-        DeptDO rh = deptMapper.selectOne("name", "瑞恒兴域");
+        DeptListReqVO deptListReqVO = new DeptListReqVO();
+        deptListReqVO.setName("瑞恒兴域");
+        List<DeptDO> deptDhS = deptMapper.selectList(deptListReqVO);
+
+        DeptDO rh = deptDhS.get(0);
         Set<Long> childDeptIdListFromCache = deptService.getChildDeptIdListFromCache(rh.getId());
         childDeptIdListFromCache.add(rh.getId());
         UserPageReqVO pageReqVO = new UserPageReqVO();
@@ -106,8 +111,9 @@ public class AdminUserServiceImpl implements AdminUserService {
         pageReqVO.setLoginDate(new LocalDateTime[]{beginEndWeek.get("start"), beginEndWeek.get("end")});
         Long rhactive = userMapper.selectCountByDeptIds(childDeptIdListFromCache, pageReqVO);
 
-
-        DeptDO ry = deptMapper.selectOne("name", "瑞鹰国际");
+        deptListReqVO.setName("瑞鹰国际");
+        List<DeptDO> deptDOS = deptMapper.selectList(deptListReqVO);
+        DeptDO ry = deptDOS.get(0);
         Set<Long> rydepts = deptService.getChildDeptIdListFromCache(ry.getId());
         rydepts.add(ry.getId());
         UserPageReqVO pageReqVO1 = new UserPageReqVO();
@@ -115,7 +121,10 @@ public class AdminUserServiceImpl implements AdminUserService {
         pageReqVO1.setLoginDate(new LocalDateTime[]{beginEndWeek.get("start"), beginEndWeek.get("end")});
         Long ryactive = userMapper.selectCountByDeptIds(rydepts, pageReqVO1);
 
-        DeptDO rd = deptMapper.selectOne("name", "四川瑞都");
+        deptListReqVO.setName("四川瑞都");
+        List<DeptDO> deptDdS = deptMapper.selectList(deptListReqVO);
+        DeptDO rd = deptDdS.get(0);
+//        DeptDO rd = deptMapper.selectOne("name", "四川瑞都");
         Set<Long> rddepts = deptService.getChildDeptIdListFromCache(rd.getId());
         rddepts.add(rd.getId());
         UserPageReqVO pageReqVO2 = new UserPageReqVO();