diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java index dfa2db03..02bda9d5 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java @@ -164,7 +164,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { List list = leaseApplyInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo); // 如果statusList包含3、4、5,则为领料出库查询,需查询领用出库数据,进行拼接 if (leaseApplyInfo.getStatusList() != null && leaseApplyInfo.getStatusList().contains(3) - && leaseApplyInfo.getStatusList().contains(4) && leaseApplyInfo.getStatusList().contains(5)) { + || leaseApplyInfo.getStatusList().contains(4) || leaseApplyInfo.getStatusList().contains(5)) { // 查询领用出库数据 List leaseApplyOutList = leaseApplyInfoMapper.selectPublishList(leaseApplyInfo); if (!CollectionUtils.isEmpty(leaseApplyOutList)) { @@ -192,6 +192,13 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { .filter(item -> containsKeyword(item, keyWord)) .collect(Collectors.toList()); } + // 判断状态 + if (!CollectionUtils.isEmpty(leaseApplyInfo.getStatusList())) { + // 将集合sortedList中状态taskStatus包含在leaseApplyInfo.getStatusList()中的元素 + sortedList = sortedList.stream() + .filter(item -> leaseApplyInfo.getStatusList().contains(item.getTaskStatus())) + .collect(Collectors.toList()); + } } return sortedList; } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml index 7699ca89..6ee649a4 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml @@ -282,6 +282,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND mt1.del_flag = '0' LEFT JOIN bm_agreement_info bai ON lpd.unit_id = bai.unit_id AND lpd.project_id = bai.project_id + where 1 = 1 + + + GROUP BY lpd.publish_task ORDER BY