|
|
|
@ -330,6 +330,9 @@
|
|
|
|
|
<if test="cpmctymc != '' and cpmctymc != null">
|
|
|
|
|
AND cpmctymc LIKE concat('%', #{cpmctymc}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="entireCpmctymc != '' and entireCpmctymc != null">
|
|
|
|
|
AND cpmctymc = #{entireCpmctymc}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ggxh != '' and ggxh != null">
|
|
|
|
|
AND ggxh LIKE concat('%', #{ggxh}, '%')
|
|
|
|
|
</if>
|
|
|
|
@ -424,63 +427,63 @@
|
|
|
|
|
<select id="filterCertUdi" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
|
|
|
|
|
resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
|
|
|
|
|
select basic_udirel.*,
|
|
|
|
|
bht.name classifyName,
|
|
|
|
|
basic_products.originUuid,
|
|
|
|
|
basic_products.nameCode,
|
|
|
|
|
basic_products.deviceRecordKey,
|
|
|
|
|
basic_products.packRatio,
|
|
|
|
|
basic_products.packUnit,
|
|
|
|
|
basic_products.packLevel,
|
|
|
|
|
basic_products.bhxjsl,
|
|
|
|
|
basic_products.bhzxxsbzsl,
|
|
|
|
|
basic_products.zxxsbzbhsydysl,
|
|
|
|
|
basic_products.bhxjcpbm,
|
|
|
|
|
basic_products.bzcj,
|
|
|
|
|
basic_products.cpmctymc,
|
|
|
|
|
basic_products.cplb,
|
|
|
|
|
basic_products.flbm,
|
|
|
|
|
basic_products.ggxh,
|
|
|
|
|
basic_products.qxlb,
|
|
|
|
|
basic_products.tyshxydm,
|
|
|
|
|
basic_products.ylqxzcrbarmc,
|
|
|
|
|
basic_products.zczbhhzbapzbh,
|
|
|
|
|
basic_products.ylqxzcrbarywmc,
|
|
|
|
|
basic_products.sydycpbs,
|
|
|
|
|
basic_products.sjcpbm,
|
|
|
|
|
basic_products.versionNumber,
|
|
|
|
|
basic_products.diType,
|
|
|
|
|
basic_products.ybbm,
|
|
|
|
|
basic_products.sptm,
|
|
|
|
|
basic_products.manufactory,
|
|
|
|
|
basic_products.measname,
|
|
|
|
|
basic_products.productType,
|
|
|
|
|
basic_products.scbssfbhph,
|
|
|
|
|
basic_products.scbssfbhxlh,
|
|
|
|
|
basic_products.scbssfbhscrq,
|
|
|
|
|
basic_products.scbssfbhsxrq,
|
|
|
|
|
basic_products.cpms,
|
|
|
|
|
basic_products.allowNoBatch,
|
|
|
|
|
basic_products.allowNoExpire,
|
|
|
|
|
basic_products.allowNoProduct,
|
|
|
|
|
basic_products.allowNoSerial,
|
|
|
|
|
basic_products.spmc,
|
|
|
|
|
basic_products.cplx,
|
|
|
|
|
basic_products.hchzsb,
|
|
|
|
|
basic_products.cpdls,
|
|
|
|
|
basic_products.price,
|
|
|
|
|
basic_products.basicPrductRemak1,
|
|
|
|
|
basic_products.basicPrductRemak2,
|
|
|
|
|
basic_products.basicPrductRemak3,
|
|
|
|
|
basic_products.basicPrductRemak4,
|
|
|
|
|
basic_products.basicPrductRemak5,
|
|
|
|
|
basic_products.basicPrductRemak6,
|
|
|
|
|
basic_products.basicPrductRemak7,
|
|
|
|
|
basic_products.basicPrductRemak8
|
|
|
|
|
bht.name classifyName,
|
|
|
|
|
basic_products.originUuid,
|
|
|
|
|
basic_products.nameCode,
|
|
|
|
|
basic_products.deviceRecordKey,
|
|
|
|
|
basic_products.packRatio,
|
|
|
|
|
basic_products.packUnit,
|
|
|
|
|
basic_products.packLevel,
|
|
|
|
|
basic_products.bhxjsl,
|
|
|
|
|
basic_products.bhzxxsbzsl,
|
|
|
|
|
basic_products.zxxsbzbhsydysl,
|
|
|
|
|
basic_products.bhxjcpbm,
|
|
|
|
|
basic_products.bzcj,
|
|
|
|
|
basic_products.cpmctymc,
|
|
|
|
|
basic_products.cplb,
|
|
|
|
|
basic_products.flbm,
|
|
|
|
|
basic_products.ggxh,
|
|
|
|
|
basic_products.qxlb,
|
|
|
|
|
basic_products.tyshxydm,
|
|
|
|
|
basic_products.ylqxzcrbarmc,
|
|
|
|
|
basic_products.zczbhhzbapzbh,
|
|
|
|
|
basic_products.ylqxzcrbarywmc,
|
|
|
|
|
basic_products.sydycpbs,
|
|
|
|
|
basic_products.sjcpbm,
|
|
|
|
|
basic_products.versionNumber,
|
|
|
|
|
basic_products.diType,
|
|
|
|
|
basic_products.ybbm,
|
|
|
|
|
basic_products.sptm,
|
|
|
|
|
basic_products.manufactory,
|
|
|
|
|
basic_products.measname,
|
|
|
|
|
basic_products.productType,
|
|
|
|
|
basic_products.scbssfbhph,
|
|
|
|
|
basic_products.scbssfbhxlh,
|
|
|
|
|
basic_products.scbssfbhscrq,
|
|
|
|
|
basic_products.scbssfbhsxrq,
|
|
|
|
|
basic_products.cpms,
|
|
|
|
|
basic_products.allowNoBatch,
|
|
|
|
|
basic_products.allowNoExpire,
|
|
|
|
|
basic_products.allowNoProduct,
|
|
|
|
|
basic_products.allowNoSerial,
|
|
|
|
|
basic_products.spmc,
|
|
|
|
|
basic_products.cplx,
|
|
|
|
|
basic_products.hchzsb,
|
|
|
|
|
basic_products.cpdls,
|
|
|
|
|
basic_products.price,
|
|
|
|
|
basic_products.basicPrductRemak1,
|
|
|
|
|
basic_products.basicPrductRemak2,
|
|
|
|
|
basic_products.basicPrductRemak3,
|
|
|
|
|
basic_products.basicPrductRemak4,
|
|
|
|
|
basic_products.basicPrductRemak5,
|
|
|
|
|
basic_products.basicPrductRemak6,
|
|
|
|
|
basic_products.basicPrductRemak7,
|
|
|
|
|
basic_products.basicPrductRemak8
|
|
|
|
|
FROM basic_products
|
|
|
|
|
inner JOIN basic_udirel
|
|
|
|
|
ON basic_products.uuid = basic_udirel.uuid
|
|
|
|
|
left join basic_hosp_type bht on basic_udirel.relCode = bht.code
|
|
|
|
|
inner join company_product_relevance on company_product_relevance.udiRlIdFk = basic_udirel.id
|
|
|
|
|
inner JOIN basic_udirel
|
|
|
|
|
ON basic_products.uuid = basic_udirel.uuid
|
|
|
|
|
left join basic_hosp_type bht on basic_udirel.relCode = bht.code
|
|
|
|
|
inner join company_product_relevance on company_product_relevance.udiRlIdFk = basic_udirel.id
|
|
|
|
|
<where>
|
|
|
|
|
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
|
|
|
|
|
AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')
|
|
|
|
@ -493,7 +496,7 @@
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bindType != '' and bindType != null">
|
|
|
|
|
AND relCode is null
|
|
|
|
|
or trim(relCode) = ''
|
|
|
|
|
or trim(relCode) = ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="supName != '' and supName != null">
|
|
|
|
|
AND supName LIKE concat('%', #{supName}, '%')
|
|
|
|
@ -509,19 +512,19 @@
|
|
|
|
|
</if>
|
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
|
and (
|
|
|
|
|
nameCode LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
or ybbm LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
or sptm LIKE concat('%', #{unionCode}, '%'))
|
|
|
|
|
nameCode LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
or ybbm LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
or sptm LIKE concat('%', #{unionCode}, '%'))
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isDisable == false">
|
|
|
|
|
AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thrPiId != '' and thrPiId != null">
|
|
|
|
|
and (thirdId LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or thirdId1 LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or thirdId2 LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or thirdId3 LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or thirdId4 LIKE concat('%', #{thrPiId}, '%'))
|
|
|
|
|
or thirdId1 LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or thirdId2 LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or thirdId3 LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or thirdId4 LIKE concat('%', #{thrPiId}, '%'))
|
|
|
|
|
</if>
|
|
|
|
|
<if test="uuid != '' and uuid != null">
|
|
|
|
|
AND basic_udirel.uuid = #{uuid}
|
|
|
|
@ -540,31 +543,31 @@
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 1">
|
|
|
|
|
AND (thirdId <![CDATA[<>]]> '' or thirdId1 <![CDATA[<>]]> '' or thirdId2 <![CDATA[<>]]> '' or
|
|
|
|
|
thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '')
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '')
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 2">
|
|
|
|
|
AND basic_products.originUuid is NULL
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 3">
|
|
|
|
|
AND (mainId is NULL or mainId = '')
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 4">
|
|
|
|
|
AND thirdId1 is NULL
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 5">
|
|
|
|
|
AND thirdId2 is NULL
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 6">
|
|
|
|
|
AND thirdId3 is NULL
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 7">
|
|
|
|
|
AND thirdId4 is NULL
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 10">
|
|
|
|
|
AND basic_udirel.updateTime is NULL
|
|
|
|
@ -584,8 +587,6 @@
|
|
|
|
|
<if test="tyshxydm != '' and tyshxydm != null">
|
|
|
|
|
AND basic_products.tyshxydm = #{tyshxydm}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
GROUP BY cpmctymc, manufactory
|
|
|
|
|
</select>
|
|
|
|
@ -1249,5 +1250,4 @@
|
|
|
|
|
</where>
|
|
|
|
|
limit 1
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|