package com.erp.warehouse.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.erp.warehouse.dto.OutboundOrderDTO.*;
import com.erp.warehouse.entity.OutboundOrder;

/**
 * 出库管理服务接口
 * 支持：销售出库、调拨出库
 */
public interface OutboundService {

    /**
     * 创建出库单
     */
    OutboundOrder createOutboundOrder(CreateRequest request, Long operatorId);

    /**
     * 确认出库（实际扣减库存）
     */
    OutboundOrder confirmOutbound(Long outboundOrderId, ShipRequest request);

    /**
     * 取消出库单
     */
    void cancelOutbound(Long outboundOrderId);

    /**
     * 分页查询出库单
     */
    IPage<OutboundOrder> listOutboundOrders(String outboundType, Long warehouseId, String status, int page, int limit);

    /**
     * 获取出库单详情
     */
    OutboundOrder getOutboundOrder(Long id);

    /**
     * 根据出库单号获取
     */
    OutboundOrder getOutboundOrderByNo(String outboundNo);
}
