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, ent_id, #{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}, #{entId,jdbcType=VARCHAR}, UPDATE buyer_manage_info commodity_id = #{commodityId}, sort_id = #{sortId}, merchandise_name = #{xmmc}, encoding = #{zxbm}, tax_items = #{spsm}, brief_code = #{spjm}, tax_rate = #{sl}, specification_model = #{ggxh}, metering_unit = #{xmdw}, unit_price = #{xmdj}, tax_logo = #{hsbz}, hide_the_logo = #{ycbz}, enjoy_preferential_policies = #{yhzcbs}, tax_class_code = #{spbm}, tax_classification_name = #{ssflMc}, preferential_policies_type = #{lslbs}, zzstsgl = #{zzstsgl}, user_id = #{userId}, create_time, modify_time, modify_user_id = #{modifyUserId}, group_id = #{groupId}, description = #{bz}, enterprise_name = #{xhfMc}, data_source = #{dataSource}, matching_state = #{matchingState}, data_state = #{dataState}, tax_class_abbreviation = #{spjc}, collect_ident = #{collectIdent}, cpy = #{cpy}, bmb_bbh = #{bmbBbh}, jdc = #{jdc}, wlflbm = #{wlflbm}, wlflmc = #{wlflmc}, ent_id = #{entId}, id = #{buyer.id,jdbcType=VARCHAR} delete from commodity_code where xhf_nsrsbh = #{xhfNsrsbh,jdbcType=VARCHAR} and ent_id = #{entId,jdbcType=VARCHAR} 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, enterprise_name, data_source, matching_state, data_state, tax_class_abbreviation, description, collect_ident, cpy, bmb_bbh, jdc, wlflbm, wlflmc,invoice_name,ent_id ) select CONCAT(#{to.entId,jdbcType=VARCHAR},'-',id) 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, invoice_name, #{to.entId,jdbcType=VARCHAR} from commodity_code where xhf_nsrsbh = #{from.xhfNsrsbh,jdbcType=VARCHAR} and ent_id = #{from.entId,jdbcType=VARCHAR}