select thisTab.id, thisTab.system_no, thisTab.bill_name, thisTab.customer_id, thisTab.customer_name, thisTab.settle_amount, thisTab.settle_rate, thisTab.dispatch_count, thisTab.settled_amount, thisTab.invoice_status, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time from tms_ar_bill AS thisTab select count(0) from tms_ar_bill as thisTab and thisTab.system_no = #{systemNo} and thisTab.bill_name like concat('%', #{billName}, '%') and thisTab.customer_name like concat('%', #{customerName}, '%') and thisTab.settle_amount = #{settleAmount} and thisTab.settle_rate = #{settleRate} and thisTab.dispatch_count = #{dispatchCount} and thisTab.settled_amount = #{settledAmount} and thisTab.invoice_status = #{invoiceStatus} and thisTab.customer_id = #{customerId} and thisTab.status = #{status} insert into tms_ar_bill system_no, bill_name, customer_name, settle_amount, settle_rate, dispatch_count, settled_amount, invoice_status, status, create_by, create_time, update_by, update_time, customer_id, #{systemNo}, #{billName}, #{customerName}, #{settleAmount}, #{settleRate}, #{dispatchCount}, #{settledAmount}, #{invoiceStatus}, #{status}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{customerId}, insert into tms_ar_bill id,system_no,bill_name,customer_name,settle_amount,settle_rate,dispatch_count,settled_amount,invoice_status,status,create_by,create_time,update_by,update_time,customer_id, #{item.id},#{item.systemNo},#{item.billName},#{item.customerName},#{item.settleAmount},#{item.settleRate},#{item.dispatchCount},#{item.settledAmount},#{item.invoiceStatus},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.customerId}, update tms_ar_bill system_no = #{systemNo}, bill_name = #{billName}, customer_name = #{customerName}, settle_amount = #{settleAmount}, settle_rate = #{settleRate}, dispatch_count = #{dispatchCount}, settled_amount = #{settledAmount}, invoice_status = #{invoiceStatus}, status = #{status}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, customer_id = #{customerId}, where id = #{id} update tms_ar_bill system_no = #{item.systemNo}, bill_name = #{item.billName}, customer_name = #{item.customerName}, settle_amount = #{item.settleAmount}, settle_rate = #{item.settleRate}, dispatch_count = #{item.dispatchCount}, settled_amount = #{item.settledAmount}, invoice_status = #{item.invoiceStatus}, status = #{item.status}, create_by = #{item.createBy}, create_time = #{item.createTime}, update_by = #{item.updateBy}, update_time = #{item.updateTime}, customer_id = #{item.customerId}, where id = #{item.id} delete from tms_ar_bill where id = #{id} delete from tms_ar_bill where id in #{id}