From 639341ebf9fe565730d3edcbec7fadde0c7c11ce Mon Sep 17 00:00:00 2001 From: heminjian502 Date: Thu, 18 Aug 2022 15:22:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=BE=AE=E4=BF=A1=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/web/controller/api/AppController.java | 2 +- .../src/main/resources/mapper/system/TRecordMapper.xml | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index f4ff4f3..cdf4945 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -309,7 +309,7 @@ public class AppController extends BaseController public TableDataInfo queryHomePatientsList(TRecordResultReq recordResultReq) { // recordResultReq.setStatus("1"); - //startPage(); + startPage(); List tRecordResps = tRecordService.queryHomePatientList(recordResultReq); return getDataTable(tRecordResps); } diff --git a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml index eb5fdfb..6dfbdcb 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml @@ -110,10 +110,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" t.age, t.disease, t.firstTime, - max(t.createTime) + max(t.trCreateTime), + t.trCreateTime, + t.tpCreateTime FROM ( SELECT + tr.create_time AS trCreateTime, + tp.create_time AS tpCreateTime, tr.id, tr.patient_id AS patientId, tr.doctor_id AS doctorId, @@ -163,11 +167,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and tr.create_time <= #{endTime} and tr.create_time between #{startTime} and #{endTime} - order by tr.create_time ${doctorOder} - order by tp.create_time ${firstVisitOder} ) t GROUP BY t.patientId + order by t.trCreateTime ${doctorOder} + order by t.tpCreateTime ${firstVisitOder}