From 60ccaa13340dc62de317bf10d3c90ac42a880d72 Mon Sep 17 00:00:00 2001 From: qiuyt Date: Wed, 11 Dec 2024 19:06:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=88=86=E6=94=AF=E5=A4=87?= =?UTF-8?q?=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/glxp/mipsdl/service/hlfyyy/VA010Service.java | 5 +++-- .../resources/mybatis/mapper/master/hlfyyy/VA010Mapper.xml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/glxp/mipsdl/service/hlfyyy/VA010Service.java b/src/main/java/com/glxp/mipsdl/service/hlfyyy/VA010Service.java index 6c4c270..d308613 100644 --- a/src/main/java/com/glxp/mipsdl/service/hlfyyy/VA010Service.java +++ b/src/main/java/com/glxp/mipsdl/service/hlfyyy/VA010Service.java @@ -27,11 +27,10 @@ public class VA010Service extends ServiceImpl { IPage iPage = va010Mapper.getList(page,udiwmsBasicSkPrescribeRequest); List list = iPage.getRecords(); List listNew = new ArrayList<>(); - list.sort( Comparator.comparing(VA010::getPrescribedate)); if(list!=null && list.size() >0){ String lastSql = ""; if(defXmlSqlType.equals("Mysql")){ - lastSql = "AND limit = 1"; + lastSql = " limit 1"; }else if(defXmlSqlType.equals("Oracle")){ lastSql = "AND rownum = 1"; @@ -43,6 +42,8 @@ public class VA010Service extends ServiceImpl { listNew.add(va010New); } } + listNew.sort( Comparator.comparing(VA010::getPrescribedate)); + iPage.setRecords(listNew); return iPage; diff --git a/src/main/resources/mybatis/mapper/master/hlfyyy/VA010Mapper.xml b/src/main/resources/mybatis/mapper/master/hlfyyy/VA010Mapper.xml index e6aae82..99db779 100644 --- a/src/main/resources/mybatis/mapper/master/hlfyyy/VA010Mapper.xml +++ b/src/main/resources/mybatis/mapper/master/hlfyyy/VA010Mapper.xml @@ -42,8 +42,8 @@ = #{req.startTime} - AND STR_TO_DATE(PRESCRIBEDATE, '%Y/%c/%e %H:%i:%s') < #{req.endTime} + STR_TO_DATE(PRESCRIBEDATE, '%e/%c/%Y %H:%i:%s') >= #{req.startTime} + AND STR_TO_DATE(PRESCRIBEDATE, '%e/%c/%Y %H:%i:%s') < #{req.endTime} ]]>