修改app条件查询

master
chenfei 2 years ago
parent 1684767691
commit fce83bbcec

@ -17,8 +17,8 @@ public class TRecordResultReq
private String name;
@ApiModelProperty("患者性别")
private String sex;
@ApiModelProperty("患者年龄")
private Integer age;
@ApiModelProperty("患者年龄范围字符串")
private String age;
@ApiModelProperty("档案号")
private String identifier;
@ApiModelProperty("医生id")
@ -28,9 +28,8 @@ public class TRecordResultReq
@ApiModelProperty("医院id")
private Long hospitalId;
@JsonFormat(pattern = "yyyy-MM")
@ApiModelProperty("初诊日期查询 到月份")
private Date createTime;
private String createTime;
@ApiModelProperty("注册日期排序(必传)asc 正序desc 倒序")
//预约时间排序
@ -71,12 +70,12 @@ public class TRecordResultReq
this.sex = sex;
}
public Integer getAge()
public String getAge()
{
return age;
}
public void setAge(Integer age)
public void setAge(String age)
{
this.age = age;
}
@ -142,12 +141,12 @@ public class TRecordResultReq
this.firstVisitOder = firstVisitOder;
}
public Date getCreateTime()
public String getCreateTime()
{
return createTime;
}
public void setCreateTime(Date createTime)
public void setCreateTime(String createTime)
{
this.createTime = createTime;
}

@ -197,14 +197,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="hospitalId != null "> and tr.hospital_id = #{hospitalId}</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="age !=null">and tp.age = #{age} </if>
<if test="age !=null">
and tp.age between
<foreach item="item" collection="age.split('-')" separator="and">
#{item}
</foreach>
</if>
<if test="sex !=null">and tp.sex = #{sex} </if>
<if test="identifier !=null">and tp.identifier like concat('%', #{identifier}, '%')</if>
<if test="delFlag == null">
and td.del_flag = '0' and tp.del_flag = '0'
</if>
<if test="createTime != null">
and DATE_FORMAT(tp.create_time,'%Y-%m') = DATE_FORMAT(#{createTime},'%Y-%m')
and DATE_FORMAT(tp.create_time,'%Y-%m') = #{createTime}
</if>
<if test="startTime != null and startTime != '' and endTime == null "> and tr.create_time &gt;= #{startTime}</if>
<if test="startTime == null and endTime != '' and endTime != null "> and tr.create_time &lt;= #{endTime}</if>

Loading…
Cancel
Save