From dc81571cdeccc464d40b0d0c29b830fea95b5cd9 Mon Sep 17 00:00:00 2001 From: x_z Date: Tue, 27 Sep 2022 17:12:14 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=8D=95=E6=8D=AE=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=9F=A5=E8=AF=A2=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/udi/admin/service/inout/OrderService.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java b/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java index 1f5e51a..527a44e 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java @@ -91,13 +91,21 @@ public class OrderService { * @return */ private static QueryWrapper buildQueryWrapper(OrderFilterRequest orderFilterRequest) { + if (null != orderFilterRequest) { + if (StrUtil.isNotBlank(orderFilterRequest.getStartTime())) { + orderFilterRequest.setStartTime(DateUtil.parse(orderFilterRequest.getStartTime()).toString(DatePattern.NORM_DATE_PATTERN) + " 00:00:00"); + } + if (StrUtil.isNotBlank(orderFilterRequest.getEndTime())) { + orderFilterRequest.setEndTime(DateUtil.parse(orderFilterRequest.getEndTime()).toString(DatePattern.NORM_DATE_PATTERN) + " 23:59:59"); + } + } QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StrUtil.isNotBlank(orderFilterRequest.getId()), "orderId", orderFilterRequest.getId()) .or(StrUtil.isNotBlank(orderFilterRequest.getId())) .eq(StrUtil.isNotBlank(orderFilterRequest.getId()),"corpOrderId", orderFilterRequest.getId()) .in(CollUtil.isNotEmpty(orderFilterRequest.getInvCodes()), "locStorageCode", orderFilterRequest.getInvCodes()) - .ge(StrUtil.isNotBlank(orderFilterRequest.getStartTime()), "actDate", StrUtil.isBlank(orderFilterRequest.getStartTime()) ? null : DateUtil.parse(orderFilterRequest.getStartTime()).toString(DatePattern.NORM_DATETIME_PATTERN)) - .le(StrUtil.isNotBlank(orderFilterRequest.getEndTime()), "actDate", StrUtil.isBlank(orderFilterRequest.getEndTime()) ? null : DateUtil.parse(orderFilterRequest.getEndTime()).toString(DatePattern.NORM_DATETIME_PATTERN)) + .ge(StrUtil.isNotBlank(orderFilterRequest.getStartTime()), "actDate", orderFilterRequest.getStartTime()) + .le(StrUtil.isNotBlank(orderFilterRequest.getEndTime()), "actDate", orderFilterRequest.getEndTime()) .eq(StrUtil.isNotBlank(orderFilterRequest.getIsError()), "status", orderFilterRequest.getStatus()) .eq(StrUtil.isNotBlank(orderFilterRequest.getAction()), "action", orderFilterRequest.getAction()) .ne(StrUtil.isBlank(orderFilterRequest.getAction()), "action", "StockCheck")