package cn.iocoder.yudao.module.wms.service.inventory;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.module.wms.api.inventory.dto.*;
|
import cn.iocoder.yudao.module.wms.controller.admin.inventory.vo.WmsInventoryReservePageReqVO;
|
import cn.iocoder.yudao.module.wms.dal.dataobject.inventory.WmsInventoryReserveDO;
|
|
import java.math.BigDecimal;
|
import java.util.List;
|
|
/**
|
* WMS 库存预留 Service 接口
|
*
|
* @author 芋道源码
|
*/
|
public interface WmsInventoryReserveService {
|
|
/**
|
* 创建库存预留
|
*
|
* @param reqDTO 预留请求
|
* @return 预留单号
|
*/
|
String createReserve(WmsReserveReqDTO reqDTO);
|
|
/**
|
* 释放库存预留
|
*
|
* @param reserveNo 预留单号
|
*/
|
void releaseReserve(String reserveNo);
|
|
/**
|
* 使用预留库存(扣减)
|
*
|
* @param reqDTO 使用请求
|
*/
|
void useReserve(WmsUseReserveReqDTO reqDTO);
|
|
/**
|
* 根据业务查询预留记录
|
*
|
* @param bizType 业务类型
|
* @param bizId 业务单据ID
|
* @return 预留记录列表
|
*/
|
List<WmsInventoryReserveDO> getReserveListByBiz(Integer bizType, Long bizId);
|
|
/**
|
* 获取库存预留分页
|
*
|
* @param reqVO 分页请求
|
* @return 分页结果
|
*/
|
PageResult<WmsInventoryReserveDO> getReservePage(WmsInventoryReservePageReqVO reqVO);
|
|
/**
|
* 获取预留详情
|
*
|
* @param id 预留ID
|
* @return 预留记录
|
*/
|
WmsInventoryReserveDO getReserve(Long id);
|
|
/**
|
* 查询指定 SKU 和仓库的预留数量
|
*
|
* @param skuId SKU编号
|
* @param warehouseId 仓库编号
|
* @return 预留数量
|
*/
|
BigDecimal getReserveQuantity(Long skuId, Long warehouseId);
|
|
}
|