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 e0e03f8e..4083298a 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 @@ -779,9 +779,7 @@ public class TmTaskServiceImpl implements TmTaskService { int deptId1 = tmTaskMapper.getDeptId(collect.get(0).getCreateBy()); if (roles.contains("admin") || deptId == 100) { // 对领料任务集合查询具体详情 - tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1))); - tmTask.setRemark(collect.get(0).getRemark()); - /*for (LeaseApplyInfo leaseApplyInfo : collect) { + for (LeaseApplyInfo leaseApplyInfo : collect) { if (leaseApplyInfo != null) { // 去查询领料任务详情表 List leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo); @@ -796,13 +794,13 @@ public class TmTaskServiceImpl implements TmTaskService { leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails); // 存入领料任务实体集合 tmTask.setLeaseApplyInfoList(collect); + tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1))); + tmTask.setRemark(collect.get(0).getRemark()); } } - }*/ - } else if (deptId == 101) { - tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1))); - tmTask.setRemark(collect.get(0).getRemark());//机具经理、书记、副经理查看数据 - /*List auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 101).collect(Collectors.toList()); + } + } else if (deptId == 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); @@ -825,14 +823,14 @@ public class TmTaskServiceImpl implements TmTaskService { leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails); // 存入领料任务实体集合 tmTask.setLeaseApplyInfoList(auditListByLeaseInfo); + tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1))); + tmTask.setRemark(collect.get(0).getRemark()); } } } - }*/ - } else if (deptId == 102) { - tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1))); - tmTask.setRemark(collect.get(0).getRemark());// 调试公司可以看到的数据权限 - /*List auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 102).collect(Collectors.toList()); + } + } else if (deptId == 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); @@ -855,15 +853,14 @@ public class TmTaskServiceImpl implements TmTaskService { leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails); // 存入领料任务实体集合 tmTask.setLeaseApplyInfoList(auditListByLeaseInfo); - + tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1))); + tmTask.setRemark(collect.get(0).getRemark()); } } } - }*/ - } else if (deptId == deptId1) { - tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1))); - tmTask.setRemark(collect.get(0).getRemark());//其他各分公司可以看到的自己部门的数据 - /*// 对领料任务集合查询具体详情 + } + } else if (deptId == deptId1) { //其他各分公司可以看到的自己部门的数据 + // 对领料任务集合查询具体详情 for (LeaseApplyInfo leaseApplyInfo : collect) { if (leaseApplyInfo != null) { // 去查询领料任务详情表 @@ -879,14 +876,13 @@ public class TmTaskServiceImpl implements TmTaskService { leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails); // 存入领料任务实体集合 tmTask.setLeaseApplyInfoList(collect); - + tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1))); + tmTask.setRemark(collect.get(0).getRemark()); } } - }*/ + } } else if (roles.contains("sgb")) { - tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1))); - tmTask.setRemark(collect.get(0).getRemark()); - /*// 对领料任务集合查询具体详情 + // 对领料任务集合查询具体详情 List auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 101).collect(Collectors.toList()); if (deptId1 == 210) { List list1 = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 102).collect(Collectors.toList()); @@ -909,16 +905,17 @@ public class TmTaskServiceImpl implements TmTaskService { leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails); // 存入领料任务实体集合 tmTask.setLeaseApplyInfoList(auditListByLeaseInfo); - + tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1))); + tmTask.setRemark(collect.get(0).getRemark()); } } } - }*/ + } } } } - //tmTask.setPreCountNum(count); + tmTask.setPreCountNum(count); } List tmTasks = tmTaskList.stream().filter(t -> t.getLeaseApplyInfoList() != null).collect(Collectors.toList()); return tmTasks;