|
@@ -37,6 +37,28 @@
|
|
<if test="startName != null and startName != ''">
|
|
<if test="startName != null and startName != ''">
|
|
AND t1.lib_name = #{startName}
|
|
AND t1.lib_name = #{startName}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="startSex != null or startAge != null">
|
|
|
|
+ AND t2.start_id = (
|
|
|
|
+ SELECT
|
|
|
|
+ id
|
|
|
|
+ FROM
|
|
|
|
+ kl_concept_common
|
|
|
|
+ WHERE
|
|
|
|
+ is_deleted = 'N'
|
|
|
|
+ <if test="startSex != null">
|
|
|
|
+ <if test="startSex == 3">
|
|
|
|
+ and sex_type in ('1','2','3')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startSex != 3">
|
|
|
|
+ and sex_type in ('3',#{startSex})
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startAge != null">
|
|
|
|
+ <![CDATA[ AND min_age <= #{startAge} ]]>
|
|
|
|
+ <![CDATA[ AND max_age >= #{startAge} ]]>
|
|
|
|
+ </if>
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
<if test="startType != null">
|
|
<if test="startType != null">
|
|
AND t1.lib_type = #{startType}
|
|
AND t1.lib_type = #{startType}
|
|
</if>
|
|
</if>
|
|
@@ -49,6 +71,28 @@
|
|
<if test="endName != null and endName != ''">
|
|
<if test="endName != null and endName != ''">
|
|
AND t3.lib_name = #{endName}
|
|
AND t3.lib_name = #{endName}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="endSex != null or endAge != null">
|
|
|
|
+ AND t2.end_id = (
|
|
|
|
+ SELECT
|
|
|
|
+ id
|
|
|
|
+ FROM
|
|
|
|
+ kl_concept_common
|
|
|
|
+ WHERE
|
|
|
|
+ is_deleted = 'N'
|
|
|
|
+ <if test="endSex != null">
|
|
|
|
+ <if test="endSex == 3">
|
|
|
|
+ and sex_type in ('1','2','3')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endSex != 3">
|
|
|
|
+ and sex_type in ('3',#{endSex})
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endAge != null">
|
|
|
|
+ <![CDATA[ AND min_age <= #{endAge} ]]>
|
|
|
|
+ <![CDATA[ AND max_age >= #{endAge} ]]>
|
|
|
|
+ </if>
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
<if test="endType != null">
|
|
<if test="endType != null">
|
|
AND t3.lib_type = #{endType}
|
|
AND t3.lib_type = #{endType}
|
|
</if>
|
|
</if>
|
|
@@ -80,6 +124,28 @@
|
|
<if test="startName != null and startName != ''">
|
|
<if test="startName != null and startName != ''">
|
|
AND t1.lib_name = #{startName}
|
|
AND t1.lib_name = #{startName}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="startSex != null or startAge != null">
|
|
|
|
+ AND t2.start_id = (
|
|
|
|
+ SELECT
|
|
|
|
+ id
|
|
|
|
+ FROM
|
|
|
|
+ kl_concept_common
|
|
|
|
+ WHERE
|
|
|
|
+ is_deleted = 'N'
|
|
|
|
+ <if test="startSex != null">
|
|
|
|
+ <if test="startSex == 3">
|
|
|
|
+ and sex_type in ('1','2','3')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startSex != 3">
|
|
|
|
+ and sex_type in ('3',#{startSex})
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startAge != null">
|
|
|
|
+ <![CDATA[ AND min_age <= #{startAge} ]]>
|
|
|
|
+ <![CDATA[ AND max_age >= #{startAge} ]]>
|
|
|
|
+ </if>
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
<if test="startType != null">
|
|
<if test="startType != null">
|
|
AND t1.lib_type = #{startType}
|
|
AND t1.lib_type = #{startType}
|
|
</if>
|
|
</if>
|
|
@@ -92,6 +158,28 @@
|
|
<if test="endName != null and endName != ''">
|
|
<if test="endName != null and endName != ''">
|
|
AND t3.lib_name = #{endName}
|
|
AND t3.lib_name = #{endName}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="endSex != null or endAge != null">
|
|
|
|
+ AND t2.end_id = (
|
|
|
|
+ SELECT
|
|
|
|
+ id
|
|
|
|
+ FROM
|
|
|
|
+ kl_concept_common
|
|
|
|
+ WHERE
|
|
|
|
+ is_deleted = 'N'
|
|
|
|
+ <if test="endSex != null">
|
|
|
|
+ <if test="endSex == 3">
|
|
|
|
+ and sex_type in ('1','2','3')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endSex != 3">
|
|
|
|
+ and sex_type in ('3',#{endSex})
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endAge != null">
|
|
|
|
+ <![CDATA[ AND min_age <= #{endAge} ]]>
|
|
|
|
+ <![CDATA[ AND max_age >= #{endAge} ]]>
|
|
|
|
+ </if>
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
<if test="endType != null">
|
|
<if test="endType != null">
|
|
AND t3.lib_type = #{endType}
|
|
AND t3.lib_type = #{endType}
|
|
</if>
|
|
</if>
|