diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml index a038784e..c311fd1e 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml @@ -212,14 +212,14 @@ 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(sai.num) AS num, mt.LEVEL as level FROM ma_type mt LEFT JOIN slt_agreement_info sai ON mt.type_id = sai.type_id LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0' WHERE - sai.STATUS = '0' + sai.STATUS = '0' and sai.agreement_id = #{agreementId} GROUP BY mt.type_id HAVING num> 0