获取患者列表增加时间段查询

master
chenfei 2 years ago
parent b8d66f7c73
commit d2cb73cfdc

@ -22,6 +22,11 @@ public class TRecordResultReq
private String firstVisitOder; private String firstVisitOder;
private String status; private String status;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
public String getName() public String getName()
{ {
return name; return name;
@ -112,4 +117,24 @@ public class TRecordResultReq
{ {
this.createTime = createTime; this.createTime = createTime;
} }
public Date getStartTime()
{
return startTime;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getEndTime()
{
return endTime;
}
public void setEndTime(Date endTime)
{
this.endTime = endTime;
}
} }

@ -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="status != null and status != ''"> and tr.status = #{status}</if>
<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="createTime !=null">and DATE_FORMAT(tp.create_time,'%Y-%m-%d') = #{createTime} </if> <if test="startTime != null and endTime != null">
<if test="doctorTime !=null and firstVisitTime!=null" >order by tr.create_time ${doctorOder}, tp.create_time ${firstVisitOder}</if> 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> </where>
</select> </select>

Loading…
Cancel
Save