|
@@ -394,7 +394,6 @@
|
|
WHERE
|
|
WHERE
|
|
a.is_deleted = 'N'
|
|
a.is_deleted = 'N'
|
|
AND a.is_placefile = '1'
|
|
AND a.is_placefile = '1'
|
|
- <![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
AND a.hospital_id = #{hospitalId}
|
|
AND a.hospital_id = #{hospitalId}
|
|
</if>
|
|
</if>
|
|
@@ -504,7 +503,6 @@
|
|
AND a.hospital_id = c.hospital_id
|
|
AND a.hospital_id = c.hospital_id
|
|
AND a.beh_dept_id = c.dept_id
|
|
AND a.beh_dept_id = c.dept_id
|
|
AND a.is_placefile = '1'
|
|
AND a.is_placefile = '1'
|
|
- <![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
|
<if test="userId!=null">
|
|
<if test="userId!=null">
|
|
AND c.user_id = #{userId}
|
|
AND c.user_id = #{userId}
|
|
</if>
|
|
</if>
|
|
@@ -1840,6 +1838,28 @@
|
|
<if test="leaveHosDateEnd != null ">
|
|
<if test="leaveHosDateEnd != null ">
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
|
+ AND a.behospital_code like CONCAT('%',#{behospitalCode},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="level != null and level != ''">
|
|
|
|
+ AND b.level = #{level}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
|
+ AND (a.doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
|
+ OR a.beh_doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
|
+ OR a.director_doctor_name like CONCAT('%',#{doctorName},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="doctorCode != null and doctorCode != ''">
|
|
|
|
+ AND (a.doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
|
+ OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
|
+ OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
|
+ AND a.beh_dept_id = #{deptId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="name != null and name != ''">
|
|
|
|
+ AND a.name like CONCAT('%',#{name},'%')
|
|
|
|
+ </if>
|
|
) t1,
|
|
) t1,
|
|
(
|
|
(
|
|
SELECT
|
|
SELECT
|
|
@@ -1865,6 +1885,28 @@
|
|
<if test="leaveHosDateEnd != null ">
|
|
<if test="leaveHosDateEnd != null ">
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
|
+ AND a.behospital_code like CONCAT('%',#{behospitalCode},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="level != null and level != ''">
|
|
|
|
+ AND b.level = #{level}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
|
+ AND (a.doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
|
+ OR a.beh_doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
|
+ OR a.director_doctor_name like CONCAT('%',#{doctorName},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="doctorCode != null and doctorCode != ''">
|
|
|
|
+ AND (a.doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
|
+ OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
|
+ OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
|
+ AND a.beh_dept_id = #{deptId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="name != null and name != ''">
|
|
|
|
+ AND a.name like CONCAT('%',#{name},'%')
|
|
|
|
+ </if>
|
|
GROUP BY
|
|
GROUP BY
|
|
a.beh_dept_id,
|
|
a.beh_dept_id,
|
|
a.beh_dept_name
|
|
a.beh_dept_name
|
|
@@ -1943,6 +1985,28 @@
|
|
<if test="leaveHosDateEnd != null ">
|
|
<if test="leaveHosDateEnd != null ">
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
|
+ AND a.behospital_code like CONCAT('%',#{behospitalCode},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="level != null and level != ''">
|
|
|
|
+ AND b.level = #{level}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
|
+ AND (a.doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
|
+ OR a.beh_doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
|
+ OR a.director_doctor_name like CONCAT('%',#{doctorName},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="doctorCode != null and doctorCode != ''">
|
|
|
|
+ AND (a.doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
|
+ OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
|
+ OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
|
+ AND a.beh_dept_id = #{deptId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="name != null and name != ''">
|
|
|
|
+ AND a.name like CONCAT('%',#{name},'%')
|
|
|
|
+ </if>
|
|
) t1,
|
|
) t1,
|
|
(
|
|
(
|
|
SELECT
|
|
SELECT
|
|
@@ -1975,6 +2039,28 @@
|
|
<if test="leaveHosDateEnd != null ">
|
|
<if test="leaveHosDateEnd != null ">
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
|
+ AND a.behospital_code like CONCAT('%',#{behospitalCode},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="level != null and level != ''">
|
|
|
|
+ AND b.level = #{level}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
|
+ AND (a.doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
|
+ OR a.beh_doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
|
+ OR a.director_doctor_name like CONCAT('%',#{doctorName},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="doctorCode != null and doctorCode != ''">
|
|
|
|
+ AND (a.doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
|
+ OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
|
+ OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
|
+ AND a.beh_dept_id = #{deptId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="name != null and name != ''">
|
|
|
|
+ AND a.name like CONCAT('%',#{name},'%')
|
|
|
|
+ </if>
|
|
GROUP BY
|
|
GROUP BY
|
|
a.beh_dept_id,
|
|
a.beh_dept_id,
|
|
a.beh_dept_name
|
|
a.beh_dept_name
|