select thisTab.id, thisTab.system_no, thisTab.bill_name, thisTab.supplier_name, thisTab.is_internal_settlement, thisTab.internal_settlement_unit, thisTab.document_count, thisTab.total_amount, thisTab.currency, thisTab.discount_amount, thisTab.paid_amount, thisTab.pending_amount, thisTab.exchange_rate, thisTab.cny_amount, thisTab.period_type, thisTab.business_start_date, thisTab.business_end_date, thisTab.billing_start_date, thisTab.billing_end_date, thisTab.bill_generate_date, thisTab.bill_send_date, thisTab.bill_due_date, thisTab.status, thisTab.remark, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.deleted from payable_bill_management AS thisTab select count(0) from payable_bill_management as thisTab and thisTab.system_no = #{systemNo} and thisTab.bill_name like concat('%', #{billName}, '%') and thisTab.supplier_name like concat('%', #{supplierName}, '%') and thisTab.is_internal_settlement = #{isInternalSettlement} and thisTab.internal_settlement_unit = #{internalSettlementUnit} and thisTab.document_count = #{documentCount} and thisTab.total_amount = #{totalAmount} and thisTab.currency = #{currency} and thisTab.discount_amount = #{discountAmount} and thisTab.paid_amount = #{paidAmount} and thisTab.pending_amount = #{pendingAmount} and thisTab.exchange_rate = #{exchangeRate} and thisTab.cny_amount = #{cnyAmount} and thisTab.period_type = #{periodType} and thisTab.business_start_date = #{businessStartDate} and thisTab.business_end_date = #{businessEndDate} and thisTab.billing_start_date = #{billingStartDate} and thisTab.billing_end_date = #{billingEndDate} and thisTab.bill_generate_date = #{billGenerateDate} and thisTab.bill_send_date = #{billSendDate} and thisTab.bill_due_date = #{billDueDate} and thisTab.status = #{status} and thisTab.deleted = #{deleted} insert into payable_bill_management system_no, bill_name, supplier_name, is_internal_settlement, internal_settlement_unit, document_count, total_amount, currency, discount_amount, paid_amount, pending_amount, exchange_rate, cny_amount, period_type, business_start_date, business_end_date, billing_start_date, billing_end_date, bill_generate_date, bill_send_date, bill_due_date, status, remark, create_by, create_time, update_by, update_time, deleted, #{systemNo}, #{billName}, #{supplierName}, #{isInternalSettlement}, #{internalSettlementUnit}, #{documentCount}, #{totalAmount}, #{currency}, #{discountAmount}, #{paidAmount}, #{pendingAmount}, #{exchangeRate}, #{cnyAmount}, #{periodType}, #{businessStartDate}, #{businessEndDate}, #{billingStartDate}, #{billingEndDate}, #{billGenerateDate}, #{billSendDate}, #{billDueDate}, #{status}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{deleted}, insert into payable_bill_management id,system_no,bill_name,supplier_name,is_internal_settlement,internal_settlement_unit,document_count,total_amount,currency,discount_amount,paid_amount,pending_amount,exchange_rate,cny_amount,period_type,business_start_date,business_end_date,billing_start_date,billing_end_date,bill_generate_date,bill_send_date,bill_due_date,status,remark,create_by,create_time,update_by,update_time,deleted, #{item.id},#{item.systemNo},#{item.billName},#{item.supplierName},#{item.isInternalSettlement},#{item.internalSettlementUnit},#{item.documentCount},#{item.totalAmount},#{item.currency},#{item.discountAmount},#{item.paidAmount},#{item.pendingAmount},#{item.exchangeRate},#{item.cnyAmount},#{item.periodType},#{item.businessStartDate},#{item.businessEndDate},#{item.billingStartDate},#{item.billingEndDate},#{item.billGenerateDate},#{item.billSendDate},#{item.billDueDate},#{item.status},#{item.remark},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.deleted}, update payable_bill_management system_no = #{systemNo}, bill_name = #{billName}, supplier_name = #{supplierName}, is_internal_settlement = #{isInternalSettlement}, internal_settlement_unit = #{internalSettlementUnit}, document_count = #{documentCount}, total_amount = #{totalAmount}, currency = #{currency}, discount_amount = #{discountAmount}, paid_amount = #{paidAmount}, pending_amount = #{pendingAmount}, exchange_rate = #{exchangeRate}, cny_amount = #{cnyAmount}, period_type = #{periodType}, business_start_date = #{businessStartDate}, business_end_date = #{businessEndDate}, billing_start_date = #{billingStartDate}, billing_end_date = #{billingEndDate}, bill_generate_date = #{billGenerateDate}, bill_send_date = #{billSendDate}, bill_due_date = #{billDueDate}, status = #{status}, remark = #{remark}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, deleted = #{deleted}, where id = #{id} update payable_bill_management system_no = #{item.systemNo}, bill_name = #{item.billName}, supplier_name = #{item.supplierName}, is_internal_settlement = #{item.isInternalSettlement}, internal_settlement_unit = #{item.internalSettlementUnit}, document_count = #{item.documentCount}, total_amount = #{item.totalAmount}, currency = #{item.currency}, discount_amount = #{item.discountAmount}, paid_amount = #{item.paidAmount}, pending_amount = #{item.pendingAmount}, exchange_rate = #{item.exchangeRate}, cny_amount = #{item.cnyAmount}, period_type = #{item.periodType}, business_start_date = #{item.businessStartDate}, business_end_date = #{item.businessEndDate}, billing_start_date = #{item.billingStartDate}, billing_end_date = #{item.billingEndDate}, bill_generate_date = #{item.billGenerateDate}, bill_send_date = #{item.billSendDate}, bill_due_date = #{item.billDueDate}, status = #{item.status}, remark = #{item.remark}, create_by = #{item.createBy}, create_time = #{item.createTime}, update_by = #{item.updateBy}, update_time = #{item.updateTime}, deleted = #{item.deleted}, where id = #{item.id} delete from payable_bill_management where id = #{id} delete from payable_bill_management where id in #{id}