From 8f9ac17a840864be90874e83e1581540afd239e8 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 21 Mar 2024 20:49:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8C=87=E6=A0=87PDA=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/logpm/supervise/api/ClassifyApi.java | 43 ++++++++++++------- .../service/impl/ClassifyServiceImpl.java | 1 + 2 files changed, 28 insertions(+), 16 deletions(-) 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)) { From fb57ef9f512bb33295f43adff225bbb1275435b3 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Thu, 21 Mar 2024 20:54:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?add:=E5=A2=9E=E5=8A=A0=E4=B8=8A=E4=BB=93?= =?UTF-8?q?=E7=9A=84=E5=90=8C=E6=AD=A5=E4=BB=93=E5=BA=93ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springblade/common/constant/OldSystemDataPushConfig.java | 4 ++++ 1 file changed, 4 insertions(+) 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"); }