|
|
@@ -104,7 +104,7 @@
|
|
|
<select id="pageQuery" resultMap="queryResult" parameterType="com.nb.web.service.bus.service.dto.ClinicQuery">
|
|
|
select p.id as patient_id,
|
|
|
c.id as clinic_id,
|
|
|
- if(c.monitor_type=1,p.code,c.patient_code) as patient_code,
|
|
|
+ c.patient_code as patient_code,
|
|
|
c.patient_name as patient_name,
|
|
|
c.ward as ward,
|
|
|
c.bed_no as bed_no,
|
|
|
@@ -120,16 +120,16 @@
|
|
|
left join bus_patient
|
|
|
as p on c.patient_id = p.id
|
|
|
<where>
|
|
|
- <if test="query.monitorType!=null">
|
|
|
+ <if test="query.monitorType!=null and query.monitorType!=''">
|
|
|
and c.monitor_type=#{query.monitorType}
|
|
|
</if>
|
|
|
<if test="query.finished!=null">
|
|
|
and c.finished=#{query.finished}
|
|
|
</if>
|
|
|
- <if test="query.surgeryName!=null">
|
|
|
+ <if test="query.surgeryName!=null and query.surgeryName!=''">
|
|
|
and c.surgery_name like concat('%',#{query.surgeryName},'%')
|
|
|
</if>
|
|
|
- <if test="query.patientName!=null">
|
|
|
+ <if test="query.patientName!=null and query.patientName!=''">
|
|
|
and c.patient_name like concat('%',#{query.patientName},'%')
|
|
|
</if>
|
|
|
<if test="query.ward != null and query.ward.size > 0">
|
|
|
@@ -138,13 +138,13 @@
|
|
|
#{w, jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- <if test="query.bedNo!=null">
|
|
|
+ <if test="query.bedNo!=null and query.bedNo!=''">
|
|
|
and c.bed_no like concat('%',#{query.bedNo},'%')
|
|
|
</if>
|
|
|
<if test="query.timeRange != null and query.timeRange.size >0">
|
|
|
and c.monitor_start_time > #{query.timeRange[0]} and c.monitor_start_time < #{query.timeRange[1]}
|
|
|
</if>
|
|
|
- <if test="query.patientCode!=null">
|
|
|
+ <if test="query.patientCode!=null and query.patientCode!=''">
|
|
|
and c.patient_code like concat('%',#{query.patientCode},'%')
|
|
|
</if>
|
|
|
</where>
|