|
|
|
@ -43,6 +43,8 @@
|
|
|
|
|
basic_products.allowNoBatch,
|
|
|
|
|
basic_products.allowNoExpire,
|
|
|
|
|
basic_products.allowNoProduct,
|
|
|
|
|
basic_products.allowNoSerial,
|
|
|
|
|
|
|
|
|
|
basic_products.spmc,
|
|
|
|
|
basic_products.cplx,
|
|
|
|
|
basic_products.hchzsb,
|
|
|
|
@ -161,6 +163,7 @@
|
|
|
|
|
basic_products.allowNoBatch,
|
|
|
|
|
basic_products.allowNoExpire,
|
|
|
|
|
basic_products.allowNoProduct,
|
|
|
|
|
basic_products.allowNoSerial,
|
|
|
|
|
basic_products.spmc,
|
|
|
|
|
basic_products.cplx,
|
|
|
|
|
basic_products.hchzsb,
|
|
|
|
@ -289,6 +292,7 @@
|
|
|
|
|
basic_products.allowNoBatch,
|
|
|
|
|
basic_products.allowNoExpire,
|
|
|
|
|
basic_products.allowNoProduct,
|
|
|
|
|
basic_products.allowNoSerial,
|
|
|
|
|
basic_products.spmc,
|
|
|
|
|
basic_products.cplx,
|
|
|
|
|
basic_products.hchzsb,
|
|
|
|
@ -404,6 +408,169 @@
|
|
|
|
|
ORDER BY modifyTime DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 资质证书选入产品分组查询-->
|
|
|
|
|
<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
|
|
|
|
|
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="manufactory != '' and manufactory != null">
|
|
|
|
|
AND manufactory LIKE concat('%', #{manufactory}, '%')
|
|
|
|
|
</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 cpmctymc LIKE concat('%', #{cpmctymc}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ggxh != '' and ggxh != null">
|
|
|
|
|
AND 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="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 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>
|
|
|
|
|
</where>
|
|
|
|
|
GROUP BY cpmctymc, manufactory
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="contrastJoinSelect" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
|
|
|
|
|
resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
|
|
|
|
|
select basic_udirel.*,
|
|
|
|
@ -444,6 +611,7 @@
|
|
|
|
|
basic_products.allowNoBatch,
|
|
|
|
|
basic_products.allowNoExpire,
|
|
|
|
|
basic_products.allowNoProduct,
|
|
|
|
|
basic_products.allowNoSerial,
|
|
|
|
|
basic_products.spmc,
|
|
|
|
|
basic_products.cplx,
|
|
|
|
|
basic_products.hchzsb,
|
|
|
|
@ -863,6 +1031,7 @@
|
|
|
|
|
basic_products.allowNoBatch,
|
|
|
|
|
basic_products.allowNoExpire,
|
|
|
|
|
basic_products.allowNoProduct,
|
|
|
|
|
basic_products.allowNoSerial,
|
|
|
|
|
basic_products.spmc,
|
|
|
|
|
basic_products.cplx,
|
|
|
|
|
basic_products.hchzsb,
|
|
|
|
|