diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java b/blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java index 13d419078..2e4d19723 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java @@ -28,6 +28,10 @@ public class OldSystemDataPushConfig { warehourseIds.add("137"); warehourseIds.add("56"); warehourseIds.add("39"); + // 长沙 + warehourseIds.add("69"); + // 绵阳 + warehourseIds.add("123"); } diff --git a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/api/ClassifyApi.java b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/api/ClassifyApi.java index fec6bd5c5..877824595 100644 --- a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/api/ClassifyApi.java +++ b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/api/ClassifyApi.java @@ -49,25 +49,36 @@ public class ClassifyApi { return null; } String dept = AuthUtil.getUser().getDeptId(); -// if (!("0").equals(dept)){ -// if (!deptId.contains(dept)){ -// log.error(method+"当前登录人无法对选择部门进行考核"); -// return R.fail("此账号无法对该部门进行考核"); -// } -// } - List a = new ArrayList<>(); List list = Func.toLongList(deptId); - Long goal = list.get(list.size() - 1); - a.addAll(list); - Long aLong = list.get(list.size() - 1); List userDeptList = Func.toLongList(dept); - a.addAll(userDeptList); -// list.addAll(userDeptList); - a = a.stream().distinct().collect(Collectors.toList()); - int indexOf = list.indexOf(aLong); - if (indexOf == list.size()){ - a.remove(indexOf); + + List a = list.stream().filter(f -> !userDeptList.contains(f)).collect(Collectors.toList()); + if (a.size() == 0){ + //判断自身部门权限是否和考核一样 + boolean flag = list.stream().allMatch(all -> userDeptList.contains(all)); + if (flag){ + List detail = new ArrayList<>(); + return R.data(detail); + } } + + Long goal = list.get(list.size() - 1); +// +// List a = new ArrayList<>(); +// a.addAll(list); +// Long aLong = list.get(list.size() - 1); +//// a.addAll(userDeptList); +//// list.addAll(userDeptList); +// a = a.stream().distinct().collect(Collectors.toList()); +//// int indexOf = list.indexOf(aLong); +//// if (indexOf == list.size()){ +//// a.remove(indexOf); +//// } +// int indexOf = userDeptList.indexOf(aLong); +// if (indexOf >= 0){ +// //自身存在有考核最后一级部门 +// a.remove(a.indexOf(aLong)); +// } String collect = a.stream().map(String::valueOf).collect(Collectors.joining(",")); List detail = classifyService.selectClassifyList(collect,goal); return R.data(detail); diff --git a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java index 1913fd3e6..8752d2a22 100644 --- a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java +++ b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java @@ -258,6 +258,7 @@ public class ClassifyServiceImpl extends BaseServiceImpl selectClassifyList(String deptId,Long goal) { Long pid = 0L; List listId = new ArrayList<>(); + //查询一级指标列表 List classifyEntities = getClassifyList(pid,null); for (ClassifyApiVO classifyEntity : classifyEntities) { if (classifyEntity.getPId().equals(0L)) {