From 6d6765cf9f3266cb5bc11218b3758e749768deb8 Mon Sep 17 00:00:00 2001 From: yangsb Date: Mon, 29 Apr 2024 13:53:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9C=AA=E6=8E=92=E5=8D=95=E7=9A=84?= =?UTF-8?q?=E6=9D=BF=E6=9D=90=E7=94=9F=E4=BA=A7=E5=8D=95=E6=9D=BF=E6=9D=90?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E5=87=BA?= =?UTF-8?q?=E5=85=A5=E5=8F=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/core/query/QueryWrapperX.java | 6 ++++++ .../admin/plan/vo/OrderPageReqVOCopy.java | 11 ++++++++--- .../controller/admin/plan/vo/OrderRespVOCopy.java | 3 +++ .../executor/service/plan/PlanServiceImpl.java | 10 +++++++--- .../main/resources/mapper/order/OrderMapper.xml | 14 ++++++++------ 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/cf-framework/cf-spring-boot-starter-mybatis/src/main/java/com/cf/imes/framework/mybatis/core/query/QueryWrapperX.java b/cf-framework/cf-spring-boot-starter-mybatis/src/main/java/com/cf/imes/framework/mybatis/core/query/QueryWrapperX.java index a0ad9ec23..a4109dc52 100644 --- a/cf-framework/cf-spring-boot-starter-mybatis/src/main/java/com/cf/imes/framework/mybatis/core/query/QueryWrapperX.java +++ b/cf-framework/cf-spring-boot-starter-mybatis/src/main/java/com/cf/imes/framework/mybatis/core/query/QueryWrapperX.java @@ -139,6 +139,12 @@ public class QueryWrapperX extends QueryWrapper { return this; } + @Override + public QueryWrapperX isNull(String column) { + super.isNull(column); + return this; + } + /** * 设置只返回最后一条 * diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/OrderPageReqVOCopy.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/OrderPageReqVOCopy.java index 734b1e7a7..aa848e0ec 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/OrderPageReqVOCopy.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/OrderPageReqVOCopy.java @@ -7,6 +7,7 @@ import lombok.NoArgsConstructor; import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; +import java.time.LocalDateTime; import java.util.Date; import java.util.List; @@ -43,11 +44,15 @@ public class OrderPageReqVOCopy extends PageParam { private Boolean burrow; @Schema(description = "有二维纹路") private Boolean twoDimensionalToolPath; - @Schema(description = "开始时间") + @Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private Date beginDate; + private LocalDateTime[] createTime; + /*@Schema(description = "交付日期开始时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private Date endDate; + private LocalDateTime beginDate; + @Schema(description = "交付日期结束时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime endDate;*/ @Schema(description = "长 小范围") private BigDecimal longMinRang; @Schema(description = "长 大范围") diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/OrderRespVOCopy.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/OrderRespVOCopy.java index 617766865..634a9573d 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/OrderRespVOCopy.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/OrderRespVOCopy.java @@ -30,6 +30,9 @@ public class OrderRespVOCopy { private String customer; @Schema(description = "地址") private String address; + @Schema(description = "订单日期") + @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT) + private Date orderDate; @Schema(description = "交付日期") @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT) private Date deliveryDate; diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plan/PlanServiceImpl.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plan/PlanServiceImpl.java index e7f6374e6..f7d4aadb9 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plan/PlanServiceImpl.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plan/PlanServiceImpl.java @@ -34,6 +34,7 @@ import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; import java.math.RoundingMode; +import java.time.LocalDateTime; import java.util.*; import java.util.stream.Collectors; @@ -242,11 +243,14 @@ public class PlanServiceImpl implements PlanService { QueryWrapperX queryWrapperX = new QueryWrapperX<>(); queryWrapperX + .isNull("opi.id") .eqIfPresent("customer", pageReqVO.getConsignee()) + .eqIfPresent("custom_order_no", pageReqVO.getDefaultId()) .eqIfPresent("address", pageReqVO.getConsigneeAddress()) .eqIfPresent("custom_order_no", pageReqVO.getDefaultId()) - .betweenIfPresent("delivery_date", new Date[]{pageReqVO.getBeginDate(), pageReqVO.getEndDate()}) - .isNull("d.order_id") + .betweenIfPresent("a.create_time", pageReqVO.getCreateTime()) + .betweenIfPresent("op.height", new BigDecimal[]{pageReqVO.getLongMinRang(), pageReqVO.getLongMaxRang()}) + .betweenIfPresent("op.width", new BigDecimal[]{pageReqVO.getWidthMinRang(), pageReqVO.getWidthMaxRang()} ) ; List filterTypes = new ArrayList<>(); if (Objects.nonNull(pageReqVO.getHoleThrough()) && pageReqVO.getHoleThrough()) { @@ -259,7 +263,7 @@ public class PlanServiceImpl implements PlanService { filterTypes.add(4); } - queryWrapperX.inIfPresent("c.filter_type", filterTypes); + queryWrapperX.inIfPresent("op.filter_type", filterTypes); IPage orderDOPageResult = orderMapper.selectOrderPage(page, queryWrapperX); if (CollectionUtil.isEmpty(orderDOPageResult.getRecords())) { diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/order/OrderMapper.xml b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/order/OrderMapper.xml index e7f65eb1e..9a8d545ea 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/order/OrderMapper.xml +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/order/OrderMapper.xml @@ -4,14 +4,16 @@