select id, company_id, system_orderno, out_trade_orderno, fpqqlsh, invoice_type, buyer_name, buyer_taxnum, buyer_address, buyer_telephone, buyer_bank, buyer_account, buyer_email, buyer_phone, seller_name, seller_taxnum, seller_address, seller_telephone, seller_account, message, seller_bank, clerk, payee, checker, red_invoice_info_code, fjh, terminal_number, remark, kptype, origin_system_orderno, bmbbh, origin_fpdm, origin_fphm, tsfs, qdbz, qdxmmc, dkbz, cpybz, state, source, service_supplier_key, bill_type, business_remark, taxfreeamt, invoiced_time, callback_url, create_by, tax, create_time, taxamt, update_by, update_time, deleted_time from bill_info insert into bill_info company_id, system_orderno, out_trade_orderno, fpqqlsh, invoice_type, buyer_name, buyer_taxnum, buyer_address, buyer_telephone, buyer_bank, buyer_account, buyer_email, buyer_phone, seller_name, seller_taxnum, seller_address, seller_telephone, seller_account, message, seller_bank, clerk, payee, checker, red_invoice_info_code, fjh, terminal_number, remark, kptype, origin_system_orderno, bmbbh, origin_fpdm, origin_fphm, tsfs, qdbz, qdxmmc, dkbz, cpybz, state, source, service_supplier_key, bill_type, business_remark, taxfreeamt, invoiced_time, create_by, tax, create_time, taxamt, update_by, update_time, deleted_time, callback_url, jbrxm, jbrzjhm, jbrzjzldm, jrznsrsbh, jshj, tdyslxdm, tdywxx, ext, #{companyId}, #{systemOrderno}, #{outTradeOrderno}, #{fpqqlsh}, #{invoiceType}, #{buyerName}, #{buyerTaxnum}, #{buyerAddress}, #{buyerTelephone}, #{buyerBank}, #{buyerAccount}, #{buyerEmail}, #{buyerPhone}, #{sellerName}, #{sellerTaxnum}, #{sellerAddress}, #{sellerTelephone}, #{sellerAccount}, #{message}, #{sellerBank}, #{clerk}, #{payee}, #{checker}, #{redInvoiceInfoCode}, #{fjh}, #{terminalNumber}, #{remark}, #{kptype}, #{originSystemOrderno}, #{bmbbh}, #{originFpdm}, #{originFphm}, #{tsfs}, #{qdbz}, #{qdxmmc}, #{dkbz}, #{cpybz}, #{state}, #{source}, #{serviceSupplierKey}, #{billType}, #{businessRemark}, #{taxfreeamt}, #{invoicedTime}, #{createBy}, #{tax}, #{createTime}, #{taxamt}, #{updateBy}, #{updateTime}, #{deletedTime}, #{callbackUrl}, #{jbrxm}, #{jbrzjhm}, #{jbrzjzldm}, #{jrznsrsbh}, #{jshj}, #{tdyslxdm}, #{tdywxx}, #{ext}, update bill_info company_id = #{companyId}, system_orderno = #{systemOrderno}, out_trade_orderno = #{outTradeOrderno}, fpqqlsh = #{fpqqlsh}, invoice_type = #{invoiceType}, buyer_name = #{buyerName}, buyer_taxnum = #{buyerTaxnum}, buyer_address = #{buyerAddress}, buyer_telephone = #{buyerTelephone}, buyer_bank = #{buyerBank}, buyer_account = #{buyerAccount}, buyer_email = #{buyerEmail}, buyer_phone = #{buyerPhone}, seller_name = #{sellerName}, seller_taxnum = #{sellerTaxnum}, seller_address = #{sellerAddress}, seller_telephone = #{sellerTelephone}, seller_account = #{sellerAccount}, message = #{message}, seller_bank = #{sellerBank}, clerk = #{clerk}, payee = #{payee}, checker = #{checker}, red_invoice_info_code = #{redInvoiceInfoCode}, fjh = #{fjh}, terminal_number = #{terminalNumber}, remark = #{remark}, kptype = #{kptype}, origin_system_orderno = #{originSystemOrderno}, bmbbh = #{bmbbh}, origin_fpdm = #{originFpdm}, origin_fphm = #{originFphm}, tsfs = #{tsfs}, qdbz = #{qdbz}, qdxmmc = #{qdxmmc}, dkbz = #{dkbz}, cpybz = #{cpybz}, state = #{state}, source = #{source}, service_supplier_key = #{serviceSupplierKey}, callback_url = #{callbackUrl}, bill_type = #{billType}, business_remark = #{businessRemark}, taxfreeamt = #{taxfreeamt}, invoiced_time = #{invoicedTime}, create_by = #{createBy}, tax = #{tax}, create_time = #{createTime}, taxamt = #{taxamt}, update_by = #{updateBy}, update_time = #{updateTime}, deleted_time = #{deletedTime}, jbrxm = #{jbrxm}, jbrzjhm = #{jbrzjhm}, jbrzjzldm = #{jbrzjzldm}, jrznsrsbh = #{jrznsrsbh}, jshj = #{jshj}, tdyslxdm = #{tdyslxdm}, tdywxx = #{tdywxx}, ext = #{ext}, where id = #{id} delete from bill_info where id = #{id} delete from bill_info where id in #{id} delete from bill_detail where bill_info_id in #{billInfoId} delete from bill_detail where bill_info_id = #{billInfoId} insert into bill_detail( id, bill_info_id, `index`, good_name, num, price, hsbz, taxrate, spec, unit, spbm, bmbbh, zsbm, fphxz, yhzcbs, zzstsgl, lslbs, kce, taxfreeamt, tax, taxamt, tspz, create_by, create_time, update_by, updated_time) values ( #{item.id}, #{item.billInfoId}, #{item.index}, #{item.goodName}, #{item.num}, #{item.price}, #{item.hsbz}, #{item.taxrate}, #{item.spec}, #{item.unit}, #{item.spbm}, #{item.bmbbh}, #{item.zsbm}, #{item.fphxz}, #{item.yhzcbs}, #{item.zzstsgl}, #{item.lslbs}, #{item.kce}, #{item.taxfreeamt}, #{item.tax}, #{item.taxamt}, #{item.tspz}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updatedTime})