|
|
@ -1,7 +1,7 @@
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.glxp.api.dao.basic.BasicDestinyRelMapper">
|
|
|
|
<mapper namespace="com.glxp.api.dao.basic.BasicDestinyRelMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicDestinyRel">
|
|
|
|
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicDestinyRelEntity">
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
<!--@Table udi_wms.basic_destiny_rel-->
|
|
|
|
<!--@Table udi_wms.basic_destiny_rel-->
|
|
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
|
@ -13,4 +13,287 @@
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
id, relId, pId, `count`
|
|
|
|
id, relId, pId, `count`
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="filterUdiJoinSup" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
|
|
|
|
|
|
|
|
resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
|
|
|
|
|
|
|
|
select basic_udirel.*,
|
|
|
|
|
|
|
|
basic_products.id as PRId,
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
|
|
|
company_product_relevance.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,
|
|
|
|
|
|
|
|
basic_products.sfwblztlcp,
|
|
|
|
|
|
|
|
basic_products.cgzmraqxgxx,
|
|
|
|
|
|
|
|
basic_products.sfbjwycxsy,
|
|
|
|
|
|
|
|
basic_products.zdcfsycs,
|
|
|
|
|
|
|
|
basic_products.sfwwjbz,
|
|
|
|
|
|
|
|
basic_products.syqsfxyjxmj,
|
|
|
|
|
|
|
|
basic_products.mjfs,
|
|
|
|
|
|
|
|
basic_products.categoryName,
|
|
|
|
|
|
|
|
company_product_relevance.unitFk,
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
left join basic_product_category_rel on basic_product_category_rel.relId = basic_udirel.id
|
|
|
|
|
|
|
|
left join basic_product_category on basic_product_category_rel.code = basic_product_category.code
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
|
|
|
|
|
|
|
|
AND basic_products.ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="category != '' and category != null">
|
|
|
|
|
|
|
|
AND basic_product_category.name = #{category}
|
|
|
|
|
|
|
|
</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 basic_products.ggxh LIKE concat('%', #{ggxh}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="cpmctymc != '' and cpmctymc != null">
|
|
|
|
|
|
|
|
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 basic_udirel.thirdId LIKE concat(#{thirdId}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="uuid != '' and uuid != null">
|
|
|
|
|
|
|
|
AND basic_udirel.uuid = #{uuid}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="unitFk != '' and unitFk != null">
|
|
|
|
|
|
|
|
AND company_product_relevance.unitFk = #{unitFk}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="id != '' and id != null">
|
|
|
|
|
|
|
|
AND basic_udirel.id = #{id}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="udplatCode != '' and udplatCode != null">
|
|
|
|
|
|
|
|
AND basic_udirel.udplatCode = #{udplatCode}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="diType != null">
|
|
|
|
|
|
|
|
AND basic_products.diType = #{diType}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lockStatus != '' and lockStatus != null">
|
|
|
|
|
|
|
|
AND basic_udirel.lockStatus = #{lockStatus}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
|
|
|
|
|
|
|
|
AND basic_products.zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
|
|
|
|
|
|
|
|
]]>
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="mainId != '' and mainId != null">
|
|
|
|
|
|
|
|
AND mainId = #{mainId}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="unionFilterStr != '' and unionFilterStr != null">
|
|
|
|
|
|
|
|
or basic_products.cpmctymc LIKE concat('%', #{unionFilterStr}, '%')
|
|
|
|
|
|
|
|
or basic_products.ylqxzcrbarmc LIKE concat('%', #{unionFilterStr}, '%')
|
|
|
|
|
|
|
|
or basic_products.ggxh LIKE concat('%', #{unionFilterStr}, '%')
|
|
|
|
|
|
|
|
or basic_products.zczbhhzbapzbh LIKE concat('%', #{unionFilterStr}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="isAdavence != '' and isAdavence != null">
|
|
|
|
|
|
|
|
AND isAdavence = #{isAdavence}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="uniqueNameCode != '' and uniqueNameCode != null">
|
|
|
|
|
|
|
|
AND nameCode = #{uniqueNameCode}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="relIds != null and relIds.size() > 0">
|
|
|
|
|
|
|
|
and basic_udirel.id in
|
|
|
|
|
|
|
|
<foreach collection="relIds" item="item" index="index" separator="," open="(" close=")">
|
|
|
|
|
|
|
|
#{item}
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="flbm != '' and flbm != null">
|
|
|
|
|
|
|
|
and (tp.flbm = #{flbm} or basic_products.flbm = #{flbm} or tp.cplb = #{flbm} or
|
|
|
|
|
|
|
|
basic_udirel.relCode = #{flbm})
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="companyName != '' and companyName != null">
|
|
|
|
|
|
|
|
AND basic_corp.name like concat('%', #{companyName}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="basicPrductRemak1 != '' and basicPrductRemak1 != null">
|
|
|
|
|
|
|
|
AND basic_products.basicPrductRemak1 like concat('%', #{basicPrductRemak1}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="basicPrductRemak2 != '' and basicPrductRemak2 != null">
|
|
|
|
|
|
|
|
AND basic_products.basicPrductRemak2 like concat('%', #{basicPrductRemak2}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="basicPrductRemak3 != '' and basicPrductRemak3 != null">
|
|
|
|
|
|
|
|
AND basic_products.basicPrductRemak3 like concat('%', #{basicPrductRemak3}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="basicPrductRemak4 != '' and basicPrductRemak4 != null">
|
|
|
|
|
|
|
|
AND basic_products.basicPrductRemak4 like concat('%', #{basicPrductRemak4}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="basicPrductRemak5 != '' and basicPrductRemak5 != null">
|
|
|
|
|
|
|
|
AND basic_products.basicPrductRemak5 like concat('%', #{basicPrductRemak5}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="basicPrductRemak6 != '' and basicPrductRemak6 != null">
|
|
|
|
|
|
|
|
AND basic_products.basicPrductRemak6 like concat('%', #{basicPrductRemak6}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="basicPrductRemak7 != '' and basicPrductRemak7 != null">
|
|
|
|
|
|
|
|
AND basic_products.basicPrductRemak7 like concat('%', #{basicPrductRemak7}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="basicPrductRemak8 != '' and basicPrductRemak8 != null">
|
|
|
|
|
|
|
|
AND basic_products.basicPrductRemak8 like concat('%', #{basicPrductRemak8}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
GROUP BY basic_udirel.id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="filterDestinyProducts" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
|
|
|
|
|
|
|
|
resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
|
|
|
|
|
|
|
|
SELECT
|
|
|
|
|
|
|
|
basic_udirel.*,
|
|
|
|
|
|
|
|
basic_products.id AS PRId,
|
|
|
|
|
|
|
|
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.basicPrductRemak1,
|
|
|
|
|
|
|
|
basic_products.basicPrductRemak2,
|
|
|
|
|
|
|
|
basic_products.basicPrductRemak3,
|
|
|
|
|
|
|
|
basic_products.basicPrductRemak4,
|
|
|
|
|
|
|
|
basic_products.basicPrductRemak5,
|
|
|
|
|
|
|
|
basic_products.basicPrductRemak6,
|
|
|
|
|
|
|
|
basic_products.basicPrductRemak7,
|
|
|
|
|
|
|
|
basic_products.basicPrductRemak8,
|
|
|
|
|
|
|
|
basic_destiny_rel.count as count,
|
|
|
|
|
|
|
|
basic_destiny_rel.id as deId
|
|
|
|
|
|
|
|
FROM
|
|
|
|
|
|
|
|
basic_udirel
|
|
|
|
|
|
|
|
INNER JOIN basic_products ON basic_products.uuid = basic_udirel.uuid
|
|
|
|
|
|
|
|
INNER JOIN basic_destiny_rel ON basic_destiny_rel.relId = basic_udirel.id
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="ids != null and ids.size() > 0">
|
|
|
|
|
|
|
|
and basic_udirel.id in
|
|
|
|
|
|
|
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
|
|
|
|
|
|
|
#{item}
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="diType != null">
|
|
|
|
|
|
|
|
AND basic_products.diType = #{diType}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="cpmctymc != '' and cpmctymc != null">
|
|
|
|
|
|
|
|
AND basic_products.cpmctymc like concat('%', #{cpmctymc}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|