|
@@ -754,4 +754,44 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="searchByTypeAndNameAdd" parameterType="com.diagbot.vo.SearchConceptVO"
|
|
|
+ resultType="com.diagbot.dto.GetAllForRelationDTO">
|
|
|
+ SELECT
|
|
|
+ kc.id AS conceptId,
|
|
|
+ kc.lib_name AS conceptName,
|
|
|
+ kc.lib_type AS libType,
|
|
|
+ kc.lib_name AS conceptNameType,
|
|
|
+ kli.remark
|
|
|
+FROM
|
|
|
+ `kl_concept` kc,
|
|
|
+kl_library_info kli
|
|
|
+WHERE
|
|
|
+ <if test="libType!=null">
|
|
|
+ kc.lib_type = #{libType}
|
|
|
+ </if>
|
|
|
+AND kc.`status` = 1
|
|
|
+AND kc.is_deleted = 'N'
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND UPPER(kc.lib_name) LIKE CONCAT('%', UPPER(trim(#{name})), '%')
|
|
|
+ </if>
|
|
|
+ <if test="excludedConceptIds != null and excludedConceptIds.size > 0">
|
|
|
+ AND kc.id not in
|
|
|
+ <foreach item="id" collection="excludedConceptIds" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+AND kc.id NOT IN (
|
|
|
+ SELECT DISTINCT
|
|
|
+ start_id
|
|
|
+ FROM
|
|
|
+ kl_relation
|
|
|
+ WHERE
|
|
|
+ is_deleted = 'N'
|
|
|
+ AND relation_id = 600
|
|
|
+)
|
|
|
+AND kc.id = kli.concept_id
|
|
|
+AND kli.is_deleted = 'N'
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|