This commit is contained in:
mashuai 2025-04-15 11:30:39 +08:00
parent 8991bad2e4
commit 877e89b24a
1 changed files with 27 additions and 24 deletions

View File

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