|
|
|
@ -43,7 +43,8 @@ |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<sql id="Base_Column_List"> |
|
|
|
|
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} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
and cc.xhf_nsrsbh != '-1' |
|
|
|
|
and cc.xhf_nsrsbh != '-1' |
|
|
|
|
<!-- 商品编码表ID--> |
|
|
|
|
<if test="map.id != null and map.id != ''"> |
|
|
|
|
AND cc.id = #{map.id,jdbcType=VARCHAR} |
|
|
|
@ -571,7 +572,8 @@ |
|
|
|
|
</trim> |
|
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
<insert id="insertCommodityOnDuplicateKey" parameterType="com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEntity"> |
|
|
|
|
<insert id="insertCommodityOnDuplicateKey" |
|
|
|
|
parameterType="com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEntity"> |
|
|
|
|
<bind name="dataType" value="${dataType}"/> |
|
|
|
|
|
|
|
|
|
insert into commodity_code |
|
|
|
@ -948,76 +950,76 @@ |
|
|
|
|
</if> |
|
|
|
|
</delete> |
|
|
|
|
<select id="queryCommodityInfoList" resultMap="commodityCodeResultMap"> |
|
|
|
|
SELECT |
|
|
|
|
<include refid="Base_Column_List"/> |
|
|
|
|
FROM |
|
|
|
|
commodity_code cc |
|
|
|
|
<where> |
|
|
|
|
SELECT |
|
|
|
|
<include refid="Base_Column_List"/> |
|
|
|
|
FROM |
|
|
|
|
commodity_code cc |
|
|
|
|
<where> |
|
|
|
|
<if test="pageSpxxReq.dataStatus!=null and pageSpxxReq.dataStatus!=''"> |
|
|
|
|
AND cc.data_state = #{pageSpxxReq.dataStatus,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="pageSpxxReq.id!=null and pageSpxxReq.id!=''"> |
|
|
|
|
AND cc.id = #{pageSpxxReq.id,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="pageSpxxReq.spId!=null and pageSpxxReq.spId!=''"> |
|
|
|
|
AND cc.commodity_id = #{pageSpxxReq.spId,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
<if test="pageSpxxReq.spdw!=null and pageSpxxReq.spdw!=''"> |
|
|
|
|
AND cc.metering_unit = #{pageSpxxReq.spdw,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
</if> |
|
|
|
|
<if test="pageSpxxReq.spdj!=null and pageSpxxReq.spdj!=''"> |
|
|
|
|
AND cc.unit_price = #{pageSpxxReq.spdj,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
</if> |
|
|
|
|
<if test="pageSpxxReq.sl!=null and pageSpxxReq.sl!=''"> |
|
|
|
|
AND cc.tax_rate = #{pageSpxxReq.sl,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
</if> |
|
|
|
|
<if test="pageSpxxReq.spmc!=null and pageSpxxReq.spmc!=''"> |
|
|
|
|
AND cc.merchandise_name LIKE CONCAT(CONCAT('%',#{pageSpxxReq.spmc}),'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="pageSpxxReq.zxbm!=null and pageSpxxReq.zxbm!=''"> |
|
|
|
|
AND cc.encoding LIKE CONCAT(CONCAT('%',#{pageSpxxReq.zxbm}),'%') |
|
|
|
|
</if> |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="pageSpxxReq.ggxh!=null and pageSpxxReq.ggxh!=''"> |
|
|
|
|
AND cc.specification_model LIKE CONCAT(CONCAT('%',#{pageSpxxReq.ggxh}),'%') |
|
|
|
|
</if> |
|
|
|
|
<!-- 成品油类型 1 成品油 --> |
|
|
|
|
</if> |
|
|
|
|
<!-- 成品油类型 1 成品油 --> |
|
|
|
|
<if test='pageSpxxReq.cpylx=="1"'> |
|
|
|
|
AND cc.cpy = 'Y' |
|
|
|
|
</if> |
|
|
|
|
<!-- 成品油类型 0 非成品油 --> |
|
|
|
|
AND cc.cpy = 'Y' |
|
|
|
|
</if> |
|
|
|
|
<!-- 成品油类型 0 非成品油 --> |
|
|
|
|
<if test='pageSpxxReq.cpylx=="0"'> |
|
|
|
|
AND cc.cpy = 'N' |
|
|
|
|
</if> |
|
|
|
|
<!-- 机动车类型 1 机动车 --> |
|
|
|
|
AND cc.cpy = 'N' |
|
|
|
|
</if> |
|
|
|
|
<!-- 机动车类型 1 机动车 --> |
|
|
|
|
<if test='pageSpxxReq.jdclx=="1"'> |
|
|
|
|
AND cc.jdc = 'Y' |
|
|
|
|
</if> |
|
|
|
|
<!-- 机动车类型 0 非机动车 --> |
|
|
|
|
AND cc.jdc = 'Y' |
|
|
|
|
</if> |
|
|
|
|
<!-- 机动车类型 0 非机动车 --> |
|
|
|
|
<if test='pageSpxxReq.jdclx=="0"'> |
|
|
|
|
AND cc.jdc = 'N' |
|
|
|
|
</if> |
|
|
|
|
AND cc.jdc = 'N' |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="shList != null and shList.size() == 0"> |
|
|
|
|
and cc.xhf_nsrsbh = '' |
|
|
|
|
</if> |
|
|
|
|
<if test="shList != null and shList.size() == 1"> |
|
|
|
|
and cc.xhf_nsrsbh = |
|
|
|
|
<foreach collection="shList" index="index" item="item"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="shList != null and shList.size() > 1"> |
|
|
|
|
and cc.xhf_nsrsbh in |
|
|
|
|
<foreach collection="shList" index="index" item="item" |
|
|
|
|
open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
and cc.xhf_nsrsbh != '-1' |
|
|
|
|
</where> |
|
|
|
|
<if test="shList != null and shList.size() == 0"> |
|
|
|
|
and cc.xhf_nsrsbh = '' |
|
|
|
|
</if> |
|
|
|
|
<if test="shList != null and shList.size() == 1"> |
|
|
|
|
and cc.xhf_nsrsbh = |
|
|
|
|
<foreach collection="shList" index="index" item="item"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="shList != null and shList.size() > 1"> |
|
|
|
|
and cc.xhf_nsrsbh in |
|
|
|
|
<foreach collection="shList" index="index" item="item" |
|
|
|
|
open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
and cc.xhf_nsrsbh != '-1' |
|
|
|
|
</where> |
|
|
|
|
|
|
|
|
|
limit 1000 |
|
|
|
|
</select> |
|
|
|
@ -1070,23 +1072,23 @@ |
|
|
|
|
and commodity_id = #{commodityId,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="shList != null and shList.size() == 0"> |
|
|
|
|
and xhf_nsrsbh = '' |
|
|
|
|
</if> |
|
|
|
|
<if test="shList != null and shList.size() == 1"> |
|
|
|
|
and xhf_nsrsbh = |
|
|
|
|
<foreach collection="shList" index="index" item="item"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="shList != null and shList.size() > 1"> |
|
|
|
|
and xhf_nsrsbh in |
|
|
|
|
<foreach collection="shList" index="index" item="item" |
|
|
|
|
open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
and xhf_nsrsbh != '-1' |
|
|
|
|
<if test="shList != null and shList.size() == 0"> |
|
|
|
|
and xhf_nsrsbh = '' |
|
|
|
|
</if> |
|
|
|
|
<if test="shList != null and shList.size() == 1"> |
|
|
|
|
and xhf_nsrsbh = |
|
|
|
|
<foreach collection="shList" index="index" item="item"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="shList != null and shList.size() > 1"> |
|
|
|
|
and xhf_nsrsbh in |
|
|
|
|
<foreach collection="shList" index="index" item="item" |
|
|
|
|
open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
and xhf_nsrsbh != '-1' |
|
|
|
|
</where> |
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
@ -1139,6 +1141,24 @@ |
|
|
|
|
and cc.xhf_nsrsbh != '-1' |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="queryByCommodityXmmc" parameterType="map" resultMap="commodityCodeResultMap"> |
|
|
|
|
SELECT |
|
|
|
|
<include refid="Base_Column_List"/> |
|
|
|
|
FROM |
|
|
|
|
commodity_code cc |
|
|
|
|
WHERE cc.merchandise_name like concat("%",#{xmmc},"%") |
|
|
|
|
and cc.xhf_nsrsbh = #{xhfNsrsbh} limit 1 |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="queryByCommodityXmmcCompany" parameterType="map" resultMap="commodityCodeResultMap"> |
|
|
|
|
SELECT |
|
|
|
|
<include refid="Base_Column_List"/> |
|
|
|
|
FROM |
|
|
|
|
commodity_code cc |
|
|
|
|
WHERE cc.merchandise_name like concat("%",#{xmmc},"%") |
|
|
|
|
and cc.xhf_nsrsbh != "-1" limit 1 |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 通用条件查询 --> |
|
|
|
|
<select id="queryCommodityInfoListByMap" resultMap="commodityCodeResultMap"> |
|
|
|
|