This commit is contained in:
parent
8991bad2e4
commit
877e89b24a
|
|
@ -779,7 +779,9 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
int deptId1 = tmTaskMapper.getDeptId(collect.get(0).getCreateBy());
|
||||
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) {
|
||||
// 去查询领料任务详情表
|
||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
||||
|
|
@ -794,13 +796,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) { //机具经理、书记、副经理查看数据
|
||||
List<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 101).collect(Collectors.toList());
|
||||
}*/
|
||||
} else if (deptId == 101) {
|
||||
tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1)));
|
||||
tmTask.setRemark(collect.get(0).getRemark());//机具经理、书记、副经理查看数据
|
||||
/*List<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 101).collect(Collectors.toList());
|
||||
if (deptId1 == 101) {
|
||||
List<LeaseApplyInfo> applyInfoList = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 102).collect(Collectors.toList());
|
||||
auditListByLeaseInfo.addAll(applyInfoList);
|
||||
|
|
@ -823,14 +825,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) { // 调试公司可以看到的数据权限
|
||||
List<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 102).collect(Collectors.toList());
|
||||
}*/
|
||||
} else if (deptId == 102) {
|
||||
tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1)));
|
||||
tmTask.setRemark(collect.get(0).getRemark());// 调试公司可以看到的数据权限
|
||||
/*List<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 102).collect(Collectors.toList());
|
||||
if (deptId1 == 102) {
|
||||
List<LeaseApplyInfo> list2 = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 101).collect(Collectors.toList());
|
||||
auditListByLeaseInfo.addAll(list2);
|
||||
|
|
@ -853,14 +855,15 @@ 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) { //其他各分公司可以看到的自己部门的数据
|
||||
// 对领料任务集合查询具体详情
|
||||
}*/
|
||||
} else if (deptId == deptId1) {
|
||||
tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1)));
|
||||
tmTask.setRemark(collect.get(0).getRemark());//其他各分公司可以看到的自己部门的数据
|
||||
/*// 对领料任务集合查询具体详情
|
||||
for (LeaseApplyInfo leaseApplyInfo : collect) {
|
||||
if (leaseApplyInfo != null) {
|
||||
// 去查询领料任务详情表
|
||||
|
|
@ -876,13 +879,14 @@ 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<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 101).collect(Collectors.toList());
|
||||
if (deptId1 == 210) {
|
||||
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);
|
||||
// 存入领料任务实体集合
|
||||
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());
|
||||
return tmTasks;
|
||||
|
|
|
|||
Loading…
Reference in New Issue