select thisTab.id, thisTab.system_no, thisTab.bill_payable_id, thisTab.bill_payable_no, thisTab.dispatch_id, thisTab.dispatch_no, thisTab.service_provider_id, thisTab.service_provider_name, thisTab.service_provider_type, thisTab.project_id, thisTab.project_name, thisTab.payable_rmb_amount, thisTab.payable_hkb_amount, thisTab.dispatch_confirm_time, thisTab.cost_generate_time, thisTab.status, thisTab.create_time, thisTab.create_by, thisTab.update_by, thisTab.update_time from tms_payable_fee AS thisTab
select count(0) from tms_payable_fee as thisTab
and thisTab.system_no = #{systemNo}
and thisTab.bill_payable_id = #{billPayableId}
and thisTab.bill_payable_no = #{billPayableNo}
and thisTab.dispatch_id = #{dispatchId}
and thisTab.dispatch_no = #{dispatchNo}
and thisTab.service_provider_id = #{serviceProviderId}
and thisTab.service_provider_name like concat('%', #{serviceProviderName}, '%')
and thisTab.service_provider_type = #{serviceProviderType}
and thisTab.project_id = #{projectId}
and thisTab.project_name like concat('%', #{projectName}, '%')
and thisTab.payable_rmb_amount = #{payableRmbAmount}
and thisTab.payable_hkb_amount = #{payableHkbAmount}
and thisTab.dispatch_confirm_time = #{dispatchConfirmTime}
and thisTab.cost_generate_time = #{costGenerateTime}
and thisTab.status = #{status}
insert into tms_payable_fee
system_no,
bill_payable_id,
bill_payable_no,
dispatch_id,
dispatch_no,
service_provider_id,
service_provider_name,
service_provider_type,
project_id,
project_name,
payable_rmb_amount,
payable_hkb_amount,
dispatch_confirm_time,
cost_generate_time,
status,
create_time,
create_by,
update_by,
update_time,
#{systemNo},
#{billPayableId},
#{billPayableNo},
#{dispatchId},
#{dispatchNo},
#{serviceProviderId},
#{serviceProviderName},
#{serviceProviderType},
#{projectId},
#{projectName},
#{payableRmbAmount},
#{payableHkbAmount},
#{dispatchConfirmTime},
#{costGenerateTime},
#{status},
#{createTime},
#{createBy},
#{updateBy},
#{updateTime},
insert into tms_payable_fee
id,system_no,bill_payable_id,bill_payable_no,dispatch_id,dispatch_no,service_provider_id,service_provider_name,service_provider_type,project_id,project_name,payable_rmb_amount,payable_hkb_amount,dispatch_confirm_time,cost_generate_time,status,create_time,create_by,update_by,update_time,
#{item.id},#{item.systemNo},#{item.billPayableId},#{item.billPayableNo},#{item.dispatchId},#{item.dispatchNo},#{item.serviceProviderId},#{item.serviceProviderName},#{item.serviceProviderType},#{item.projectId},#{item.projectName},#{item.payableRmbAmount},#{item.payableHkbAmount},#{item.dispatchConfirmTime},#{item.costGenerateTime},#{item.status},#{item.createTime},#{item.createBy},#{item.updateBy},#{item.updateTime},
update tms_payable_fee
system_no = #{systemNo},
bill_payable_id = #{billPayableId},
bill_payable_no = #{billPayableNo},
dispatch_id = #{dispatchId},
dispatch_no = #{dispatchNo},
service_provider_id = #{serviceProviderId},
service_provider_name = #{serviceProviderName},
service_provider_type = #{serviceProviderType},
project_id = #{projectId},
project_name = #{projectName},
payable_rmb_amount = #{payableRmbAmount},
payable_hkb_amount = #{payableHkbAmount},
dispatch_confirm_time = #{dispatchConfirmTime},
cost_generate_time = #{costGenerateTime},
status = #{status},
create_time = #{createTime},
create_by = #{createBy},
update_by = #{updateBy},
update_time = #{updateTime},
where id = #{id}
update tms_payable_fee
system_no = #{item.systemNo},
bill_payable_id = #{item.billPayableId},
bill_payable_no = #{item.billPayableNo},
dispatch_id = #{item.dispatchId},
dispatch_no = #{item.dispatchNo},
service_provider_id = #{item.serviceProviderId},
service_provider_name = #{item.serviceProviderName},
service_provider_type = #{item.serviceProviderType},
project_id = #{item.projectId},
project_name = #{item.projectName},
payable_rmb_amount = #{item.payableRmbAmount},
payable_hkb_amount = #{item.payableHkbAmount},
dispatch_confirm_time = #{item.dispatchConfirmTime},
cost_generate_time = #{item.costGenerateTime},
status = #{item.status},
create_time = #{item.createTime},
create_by = #{item.createBy},
update_by = #{item.updateBy},
update_time = #{item.updateTime},
where id = #{item.id}
delete from tms_payable_fee where id = #{id}
delete from tms_payable_fee where id in
#{id}