From 88dc90fa49da4fe3a1e409c1162afc0786088b3e Mon Sep 17 00:00:00 2001 From: csyue <1203338439@qq.com> Date: Wed, 29 May 2024 12:44:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98=E9=A1=B9?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/service/impl/TmTaskServiceImpl.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java index 0273f3fe..7ca8fdd3 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java @@ -616,7 +616,9 @@ public class TmTaskServiceImpl implements TmTaskService { Set roles = SecurityUtils.getLoginUser().getRoles(); Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId(); List list = tmTaskMapper.getAuditManageListByLeaseTmTask(record); - record.setDeptId(deptId); + if (deptId == 101 || deptId == 102) { + record.setCompanyId(deptId.intValue()); + } List tmTaskList = tmTaskMapper.getAuditManageListByLeaseTmTask(record); @@ -628,12 +630,11 @@ public class TmTaskServiceImpl implements TmTaskService { if (collect.size() > 0) { int deptId1 = tmTaskMapper.getDeptId(collect.get(0).getCreateBy()); //机具经理、书记、副经理查看数据 - if (deptId == 101) { + if (deptId == 101 && deptId1 == 101) { List auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 101).collect(Collectors.toList()); - if (deptId1 == 101) { - List applyInfoList = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 102).collect(Collectors.toList()); - auditListByLeaseInfo.addAll(applyInfoList); - } + List applyInfoList = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 102).collect(Collectors.toList()); + auditListByLeaseInfo.addAll(applyInfoList); + if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) { // 对领料任务集合查询具体详情 for (LeaseApplyInfo leaseApplyInfo : auditListByLeaseInfo) { @@ -658,12 +659,11 @@ public class TmTaskServiceImpl implements TmTaskService { } } // 调试公司可以看到的数据权限 - if (deptId == 102) { + if (deptId == 102 && deptId1 == 102) { List auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 102).collect(Collectors.toList()); - if (deptId1 == 102) { - List list2 = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 101).collect(Collectors.toList()); - auditListByLeaseInfo.addAll(list2); - } + List list2 = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 101).collect(Collectors.toList()); + auditListByLeaseInfo.addAll(list2); + if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) { // 对领料任务集合查询具体详情 for (LeaseApplyInfo leaseApplyInfo : auditListByLeaseInfo) {