|
@@ -312,6 +312,110 @@
|
|
|
concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%')))
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="staticKnowledgeIndexPageVO.typeIds.contains(109) or staticKnowledgeIndexPageVO.typeIds.contains(110)">
|
|
|
+ UNION
|
|
|
+ SELECT DISTINCT
|
|
|
+ concat( '1', e.lib_type ) AS moduleNo,
|
|
|
+ e.id AS id,
|
|
|
+ e.lib_name AS NAME,
|
|
|
+ b.lib_name AS retrievalName,
|
|
|
+ 1 AS isConcept,
|
|
|
+ e.lib_type AS type,
|
|
|
+ c.name AS typeName,
|
|
|
+ NULL AS code
|
|
|
+ FROM
|
|
|
+ kl_library_info a,
|
|
|
+ kl_concept b,
|
|
|
+ kl_lexicon c,
|
|
|
+ kl_relation d,
|
|
|
+ kl_concept e
|
|
|
+ WHERE
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
+ AND c.is_deleted = 'N'
|
|
|
+ AND d.is_deleted = 'N'
|
|
|
+ AND e.is_deleted = 'N'
|
|
|
+ AND a.concept_id = b.id
|
|
|
+ AND b.id = d.end_id
|
|
|
+ AND e.id = d.start_id
|
|
|
+ AND e.lib_type = c.code
|
|
|
+ AND b.lib_type = 110
|
|
|
+ AND e.lib_type = 109
|
|
|
+ AND d.relation_id = 600
|
|
|
+ AND b.`status` = 1
|
|
|
+ <if test="staticKnowledgeIndexPageVO.inputStr!=null and staticKnowledgeIndexPageVO.inputStr!=''">
|
|
|
+ AND ( a.name = #{staticKnowledgeIndexPageVO.inputStr} OR LOWER(a.spell) =
|
|
|
+ LOWER(#{staticKnowledgeIndexPageVO.inputStr}))
|
|
|
+ </if>
|
|
|
+ UNION
|
|
|
+ SELECT DISTINCT
|
|
|
+ concat( '2', e.lib_type ) AS moduleNo,
|
|
|
+ e.id AS id,
|
|
|
+ e.lib_name AS NAME,
|
|
|
+ b.lib_name AS retrievalName,
|
|
|
+ 1 AS isConcept,
|
|
|
+ e.lib_type AS type,
|
|
|
+ c.name AS typeName,
|
|
|
+ NULL AS code
|
|
|
+ FROM
|
|
|
+ kl_library_info a,
|
|
|
+ kl_concept b,
|
|
|
+ kl_lexicon c,
|
|
|
+ kl_relation d,
|
|
|
+ kl_concept e
|
|
|
+ WHERE
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
+ AND c.is_deleted = 'N'
|
|
|
+ AND d.is_deleted = 'N'
|
|
|
+ AND e.is_deleted = 'N'
|
|
|
+ AND a.concept_id = b.id
|
|
|
+ AND b.id = d.end_id
|
|
|
+ AND e.id = d.start_id
|
|
|
+ AND e.lib_type = c.code
|
|
|
+ AND b.lib_type = 110
|
|
|
+ AND e.lib_type = 109
|
|
|
+ AND d.relation_id = 600
|
|
|
+ AND b.`status` = 1
|
|
|
+ <if test="staticKnowledgeIndexPageVO.inputStr!=null and staticKnowledgeIndexPageVO.inputStr!=''">
|
|
|
+ AND ( a.name LIKE concat(#{staticKnowledgeIndexPageVO.inputStr},'%') OR LOWER(a.spell) LIKE LOWER(
|
|
|
+ concat(#{staticKnowledgeIndexPageVO.inputStr},'%')))
|
|
|
+ </if>
|
|
|
+ UNION
|
|
|
+ SELECT DISTINCT
|
|
|
+ concat( '3', e.lib_type ) AS moduleNo,
|
|
|
+ e.id AS id,
|
|
|
+ e.lib_name AS NAME,
|
|
|
+ b.lib_name AS retrievalName,
|
|
|
+ 1 AS isConcept,
|
|
|
+ e.lib_type AS type,
|
|
|
+ c.name AS typeName,
|
|
|
+ NULL AS code
|
|
|
+ FROM
|
|
|
+ kl_library_info a,
|
|
|
+ kl_concept b,
|
|
|
+ kl_lexicon c,
|
|
|
+ kl_relation d,
|
|
|
+ kl_concept e
|
|
|
+ WHERE
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
+ AND c.is_deleted = 'N'
|
|
|
+ AND d.is_deleted = 'N'
|
|
|
+ AND e.is_deleted = 'N'
|
|
|
+ AND a.concept_id = b.id
|
|
|
+ AND b.id = d.end_id
|
|
|
+ AND e.id = d.start_id
|
|
|
+ AND e.lib_type = c.code
|
|
|
+ AND b.lib_type = 110
|
|
|
+ AND e.lib_type = 109
|
|
|
+ AND d.relation_id = 600
|
|
|
+ AND b.`status` = 1
|
|
|
+ <if test="staticKnowledgeIndexPageVO.inputStr!=null and staticKnowledgeIndexPageVO.inputStr!=''">
|
|
|
+ AND ( a.name LIKE concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%') OR LOWER(a.spell) LIKE LOWER(
|
|
|
+ concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%')))
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
<if test="staticKnowledgeIndexPageVO.typeIds.contains(100) ">
|
|
|
UNION
|
|
|
SELECT
|