From d2cb73cfdc0eb17e96e153b4954d06e1752c376a Mon Sep 17 00:00:00 2001
From: chenfei <18955928961@163.com>
Date: Tue, 9 Aug 2022 10:32:05 +0800
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=82=A3=E8=80=85=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=97=B4=E6=AE=B5=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../system/domain/req/TRecordResultReq.java | 25 +++++++++++++++++++
.../resources/mapper/system/TRecordMapper.xml | 6 +++--
2 files changed, 29 insertions(+), 2 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 9d17b72..8d5232e 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
@@ -22,6 +22,11 @@ public class TRecordResultReq
private String firstVisitOder;
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()
{
return name;
@@ -112,4 +117,24 @@ public class TRecordResultReq
{
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;
+ }
}
diff --git a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml
index b860c0d..537ef68 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml
@@ -108,8 +108,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and tr.status = #{status}
and tp.age = #{age}
and tp.sex = #{sex}
- and DATE_FORMAT(tp.create_time,'%Y-%m-%d') = #{createTime}
- order by tr.create_time ${doctorOder}, tp.create_time ${firstVisitOder}
+
+ AND tp.create_time between DATE_FORMAT(#{startTime},'%Y-%m-%d %H:%i:%s') and DATE_FORMAT(#{endTime},'%Y-%m-%d %H:%i:%s')
+
+ order by tr.create_time ${doctorOder}, tp.create_time ${firstVisitOder}