|
@@ -20039,22 +20039,38 @@
|
|
|
<if test="diagnose != null and diagnose != ''">
|
|
|
AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
|
|
|
</if>
|
|
|
- <if test="deptName != null and deptName != ''">
|
|
|
+ <if test="deptId != null and deptId != '' and deptId != '-0'">
|
|
|
+ and t.beh_dept_id= #{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="deptName == '-0'">
|
|
|
+ AND (t.beh_dept_id IS NULL OR t.beh_dept_id = '' OR t.beh_dept_id = '-')
|
|
|
+ </if>
|
|
|
+ <if test="deptName != null and deptName != '' and deptName != '-0'">
|
|
|
and t.beh_dept_name= #{deptName}
|
|
|
</if>
|
|
|
- <if test="doctorName != null and doctorName != ''">
|
|
|
+ <if test="deptName == '-0'">
|
|
|
+ AND (t.beh_dept_name IS NULL OR t.beh_dept_name = '' OR t.beh_dept_name = '-')
|
|
|
+ </if>
|
|
|
+ <if test="doctorName != null and doctorName != '' and doctorName != '-0'">
|
|
|
and CONCAT(
|
|
|
IFNULL(t.doctor_name,''),IFNULL(t.beh_doctor_name,''),IFNULL(t.director_doctor_name,''))
|
|
|
like CONCAT('%',#{doctorName},'%')
|
|
|
</if>
|
|
|
+ <if test="doctorName == '-0'">
|
|
|
+ AND (t.doctor_name IS NULL OR t.doctor_name = '' OR t.doctor_name = '-')
|
|
|
+ </if>
|
|
|
+
|
|
|
<if test="name != null and name != ''">
|
|
|
and t.name like CONCAT('%',#{name},'%')
|
|
|
</if>
|
|
|
- <if test="doctorCode != null and doctorCode != ''">
|
|
|
+ <if test="doctorCode != null and doctorCode != '' and doctorCode != '-0'">
|
|
|
and (t.doctor_id = #{doctorCode}
|
|
|
or t.beh_doctor_id = #{doctorCode}
|
|
|
or t.director_doctor_id = #{doctorCode})
|
|
|
</if>
|
|
|
+ <if test="doctorCode == '-0'">
|
|
|
+ AND (t.doctor_id IS NULL OR t.doctor_id = '' OR t.doctor_id = '-')
|
|
|
+ </if>
|
|
|
<if test="fileCode != null and fileCode != ''">
|
|
|
and t.file_code like CONCAT('%',#{fileCode},'%')
|
|
|
</if>
|