|
@@ -44,7 +44,9 @@
|
|
|
IFNULL((select sum(change_build_picture_total) from s_inventory_form_meter where is_deleted = 0
|
|
|
and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0) as ChangeTotal2,
|
|
|
IFNULL((select sum(current_meter_total) from s_inventory_form_apply where is_deleted = 0
|
|
|
- and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0) as allMeterTotal
|
|
|
+ and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0) as allMeterTotal,
|
|
|
+ IFNULL((select sum(current_meter_money) from s_inventory_form_apply where is_deleted = 0
|
|
|
+ and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0) as allMeterMoney
|
|
|
from s_contract_inventory_form cif where contract_id = #{contractId} and is_deleted = 0 and is_form_node = 1
|
|
|
AND id in
|
|
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
@@ -65,7 +67,9 @@
|
|
|
and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0) as resolveTotal,
|
|
|
0 as currentMeterTotal,0 as containChangeTotal,0 as currentMeterMoney,
|
|
|
(IFNULL((select sum(current_meter_total) from s_inventory_form_apply where is_deleted = 0
|
|
|
- and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0)) as allMeterTotal
|
|
|
+ and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0)) as allMeterTotal,
|
|
|
+ (IFNULL((select sum(current_meter_money) from s_inventory_form_apply where is_deleted = 0
|
|
|
+ and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0)) as allMeterMoney
|
|
|
from s_contract_inventory_form cif where contract_id = #{contractId} and is_deleted = 0 and is_form_node = 1
|
|
|
AND id in
|
|
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|