diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialLeaseInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialLeaseInfoServiceImpl.java index 070fd2fa..d5d07551 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialLeaseInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialLeaseInfoServiceImpl.java @@ -969,10 +969,9 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService { } if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(listL5)) { for (TypeTreeNode node : listL5) { - // 根据协议id以及typeId查询在用量 - if (bean.getAgreementId() != null) { - // 根据工程和班组id查询协议id - BmAgreementInfo info = materialLeaseInfoMapper.getAgreeId(bean); + // 根据工程和班组id查询协议id + BmAgreementInfo info = materialLeaseInfoMapper.getAgreeId(bean); + if (info != null) { Type maType = new Type(); maType.setAgreementId(info.getAgreementId()); maType.setTypeId(node.getTypeId());