From 798b72778ef1af60745fc8f1416f38d30934f694 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 12 Feb 2024 06:52:20 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ERP=EF=BC=9A=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E9=94=80=E5=94=AE=E9=80=80=E8=B4=A7=E9=80=BB=E8=BE=91?= =?UTF-8?q?=20100%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/sale/vo/order/ErpSaleOrderPageReqVO.java | 3 +++ .../admin/sale/vo/returns/ErpSaleReturnRespVO.java | 2 +- .../module/erp/dal/mysql/sale/ErpSaleOrderMapper.java | 7 ++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/order/ErpSaleOrderPageReqVO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/order/ErpSaleOrderPageReqVO.java index 13b1abd76..5d4f22f1b 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/order/ErpSaleOrderPageReqVO.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/order/ErpSaleOrderPageReqVO.java @@ -74,4 +74,7 @@ public class ErpSaleOrderPageReqVO extends PageParam { @Schema(description = "是否可出库", example = "true") private Boolean outEnable; + @Schema(description = "是否可退货", example = "true") + private Boolean returnEnable; + } \ No newline at end of file diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/returns/ErpSaleReturnRespVO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/returns/ErpSaleReturnRespVO.java index 1284909fe..78b94a35e 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/returns/ErpSaleReturnRespVO.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/returns/ErpSaleReturnRespVO.java @@ -42,7 +42,7 @@ public class ErpSaleReturnRespVO { @Schema(description = "退货时间", requiredMode = Schema.RequiredMode.REQUIRED) @ExcelProperty("退货时间") - private LocalDateTime outTime; + private LocalDateTime returnTime; @Schema(description = "销售订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17386") private Long orderId; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/sale/ErpSaleOrderMapper.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/sale/ErpSaleOrderMapper.java index f290fb6fd..a8a31bd2a 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/sale/ErpSaleOrderMapper.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/sale/ErpSaleOrderMapper.java @@ -46,11 +46,16 @@ public interface ErpSaleOrderMapper extends BaseMapperX { } else if (Objects.equals(reqVO.getReturnStatus(), ErpSaleOrderPageReqVO.RETURN_STATUS_ALL)) { query.apply("t.return_count = t.total_count"); } - // 可出库 + // 可销售出库 if (Boolean.TRUE.equals(reqVO.getOutEnable())) { query.eq(ErpSaleOrderDO::getStatus, ErpAuditStatus.APPROVE.getStatus()) .apply("t.out_count < t.total_count"); } + // 可销售退货 + if (Boolean.TRUE.equals(reqVO.getReturnEnable())) { + query.eq(ErpSaleOrderDO::getStatus, ErpAuditStatus.APPROVE.getStatus()) + .apply("t.return_count < t.out_count"); + } if (reqVO.getProductId() != null) { query.leftJoin(ErpSaleOrderItemDO.class, ErpSaleOrderItemDO::getOrderId, ErpSaleOrderDO::getId) .eq(reqVO.getProductId() != null, ErpSaleOrderItemDO::getProductId, reqVO.getProductId())