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 d5d07551..f8b95212 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
@@ -900,6 +900,9 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
backApplyInfo.setAgreementId(agreementId);
listL4 = mapper.getUseTypeTreeL4(backApplyInfo);
if (!CollectionUtils.isEmpty(listL4)) {
+ listL4 = listL4.stream()
+ .filter(item -> StringUtils.isNotBlank(item.getMaterialName()) && StringUtils.isNotBlank(item.getTypeName()))
+ .collect(Collectors.toList());
// 将listL5中typeId相同的数据进行num相加
for (TypeTreeNode node : listL4) {
// 根据node中的typeId查询listL5中相同数据,如果在listL5中存在,则将num相加,反之将node添加到list5中
diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialLeaseInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialLeaseInfoMapper.xml
index d549dbbd..ca8b9bdd 100644
--- a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialLeaseInfoMapper.xml
+++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialLeaseInfoMapper.xml
@@ -857,7 +857,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt.unit_name as unitName,
mt.unit_value as unitValue,
mt.manage_type as manageType,
- SUM( CASE WHEN sai.agreement_id = #{agreementId} AND sai.STATUS = '0' THEN sai.num ELSE 0 END ) AS num,
+ SUM( CASE WHEN sai.agreement_id = #{agreementId} THEN sai.num ELSE 0 END ) AS num,
mt.LEVEL as level
FROM
ma_type mt
@@ -865,7 +865,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0'
WHERE
EXISTS ( SELECT 1 FROM clz_slt_agreement_info sai2 WHERE sai2.type_id = mt.type_id AND sai2.agreement_id = #{agreementId}
- AND sai2.STATUS = '0' and IFNULL(sai.lease_type,0) = 0 and sai2.num > 0)
+ AND IFNULL(sai.lease_type,0) = 0 AND sai2.num > 0)
GROUP BY
mt.type_id
diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
index 867414f2..3059c997 100644
--- a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
+++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
@@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and mt.type_name like concat('%', #{maModel}, '%')
GROUP BY
- mm.ma_code
+ mm.ma_id