|
@@ -33,6 +33,7 @@
|
|
|
FROM
|
|
FROM
|
|
|
( SELECT patient_id, COUNT ( 1 ) AS result_count FROM biz_clinic_room
|
|
( SELECT patient_id, COUNT ( 1 ) AS result_count FROM biz_clinic_room
|
|
|
<where>
|
|
<where>
|
|
|
|
|
+ and deleted = 0
|
|
|
<if test="query.queryTime != null and query.queryTime.size() > 0">
|
|
<if test="query.queryTime != null and query.queryTime.size() > 0">
|
|
|
AND clinic_start_time >= #{query.queryTime[0]}
|
|
AND clinic_start_time >= #{query.queryTime[0]}
|
|
|
</if>
|
|
</if>
|
|
@@ -44,6 +45,8 @@
|
|
|
JOIN biz_patient AS bp ON query_result.patient_id = bp.ID
|
|
JOIN biz_patient AS bp ON query_result.patient_id = bp.ID
|
|
|
LEFT JOIN biz_clinic_room bcr ON bp.current_clinic_id = bcr.ID
|
|
LEFT JOIN biz_clinic_room bcr ON bp.current_clinic_id = bcr.ID
|
|
|
<where>
|
|
<where>
|
|
|
|
|
+ and bcr.deleted = 0
|
|
|
|
|
+ and bp.deleted = 0
|
|
|
<if test="query.queryCondition != null and query.queryCondition != ''">
|
|
<if test="query.queryCondition != null and query.queryCondition != ''">
|
|
|
bp.patient_code LIKE concat('%',#{query.queryCondition,jdbcType=VARCHAR},'%')
|
|
bp.patient_code LIKE concat('%',#{query.queryCondition,jdbcType=VARCHAR},'%')
|
|
|
or bp.name like concat('%',#{query.queryCondition,jdbcType=VARCHAR},'%')
|
|
or bp.name like concat('%',#{query.queryCondition,jdbcType=VARCHAR},'%')
|
|
@@ -80,7 +83,9 @@
|
|
|
biz_patient bp
|
|
biz_patient bp
|
|
|
LEFT JOIN biz_clinic_room bcr ON bp.current_clinic_id = bcr.ID
|
|
LEFT JOIN biz_clinic_room bcr ON bp.current_clinic_id = bcr.ID
|
|
|
<where>
|
|
<where>
|
|
|
- bp.current_clinic_id is not null
|
|
|
|
|
|
|
+ and bp.deleted = 0
|
|
|
|
|
+ and bcr.deleted = 0
|
|
|
|
|
+ and bp.current_clinic_id is not null
|
|
|
<if test="query.condition != null and query.condition != ''">
|
|
<if test="query.condition != null and query.condition != ''">
|
|
|
and bcr.patient_name like concat('%',#{query.condition,jdbcType=VARCHAR},'%')
|
|
and bcr.patient_name like concat('%',#{query.condition,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
</if>
|