|
@@ -192,10 +192,17 @@
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
|
|
LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
|
|
|
|
+ </if>
|
|
WHERE
|
|
WHERE
|
|
t1.is_deleted = 'N'
|
|
t1.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
|
|
+ AND t3.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ AND t7.is_deleted = 'N'
|
|
|
|
+ </if>
|
|
<if test="type != null">
|
|
<if test="type != null">
|
|
AND t1.lib_type = #{type}
|
|
AND t1.lib_type = #{type}
|
|
</if>
|
|
</if>
|
|
@@ -206,15 +213,14 @@
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
<if test="sexType == 3">
|
|
<if test="sexType == 3">
|
|
- and (t3.sex_type in ('1','2','3') or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('1','2','3')
|
|
</if>
|
|
</if>
|
|
<if test="sexType != 3">
|
|
<if test="sexType != 3">
|
|
- and (t3.sex_type in ('3',#{sexType}) or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('3',#{sexType})
|
|
</if>
|
|
</if>
|
|
<if test="age != null and age != ''">
|
|
<if test="age != null and age != ''">
|
|
- AND (( <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
- AND <![CDATA[ t3.max_age >= #{age} ]]>)
|
|
|
|
- or (t3.min_age is null and t3.max_age is null))
|
|
|
|
|
|
+ AND <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
+ AND <![CDATA[ t3.max_age >= #{age} ]]>
|
|
</if>
|
|
</if>
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
and t1.id not in
|
|
and t1.id not in
|
|
@@ -223,16 +229,28 @@
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
AND (t2.spell = UPPER(#{InputStr}) OR t2.name = #{InputStr})
|
|
AND (t2.spell = UPPER(#{InputStr}) OR t2.name = #{InputStr})
|
|
- LIMIT 100)
|
|
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ GROUP BY t1.id
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isStatic == null or isStatic != 1">
|
|
|
|
+ LIMIT 100
|
|
|
|
+ </if>)
|
|
UNION
|
|
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
|
|
(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
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
|
|
LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
|
|
|
|
+ </if>
|
|
WHERE
|
|
WHERE
|
|
t1.is_deleted = 'N'
|
|
t1.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
|
|
+ AND t3.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ AND t7.is_deleted = 'N'
|
|
|
|
+ </if>
|
|
<if test="type != null">
|
|
<if test="type != null">
|
|
AND t1.lib_type = #{type}
|
|
AND t1.lib_type = #{type}
|
|
</if>
|
|
</if>
|
|
@@ -243,15 +261,14 @@
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
<if test="sexType == 3">
|
|
<if test="sexType == 3">
|
|
- and (t3.sex_type in ('1','2','3') or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('1','2','3')
|
|
</if>
|
|
</if>
|
|
<if test="sexType != 3">
|
|
<if test="sexType != 3">
|
|
- and (t3.sex_type in ('3',#{sexType}) or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('3',#{sexType})
|
|
</if>
|
|
</if>
|
|
<if test="age != null and age != ''">
|
|
<if test="age != null and age != ''">
|
|
- AND (( <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
- AND <![CDATA[ t3.max_age >= #{age} ]]>)
|
|
|
|
- or (t3.min_age is null and t3.max_age is null))
|
|
|
|
|
|
+ AND <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
+ AND <![CDATA[ t3.max_age >= #{age} ]]>
|
|
</if>
|
|
</if>
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
and t1.id not in
|
|
and t1.id not in
|
|
@@ -260,16 +277,28 @@
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
AND (t2.spell LIKE CONCAT( UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT( #{InputStr},'%'))
|
|
AND (t2.spell LIKE CONCAT( UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT( #{InputStr},'%'))
|
|
- LIMIT 100)
|
|
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ GROUP BY t1.id
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isStatic == null or isStatic != 1">
|
|
|
|
+ LIMIT 100
|
|
|
|
+ </if>)
|
|
UNION
|
|
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
|
|
(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
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
|
|
LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
|
|
|
|
+ </if>
|
|
WHERE
|
|
WHERE
|
|
t1.is_deleted = 'N'
|
|
t1.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
|
|
+ AND t3.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ AND t7.is_deleted = 'N'
|
|
|
|
+ </if>
|
|
<if test="type != null">
|
|
<if test="type != null">
|
|
AND t1.lib_type = #{type}
|
|
AND t1.lib_type = #{type}
|
|
</if>
|
|
</if>
|
|
@@ -280,15 +309,14 @@
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
<if test="sexType == 3">
|
|
<if test="sexType == 3">
|
|
- and (t3.sex_type in ('1','2','3') or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('1','2','3')
|
|
</if>
|
|
</if>
|
|
<if test="sexType != 3">
|
|
<if test="sexType != 3">
|
|
- and (t3.sex_type in ('3',#{sexType}) or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('3',#{sexType})
|
|
</if>
|
|
</if>
|
|
<if test="age != null and age != ''">
|
|
<if test="age != null and age != ''">
|
|
- AND (( <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
- AND <![CDATA[ t3.max_age >= #{age} ]]>)
|
|
|
|
- or (t3.min_age is null and t3.max_age is null))
|
|
|
|
|
|
+ AND <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
+ AND <![CDATA[ t3.max_age >= #{age} ]]>
|
|
</if>
|
|
</if>
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
and t1.id not in
|
|
and t1.id not in
|
|
@@ -297,34 +325,45 @@
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',#{InputStr},'%'))
|
|
AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',#{InputStr},'%'))
|
|
- LIMIT 100)
|
|
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ GROUP BY t1.id
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isStatic == null or isStatic != 1">
|
|
|
|
+ LIMIT 100
|
|
|
|
+ </if>)
|
|
<if test="detilType != null and detilType != ''">
|
|
<if test="detilType != null and detilType != ''">
|
|
UNION
|
|
UNION
|
|
(SELECT t1.id selfId,t1.lib_name 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
|
|
(SELECT t1.id selfId,t1.lib_name 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
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
- LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
|
|
|
|
LEFT JOIN kl_relation t4 ON t4.end_id= t1.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_concept t5 on t5.id = t4.start_id
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
|
|
|
|
+ LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t5.id
|
|
|
|
+ </if>
|
|
WHERE
|
|
WHERE
|
|
t1.is_deleted = 'N'
|
|
t1.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
|
|
+ AND t3.is_deleted = 'N'
|
|
AND t4.is_deleted = 'N'
|
|
AND t4.is_deleted = 'N'
|
|
AND t5.is_deleted = 'N'
|
|
AND t5.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ AND t7.is_deleted = 'N'
|
|
|
|
+ </if>
|
|
<if test="detilType != null">
|
|
<if test="detilType != null">
|
|
AND t1.lib_type = #{detilType}
|
|
AND t1.lib_type = #{detilType}
|
|
</if>
|
|
</if>
|
|
<if test="sexType == 3">
|
|
<if test="sexType == 3">
|
|
- and (t3.sex_type in ('1','2','3') or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('1','2','3')
|
|
</if>
|
|
</if>
|
|
<if test="sexType != 3">
|
|
<if test="sexType != 3">
|
|
- and (t3.sex_type in ('3',#{sexType}) or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('3',#{sexType})
|
|
</if>
|
|
</if>
|
|
<if test="age != null and age != ''">
|
|
<if test="age != null and age != ''">
|
|
- AND (( <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
- AND <![CDATA[ t3.max_age >= #{age} ]]>)
|
|
|
|
- or (t3.min_age is null and t3.max_age is null))
|
|
|
|
|
|
+ AND <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
+ AND <![CDATA[ t3.max_age >= #{age} ]]>
|
|
</if>
|
|
</if>
|
|
AND (t2.spell = UPPER(#{InputStr}) OR t2.name = #{InputStr})
|
|
AND (t2.spell = UPPER(#{InputStr}) OR t2.name = #{InputStr})
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
@@ -334,33 +373,44 @@
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
AND t4.relation_id = 18
|
|
AND t4.relation_id = 18
|
|
- LIMIT 100)
|
|
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ GROUP BY t5.id
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isStatic == null or isStatic != 1">
|
|
|
|
+ LIMIT 100
|
|
|
|
+ </if>)
|
|
UNION
|
|
UNION
|
|
(SELECT t1.id selfId,t1.lib_name 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
|
|
(SELECT t1.id selfId,t1.lib_name 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
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
- LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
|
|
|
|
LEFT JOIN kl_relation t4 ON t4.end_id= t1.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_concept t5 on t5.id = t4.start_id
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
|
|
|
|
+ LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t5.id
|
|
|
|
+ </if>
|
|
WHERE
|
|
WHERE
|
|
t1.is_deleted = 'N'
|
|
t1.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
|
|
+ AND t3.is_deleted = 'N'
|
|
AND t4.is_deleted = 'N'
|
|
AND t4.is_deleted = 'N'
|
|
AND t5.is_deleted = 'N'
|
|
AND t5.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ AND t7.is_deleted = 'N'
|
|
|
|
+ </if>
|
|
<if test="detilType != null">
|
|
<if test="detilType != null">
|
|
AND t1.lib_type = #{detilType}
|
|
AND t1.lib_type = #{detilType}
|
|
</if>
|
|
</if>
|
|
<if test="sexType == 3">
|
|
<if test="sexType == 3">
|
|
- and (t3.sex_type in ('1','2','3') or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('1','2','3')
|
|
</if>
|
|
</if>
|
|
<if test="sexType != 3">
|
|
<if test="sexType != 3">
|
|
- and (t3.sex_type in ('3',#{sexType}) or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('3',#{sexType})
|
|
</if>
|
|
</if>
|
|
<if test="age != null and age != ''">
|
|
<if test="age != null and age != ''">
|
|
- AND (( <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
- AND <![CDATA[ t3.max_age >= #{age} ]]>)
|
|
|
|
- or (t3.min_age is null and t3.max_age is null))
|
|
|
|
|
|
+ AND <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
+ AND <![CDATA[ t3.max_age >= #{age} ]]>
|
|
</if>
|
|
</if>
|
|
AND (t2.spell LIKE CONCAT(UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT( #{InputStr},'%'))
|
|
AND (t2.spell LIKE CONCAT(UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT( #{InputStr},'%'))
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
@@ -369,34 +419,45 @@
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ GROUP BY t5.id
|
|
|
|
+ </if>
|
|
AND t4.relation_id = 18
|
|
AND t4.relation_id = 18
|
|
- LIMIT 100)
|
|
|
|
|
|
+ <if test="isStatic == null or isStatic != 1">
|
|
|
|
+ LIMIT 100
|
|
|
|
+ </if>)
|
|
UNION
|
|
UNION
|
|
(SELECT t1.id selfId,t1.lib_name 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
|
|
(SELECT t1.id selfId,t1.lib_name 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
|
|
LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
|
|
- LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
|
|
|
|
LEFT JOIN kl_relation t4 ON t4.end_id= t1.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_concept t5 on t5.id = t4.start_id
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
|
|
LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
|
|
|
|
+ LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t5.id
|
|
|
|
+ </if>
|
|
WHERE
|
|
WHERE
|
|
t1.is_deleted = 'N'
|
|
t1.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
|
|
+ AND t3.is_deleted = 'N'
|
|
AND t4.is_deleted = 'N'
|
|
AND t4.is_deleted = 'N'
|
|
AND t5.is_deleted = 'N'
|
|
AND t5.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
AND t6.is_deleted = 'N'
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ AND t7.is_deleted = 'N'
|
|
|
|
+ </if>
|
|
<if test="detilType != null">
|
|
<if test="detilType != null">
|
|
AND t1.lib_type = #{detilType}
|
|
AND t1.lib_type = #{detilType}
|
|
</if>
|
|
</if>
|
|
<if test="sexType == 3">
|
|
<if test="sexType == 3">
|
|
- and (t3.sex_type in ('1','2','3') or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('1','2','3')
|
|
</if>
|
|
</if>
|
|
<if test="sexType != 3">
|
|
<if test="sexType != 3">
|
|
- and (t3.sex_type in ('3',#{sexType}) or t3.sex_type is null)
|
|
|
|
|
|
+ and t3.sex_type in ('3',#{sexType})
|
|
</if>
|
|
</if>
|
|
<if test="age != null and age != ''">
|
|
<if test="age != null and age != ''">
|
|
- AND (( <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
- AND <![CDATA[ t3.max_age >= #{age} ]]>)
|
|
|
|
- or (t3.min_age is null and t3.max_age is null))
|
|
|
|
|
|
+ AND <![CDATA[ t3.min_age <= #{age} ]]>
|
|
|
|
+ AND <![CDATA[ t3.max_age >= #{age} ]]>
|
|
</if>
|
|
</if>
|
|
AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',#{InputStr},'%'))
|
|
AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',#{InputStr},'%'))
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
<if test="inputIds != null and inputIds.size > 0">
|
|
@@ -405,10 +466,50 @@
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="isStatic != null and isStatic == 1">
|
|
|
|
+ GROUP BY t5.id
|
|
|
|
+ </if>
|
|
AND t4.relation_id = 18
|
|
AND t4.relation_id = 18
|
|
- LIMIT 100)
|
|
|
|
|
|
+ <if test="isStatic == null or isStatic != 1">
|
|
|
|
+ LIMIT 100
|
|
|
|
+ </if>)
|
|
</if>
|
|
</if>
|
|
) a1
|
|
) a1
|
|
- LIMIT 100
|
|
|
|
|
|
+ <if test="isStatic == null or isStatic != 1">
|
|
|
|
+ LIMIT 100
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getConceptConMap" resultType="com.diagbot.dto.ConceptBaseDTO" parameterType="com.diagbot.vo.ConceptFindVO">
|
|
|
|
+ SELECT
|
|
|
|
+ t1.id as conceptId,
|
|
|
|
+ t1.lib_name as name
|
|
|
|
+ FROM
|
|
|
|
+ kl_concept t1,
|
|
|
|
+ kl_concept_common t2
|
|
|
|
+ WHERE
|
|
|
|
+ t1.id = t2.concept_id
|
|
|
|
+ AND t1.is_deleted = 'N'
|
|
|
|
+ AND t2.is_deleted = 'N'
|
|
|
|
+ <if test="conceptIds != null and conceptIds.size > 0">
|
|
|
|
+ and t1.id in
|
|
|
|
+ <foreach item="id" collection="conceptIds" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="sexType == 3">
|
|
|
|
+ AND t2.sex_type IN ('1','2','3')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="sexType != 3">
|
|
|
|
+ AND t2.sex_type IN ('3',#{sexType})
|
|
|
|
+ </if>
|
|
|
|
+ <if test="age != null and age != ''">
|
|
|
|
+ AND <![CDATA[ t2.min_age <= #{age} ]]>
|
|
|
|
+ AND <![CDATA[ t2.max_age >= #{age} ]]>
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getStandWord" resultType="java.lang.String">
|
|
|
|
+ SELECT lib_name FROM kl_concept WHERE is_deleted = 'N' AND lib_type = 33
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|