|
@@ -78,11 +78,13 @@
|
|
|
<select id="getAllForm" resultType="org.springblade.meter.entity.ContractInventoryForm">
|
|
|
select cif.id,cif.current_price,
|
|
|
IFNULL((select sum(build_picture_total) from s_inventory_form_meter ifm
|
|
|
- where ifm.contract_id = #{contractId} and ifm.is_deleted = 0 and ifm.contract_form_id = cif.id),0) as build_change_total
|
|
|
+ where ifm.contract_id = #{contractId} and ifm.is_deleted = 0 and ifm.contract_form_id = cif.id),0) as build_change_total,
|
|
|
+ IFNULL((select sum(change_build_picture_total) from s_inventory_form_meter ifm
|
|
|
+ where ifm.contract_id = #{contractId} and ifm.is_deleted = 0 and ifm.contract_form_id = cif.id),0) as changeTotal
|
|
|
from s_contract_inventory_form cif
|
|
|
where id in
|
|
|
(select contract_form_id from s_inventory_form_meter
|
|
|
- where contract_id = #{contractId} group by contract_form_id)
|
|
|
+ where contract_id = #{contractId} and is_deleted = 0 group by contract_form_id)
|
|
|
</select>
|
|
|
<select id="getZeroChange" resultType="org.springblade.meter.vo.ZeroChangeVO">
|
|
|
select id,form_number,form_name,current_price,contract_total,contract_money,
|