Browse Source

Merge branch 'dev' into pre-production

master
pref_mail@163.com 10 months ago
parent
commit
8fa7ce2853
  1. 4
      blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java
  2. 43
      blade-service/logpm-supervise/src/main/java/com/logpm/supervise/api/ClassifyApi.java
  3. 1
      blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java

4
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");
}

43
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<Long> a = new ArrayList<>();
List<Long> list = Func.toLongList(deptId);
Long goal = list.get(list.size() - 1);
a.addAll(list);
Long aLong = list.get(list.size() - 1);
List<Long> 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<Long> 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<ClassifyApiVO> detail = new ArrayList<>();
return R.data(detail);
}
}
Long goal = list.get(list.size() - 1);
//
// List<Long> 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<ClassifyApiVO> detail = classifyService.selectClassifyList(collect,goal);
return R.data(detail);

1
blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java

@ -258,6 +258,7 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif
public List<ClassifyApiVO> selectClassifyList(String deptId,Long goal) {
Long pid = 0L;
List<Long> listId = new ArrayList<>();
//查询一级指标列表
List<ClassifyApiVO> classifyEntities = getClassifyList(pid,null);
for (ClassifyApiVO classifyEntity : classifyEntities) {
if (classifyEntity.getPId().equals(0L)) {

Loading…
Cancel
Save