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}