select t1.id, t1.write_off_code, t1.write_off_type, t1.payment_bill_code, t1.vendor_code, t1.write_off_amount, t1.write_off_amount_without_tax, t1.write_off_tax_amount, t1.write_off_time, t1.remark, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t2.vendor_name,t3.user_name as create_by_name from oms_payable_write_off t1 left join oms_vendor_info t2 on t1.vendor_code=t2.vendor_code left join sys_user t3 on t1.create_by=t3.user_id insert into oms_payable_write_off write_off_code, write_off_type, payment_bill_code, vendor_code, write_off_amount, write_off_amount_without_tax, write_off_tax_amount, write_off_time, remark, create_by, create_time, update_by, update_time, #{writeOffCode}, #{writeOffType}, #{paymentBillCode}, #{vendorCode}, #{writeOffAmount}, #{writeOffAmountWithoutTax}, #{writeOffTaxAmount}, #{writeOffTime}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, update oms_payable_write_off write_off_code = #{writeOffCode}, write_off_type = #{writeOffType}, payment_bill_code = #{paymentBillCode}, vendor_code = #{vendorCode}, write_off_amount = #{writeOffAmount}, write_off_amount_without_tax = #{writeOffAmountWithoutTax}, write_off_tax_amount = #{writeOffTaxAmount}, write_off_time = #{writeOffTime}, remark = #{remark}, update_by = #{updateBy}, update_time = #{updateTime}, where id = #{id} delete from oms_payable_write_off where id = #{id} delete from oms_payable_write_off where id in #{id}