diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml index 348a80b..fe9b626 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml @@ -682,8 +682,8 @@ back_apply_details bad LEFT JOIN back_apply_info bai on bai.id=bad.parent_id LEFT JOIN tm_task_agreement tta on tta.task_id=bai.task_id - LEFT JOIN (select agreement_id, sum(IFNULL(num, 0)) as num from slt_agreement_info where status=0 - group by agreement_id) sai on tta.agreement_id=sai.agreement_id + LEFT JOIN (select agreement_id,type_id, sum(IFNULL(num, 0)) as num from slt_agreement_info where status=0 + group by agreement_id,type_id) sai on tta.agreement_id=sai.agreement_id and sai.type_id=bad.type_id LEFT JOIN ma_type mt on mt.type_id=bad.type_id LEFT JOIN ma_type mt2 ON mt2.type_id=mt.parent_id LEFT JOIN ma_type_keeper mtk on mt.type_id=mtk.type_id