diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java index 075de9e8..a53e32cf 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java @@ -133,6 +133,15 @@ public class ClzSltAgreementInfoServiceImpl implements ClzSltAgreementInfoServic if (proId == null || !unsettledProjectIds.contains(proId)) { iterator.remove(); + continue; + } + // 根据工程去机具协议表查询关联协议数据 + List agreementIdList = mapper.getAgreementId(info.getProId()); + // 根据工程去材料站协议表查询关联协议数据 + List storageAgreementIdList = mapper.getStorageAgreementId(info.getProId()); + // 如果获取的协议数据为空,则移除该行数据 + if (com.alibaba.nacos.common.utils.CollectionUtils.isEmpty(agreementIdList) && com.alibaba.nacos.common.utils.CollectionUtils.isEmpty(storageAgreementIdList)) { + iterator.remove(); } } }