|
@@ -81,7 +81,11 @@
|
|
|
<select id="getContrFormAllByContrId" resultType="org.springblade.meter.vo.ContractFromVO">
|
|
|
select x.*,contract_total-poseNum as residueNum from (
|
|
|
select id,form_number,form_name,current_price,contract_total,change_total,
|
|
|
- (SELECT build_picture_total from s_inventory_form_meter a where is_deleted=0 and a.contract_id=u.contract_id and a.contract_form_id=u.id) as poseNum,is_supplement
|
|
|
+ (SELECT sum(build_picture_total) from s_inventory_form_meter a where is_deleted=0 and a.contract_id=u.contract_id and a.contract_form_id=u.id
|
|
|
+ <if test="type==2">
|
|
|
+ and contract_meter_id=#{meterId}
|
|
|
+ </if>
|
|
|
+ ) as poseNum,is_supplement
|
|
|
from s_contract_inventory_form u
|
|
|
where contract_id = #{contractId} and is_deleted = 0
|
|
|
<if test="formNum != null and formNum != '' and type==1">
|