|
@@ -452,12 +452,7 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
AND (t2.spell = UPPER(#{InputStr}) OR t2.name = #{InputStr})
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- GROUP BY t1.id
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- LIMIT 100
|
|
|
- </if>)
|
|
|
+ GROUP BY t1.id
|
|
|
UNION
|
|
|
(SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
|
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
@@ -494,12 +489,7 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
AND (t2.spell LIKE CONCAT( UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT( #{InputStr},'%'))
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- GROUP BY t1.id
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- LIMIT 100
|
|
|
- </if>)
|
|
|
+ GROUP BY t1.id
|
|
|
UNION
|
|
|
(SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
|
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
@@ -536,31 +526,16 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',#{InputStr},'%'))
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- GROUP BY t1.id
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- LIMIT 100
|
|
|
- </if>)
|
|
|
+ GROUP BY t1.id
|
|
|
<if test="detilType != null and detilType != ''">
|
|
|
UNION
|
|
|
(SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- ,t1.lib_type libTypeId
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- ,t5.lib_type libTypeId
|
|
|
- </if> ,t6.`name` libTypeName FROM kl_concept t1
|
|
|
+ ,t1.lib_type libTypeId
|
|
|
+ ,t6.`name` libTypeName FROM kl_concept t1
|
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
|
LEFT JOIN kl_relation t4 ON t4.end_id= t1.id
|
|
|
LEFT JOIN kl_concept t5 on t5.id = t4.start_id
|
|
|
- LEFT JOIN kl_lexicon t6 ON
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- t6.id = t1.lib_type
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- t6.id = t5.lib_type
|
|
|
- </if>
|
|
|
+ LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
|
|
|
LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
|
|
|
WHERE
|
|
|
t1.is_deleted = 'N'
|
|
@@ -590,30 +565,15 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
AND t4.relation_id = 18
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- GROUP BY t5.id
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- LIMIT 100
|
|
|
- </if>)
|
|
|
+ GROUP BY t5.id
|
|
|
UNION
|
|
|
(SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- ,t1.lib_type libTypeId
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- ,t5.lib_type libTypeId
|
|
|
- </if> ,t6.`name` libTypeName FROM kl_concept t1
|
|
|
+ ,t1.lib_type libTypeId
|
|
|
+ ,t6.`name` libTypeName FROM kl_concept t1
|
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
|
LEFT JOIN kl_relation t4 ON t4.end_id= t1.id
|
|
|
LEFT JOIN kl_concept t5 on t5.id = t4.start_id
|
|
|
- LEFT JOIN kl_lexicon t6 ON
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- t6.id = t1.lib_type
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- t6.id = t5.lib_type
|
|
|
- </if>
|
|
|
+ LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
|
|
|
LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
|
|
|
WHERE
|
|
|
t1.is_deleted = 'N'
|
|
@@ -643,30 +603,15 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
AND t4.relation_id = 18
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- GROUP BY t5.id
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- LIMIT 100
|
|
|
- </if>)
|
|
|
+ GROUP BY t5.id
|
|
|
UNION
|
|
|
(SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- ,t1.lib_type libTypeId
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- ,t5.lib_type libTypeId
|
|
|
- </if> ,t6.`name` libTypeName FROM kl_concept t1
|
|
|
+ ,t1.lib_type libTypeId
|
|
|
+ ,t6.`name` libTypeName FROM kl_concept t1
|
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
|
LEFT JOIN kl_relation t4 ON t4.end_id= t1.id
|
|
|
LEFT JOIN kl_concept t5 on t5.id = t4.start_id
|
|
|
- LEFT JOIN kl_lexicon t6 ON
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- t6.id = t1.lib_type
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- t6.id = t5.lib_type
|
|
|
- </if>
|
|
|
+ LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
|
|
|
LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
|
|
|
WHERE
|
|
|
t1.is_deleted = 'N'
|
|
@@ -696,14 +641,8 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
AND t4.relation_id = 18
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- GROUP BY t5.id
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- LIMIT 100
|
|
|
- </if>)
|
|
|
+ GROUP BY t5.id
|
|
|
</if>
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
UNION
|
|
|
(SELECT 0 selfId,null selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
|
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
@@ -739,12 +678,7 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
AND t4.relation_id = 18
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- GROUP BY t5.id
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- LIMIT 100
|
|
|
- </if>)
|
|
|
+ GROUP BY t5.id
|
|
|
UNION
|
|
|
(SELECT 0 selfId,null selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
|
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
@@ -780,12 +714,7 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
AND t4.relation_id = 18
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- GROUP BY t5.id
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- LIMIT 100
|
|
|
- </if>)
|
|
|
+ GROUP BY t5.id
|
|
|
UNION
|
|
|
(SELECT 0 selfId,null selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
|
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
@@ -821,17 +750,8 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
AND t4.relation_id = 18
|
|
|
- <if test="isStatic != null and isStatic == 1">
|
|
|
- GROUP BY t5.id
|
|
|
- </if>
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- LIMIT 100
|
|
|
- </if>)
|
|
|
- </if>
|
|
|
+ GROUP BY t5.id
|
|
|
) a1
|
|
|
- <if test="isStatic == null or isStatic != 1">
|
|
|
- LIMIT 100
|
|
|
- </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getConceptConMap" resultType="com.diagbot.dto.ConceptBaseDTO" parameterType="com.diagbot.vo.ConceptFindVO">
|