|
|
|
@ -179,35 +179,55 @@
|
|
|
|
|
basic_products.basicPrductRemak7,
|
|
|
|
|
basic_products.basicPrductRemak8,
|
|
|
|
|
company_product_relevance.unitFk,
|
|
|
|
|
basic_corp.erpId as customerId,
|
|
|
|
|
basic_corp.name companyName
|
|
|
|
|
basic_corp.erpId as customerId,
|
|
|
|
|
basic_corp.name companyName
|
|
|
|
|
FROM basic_udirel
|
|
|
|
|
inner JOIN basic_products
|
|
|
|
|
ON basic_products.uuid = basic_udirel.uuid
|
|
|
|
|
left join company_product_relevance
|
|
|
|
|
on basic_udirel.id = company_product_relevance.udiRlIdFk
|
|
|
|
|
left JOIN basic_corp on basic_corp.erpId = company_product_relevance.customerId
|
|
|
|
|
left join basic_hosp_type bht on basic_udirel.relCode = bht.code
|
|
|
|
|
left join thr_products tp on tp.code = basic_udirel.mainId
|
|
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
|
|
|
|
|
AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')
|
|
|
|
|
AND basic_products.ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="manufactory != '' and manufactory != null">
|
|
|
|
|
AND basic_products.manufactory LIKE concat('%', #{manufactory}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="supName != '' and supName != null">
|
|
|
|
|
AND supName LIKE concat('%', #{supName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ids != null and ids.size() > 0">
|
|
|
|
|
and basic_udirel.id not in
|
|
|
|
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="pinyinInitial != null and pinyinInitial != ''">
|
|
|
|
|
AND basic_products.pinyinInitial like concat('%', #{pinyinInitial}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thrPiId != '' and thrPiId != null">
|
|
|
|
|
and (basic_udirel.thirdId LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or basic_udirel.thirdId1 LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or basic_udirel.thirdId2 LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or basic_udirel.thirdId3 LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
|
or basic_udirel.thirdId4 LIKE concat('%', #{thrPiId}, '%'))
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ggxh != '' and ggxh != null">
|
|
|
|
|
AND ggxh LIKE concat('%', #{ggxh}, '%')
|
|
|
|
|
AND basic_products.ggxh LIKE concat('%', #{ggxh}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cpmctymc != '' and cpmctymc != null">
|
|
|
|
|
AND cpmctymc LIKE concat('%', #{cpmctymc}, '%')
|
|
|
|
|
AND basic_products.cpmctymc LIKE concat('%', #{cpmctymc}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="nameCode != '' and nameCode != null">
|
|
|
|
|
AND nameCode LIKE concat(#{nameCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thirdId != '' and thirdId != null">
|
|
|
|
|
AND thirdId LIKE concat(#{thirdId}, '%')
|
|
|
|
|
AND basic_udirel.thirdId LIKE concat(#{thirdId}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="uuid != '' and uuid != null">
|
|
|
|
|
AND basic_udirel.uuid = #{uuid}
|
|
|
|
@ -228,7 +248,7 @@
|
|
|
|
|
AND basic_udirel.lockStatus = #{lockStatus}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
|
|
|
|
|
AND zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%')
|
|
|
|
|
AND basic_products.zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
|
<![CDATA[
|
|
|
|
@ -256,6 +276,12 @@
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="flbm != '' and flbm != null">
|
|
|
|
|
and (tp.flbm = #{flbm} or basic_products.flbm = #{flbm} or tp.cplb = #{flbm})
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyName != '' and companyName != null">
|
|
|
|
|
AND basic_corp.name like concat('%', #{companyName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -336,13 +362,13 @@
|
|
|
|
|
AND nameCode LIKE concat(#{nameCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cpmctymc != '' and cpmctymc != null">
|
|
|
|
|
AND cpmctymc LIKE concat('%', #{cpmctymc}, '%')
|
|
|
|
|
AND basic_products.cpmctymc LIKE concat('%', #{cpmctymc}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="entireCpmctymc != '' and entireCpmctymc != null">
|
|
|
|
|
AND cpmctymc = #{entireCpmctymc}
|
|
|
|
|
AND basic_products.cpmctymc = #{entireCpmctymc}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ggxh != '' and ggxh != null">
|
|
|
|
|
AND ggxh LIKE concat('%', #{ggxh}, '%')
|
|
|
|
|
AND basic_products.ggxh LIKE concat('%', #{ggxh}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
|
and (
|
|
|
|
@ -354,7 +380,7 @@
|
|
|
|
|
AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isDisable == true">
|
|
|
|
|
AND basic_udirel.isDisable = true
|
|
|
|
|
AND basic_udirel.isDisable = true
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thrPiId != '' and thrPiId != null">
|
|
|
|
|
and (thirdId LIKE concat('%', #{thrPiId}, '%')
|
|
|
|
@ -373,7 +399,7 @@
|
|
|
|
|
AND udplatCode = #{udplatCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
|
|
|
|
|
AND zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%')
|
|
|
|
|
AND basic_products.zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="diType != '' and diType != null">
|
|
|
|
|
AND diType = #{diType}
|
|
|
|
@ -422,7 +448,7 @@
|
|
|
|
|
and originUuid = #{originUuid}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="manufactory != null and manufactory != ''">
|
|
|
|
|
and manufactory LIKE concat('%', #{manufactory}, '%')
|
|
|
|
|
and basic_products.manufactory LIKE concat('%', #{manufactory}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dispatch != null">
|
|
|
|
|
and basic_udirel.dispatch = #{dispatch}
|
|
|
|
@ -1266,14 +1292,12 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectRelIdByName" resultType="java.lang.String">
|
|
|
|
|
SELECT
|
|
|
|
|
b2.id
|
|
|
|
|
FROM
|
|
|
|
|
basic_products b1
|
|
|
|
|
LEFT JOIN basic_udirel b2 ON b1.uuid = b2.uuid
|
|
|
|
|
SELECT b2.id
|
|
|
|
|
FROM basic_products b1
|
|
|
|
|
LEFT JOIN basic_udirel b2 ON b1.uuid = b2.uuid
|
|
|
|
|
<where>
|
|
|
|
|
<if test="productName != '' and productName != null">
|
|
|
|
|
AND b1.cpmctymc like concat('%', #{productName}, '%')
|
|
|
|
|
AND b1.cpmctymc like concat('%', #{productName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|