测试问题项修改
This commit is contained in:
parent
a072242325
commit
f0db05ce34
|
|
@ -625,17 +625,71 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
if (tmTask != null) {
|
if (tmTask != null) {
|
||||||
// 去查询任务分单表
|
// 去查询任务分单表
|
||||||
List<LeaseApplyInfo> collect = tmTaskMapper.getAuditManageListByLeaseInfo(tmTask);
|
List<LeaseApplyInfo> collect = tmTaskMapper.getAuditManageListByLeaseInfo(tmTask);
|
||||||
int deptId1 = tmTaskMapper.getDeptId(collect.get(0).getCreateBy());
|
if (collect != null) {
|
||||||
//施管部只能看到机具分公司(101)的数据
|
int deptId1 = tmTaskMapper.getDeptId(collect.get(0).getCreateBy());
|
||||||
if (deptId == 101) {
|
//施管部只能看到机具分公司(101)的数据
|
||||||
List<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 101).collect(Collectors.toList());
|
if (deptId == 101) {
|
||||||
if (deptId1 == 101) {
|
List<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 101).collect(Collectors.toList());
|
||||||
List<LeaseApplyInfo> applyInfoList = collect.stream().filter(t -> t.getCompanyId() != null).filter(t -> t.getCompanyId() == 102).collect(Collectors.toList());
|
if (deptId1 == 101) {
|
||||||
auditListByLeaseInfo.addAll(applyInfoList);
|
List<LeaseApplyInfo> 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) {
|
||||||
|
if (leaseApplyInfo != null) {
|
||||||
|
// 去查询领料任务详情表
|
||||||
|
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
||||||
|
if (leaseApplyDetails.size() > 0) {
|
||||||
|
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||||
|
if (leaseApplyDetail != null && leaseApplyDetail.getPreNum() != null) {
|
||||||
|
// 统计预领数量
|
||||||
|
count += leaseApplyDetail.getPreNum();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 塞入领料任务详情的集合中
|
||||||
|
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||||
|
// 存入领料任务实体集合
|
||||||
|
tmTask.setLeaseApplyInfoList(auditListByLeaseInfo);
|
||||||
|
tmTask.setRemark(collect.get(0).getRemark());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) {
|
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);
|
||||||
|
}
|
||||||
|
if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) {
|
||||||
|
// 对领料任务集合查询具体详情
|
||||||
|
for (LeaseApplyInfo leaseApplyInfo : auditListByLeaseInfo) {
|
||||||
|
if (leaseApplyInfo != null) {
|
||||||
|
// 去查询领料任务详情表
|
||||||
|
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
||||||
|
if (leaseApplyDetails.size() > 0) {
|
||||||
|
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||||
|
if (leaseApplyDetail != null && leaseApplyDetail.getPreNum() != null) {
|
||||||
|
// 统计预领数量
|
||||||
|
count += leaseApplyDetail.getPreNum();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 塞入领料任务详情的集合中
|
||||||
|
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||||
|
// 存入领料任务实体集合
|
||||||
|
tmTask.setLeaseApplyInfoList(auditListByLeaseInfo);
|
||||||
|
tmTask.setRemark(collect.get(0).getRemark());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//只能查詢改部門下的數據
|
||||||
|
if (deptId == deptId1) {
|
||||||
// 对领料任务集合查询具体详情
|
// 对领料任务集合查询具体详情
|
||||||
for (LeaseApplyInfo leaseApplyInfo : auditListByLeaseInfo) {
|
for (LeaseApplyInfo leaseApplyInfo : collect) {
|
||||||
if (leaseApplyInfo != null) {
|
if (leaseApplyInfo != null) {
|
||||||
// 去查询领料任务详情表
|
// 去查询领料任务详情表
|
||||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
||||||
|
|
@ -649,65 +703,13 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
// 塞入领料任务详情的集合中
|
// 塞入领料任务详情的集合中
|
||||||
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||||
// 存入领料任务实体集合
|
// 存入领料任务实体集合
|
||||||
tmTask.setLeaseApplyInfoList(auditListByLeaseInfo);
|
tmTask.setLeaseApplyInfoList(collect);
|
||||||
tmTask.setRemark(collect.get(0).getRemark());
|
tmTask.setRemark(collect.get(0).getRemark());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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);
|
|
||||||
}
|
|
||||||
if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) {
|
|
||||||
// 对领料任务集合查询具体详情
|
|
||||||
for (LeaseApplyInfo leaseApplyInfo : auditListByLeaseInfo) {
|
|
||||||
if (leaseApplyInfo != null) {
|
|
||||||
// 去查询领料任务详情表
|
|
||||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
|
||||||
if (leaseApplyDetails.size() > 0) {
|
|
||||||
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
|
||||||
if (leaseApplyDetail != null && leaseApplyDetail.getPreNum() != null) {
|
|
||||||
// 统计预领数量
|
|
||||||
count += leaseApplyDetail.getPreNum();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 塞入领料任务详情的集合中
|
|
||||||
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
|
||||||
// 存入领料任务实体集合
|
|
||||||
tmTask.setLeaseApplyInfoList(auditListByLeaseInfo);
|
|
||||||
tmTask.setRemark(collect.get(0).getRemark());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//只能查詢改部門下的數據
|
|
||||||
if (deptId == deptId1) {
|
|
||||||
// 对领料任务集合查询具体详情
|
|
||||||
for (LeaseApplyInfo leaseApplyInfo : collect) {
|
|
||||||
if (leaseApplyInfo != null) {
|
|
||||||
// 去查询领料任务详情表
|
|
||||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
|
||||||
if (leaseApplyDetails.size() > 0) {
|
|
||||||
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
|
||||||
if (leaseApplyDetail != null && leaseApplyDetail.getPreNum() != null) {
|
|
||||||
// 统计预领数量
|
|
||||||
count += leaseApplyDetail.getPreNum();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 塞入领料任务详情的集合中
|
|
||||||
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
|
||||||
// 存入领料任务实体集合
|
|
||||||
tmTask.setLeaseApplyInfoList(collect);
|
|
||||||
tmTask.setRemark(collect.get(0).getRemark());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
tmTask.setPreCountNum(count);
|
tmTask.setPreCountNum(count);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue