mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 04:08:43 +08:00 
			
		
		
		
	✨ ERP:增加 ERP 销售出库的实现 30%(列表)
This commit is contained in:
		@@ -107,8 +107,6 @@ public class ErpSaleOutDO extends BaseDO {
 | 
			
		||||
    private BigDecimal discountPrice;
 | 
			
		||||
    /**
 | 
			
		||||
     * 其它金额,单位:元
 | 
			
		||||
     *
 | 
			
		||||
     * 注意:它不算在 {@link #totalPrice} 中
 | 
			
		||||
     */
 | 
			
		||||
    private BigDecimal otherPrice;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@ public interface ErpAccountMapper extends BaseMapperX<ErpAccountDO> {
 | 
			
		||||
    default PageResult<ErpAccountDO> selectPage(ErpAccountPageReqVO reqVO) {
 | 
			
		||||
        return selectPage(reqVO, new LambdaQueryWrapperX<ErpAccountDO>()
 | 
			
		||||
                .likeIfPresent(ErpAccountDO::getName, reqVO.getName())
 | 
			
		||||
                .eqIfPresent(ErpAccountDO::getNo, reqVO.getNo())
 | 
			
		||||
                .likeIfPresent(ErpAccountDO::getNo, reqVO.getNo())
 | 
			
		||||
                .eqIfPresent(ErpAccountDO::getRemark, reqVO.getRemark())
 | 
			
		||||
                .orderByDesc(ErpAccountDO::getId));
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@ public interface ErpSaleOrderMapper extends BaseMapperX<ErpSaleOrderDO> {
 | 
			
		||||
 | 
			
		||||
    default PageResult<ErpSaleOrderDO> selectPage(ErpSaleOrderPageReqVO reqVO) {
 | 
			
		||||
        MPJLambdaWrapperX<ErpSaleOrderDO> query = new MPJLambdaWrapperX<ErpSaleOrderDO>()
 | 
			
		||||
                .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())
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@ public interface ErpSaleOutMapper extends BaseMapperX<ErpSaleOutDO> {
 | 
			
		||||
 | 
			
		||||
    default PageResult<ErpSaleOutDO> selectPage(ErpSaleOutPageReqVO reqVO) {
 | 
			
		||||
        MPJLambdaWrapperX<ErpSaleOutDO> query = new MPJLambdaWrapperX<ErpSaleOutDO>()
 | 
			
		||||
                .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<ErpSaleOutDO> {
 | 
			
		||||
                .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())
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@ public interface ErpStockCheckMapper extends BaseMapperX<ErpStockCheckDO> {
 | 
			
		||||
 | 
			
		||||
    default PageResult<ErpStockCheckDO> selectPage(ErpStockCheckPageReqVO reqVO) {
 | 
			
		||||
        MPJLambdaWrapperX<ErpStockCheckDO> query = new MPJLambdaWrapperX<ErpStockCheckDO>()
 | 
			
		||||
                .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())
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@ public interface ErpStockInMapper extends BaseMapperX<ErpStockInDO> {
 | 
			
		||||
 | 
			
		||||
    default PageResult<ErpStockInDO> selectPage(ErpStockInPageReqVO reqVO) {
 | 
			
		||||
        MPJLambdaWrapperX<ErpStockInDO> query = new MPJLambdaWrapperX<ErpStockInDO>()
 | 
			
		||||
                .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())
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@ public interface ErpStockMoveMapper extends BaseMapperX<ErpStockMoveDO> {
 | 
			
		||||
 | 
			
		||||
    default PageResult<ErpStockMoveDO> selectPage(ErpStockMovePageReqVO reqVO) {
 | 
			
		||||
        MPJLambdaWrapperX<ErpStockMoveDO> query = new MPJLambdaWrapperX<ErpStockMoveDO>()
 | 
			
		||||
                .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())
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@ public interface ErpStockOutMapper extends BaseMapperX<ErpStockOutDO> {
 | 
			
		||||
 | 
			
		||||
    default PageResult<ErpStockOutDO> selectPage(ErpStockOutPageReqVO reqVO) {
 | 
			
		||||
        MPJLambdaWrapperX<ErpStockOutDO> query = new MPJLambdaWrapperX<ErpStockOutDO>()
 | 
			
		||||
                .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())
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user