|
@@ -81,6 +81,20 @@
|
|
from s_inventory_form_apply ifa left join s_contract_inventory_form cif on ifa.contract_form_id = cif.id
|
|
from s_inventory_form_apply ifa left join s_contract_inventory_form cif on ifa.contract_form_id = cif.id
|
|
WHERE ifa.contract_id = #{apply.contractId} and ifa.contract_period_id =#{apply.contractPeriodId} and ifa.is_deleted = 0
|
|
WHERE ifa.contract_id = #{apply.contractId} and ifa.contract_period_id =#{apply.contractPeriodId} and ifa.is_deleted = 0
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="getById" resultType="org.springblade.meter.vo.MiddleMeterApplyVO">
|
|
|
|
+ select *
|
|
|
|
+ from s_middle_meter_apply where id = #{id}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="getForm" resultType="org.springblade.meter.vo.MeterInventoryVO">
|
|
|
|
+ select cif.id,cif.form_number,cif.form_name,cif.current_price,cif.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 resolveTotal,
|
|
|
|
+ ifa.current_meter_total as currentMeterTotal,0 as containChangeTotal,
|
|
|
|
+ ifa.current_meter_money as currentMeterMoney,
|
|
|
|
+ (IFNULL((select sum(current_meter_total) from s_inventory_form_apply where is_deleted = 0 and contract_form_id = cif.id),0)) as allMeterTotal
|
|
|
|
+ from s_inventory_form_apply ifa left join s_contract_inventory_form cif on ifa.contract_form_id = cif.id
|
|
|
|
+ where ifa.contract_id = #{contractId} and ifa.is_deleted = 0
|
|
|
|
+ AND ifa.middle_meter_id = #{id}
|
|
|
|
+ </select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|