|
|
@ -198,9 +198,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="age !=null">and tp.age = #{age} </if>
|
|
|
|
<if test="age !=null">and tp.age = #{age} </if>
|
|
|
|
<if test="sex !=null">and tp.sex = #{sex} </if>
|
|
|
|
<if test="sex !=null">and tp.sex = #{sex} </if>
|
|
|
|
<if test="identifier !=null">and tp.identifier like concat('%', #{identifier}, '%')</if>
|
|
|
|
<if test="identifier !=null">and tp.identifier like concat('%', #{identifier}, '%')</if>
|
|
|
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
|
|
|
and DATE_FORMAT(tp.create_time,'%Y-%m') = DATE_FORMAT(#{createTime},'%Y-%m')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="startTime != null and endTime != null">
|
|
|
|
<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')
|
|
|
|
AND tr.create_time between DATE_FORMAT(#{startTime},'%Y-%m-%d %H:%i:%s') and DATE_FORMAT(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="startTime != null and endTime != null"></if>
|
|
|
|
<if test="doctorOder !=null and firstVisitOder!=null" >order by tr.create_time ${doctorOder}, tp.create_time ${firstVisitOder}</if>
|
|
|
|
<if test="doctorOder !=null and firstVisitOder!=null" >order by tr.create_time ${doctorOder}, tp.create_time ${firstVisitOder}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|