This commit is contained in:
mashuai 2025-08-06 09:12:38 +08:00
parent e7e694735d
commit 342f27cfc8
1 changed files with 2 additions and 2 deletions

View File

@ -212,14 +212,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt.unit_name as unitName, mt.unit_name as unitName,
mt.unit_value as unitValue, mt.unit_value as unitValue,
mt.manage_type as manageType, 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 mt.LEVEL as level
FROM FROM
ma_type mt ma_type mt
LEFT JOIN slt_agreement_info sai ON mt.type_id = sai.type_id 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' LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0'
WHERE WHERE
sai.STATUS = '0' sai.STATUS = '0' and sai.agreement_id = #{agreementId}
GROUP BY GROUP BY
mt.type_id mt.type_id
HAVING num> 0 HAVING num> 0