parent
de10862bf7
commit
aeec8abf41
|
|
@ -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> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
||||
|
|
@ -796,13 +794,13 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||
// 存入领料任务实体集合
|
||||
tmTask.setLeaseApplyInfoList(collect);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
} 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());
|
||||
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());
|
||||
if (deptId1 == 101) {
|
||||
List<LeaseApplyInfo> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
} 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());
|
||||
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());
|
||||
if (deptId1 == 102) {
|
||||
List<LeaseApplyInfo> 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);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
} else if (deptId == 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) {
|
||||
if (leaseApplyInfo != null) {
|
||||
// 去查询领料任务详情表
|
||||
|
|
@ -879,14 +876,13 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||
// 存入领料任务实体集合
|
||||
tmTask.setLeaseApplyInfoList(collect);
|
||||
|
||||
}
|
||||
}
|
||||
}*/
|
||||
} else if (roles.contains("sgb")) {
|
||||
tmTask.setDeptId(Long.parseLong(String.valueOf(deptId1)));
|
||||
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());
|
||||
if (deptId1 == 210) {
|
||||
List<LeaseApplyInfo> 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<TmTask> tmTasks = tmTaskList.stream().filter(t -> t.getLeaseApplyInfoList() != null).collect(Collectors.toList());
|
||||
return tmTasks;
|
||||
|
|
|
|||
Loading…
Reference in New Issue