2026-06-29 940c8481d2fdcf51341db4ccd6fd6fcc2d43debb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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);
 
}