diff --git a/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/dao/CommodityMapper.java b/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/dao/CommodityMapper.java index 0098229f..844f1194 100644 --- a/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/dao/CommodityMapper.java +++ b/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/dao/CommodityMapper.java @@ -32,6 +32,18 @@ public interface CommodityMapper { */ List queryProductList(@Param("map") Map map, @Param("shList") List shList); + /** + * 根据项目名称匹配税收分类编码,查找一条 + * + * @param xmmc + * @param xhfNsrsbh + * @return + */ + CommodityCodeEntity queryByCommodityXmmc(@Param("xmmc") String xmmc, @Param("xhfNsrsbh") String xhfNsrsbh); + + + CommodityCodeEntity queryByCommodityXmmcCompany(@Param("xmmc") String xmmc); + /** * 修改商品信息 * diff --git a/order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml b/order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml index 8e7cef07..5bf0743e 100644 --- a/order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml +++ b/order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml @@ -43,7 +43,8 @@ - id, commodity_id, sort_id, xhf_nsrsbh, merchandise_name,encoding, tax_items, brief_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, @@ -111,7 +112,7 @@ #{item} - and cc.xhf_nsrsbh != '-1' + and cc.xhf_nsrsbh != '-1' AND cc.id = #{map.id,jdbcType=VARCHAR} @@ -571,7 +572,8 @@ - + insert into commodity_code @@ -948,76 +950,76 @@ @@ -1070,23 +1072,23 @@ and commodity_id = #{commodityId,jdbcType=VARCHAR} - - and xhf_nsrsbh = '' - - - and xhf_nsrsbh = - - #{item} - - - - and xhf_nsrsbh in - - #{item} - - - and xhf_nsrsbh != '-1' + + and xhf_nsrsbh = '' + + + and xhf_nsrsbh = + + #{item} + + + + and xhf_nsrsbh in + + #{item} + + + and xhf_nsrsbh != '-1' @@ -1139,6 +1141,24 @@ and cc.xhf_nsrsbh != '-1' + + + + + + +