|
@@ -40,7 +40,11 @@
|
|
|
<select id="getFormList" resultType="org.springblade.meter.vo.ResolveInventoryVO">
|
|
|
select id,form_number,form_name,current_price,contract_total,change_total,
|
|
|
change_total as buildChangeTotal,
|
|
|
- (change_total - IFNULL((select sum(build_picture_total) from s_inventory_form_meter where is_deleted = 0 and contract_form_id = cif.id),0)) as resolveResidueTotal
|
|
|
+ (change_total - IFNULL((select sum(build_picture_total) from s_inventory_form_meter where is_deleted = 0 and contract_form_id = cif.id),0)) as resolveResidueTotal,
|
|
|
+ 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
|
|
|
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=")">
|