zhoutg 4 anni fa
parent
commit
b4e84edb95

+ 1 - 2
src/main/java/com/diagbot/CdssCoreApplication.java

@@ -13,9 +13,8 @@ import org.springframework.cloud.netflix.hystrix.EnableHystrix;
 import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 
-
 /**
- * @Description: 病历质控系统启动文件
+ * @Description: 系统启动文件
  * @author: zhoutg
  * @time: 2018/8/7 9:26
  */

+ 9 - 8
src/main/resources/mapper/ConceptInfoMapper.xml

@@ -58,14 +58,15 @@
         ) t
         LEFT JOIN kl_concept_common e ON t.sonId = e.concept_id
         AND e.is_deleted = 'N'
-        <if test="sexType != null and sexType != 3 and sexType != ''">
-            and e.sex_type in (3, #{sexType})
-        </if>
-        <if test="age != null and age != ''">
-            <![CDATA[ and ((e.min_age <= #{age} and e.max_age >= #{age})
-                      OR e.min_age IS NULL
-                      OR e.max_age IS NULL)]]>
-        </if>
+        <where>
+            <if test="sexType != null and sexType != 3 and sexType != ''">
+                and (e.sex_type in (3, #{sexType}) or e.sex_type is null)
+            </if>
+            <if test="age != null and age != ''">
+                <![CDATA[ and ((e.min_age <= #{age} and e.max_age >= #{age})
+                          OR (e.min_age IS NULL and e.max_age IS NULL))]]>
+            </if>
+        </where>
         ORDER BY
         t.relation_id,
         t.order_no