|
|
|
@ -354,20 +354,22 @@
|
|
|
|
|
<select id="findNcByCategory" resultMap="BaseResultMap">
|
|
|
|
|
SELECT NC.NC_CODE , NCT.DESCRIPTION
|
|
|
|
|
FROM NC_CODE NC
|
|
|
|
|
INNER JOIN NC_CODE_DEF NCD ON NC.HANDLE = NCD.NC_CODE_OR_GROUP_GBO AND NCD.CAN_BE_PRIMARY_CODE = 'true'
|
|
|
|
|
/*判断是否是主数据*/
|
|
|
|
|
/*INNER JOIN NC_CODE_DEF NCD ON NC.HANDLE = NCD.NC_CODE_OR_GROUP_GBO AND NCD.CAN_BE_PRIMARY_CODE = 'true'*/
|
|
|
|
|
INNER JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE AND NCT.LOCALE = #{locale}
|
|
|
|
|
LEFT JOIN NC_GROUP_MEMBER NGM ON NGM.NC_CODE_OR_GROUP_GBO = NC.HANDLE
|
|
|
|
|
LEFT JOIN NC_GROUP NG ON NG.HANDLE = NGM.NC_GROUP_BO
|
|
|
|
|
<where>
|
|
|
|
|
NC.SITE = #{site}
|
|
|
|
|
AND NCD.CAN_BE_PRIMARY_CODE = 'true'
|
|
|
|
|
<if test="messageType != null and messageType != ''">
|
|
|
|
|
AND NC.NC_CATEGORY =#{messageType}
|
|
|
|
|
</if>
|
|
|
|
|
AND NG.NC_GROUP LIKE 'E\_%' ESCAPE '\'
|
|
|
|
|
<if test="code != null and code != ''">
|
|
|
|
|
AND NC.NC_CDDE = #{code}
|
|
|
|
|
</if>
|
|
|
|
|
AND NC.STATUS_BO = 'StatusBO:' || #{site} || ',101'
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!--暂时不用-->
|
|
|
|
|
<select id="findSecondaryNcByNc" resultMap="BaseResultMap">
|
|
|
|
|
SELECT SUBSTR(nsc.NC_CODE_OR_GROUP_GBO, instr(nsc.NC_CODE_OR_GROUP_GBO,',')+1) NC_CODE,nct.DESCRIPTION
|
|
|
|
|
FROM NC_CODE nc
|
|
|
|
@ -409,9 +411,10 @@
|
|
|
|
|
INNER JOIN NC_CODE NC ON NGM.NC_CODE_OR_GROUP_GBO = NC.HANDLE
|
|
|
|
|
LEFT JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE AND NCT.LOCALE = 'zh'
|
|
|
|
|
<where>
|
|
|
|
|
NC.STATUS_BO = 'StatusBO:' || #{ncGroup.site} || ',101'
|
|
|
|
|
<if test="ncGroup != null">
|
|
|
|
|
<if test="ncGroup.site != null and ncGroup.site != ''">
|
|
|
|
|
NG.SITE = #{ncGroup.site}
|
|
|
|
|
AND NG.SITE = #{ncGroup.site}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ncGroup.ncGroup != null and ncGroup.ncGroup != null">
|
|
|
|
|
AND NG.NC_GROUP = #{ncGroup.ncGroup}
|
|
|
|
@ -432,6 +435,7 @@
|
|
|
|
|
<foreach collection="ncCode" open="(" close=")" item="item" separator=",">
|
|
|
|
|
UPPER(#{item})
|
|
|
|
|
</foreach>
|
|
|
|
|
AND NC.STATUS_BO = 'StatusBO:' || #{site} || ',101'
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|