From 6f5798720817883b600728a4f711c967a9b1dbe0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 10 Feb 2024 22:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ERP=EF=BC=9A=E5=A2=9E=E5=8A=A0=20ER?= =?UTF-8?q?P=20=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=2030%=EF=BC=88=E5=88=97=E8=A1=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/erp/dal/dataobject/sale/ErpSaleOutDO.java | 2 -- .../erp/dal/dataobject/sale/ErpSaleOutItemDO.java | 4 ++-- .../module/erp/dal/mysql/finance/ErpAccountMapper.java | 2 +- .../module/erp/dal/mysql/sale/ErpSaleOrderMapper.java | 2 +- .../module/erp/dal/mysql/sale/ErpSaleOutMapper.java | 10 +++++++--- .../erp/dal/mysql/stock/ErpStockCheckMapper.java | 2 +- .../module/erp/dal/mysql/stock/ErpStockInMapper.java | 2 +- .../module/erp/dal/mysql/stock/ErpStockMoveMapper.java | 2 +- .../module/erp/dal/mysql/stock/ErpStockOutMapper.java | 2 +- 9 files changed, 15 insertions(+), 13 deletions(-) diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/sale/ErpSaleOutDO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/sale/ErpSaleOutDO.java index 1a0e6f1d3..3ce6efcbd 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/sale/ErpSaleOutDO.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/sale/ErpSaleOutDO.java @@ -107,8 +107,6 @@ public class ErpSaleOutDO extends BaseDO { private BigDecimal discountPrice; /** * 其它金额,单位:元 - * - * 注意:它不算在 {@link #totalPrice} 中 */ private BigDecimal otherPrice; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/sale/ErpSaleOutItemDO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/sale/ErpSaleOutItemDO.java index d13915dae..b9b406413 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/sale/ErpSaleOutItemDO.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/sale/ErpSaleOutItemDO.java @@ -16,8 +16,8 @@ import java.math.BigDecimal; * * @author 芋道源码 */ -@TableName("erp_sale_order_items") -@KeySequence("erp_sale_order_items_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@TableName("erp_sale_out_items") +@KeySequence("erp_sale_out_items_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/finance/ErpAccountMapper.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/finance/ErpAccountMapper.java index d879a933e..693a2804b 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/finance/ErpAccountMapper.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/finance/ErpAccountMapper.java @@ -20,7 +20,7 @@ public interface ErpAccountMapper extends BaseMapperX { default PageResult selectPage(ErpAccountPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(ErpAccountDO::getName, reqVO.getName()) - .eqIfPresent(ErpAccountDO::getNo, reqVO.getNo()) + .likeIfPresent(ErpAccountDO::getNo, reqVO.getNo()) .eqIfPresent(ErpAccountDO::getRemark, reqVO.getRemark()) .orderByDesc(ErpAccountDO::getId)); } 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 70ff75285..d586c32fc 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 @@ -22,7 +22,7 @@ public interface ErpSaleOrderMapper extends BaseMapperX { default PageResult selectPage(ErpSaleOrderPageReqVO reqVO) { MPJLambdaWrapperX query = new MPJLambdaWrapperX() - .eqIfPresent(ErpSaleOrderDO::getNo, reqVO.getNo()) + .likeIfPresent(ErpSaleOrderDO::getNo, reqVO.getNo()) .eqIfPresent(ErpSaleOrderDO::getCustomerId, reqVO.getCustomerId()) .betweenIfPresent(ErpSaleOrderDO::getOrderTime, reqVO.getOrderTime()) .eqIfPresent(ErpSaleOrderDO::getStatus, reqVO.getStatus()) diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/sale/ErpSaleOutMapper.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/sale/ErpSaleOutMapper.java index 809954df9..e146994bf 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/sale/ErpSaleOutMapper.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/sale/ErpSaleOutMapper.java @@ -22,7 +22,7 @@ public interface ErpSaleOutMapper extends BaseMapperX { default PageResult selectPage(ErpSaleOutPageReqVO reqVO) { MPJLambdaWrapperX query = new MPJLambdaWrapperX() - .eqIfPresent(ErpSaleOutDO::getNo, reqVO.getNo()) + .likeIfPresent(ErpSaleOutDO::getNo, reqVO.getNo()) .eqIfPresent(ErpSaleOutDO::getCustomerId, reqVO.getCustomerId()) .betweenIfPresent(ErpSaleOutDO::getOutTime, reqVO.getOutTime()) .eqIfPresent(ErpSaleOutDO::getStatus, reqVO.getStatus()) @@ -31,8 +31,12 @@ public interface ErpSaleOutMapper extends BaseMapperX { .eqIfPresent(ErpSaleOutDO::getAccountId, reqVO.getAccountId()) .likeIfPresent(ErpSaleOutDO::getOrderNo, reqVO.getOrderNo()) .orderByDesc(ErpSaleOutDO::getId); - query.gt(Boolean.TRUE.equals(reqVO.getDebtStatus()), ErpSaleOutDO::getDebtPrice, BigDecimal.ZERO); - if (reqVO.getWarehouseId() != null && reqVO.getProductId() != null) { + if (Boolean.TRUE.equals(reqVO.getDebtStatus())) { + query.gt(ErpSaleOutDO::getDebtPrice, BigDecimal.ZERO); + } else if (Boolean.FALSE.equals(reqVO.getDebtStatus())) { + query.eq(ErpSaleOutDO::getDebtPrice, BigDecimal.ZERO); + } + if (reqVO.getWarehouseId() != null || reqVO.getProductId() != null) { query.leftJoin(ErpSaleOutItemDO.class, ErpSaleOutItemDO::getOutId, ErpSaleOutDO::getId) .eq(reqVO.getWarehouseId() != null, ErpSaleOutItemDO::getWarehouseId, reqVO.getWarehouseId()) .eq(reqVO.getProductId() != null, ErpSaleOutItemDO::getProductId, reqVO.getProductId()) diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockCheckMapper.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockCheckMapper.java index 3328f39b2..dd976df3d 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockCheckMapper.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockCheckMapper.java @@ -19,7 +19,7 @@ public interface ErpStockCheckMapper extends BaseMapperX { default PageResult selectPage(ErpStockCheckPageReqVO reqVO) { MPJLambdaWrapperX query = new MPJLambdaWrapperX() - .eqIfPresent(ErpStockCheckDO::getNo, reqVO.getNo()) + .likeIfPresent(ErpStockCheckDO::getNo, reqVO.getNo()) .betweenIfPresent(ErpStockCheckDO::getCheckTime, reqVO.getCheckTime()) .eqIfPresent(ErpStockCheckDO::getStatus, reqVO.getStatus()) .likeIfPresent(ErpStockCheckDO::getRemark, reqVO.getRemark()) diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockInMapper.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockInMapper.java index 9e7ea9bca..e815583ac 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockInMapper.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockInMapper.java @@ -19,7 +19,7 @@ public interface ErpStockInMapper extends BaseMapperX { default PageResult selectPage(ErpStockInPageReqVO reqVO) { MPJLambdaWrapperX query = new MPJLambdaWrapperX() - .eqIfPresent(ErpStockInDO::getNo, reqVO.getNo()) + .likeIfPresent(ErpStockInDO::getNo, reqVO.getNo()) .eqIfPresent(ErpStockInDO::getSupplierId, reqVO.getSupplierId()) .betweenIfPresent(ErpStockInDO::getInTime, reqVO.getInTime()) .eqIfPresent(ErpStockInDO::getStatus, reqVO.getStatus()) diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockMoveMapper.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockMoveMapper.java index 2b45f6c7e..9a8ce0b64 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockMoveMapper.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockMoveMapper.java @@ -19,7 +19,7 @@ public interface ErpStockMoveMapper extends BaseMapperX { default PageResult selectPage(ErpStockMovePageReqVO reqVO) { MPJLambdaWrapperX query = new MPJLambdaWrapperX() - .eqIfPresent(ErpStockMoveDO::getNo, reqVO.getNo()) + .likeIfPresent(ErpStockMoveDO::getNo, reqVO.getNo()) .betweenIfPresent(ErpStockMoveDO::getMoveTime, reqVO.getMoveTime()) .eqIfPresent(ErpStockMoveDO::getStatus, reqVO.getStatus()) .likeIfPresent(ErpStockMoveDO::getRemark, reqVO.getRemark()) diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockOutMapper.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockOutMapper.java index f27e01310..a73dd3ccf 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockOutMapper.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/stock/ErpStockOutMapper.java @@ -19,7 +19,7 @@ public interface ErpStockOutMapper extends BaseMapperX { default PageResult selectPage(ErpStockOutPageReqVO reqVO) { MPJLambdaWrapperX query = new MPJLambdaWrapperX() - .eqIfPresent(ErpStockOutDO::getNo, reqVO.getNo()) + .likeIfPresent(ErpStockOutDO::getNo, reqVO.getNo()) .eqIfPresent(ErpStockOutDO::getCustomerId, reqVO.getCustomerId()) .betweenIfPresent(ErpStockOutDO::getOutTime, reqVO.getOutTime()) .eqIfPresent(ErpStockOutDO::getStatus, reqVO.getStatus())