|
|
|
@ -411,10 +411,10 @@
|
|
|
|
|
|
|
|
|
|
<select id="filterUdiGp" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
|
|
|
|
|
resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
|
|
|
|
|
select
|
|
|
|
|
IF ( (COUNT(DISTINCT IF(basic_products.bhltcjsl = 1,basic_products.bhsycjsl,0))-1) > 1,'多种包装规格',basic_products.bzgg) AS bzgg,
|
|
|
|
|
basic_udirel.*,
|
|
|
|
|
bht.name classifyName,
|
|
|
|
|
select IF((COUNT(DISTINCT IF(basic_products.bhltcjsl = 1, basic_products.bhsycjsl, 0)) - 1) > 1, '多种包装规格',
|
|
|
|
|
basic_products.bzgg) AS bzgg,
|
|
|
|
|
basic_udirel.*,
|
|
|
|
|
bht.name classifyName,
|
|
|
|
|
basic_products.originUuid,
|
|
|
|
|
basic_products.nameCode,
|
|
|
|
|
basic_products.deviceRecordKey,
|
|
|
|
@ -474,7 +474,7 @@
|
|
|
|
|
basic_products.sfwwjbz,
|
|
|
|
|
basic_products.syqsfxyjxmj,
|
|
|
|
|
basic_products.mjfs,
|
|
|
|
|
basic_products.id as productId,
|
|
|
|
|
basic_products.id as productId,
|
|
|
|
|
basic_products.categoryName,
|
|
|
|
|
basic_products.catalogname1,
|
|
|
|
|
basic_products.catalogname2,
|
|
|
|
@ -495,7 +495,7 @@
|
|
|
|
|
basic_products.workPlaceCount,
|
|
|
|
|
basic_products.bhltcjsl,
|
|
|
|
|
basic_products.bhsycjsl,
|
|
|
|
|
th.hsmc hslbName
|
|
|
|
|
th.hsmc hslbName
|
|
|
|
|
FROM basic_products
|
|
|
|
|
inner JOIN basic_udirel
|
|
|
|
|
ON basic_products.uuid = basic_udirel.uuid
|
|
|
|
@ -520,27 +520,27 @@
|
|
|
|
|
</if>
|
|
|
|
|
<if test="keyWords != '' and keyWords != null">
|
|
|
|
|
AND (
|
|
|
|
|
nameCode LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or ybbm LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or sptm LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.mainId LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId1 LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId2 LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId3 LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId4 LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId4 LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.cpmctymc LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.ggxh LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.zczbhhzbapzbh LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.manufactory LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.ybbm LIKE concat(#{keyWords}, '%')
|
|
|
|
|
or basic_products.bzgg LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.prepnSpec LIKE concat('%', #{keyWords}, '%'))
|
|
|
|
|
nameCode LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or ybbm LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or sptm LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.mainId LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId1 LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId2 LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId3 LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId4 LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_udirel.thirdId4 LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.cpmctymc LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.ggxh LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.zczbhhzbapzbh LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.manufactory LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.ybbm LIKE concat(#{keyWords}, '%')
|
|
|
|
|
or basic_products.bzgg LIKE concat('%', #{keyWords}, '%')
|
|
|
|
|
or basic_products.prepnSpec LIKE concat('%', #{keyWords}, '%'))
|
|
|
|
|
</if>
|
|
|
|
|
<if test="nameCode != '' and nameCode != null">
|
|
|
|
|
AND (
|
|
|
|
|
nameCode LIKE concat('%', #{nameCode}, '%')
|
|
|
|
|
nameCode LIKE concat('%', #{nameCode}, '%')
|
|
|
|
|
or ybbm LIKE concat('%', #{nameCode}, '%')
|
|
|
|
|
or sptm LIKE concat('%', #{nameCode}, '%')
|
|
|
|
|
or basic_udirel.mainId LIKE concat('%', #{nameCode}, '%')
|
|
|
|
@ -561,7 +561,7 @@
|
|
|
|
|
</if>
|
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
|
and (
|
|
|
|
|
nameCode LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
nameCode LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
or ybbm LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
or sptm LIKE concat('%', #{unionCode}, '%'))
|
|
|
|
|
</if>
|
|
|
|
@ -578,12 +578,16 @@
|
|
|
|
|
or thirdId3 LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or thirdId4 LIKE concat('%', #{thrPiId}, '%'))
|
|
|
|
|
</if>
|
|
|
|
|
<if test="uuid != '' and uuid != null">
|
|
|
|
|
AND basic_udirel.uuid = #{uuid}
|
|
|
|
|
<if test="notCodeType != '' and notCodeType != null">
|
|
|
|
|
AND basic_udirel.notCodeType = #{notCodeType}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="manuReview != '' and thirdId != null">
|
|
|
|
|
AND manuReview = #{manuReview}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thirdId != '' and thirdId != null">
|
|
|
|
|
AND thirdId = #{thirdId}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="udplatCode != '' and udplatCode != null">
|
|
|
|
|
AND udplatCode = #{udplatCode}
|
|
|
|
|
</if>
|
|
|
|
@ -595,25 +599,26 @@
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 1 and productsType == 1">
|
|
|
|
|
AND (thirdId <![CDATA[<>]]> '' or thirdId1 <![CDATA[<>]]> '' or thirdId2 <![CDATA[<>]]> '' or
|
|
|
|
|
thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '')
|
|
|
|
|
thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '')
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 1 and productsType == 2">
|
|
|
|
|
AND (thirdId is not null or thirdId1 is not null)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 1 and productsType == 2">
|
|
|
|
|
AND basic_products.nameCode is not null
|
|
|
|
|
AND basic_products.nameCode is not null
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 2 and productsType == 1">
|
|
|
|
|
AND basic_products.originUuid is NULL
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 2 and productsType == 2">
|
|
|
|
|
AND ((thirdId = '' or thirdId is null) or (thirdId1 = '' or thirdId1 is null)
|
|
|
|
|
)
|
|
|
|
|
AND ((thirdId = '' or thirdId is null) or (thirdId1 = '' or thirdId1 is null)
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 2 and productsType == 2">
|
|
|
|
|
AND ( (mainId = '' or mainId is null) or (basic_products.nameCode = '' or basic_products.nameCode is null)
|
|
|
|
|
)
|
|
|
|
|
AND ((mainId = '' or mainId is null) or
|
|
|
|
|
(basic_products.nameCode = '' or basic_products.nameCode is null)
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 3">
|
|
|
|
|
AND (mainId is NULL or mainId = '')
|
|
|
|
@ -778,7 +783,7 @@
|
|
|
|
|
</if>
|
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
|
and (
|
|
|
|
|
nameCode LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
nameCode LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
or ybbm LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
or sptm LIKE concat('%', #{unionCode}, '%'))
|
|
|
|
|
</if>
|
|
|
|
@ -854,7 +859,7 @@
|
|
|
|
|
AND basic_products.tyshxydm = #{tyshxydm}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
GROUP BY cpmctymc, manufactory,zczbhhzbapzbh
|
|
|
|
|
GROUP BY cpmctymc, manufactory, zczbhhzbapzbh
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -983,7 +988,6 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectByThirdId" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
|
|
|
|
|
resultType="com.glxp.api.entity.basic.UdiRelevanceEntity">
|
|
|
|
|
select *
|
|
|
|
@ -1061,7 +1065,7 @@
|
|
|
|
|
groupBuy, needCert, isStack,
|
|
|
|
|
distributeLevelCount, useLevel,
|
|
|
|
|
distributeLevel,
|
|
|
|
|
splitEnable, autoCode, distributeMaxLevel, useMaxLevel,unpackUseTime,detailSort)
|
|
|
|
|
splitEnable, autoCode, distributeMaxLevel, useMaxLevel, unpackUseTime, detailSort)
|
|
|
|
|
values (#{id},
|
|
|
|
|
#{uuid},
|
|
|
|
|
#{mainId},
|
|
|
|
@ -1097,7 +1101,7 @@
|
|
|
|
|
#{useLevel},
|
|
|
|
|
#{distributeLevel},
|
|
|
|
|
#{splitEnable},
|
|
|
|
|
#{autoCode}, #{distributeMaxLevel}, #{useMaxLevel}, #{unpackUseTime},#{detailSort})
|
|
|
|
|
#{autoCode}, #{distributeMaxLevel}, #{useMaxLevel}, #{unpackUseTime}, #{detailSort})
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|