From fce83bbcec4bce60e325570388e0d9c1e96b8808 Mon Sep 17 00:00:00 2001 From: chenfei <18955928961@163.com> Date: Fri, 12 Aug 2022 15:38:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9app=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/system/domain/req/TRecordResultReq.java | 15 +++++++-------- .../resources/mapper/system/TRecordMapper.xml | 9 +++++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/TRecordResultReq.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/TRecordResultReq.java index 5afb76e..a736d53 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/TRecordResultReq.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/TRecordResultReq.java @@ -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; } diff --git a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml index 7700dde..287d7d7 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml @@ -197,14 +197,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and tr.hospital_id = #{hospitalId} and tr.status = #{status} and td.name like concat('%', #{doctorName}, '%') - and tp.age = #{age} + + and tp.age between + + #{item} + + and tp.sex = #{sex} and tp.identifier like concat('%', #{identifier}, '%') and td.del_flag = '0' and tp.del_flag = '0' - and DATE_FORMAT(tp.create_time,'%Y-%m') = DATE_FORMAT(#{createTime},'%Y-%m') + and DATE_FORMAT(tp.create_time,'%Y-%m') = #{createTime} and tr.create_time >= #{startTime} and tr.create_time <= #{endTime}