select thisTab.id, thisTab.fee_type, thisTab.finance_id, thisTab.finance_type, thisTab.dispatch_order_id, thisTab.data_source, thisTab.create_id, thisTab.initial_fee_amount, thisTab.actual_fee_amount, thisTab.fee_voucher_url, thisTab.fee_create_time, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time from tms_finance_detail AS thisTab
select count(0) from tms_finance_detail as thisTab
and thisTab.fee_type = #{feeType}
and thisTab.finance_id = #{financeId}
and thisTab.finance_type = #{financeType}
and thisTab.dispatch_order_id = #{dispatchOrderId}
and thisTab.data_source = #{dataSource}
and thisTab.create_id = #{createId}
and thisTab.initial_fee_amount = #{initialFeeAmount}
and thisTab.actual_fee_amount = #{actualFeeAmount}
and thisTab.fee_voucher_url = #{feeVoucherUrl}
and thisTab.fee_create_time = #{feeCreateTime}
insert into tms_finance_detail
fee_type,
finance_id,
finance_type,
dispatch_order_id,
data_source,
create_id,
initial_fee_amount,
actual_fee_amount,
fee_voucher_url,
fee_create_time,
create_by,
create_time,
update_by,
update_time,
#{feeType},
#{financeId},
#{financeType},
#{dispatchOrderId},
#{dataSource},
#{createId},
#{initialFeeAmount},
#{actualFeeAmount},
#{feeVoucherUrl},
#{feeCreateTime},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
insert into tms_finance_detail
id,fee_type,finance_id,finance_type,dispatch_order_id,data_source,create_id,initial_fee_amount,actual_fee_amount,fee_voucher_url,fee_create_time,create_by,create_time,update_by,update_time,
#{item.id},#{item.feeType},#{item.financeId},#{item.financeType},#{item.dispatchOrderId},#{item.dataSource},#{item.createId},#{item.initialFeeAmount},#{item.actualFeeAmount},#{item.feeVoucherUrl},#{item.feeCreateTime},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},
update tms_finance_detail
fee_type = #{feeType},
finance_id = #{financeId},
finance_type = #{financeType},
dispatch_order_id = #{dispatchOrderId},
data_source = #{dataSource},
create_id = #{createId},
initial_fee_amount = #{initialFeeAmount},
actual_fee_amount = #{actualFeeAmount},
fee_voucher_url = #{feeVoucherUrl},
fee_create_time = #{feeCreateTime},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
where id = #{id}
update tms_finance_detail
fee_type = #{item.feeType},
finance_id = #{item.financeId},
finance_type = #{item.financeType},
dispatch_order_id = #{item.dispatchOrderId},
data_source = #{item.dataSource},
create_id = #{item.createId},
initial_fee_amount = #{item.initialFeeAmount},
actual_fee_amount = #{item.actualFeeAmount},
fee_voucher_url = #{item.feeVoucherUrl},
fee_create_time = #{item.feeCreateTime},
create_by = #{item.createBy},
create_time = #{item.createTime},
update_by = #{item.updateBy},
update_time = #{item.updateTime},
where id = #{item.id}
delete from tms_finance_detail where id = #{id}
delete from tms_finance_detail where id in
#{id}