select id, company_id, system_orderno, out_trade_orderno, fpqqlsh, bill_info_id, red_info_no, red_info_status, red_info_message, red_info_type, origin_fpdm, red_info_spec_flag, origin_fphm, tax_type, origin_kprq, mult_tax_rate, bill_input_time, buyer_name, buyer_taxnum, seller_name, seller_taxnum, taxfreeamt, tax, taxamt, apply_remark, pdf_url, bmbbh, business_tax_code, apply_time, invoice_type, fjh, terminal_number, jspbh, ssyf, taxrate, sqxz, jbr, reqnsrsbh, create_by, product_oil_flag, create_time, update_by, update_time ,service_supplier_key,callback_url,sqlb from redinfo
insert into redinfo
company_id,
system_orderno,
out_trade_orderno,
fpqqlsh,
bill_info_id,
red_info_no,
red_info_status,
red_info_message,
red_info_type,
origin_fpdm,
red_info_spec_flag,
origin_fphm,
tax_type,
origin_kprq,
mult_tax_rate,
bill_input_time,
buyer_name,
buyer_taxnum,
seller_name,
seller_taxnum,
taxfreeamt,
tax,
taxamt,
apply_remark,
pdf_url,
bmbbh,
business_tax_code,
apply_time,
invoice_type,
fjh,
terminal_number,
jspbh,
ssyf,
taxrate,
sqxz,
jbr,
reqnsrsbh,
create_by,
product_oil_flag,
create_time,
update_by,
update_time,
service_supplier_key,
callback_url,
sqlb,
#{companyId},
#{systemOrderno},
#{outTradeOrderno},
#{fpqqlsh},
#{billInfoId},
#{redInfoNo},
#{redInfoStatus},
#{redInfoMessage},
#{redInfoType},
#{originFpdm},
#{redInfoSpecFlag},
#{originFphm},
#{taxType},
#{originKprq},
#{multTaxRate},
#{billInputTime},
#{buyerName},
#{buyerTaxnum},
#{sellerName},
#{sellerTaxnum},
#{taxfreeamt},
#{tax},
#{taxamt},
#{applyRemark},
#{pdfUrl},
#{bmbbh},
#{businessTaxCode},
#{applyTime},
#{invoiceType},
#{fjh},
#{terminalNumber},
#{jspbh},
#{ssyf},
#{taxrate},
#{sqxz},
#{jbr},
#{reqnsrsbh},
#{createBy},
#{productOilFlag},
#{createTime},
#{updateBy},
#{updateTime},
#{serviceSupplierKey},
#{callbackUrl},
#{sqlb},
update redinfo
company_id = #{companyId},
system_orderno = #{systemOrderno},
out_trade_orderno = #{outTradeOrderno},
fpqqlsh = #{fpqqlsh},
bill_info_id = #{billInfoId},
red_info_no = #{redInfoNo},
red_info_status = #{redInfoStatus},
red_info_message = #{redInfoMessage},
red_info_type = #{redInfoType},
origin_fpdm = #{originFpdm},
red_info_spec_flag = #{redInfoSpecFlag},
origin_fphm = #{originFphm},
tax_type = #{taxType},
origin_kprq = #{originKprq},
mult_tax_rate = #{multTaxRate},
bill_input_time = #{billInputTime},
buyer_name = #{buyerName},
buyer_taxnum = #{buyerTaxnum},
seller_name = #{sellerName},
seller_taxnum = #{sellerTaxnum},
taxfreeamt = #{taxfreeamt},
tax = #{tax},
taxamt = #{taxamt},
apply_remark = #{applyRemark},
pdf_url = #{pdfUrl},
bmbbh = #{bmbbh},
business_tax_code = #{businessTaxCode},
apply_time = #{applyTime},
invoice_type = #{invoiceType},
fjh = #{fjh},
terminal_number = #{terminalNumber},
jspbh = #{jspbh},
ssyf = #{ssyf},
taxrate = #{taxrate},
sqxz = #{sqxz},
jbr = #{jbr},
reqnsrsbh = #{reqnsrsbh},
create_by = #{createBy},
product_oil_flag = #{productOilFlag},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
service_supplier_key = #{serviceSupplierKey},
callback_url = #{callbackUrl},
sqlb = #{sqlb},
where id = #{id}
delete from redinfo where id = #{id}
delete from redinfo where id in
#{id}
delete from redinfodetail where redinfo_id in
#{redinfoId}
delete from redinfodetail where redinfo_id = #{redinfoId}
INSERT INTO redinfodetail(`id`,
`redinfo_id`,
`billNo`,
`index`,
`good_name`,
`unit`,
`spec`,
`num`,
`price`,
`taxfreeamt`,
`taxrate`,
`tax`,
`taxamt`,
`spbm`,
`bmbbh`,
`yhzcbs`,
`zzstsgl`,
`lslbs`,
`good_abbreviation`,
`fphxz`,
`create_by`,
`kce`,
`create_time`,
`update_by`,
`updated_time`) values
( #{item.id}, #{item.redinfoId}, #{item.billno}, #{item.index}, #{item.goodName}, #{item.unit}, #{item.spec}, #{item.num}, #{item.price}, #{item.taxfreeamt}, #{item.taxrate}, #{item.tax}, #{item.taxamt}, #{item.spbm}, #{item.bmbbh}, #{item.yhzcbs}, #{item.zzstsgl}, #{item.lslbs}, #{item.goodAbbreviation}, #{item.fphxz}, #{item.createBy}, #{item.kce}, #{item.createTime}, #{item.updateBy}, #{item.updatedTime})