id
, commodity_id, sort_id, xhf_nsrsbh, merchandise_name,encoding, tax_items, brief_code,
tax_rate, specification_model, metering_unit, unit_price, tax_logo, hide_the_logo,
enjoy_preferential_policies, tax_class_code, tax_classification_name, preferential_policies_type,zzstsgl,
user_id, create_time, modify_time, modify_user_id, group_id,enterprise_name,data_source,
matching_state,data_state,tax_class_abbreviation,description,collect_ident,cpy,bmb_bbh,jdc,wlflbm,wlflmc,ent_id,tswl
SELECT cc.id,
cc.commodity_id,
cc.sort_id,
cc.xhf_nsrsbh,
cc.merchandise_name,
cc.tax_items,
cc.brief_code,
cc.tax_rate,
cc.specification_model,
cc.metering_unit,
cc.unit_price,
cc.tax_logo,
cc.hide_the_logo,
cc.enjoy_preferential_policies,
cc.tax_class_code,
cc.tax_classification_name,
cc.preferential_policies_type,
cc.zzstsgl,
cc.user_id,
cc.create_time,
cc.modify_time,
cc.modify_user_id,
cc.encoding,
cc.group_id,
cc.enterprise_name,
cc.data_source,
cc.matching_state,
cc.data_state,
cc.tax_class_abbreviation,
cc.description,
cc.cpy,
cc.jdc,
cc.bmb_bbh,
gc.group_name,
cc.wlflbm,
cc.wlflmc,
cc.ent_id,
cc.tswl
FROM commodity_code cc
LEFT JOIN group_commodity gc
ON gc.id = cc.group_id
insert into commodity_code
id,
commodity_id,
sort_id,
xhf_nsrsbh,
merchandise_name,
encoding,
tax_items,
brief_code,
tax_rate,
specification_model,
metering_unit,
unit_price,
tax_logo,
hide_the_logo,
enjoy_preferential_policies,
tax_class_code,
tax_classification_name,
preferential_policies_type,
zzstsgl,
user_id,
create_time,
modify_time,
modify_user_id,
group_id,
description,
enterprise_name,
data_source,
matching_state,
data_state,
tax_class_abbreviation,
collect_ident,
cpy,
bmb_bbh,
jdc,
wlflbm,
wlflmc,
#{id,jdbcType=VARCHAR},
#{commodityId,jdbcType=VARCHAR},
#{sortId,jdbcType=BIGINT},
#{xhfNsrsbh,jdbcType=VARCHAR},
#{xmmc,jdbcType=VARCHAR},
#{zxbm,jdbcType=VARCHAR},
#{spsm,jdbcType=VARCHAR},
#{spjm,jdbcType=VARCHAR},
#{sl,jdbcType=VARCHAR},
#{ggxh,jdbcType=VARCHAR},
#{xmdw,jdbcType=VARCHAR},
#{xmdj,jdbcType=VARCHAR},
#{hsbz,jdbcType=VARCHAR},
#{ycbz,jdbcType=VARCHAR},
#{yhzcbs,jdbcType=VARCHAR},
#{spbm,jdbcType=VARCHAR},
#{ssflMc,jdbcType=VARCHAR},
#{lslbs,jdbcType=VARCHAR},
#{zzstsgl,jdbcType=VARCHAR},
#{userId,jdbcType=VARCHAR},
now(),
now(),
SYSDATE,
SYSDATE,
#{modifyUserId,jdbcType=CHAR},
#{groupId,jdbcType=VARCHAR},
#{bz,jdbcType=VARCHAR},
#{xhfMc,jdbcType=VARCHAR},
#{dataSource,jdbcType=VARCHAR},
#{matchingState,jdbcType=VARCHAR},
#{dataState,jdbcType=VARCHAR},
#{spjc,jdbcType=VARCHAR},
#{collectIdent,jdbcType=VARCHAR},
#{cpy,jdbcType=VARCHAR},
#{bmbBbh,jdbcType=VARCHAR},
#{jdc,jdbcType=VARCHAR},
#{wlflbm,jdbcType=VARCHAR},
#{wlflmc,jdbcType=VARCHAR},
delete
from commodity_code
where xhf_nsrsbh = #{xhfNsrsbh,jdbcType=VARCHAR} and ent_id = #{entId,jdbcType=VARCHAR}
insert into commodity_code (commodity_id, sort_id, xhf_nsrsbh, merchandise_name, encoding, tax_items,
brief_code,
tax_rate, specification_model, metering_unit, unit_price, tax_logo, hide_the_logo,
enjoy_preferential_policies, tax_class_code, tax_classification_name,
preferential_policies_type, zzstsgl,
user_id, create_time, modify_time, modify_user_id, group_id, enterprise_name,
data_source,
matching_state, data_state, tax_class_abbreviation, description, collect_ident, cpy,
bmb_bbh, jdc, wlflbm, wlflmc,ent_id)
select commodity_id,
sort_id,
#{to.xhfNsrsbh,jdbcType=VARCHAR},
merchandise_name,
encoding,
tax_items,
brief_code,
tax_rate,
specification_model,
metering_unit,
unit_price,
tax_logo,
hide_the_logo,
enjoy_preferential_policies,
tax_class_code,
tax_classification_name,
preferential_policies_type,
zzstsgl,
user_id,
create_time,
modify_time,
modify_user_id,
group_id,
enterprise_name,
data_source,
matching_state,
data_state,
tax_class_abbreviation,
description,
collect_ident,
cpy,
bmb_bbh,
jdc,
wlflbm,
wlflmc,
#{to.entId,jdbcType=VARCHAR}
from commodity_code where xhf_nsrsbh = #{from.xhfNsrsbh,jdbcType=VARCHAR} and ent_id = #{from.entId,jdbcType=VARCHAR}