|
|
|
@ -23,7 +23,7 @@
|
|
|
|
|
]]>
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY id DESC
|
|
|
|
|
ORDER BY id
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -47,11 +47,13 @@
|
|
|
|
|
basic_udirel.mainId,
|
|
|
|
|
basic_udirel.isAdavence,
|
|
|
|
|
basic_udirel.purType,
|
|
|
|
|
basic_udirel.attributeType,basic_udirel.hcType,
|
|
|
|
|
basic_udirel.attributeType,
|
|
|
|
|
basic_udirel.hcType,
|
|
|
|
|
basic_udirel.lowStockNum,
|
|
|
|
|
basic_udirel.overStockNum,
|
|
|
|
|
basic_udirel.recentDateTime,
|
|
|
|
|
basic_udirel.isDateBy,basic_udirel.isStack,
|
|
|
|
|
basic_udirel.isDateBy,
|
|
|
|
|
basic_udirel.isStack,
|
|
|
|
|
bht.name classifyName,
|
|
|
|
|
basic_products.id as PRId,
|
|
|
|
|
basic_products.originUuid,
|
|
|
|
@ -105,19 +107,19 @@
|
|
|
|
|
basic_products.basicPrductRemak7,
|
|
|
|
|
basic_products.basicPrductRemak8,
|
|
|
|
|
basic_corp.name companyName,
|
|
|
|
|
basic_products.catalogname1,
|
|
|
|
|
basic_products.catalogname2,
|
|
|
|
|
basic_products.catalogname3,
|
|
|
|
|
basic_products.requireScanCode,
|
|
|
|
|
basic_products.matrial
|
|
|
|
|
basic_products.catalogname1,
|
|
|
|
|
basic_products.catalogname2,
|
|
|
|
|
basic_products.catalogname3,
|
|
|
|
|
basic_products.requireScanCode,
|
|
|
|
|
basic_products.matrial
|
|
|
|
|
FROM company_product_relevance
|
|
|
|
|
inner JOIN basic_udirel
|
|
|
|
|
ON company_product_relevance.udiRlIdFk = basic_udirel.id
|
|
|
|
|
inner JOIN basic_products
|
|
|
|
|
ON basic_udirel.uuid = basic_products.uuid
|
|
|
|
|
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
|
|
|
|
|
inner JOIN basic_udirel
|
|
|
|
|
ON company_product_relevance.udiRlIdFk = basic_udirel.id
|
|
|
|
|
inner JOIN basic_products
|
|
|
|
|
ON basic_udirel.uuid = basic_products.uuid
|
|
|
|
|
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 basic_products.ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc}, '%')
|
|
|
|
@ -143,18 +145,18 @@
|
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
|
and (
|
|
|
|
|
nameCode LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
or basic_products.ybbm LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
or basic_products.sptm LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
)
|
|
|
|
|
or basic_products.ybbm LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
or basic_products.sptm LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
)
|
|
|
|
|
</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}, '%')
|
|
|
|
|
)
|
|
|
|
|
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="uuid != '' and uuid != null">
|
|
|
|
|
AND basic_udirel.uuid = #{uuid}
|
|
|
|
@ -258,7 +260,7 @@
|
|
|
|
|
and (tp.flbm = #{flbm} or basic_products.flbm = #{flbm})
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ids != null and ids.size() != 0">
|
|
|
|
|
and company_product_relevance.id in
|
|
|
|
|
and company_product_relevance.id in
|
|
|
|
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
@ -337,9 +339,9 @@
|
|
|
|
|
<insert id="insertCompanyProductRelevance"
|
|
|
|
|
parameterType="com.glxp.api.entity.basic.UdiRlSupEntity">
|
|
|
|
|
replace
|
|
|
|
|
INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
|
|
|
|
|
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
|
|
|
|
|
price, createUser, updateUser)
|
|
|
|
|
INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
|
|
|
|
|
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
|
|
|
|
|
price, createUser, updateUser)
|
|
|
|
|
values (#{id}, #{customerId},
|
|
|
|
|
#{productId},
|
|
|
|
|
#{enterpriseId},
|
|
|
|
@ -359,9 +361,9 @@
|
|
|
|
|
<insert id="importCompanyProductRelevance"
|
|
|
|
|
parameterType="com.glxp.api.entity.basic.UdiRlSupEntity">
|
|
|
|
|
replace
|
|
|
|
|
INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
|
|
|
|
|
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
|
|
|
|
|
price, createUser, updateUser)
|
|
|
|
|
INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
|
|
|
|
|
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
|
|
|
|
|
price, createUser, updateUser)
|
|
|
|
|
values (#{id},
|
|
|
|
|
#{customerId},
|
|
|
|
|
#{productId},
|
|
|
|
@ -406,9 +408,9 @@
|
|
|
|
|
<select id="selectSupRlCount" resultType="java.lang.Long">
|
|
|
|
|
select count(*)
|
|
|
|
|
FROM company_product_relevance
|
|
|
|
|
inner JOIN basic_udirel
|
|
|
|
|
ON company_product_relevance.udiRlIdFk = basic_udirel.id
|
|
|
|
|
inner JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
|
|
|
|
|
inner JOIN basic_udirel
|
|
|
|
|
ON company_product_relevance.udiRlIdFk = basic_udirel.id
|
|
|
|
|
inner JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
|
|
|
|
|
<where>
|
|
|
|
|
<if test="nameCode != '' and nameCode != null">
|
|
|
|
|
AND nameCode LIKE concat(#{nameCode}, '%')
|
|
|
|
|