diff --git a/casic-iris-acs/src/main/java/com/casic/missiles/modular/system/service/impl/RecognitionRecordsServiceImpl.java b/casic-iris-acs/src/main/java/com/casic/missiles/modular/system/service/impl/RecognitionRecordsServiceImpl.java index 73b88ab..a77da92 100644 --- a/casic-iris-acs/src/main/java/com/casic/missiles/modular/system/service/impl/RecognitionRecordsServiceImpl.java +++ b/casic-iris-acs/src/main/java/com/casic/missiles/modular/system/service/impl/RecognitionRecordsServiceImpl.java @@ -62,7 +62,13 @@ public List> statisticByDept(String doorCode,String beginTime, String endTime,String inoutType){ List> list = new ArrayList<>(); DataScope dataScope = permissionService.getCurrUserDataScope(); - String deptIds = StringUtils.strip(dataScope.getDeptIds().toString(),"[]"); + List deptList = new ArrayList<>(); + if ("1".equals(dataScope.getScopeEnums().getCode())){ + deptList = permissionService.getSubDepts(0,null); + } else { + deptList = dataScope.getDeptIds(); + } + String deptIds = StringUtils.strip(deptList.toString(),"[]"); list = this.baseMapper.statisticByDept(doorCode, deptIds,beginTime, endTime, inoutType); for (Map res : list) { Long deptid = Long.valueOf(String.valueOf(res.get("deptId"))); @@ -78,7 +84,13 @@ List> mapList = new ArrayList<>(); DataScope dataScope = permissionService.getCurrUserDataScope(); - String deptIds = StringUtils.strip(dataScope.getDeptIds().toString(),"[]"); + List deptList = new ArrayList<>(); + if ("1".equals(dataScope.getScopeEnums().getCode())){ + deptList = permissionService.getSubDepts(0,null); + } else { + deptList = dataScope.getDeptIds(); + } + String deptIds = StringUtils.strip(deptList.toString(),"[]"); // 进门 Map map1 = new HashMap<>(); map1.put("inoutType","进门");