mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-30 03:01:53 +08:00
✨ ERP:增加 ERP 可出库订单列表
This commit is contained in:
parent
6f57987208
commit
09e4763c79
@ -71,4 +71,7 @@ public class ErpSaleOrderPageReqVO extends PageParam {
|
|||||||
@Schema(description = "退货状态", example = "2")
|
@Schema(description = "退货状态", example = "2")
|
||||||
private Integer returnStatus;
|
private Integer returnStatus;
|
||||||
|
|
||||||
|
@Schema(description = "是否可出库", example = "true")
|
||||||
|
private Boolean outEnable;
|
||||||
|
|
||||||
}
|
}
|
@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX;
|
|||||||
import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderPageReqVO;
|
import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderPageReqVO;
|
||||||
import cn.iocoder.yudao.module.erp.dal.dataobject.sale.ErpSaleOrderDO;
|
import cn.iocoder.yudao.module.erp.dal.dataobject.sale.ErpSaleOrderDO;
|
||||||
import cn.iocoder.yudao.module.erp.dal.dataobject.sale.ErpSaleOrderItemDO;
|
import cn.iocoder.yudao.module.erp.dal.dataobject.sale.ErpSaleOrderItemDO;
|
||||||
|
import cn.iocoder.yudao.module.erp.enums.ErpAuditStatus;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
@ -45,6 +46,11 @@ public interface ErpSaleOrderMapper extends BaseMapperX<ErpSaleOrderDO> {
|
|||||||
} else if (Objects.equals(reqVO.getReturnStatus(), ErpSaleOrderPageReqVO.RETURN_STATUS_ALL)) {
|
} else if (Objects.equals(reqVO.getReturnStatus(), ErpSaleOrderPageReqVO.RETURN_STATUS_ALL)) {
|
||||||
query.apply("t.return_count = t.total_count");
|
query.apply("t.return_count = t.total_count");
|
||||||
}
|
}
|
||||||
|
// 可出库
|
||||||
|
if (Boolean.TRUE.equals(reqVO.getOutEnable())) {
|
||||||
|
query.eq(ErpSaleOrderDO::getStatus, ErpAuditStatus.APPROVE.getStatus())
|
||||||
|
.apply("t.in_count < t.total_count");
|
||||||
|
}
|
||||||
if (reqVO.getProductId() != null) {
|
if (reqVO.getProductId() != null) {
|
||||||
query.leftJoin(ErpSaleOrderItemDO.class, ErpSaleOrderItemDO::getOrderId, ErpSaleOrderDO::getId)
|
query.leftJoin(ErpSaleOrderItemDO.class, ErpSaleOrderItemDO::getOrderId, ErpSaleOrderDO::getId)
|
||||||
.eq(reqVO.getProductId() != null, ErpSaleOrderItemDO::getProductId, reqVO.getProductId())
|
.eq(reqVO.getProductId() != null, ErpSaleOrderItemDO::getProductId, reqVO.getProductId())
|
||||||
|
Loading…
Reference in New Issue
Block a user