|
@@ -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
|