|
@@ -1334,6 +1334,9 @@
|
|
|
<if test="deptName != null and deptName != ''">
|
|
|
and t.beh_dept_name = #{deptName}
|
|
|
</if>
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ and t.beh_dept_id= #{deptId}
|
|
|
+ </if>
|
|
|
<if test="name != null and name != ''">
|
|
|
and t.name like CONCAT('%',#{name},'%')
|
|
|
</if>
|
|
@@ -6770,7 +6773,8 @@
|
|
|
GROUP BY
|
|
|
c.doctorId,
|
|
|
c.doctorName
|
|
|
- having sum( d.cases_entry_id = 2511 ) is not null
|
|
|
+ having
|
|
|
+ sum( d.cases_entry_id = 2511 ) is not null and sum( d.cases_entry_id = 2511 ) != 0
|
|
|
) UNION
|
|
|
(
|
|
|
SELECT
|
|
@@ -6853,7 +6857,9 @@
|
|
|
GROUP BY
|
|
|
d.doctor_id,
|
|
|
d.doctor_name
|
|
|
- having sum( e.cases_entry_id = 2594 ) is not null and sum( e.cases_entry_id = 2973 ) is not null and sum( e.cases_entry_id = 2930 )is not null
|
|
|
+ having sum( e.cases_entry_id = 2594 ) is not null and sum( e.cases_entry_id = 2594 ) != 0
|
|
|
+ and sum( e.cases_entry_id = 2973 ) is not null and sum( e.cases_entry_id = 2973 ) != 0
|
|
|
+ and sum( e.cases_entry_id = 2930 )is not null and sum( e.cases_entry_id = 2930 ) != 0
|
|
|
) UNION
|
|
|
(
|
|
|
SELECT
|
|
@@ -6932,7 +6938,7 @@
|
|
|
GROUP BY
|
|
|
c.doctor_id,
|
|
|
c.doctor_name
|
|
|
- having sum( d.cases_entry_id = 2419 ) is not null
|
|
|
+ having sum( d.cases_entry_id = 2419 ) is not null and sum( d.cases_entry_id = 2419 ) != 0
|
|
|
) UNION
|
|
|
(
|
|
|
SELECT
|
|
@@ -7011,7 +7017,7 @@
|
|
|
GROUP BY
|
|
|
b.doctor_id,
|
|
|
b.doctor_name
|
|
|
- having sum(c.cases_entry_id = 2495) is not null
|
|
|
+ having sum(c.cases_entry_id = 2495) is not null and sum(c.cases_entry_id = 2495) != 0
|
|
|
) UNION
|
|
|
(
|
|
|
SELECT
|