Commit 09e4763c7997f34b06da4ec2e60d7ad197ee87aa
1 parent
6f579872
✨ ERP:增加 ERP 可出库订单列表
Showing
2 changed files
with
9 additions
and
0 deletions
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/order/ErpSaleOrderPageReqVO.java
| @@ -71,4 +71,7 @@ public class ErpSaleOrderPageReqVO extends PageParam { | @@ -71,4 +71,7 @@ public class ErpSaleOrderPageReqVO extends PageParam { | ||
| 71 | @Schema(description = "退货状态", example = "2") | 71 | @Schema(description = "退货状态", example = "2") |
| 72 | private Integer returnStatus; | 72 | private Integer returnStatus; |
| 73 | 73 | ||
| 74 | + @Schema(description = "是否可出库", example = "true") | ||
| 75 | + private Boolean outEnable; | ||
| 76 | + | ||
| 74 | } | 77 | } |
| 75 | \ No newline at end of file | 78 | \ No newline at end of file |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/sale/ErpSaleOrderMapper.java
| @@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX; | @@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX; | ||
| 7 | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderPageReqVO; | 7 | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderPageReqVO; |
| 8 | import cn.iocoder.yudao.module.erp.dal.dataobject.sale.ErpSaleOrderDO; | 8 | import cn.iocoder.yudao.module.erp.dal.dataobject.sale.ErpSaleOrderDO; |
| 9 | import cn.iocoder.yudao.module.erp.dal.dataobject.sale.ErpSaleOrderItemDO; | 9 | import cn.iocoder.yudao.module.erp.dal.dataobject.sale.ErpSaleOrderItemDO; |
| 10 | +import cn.iocoder.yudao.module.erp.enums.ErpAuditStatus; | ||
| 10 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 11 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 11 | import org.apache.ibatis.annotations.Mapper; | 12 | import org.apache.ibatis.annotations.Mapper; |
| 12 | 13 | ||
| @@ -45,6 +46,11 @@ public interface ErpSaleOrderMapper extends BaseMapperX<ErpSaleOrderDO> { | @@ -45,6 +46,11 @@ public interface ErpSaleOrderMapper extends BaseMapperX<ErpSaleOrderDO> { | ||
| 45 | } else if (Objects.equals(reqVO.getReturnStatus(), ErpSaleOrderPageReqVO.RETURN_STATUS_ALL)) { | 46 | } else if (Objects.equals(reqVO.getReturnStatus(), ErpSaleOrderPageReqVO.RETURN_STATUS_ALL)) { |
| 46 | query.apply("t.return_count = t.total_count"); | 47 | query.apply("t.return_count = t.total_count"); |
| 47 | } | 48 | } |
| 49 | + // 可出库 | ||
| 50 | + if (Boolean.TRUE.equals(reqVO.getOutEnable())) { | ||
| 51 | + query.eq(ErpSaleOrderDO::getStatus, ErpAuditStatus.APPROVE.getStatus()) | ||
| 52 | + .apply("t.in_count < t.total_count"); | ||
| 53 | + } | ||
| 48 | if (reqVO.getProductId() != null) { | 54 | if (reqVO.getProductId() != null) { |
| 49 | query.leftJoin(ErpSaleOrderItemDO.class, ErpSaleOrderItemDO::getOrderId, ErpSaleOrderDO::getId) | 55 | query.leftJoin(ErpSaleOrderItemDO.class, ErpSaleOrderItemDO::getOrderId, ErpSaleOrderDO::getId) |
| 50 | .eq(reqVO.getProductId() != null, ErpSaleOrderItemDO::getProductId, reqVO.getProductId()) | 56 | .eq(reqVO.getProductId() != null, ErpSaleOrderItemDO::getProductId, reqVO.getProductId()) |