|
|
|
@ -461,6 +461,188 @@
|
|
|
|
|
ORDER BY modifyTime DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="filterUdiGpexist" 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
|
|
|
|
|
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
|
|
|
|
|
<where>
|
|
|
|
|
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
|
|
|
|
|
AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="relCode != '' and relCode != null">
|
|
|
|
|
AND relCode = #{relCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bindType != '' and bindType != null">
|
|
|
|
|
AND (relCode is null
|
|
|
|
|
or trim(relCode) = '')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="supName != '' and supName != null">
|
|
|
|
|
AND supName LIKE concat('%', #{supName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="nameCode != '' and nameCode != null">
|
|
|
|
|
AND nameCode LIKE concat(#{nameCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cpmctymc != '' and cpmctymc != null">
|
|
|
|
|
AND basic_products.cpmctymc LIKE concat('%', #{cpmctymc}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="entireCpmctymc != '' and entireCpmctymc != null">
|
|
|
|
|
AND basic_products.cpmctymc = #{entireCpmctymc}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ggxh != '' and ggxh != null">
|
|
|
|
|
AND basic_products.ggxh LIKE concat('%', #{ggxh}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
|
and (
|
|
|
|
|
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="isDisable == true">
|
|
|
|
|
AND basic_udirel.isDisable = true
|
|
|
|
|
</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}, '%'))
|
|
|
|
|
</if>
|
|
|
|
|
<if test="uuid != '' and uuid != null">
|
|
|
|
|
AND basic_udirel.uuid = #{uuid}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thirdId != '' and thirdId != null">
|
|
|
|
|
AND thirdId = #{thirdId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="udplatCode != '' and udplatCode != null">
|
|
|
|
|
AND udplatCode = #{udplatCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
|
|
|
|
|
AND basic_products.zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="diType != '' and diType != null">
|
|
|
|
|
AND diType = #{diType}
|
|
|
|
|
</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[<>]]> ''
|
|
|
|
|
</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[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 4">
|
|
|
|
|
AND thirdId1 is NULL
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 5">
|
|
|
|
|
AND thirdId2 is NULL
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 6">
|
|
|
|
|
AND thirdId3 is NULL
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 7">
|
|
|
|
|
AND thirdId4 is NULL
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="filterType != null and filterType == 10">
|
|
|
|
|
AND basic_udirel.updateTime is NULL
|
|
|
|
|
</if>
|
|
|
|
|
<if test="lockStatus != '' and lockStatus != null">
|
|
|
|
|
AND basic_udirel.lockStatus = #{lockStatus}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="mainId != '' and mainId != null">
|
|
|
|
|
AND mainId = #{mainId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="id != '' and id != null">
|
|
|
|
|
AND basic_udirel.id = #{id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="originUuid != null and originUuid != ''">
|
|
|
|
|
and originUuid = #{originUuid}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="manufactory != null and manufactory != ''">
|
|
|
|
|
and basic_products.manufactory LIKE concat('%', #{manufactory}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dispatch != null">
|
|
|
|
|
and basic_udirel.dispatch = #{dispatch}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="groupBuy != null">
|
|
|
|
|
and basic_udirel.groupBuy = #{groupBuy}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="existid != null and existid.size() != 0">
|
|
|
|
|
and basic_udirel.id not in
|
|
|
|
|
<foreach collection="existid" item="item" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY modifyTime DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 资质证书选入产品分组查询-->
|
|
|
|
|
<select id="filterCertUdi" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
|
|
|
|
|
resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
|
|
|
|
|