Parcourir la source

变更令下达修改支付比例2

qianxb il y a 1 an
Parent
commit
66869b9916

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MiddleMeterApplyMapper.xml

@@ -137,7 +137,7 @@
                       and contract_meter_id = #{nodeId} and contract_form_id = ifa.contract_form_id and id != ifa.id),0)) as otherMeterTotal,
                (IFNULL((select sum(current_meter_total) from s_inventory_form_apply where is_deleted = 0
                       and contract_meter_id = #{nodeId} and contract_form_id = ifa.contract_form_id),0)) as allMeterTotal,
-               (IFNULL((select sum(pay_ratio) from s_inventory_form_apply where is_deleted = 0
+               (IFNULL((select sum(pay_ratio) from s_inventory_form_apply ifa2 where is_deleted = 0 and ifa2.id != ifa.id
                       and contract_meter_id = #{nodeId} and contract_form_id = ifa.contract_form_id),0)) as otherPayRatio,
                (select up_pay_ratio from s_inventory_form_meter where is_deleted = 0
                       and contract_meter_id = #{nodeId} and contract_form_id = ifa.contract_form_id) as upPayRatio