(select case when max(receipt_progress) is null then 1 else max(receipt_progress)+1 end as receipt_progress from tb_receipt where tb_receipt.contract_unid=#{contract_unid})
</when>
<otherwise>
#{receipt_progress}
</otherwise>
</choose>
,#{receipt_amount},#{oa_flow_id},
<iftest="receipt_note !=null and receipt_note !=''">
<iftest="reback_progress !=null and reback_progress !=''">
reback_progress,
</if>
<iftest="reback_date !=null">
reback_date,
</if>
...
...
@@ -17,9 +15,12 @@
)
values (
#{contract_unid},
<iftest="reback_progress !=null and reback_progress !=''">
<iftest="reback_progress !=null">
#{reback_progress},
</if>
<iftest="reback_progress ==null">
(select case when max(reback_progress) is null then 1 else max(reback_progress)+1 end as reback_progress from tb_return_info where tb_return_info.contract_unid=#{contract_unid}),