From 7d3a48dbefbfcc06f19fa79193f49bd80f2ea3b6 Mon Sep 17 00:00:00 2001 From: gongzhenkun <1658878546@qq.com> Date: Tue, 30 Aug 2022 16:40:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=8A=E6=96=AD=E8=AE=B0=E5=BD=95=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E5=88=97=E8=A1=A8=20uploadTime=20=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9;=E6=8C=89=E6=97=B6=E9=97=B4=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/web/controller/api/AppController.java | 3 ++- .../main/java/com/ruoyi/system/domain/resp/TRecordResp.java | 4 ++-- 2 files changed, 4 insertions(+), 3 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 5d663f8..ff805e2 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 @@ -300,7 +300,8 @@ public class AppController extends BaseController tPatientHospitalDoctor.setPatientId(patientId); List tRecords = tRecordService.queryRecordListByPHDids(tPatientHospitalDoctor); List tRecordResps = tRecords.stream().filter(record -> "1".equals(record.getStatus())).collect(Collectors.toList()); - return AjaxResult.success(tRecordResps); + List respList = tRecordResps.stream().sorted(Comparator.comparing(TRecordResp::getUploadTime).reversed()).collect(Collectors.toList()); + return AjaxResult.success(respList); } /** diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/TRecordResp.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/TRecordResp.java index 74976f1..ebd40e0 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/TRecordResp.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/TRecordResp.java @@ -83,8 +83,8 @@ public class TRecordResp private String updateResult2; /** 上传时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty("上传时间") private Date uploadTime;