领料通过代码优化

This commit is contained in:
liang.chao 2024-05-15 10:29:51 +08:00
parent 244c850889
commit 47628f51c1
1 changed files with 25 additions and 24 deletions

View File

@ -92,7 +92,8 @@ public class TmTaskServiceImpl implements TmTaskService {
// 再审核领料任务信息表
List<LeaseApplyInfo> leaseApplyInfoList = record.getLeaseApplyInfoList();
if (CollUtil.isNotEmpty(leaseApplyInfoList)) {
Integer companyId1 = leaseApplyInfoList.get(0).getCompanyId();
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
Integer companyId1 = leaseApplyInfo.getCompanyId();
List<LeaseApplyInfo> applyInfoList = new ArrayList<>();
if (companyId1 != null && companyId1 == 101) {
applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(101)).collect(Collectors.toList());
@ -100,11 +101,11 @@ public class TmTaskServiceImpl implements TmTaskService {
applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(102)).collect(Collectors.toList());
}
if (CollUtil.isNotEmpty(applyInfoList)) {
for (LeaseApplyInfo leaseApplyInfo : applyInfoList) {
taskId = leaseApplyInfo.getTaskId();
if (leaseApplyInfo != null) {
for (LeaseApplyInfo applyInfo : applyInfoList) {
taskId = applyInfo.getTaskId();
//leaseApplyInfo.setExamineStatusId(record.getExamineStatusId());
result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(leaseApplyInfo);
result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(applyInfo);
}
}
}
@ -138,7 +139,8 @@ public class TmTaskServiceImpl implements TmTaskService {
// 再审核领料任务信息表
List<LeaseApplyInfo> leaseApplyInfoList = record.getLeaseApplyInfoList();
if (CollUtil.isNotEmpty(leaseApplyInfoList)) {
Integer companyId1 = leaseApplyInfoList.get(0).getCompanyId();
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
Integer companyId1 = leaseApplyInfo.getCompanyId();
List<LeaseApplyInfo> applyInfoList = new ArrayList<>();
if (companyId1 != null && companyId1 == 101) {
applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(101)).collect(Collectors.toList());
@ -146,11 +148,10 @@ public class TmTaskServiceImpl implements TmTaskService {
applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(102)).collect(Collectors.toList());
}
if (CollUtil.isNotEmpty(applyInfoList)) {
for (LeaseApplyInfo leaseApplyInfo : applyInfoList) {
taskId = leaseApplyInfo.getTaskId();
if (leaseApplyInfo != null) {
for (LeaseApplyInfo applyInfo : applyInfoList) {
taskId = applyInfo.getTaskId();
//leaseApplyInfo.setExamineStatusId(record.getExamineStatusId());
result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(leaseApplyInfo);
result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(applyInfo);
}
}
}