select id, bill_info_id, company_id, system_orderno, out_trade_orderno, fpqqlsh, invoice_type, state, c_invoiceid, fpdm, fphm, kprq, buyer_name, buyer_taxnum, buyer_address, buyer_telephone, buyer_account, buyer_email, buyer_phone, seller_name, seller_taxnum, seller_address, seller_telephone, seller_account, message, clerk, payee, checker, taxfreeamt, tax, taxamt, origin_fpdm, origin_fphm, jym, qr_code, machine_code, cipher_text, invoice_pdf_url, invoice_jpg_url,invoice_file_storage, invoice_msg, invoice_result_msg, product_oil_flag, qdbz, c_ofd_url, fjh, terminal_number,deprecate_type,deprecate_reason,create_by, create_time, update_by, update_time from invoice
insert into invoice
bill_info_id,
company_id,
system_orderno,
out_trade_orderno,
fpqqlsh,
invoice_type,
state,
c_invoiceid,
fpdm,
fphm,
kprq,
buyer_name,
buyer_taxnum,
buyer_address,
buyer_telephone,
buyer_account,
buyer_email,
buyer_phone,
seller_name,
seller_taxnum,
seller_address,
seller_telephone,
seller_account,
message,
clerk,
payee,
checker,
taxfreeamt,
tax,
taxamt,
origin_fpdm,
origin_fphm,
jym,
qr_code,
machine_code,
cipher_text,
invoice_pdf_url,
invoice_jpg_url,
invoice_file_storage,
invoice_msg,
invoice_result_msg,
product_oil_flag,
qdbz,
c_ofd_url,
fjh,
terminal_number,
create_by,
create_time,
update_by,
update_time,
jbrxm,
jbrzjhm,
jbrzjzldm,
jrznsrsbh,
jshj,
tdyslxdm,
tdywxx,
ext,
filedata,
zzfpdm,
zzfphm,
#{billInfoId},
#{companyId},
#{systemOrderno},
#{outTradeOrderno},
#{fpqqlsh},
#{invoiceType},
#{state},
#{cInvoiceid},
#{fpdm},
#{fphm},
#{kprq},
#{buyerName},
#{buyerTaxnum},
#{buyerAddress},
#{buyerTelephone},
#{buyerAccount},
#{buyerEmail},
#{buyerPhone},
#{sellerName},
#{sellerTaxnum},
#{sellerAddress},
#{sellerTelephone},
#{sellerAccount},
#{message},
#{clerk},
#{payee},
#{checker},
#{taxfreeamt},
#{tax},
#{taxamt},
#{originFpdm},
#{originFphm},
#{jym},
#{qrCode},
#{machineCode},
#{cipherText},
#{invoicePdfUrl},
#{invoiceJpgUrl},
#{invoiceFileStorage},
#{invoiceMsg},
#{invoiceResultMsg},
#{productOilFlag},
#{qdbz},
#{cOfdUrl},
#{fjh},
#{terminalNumber},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{jbrxm},
#{jbrzjhm},
#{jbrzjzldm},
#{jrznsrsbh},
#{jshj},
#{tdyslxdm},
#{tdywxx},
#{ext},
#{filedata},
#{zzfpdm},
#{zzfphm},
update invoice
bill_info_id = #{billInfoId},
company_id = #{companyId},
system_orderno = #{systemOrderno},
out_trade_orderno = #{outTradeOrderno},
fpqqlsh = #{fpqqlsh},
invoice_type = #{invoiceType},
state = #{state},
c_invoiceid = #{cInvoiceid},
fpdm = #{fpdm},
fphm = #{fphm},
kprq = #{kprq},
buyer_name = #{buyerName},
buyer_taxnum = #{buyerTaxnum},
buyer_address = #{buyerAddress},
buyer_telephone = #{buyerTelephone},
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},
clerk = #{clerk},
payee = #{payee},
checker = #{checker},
taxfreeamt = #{taxfreeamt},
tax = #{tax},
taxamt = #{taxamt},
origin_fpdm = #{originFpdm},
origin_fphm = #{originFphm},
jym = #{jym},
qr_code = #{qrCode},
machine_code = #{machineCode},
cipher_text = #{cipherText},
invoice_pdf_url = #{invoicePdfUrl},
invoice_jpg_url = #{invoiceJpgUrl},
invoice_file_storage = #{invoiceFileStorage},
invoice_msg = #{invoiceMsg},
invoice_result_msg = #{invoiceResultMsg},
product_oil_flag = #{productOilFlag},
qdbz = #{qdbz},
c_ofd_url = #{cOfdUrl},
fjh = #{fjh},
terminal_number = #{terminalNumber},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
jbrxm = #{jbrxm},
jbrzjhm = #{jbrzjhm},
jbrzjzldm = #{jbrzjzldm},
jrznsrsbh = #{jrznsrsbh},
jshj = #{jshj},
tdyslxdm = #{tdyslxdm},
tdywxx = #{tdywxx},
ext = #{ext},
ext = #{filedata},
ext = #{zzfpdm},
ext = #{zzfphm},
where id = #{id}
delete from invoice where id = #{id}
delete from invoice where id in
#{id}
delete from invoice_detail where invoice_id in
#{invoiceId}
delete from invoice_detail where invoice_id = #{invoiceId}
insert into invoice_detail( id, invoice_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) values
( #{item.id}, #{item.invoiceId}, #{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})