|
|
@ -199,20 +199,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="hospitalId != null "> and tr.hospital_id = #{hospitalId}</if>
|
|
|
|
<if test="hospitalId != null "> and tr.hospital_id = #{hospitalId}</if>
|
|
|
|
<if test="status != null and status != ''"> and tr.status = #{status}</if>
|
|
|
|
<if test="status != null and status != ''"> and tr.status = #{status}</if>
|
|
|
|
<if test="doctorName != null and doctorName != ''"> and td.name like concat('%', #{doctorName}, '%')</if>
|
|
|
|
<if test="doctorName != null and doctorName != ''"> and td.name like concat('%', #{doctorName}, '%')</if>
|
|
|
|
<if test="age !=null">
|
|
|
|
<if test="age !=null and age != ''">
|
|
|
|
and tp.age between
|
|
|
|
and tp.age between
|
|
|
|
<foreach item="item" collection="age.split('-')" separator="and">
|
|
|
|
<foreach item="item" collection="age.split('-')" separator="and">
|
|
|
|
#{item}
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="sex !=null">and tp.sex = #{sex} </if>
|
|
|
|
<if test="sex !=null and sex !=''">and tp.sex = #{sex} </if>
|
|
|
|
<if test="identifier !=null">and tp.identifier like concat('%', #{identifier}, '%')</if>
|
|
|
|
<if test="identifier !=null and identifier != null">and tp.identifier like concat('%', #{identifier}, '%')</if>
|
|
|
|
<if test="delFlag == null">
|
|
|
|
<if test="delFlag == null">
|
|
|
|
and td.del_flag = '0' and tp.del_flag = '0'
|
|
|
|
and td.del_flag = '0' and tp.del_flag = '0'
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="createTime != null and createTime !=''">
|
|
|
|
<if test="createTime != null and createTime !='' and createTime != 'all'">
|
|
|
|
and DATE_FORMAT(tp.create_time,'%Y-%m') = #{createTime}
|
|
|
|
and DATE_FORMAT(tp.create_time,'%Y-%m') = #{createTime}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="createTime == null or createTime ==''">
|
|
|
|
|
|
|
|
and to_days(tr.create_time) = to_days(now())
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="startTime != null and startTime != '' and endTime == null "> and tr.create_time >= #{startTime}</if>
|
|
|
|
<if test="startTime != null and startTime != '' and endTime == null "> and tr.create_time >= #{startTime}</if>
|
|
|
|
<if test="startTime == null and endTime != '' and endTime != null "> and tr.create_time <= #{endTime}</if>
|
|
|
|
<if test="startTime == null and endTime != '' and endTime != null "> and tr.create_time <= #{endTime}</if>
|
|
|
|
<if test="startTime != null and endTime != null "> and tr.create_time between #{startTime} and #{endTime}</if>
|
|
|
|
<if test="startTime != null and endTime != null "> and tr.create_time between #{startTime} and #{endTime}</if>
|
|
|
|