|
|
|
@ -108,8 +108,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="status != null and status != ''"> and tr.status = #{status}</if>
|
|
|
|
|
<if test="age !=null">and tp.age = #{age} </if>
|
|
|
|
|
<if test="sex !=null">and tp.sex = #{sex} </if>
|
|
|
|
|
<if test="createTime !=null">and DATE_FORMAT(tp.create_time,'%Y-%m-%d') = #{createTime} </if>
|
|
|
|
|
<if test="doctorTime !=null and firstVisitTime!=null" >order by tr.create_time ${doctorOder}, tp.create_time ${firstVisitOder}</if>
|
|
|
|
|
<if test="startTime != null and endTime != null">
|
|
|
|
|
AND tp.create_time between DATE_FORMAT(#{startTime},'%Y-%m-%d %H:%i:%s') and DATE_FORMAT(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="doctorOder !=null and firstVisitOder!=null" >order by tr.create_time ${doctorOder}, tp.create_time ${firstVisitOder}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|