package com.ruoyi.asset.service;

import java.util.List;
import com.ruoyi.asset.domain.AmsAsset;
import com.ruoyi.asset.domain.AmsReturnAssetCandidate;
import com.ruoyi.asset.domain.AmsReturnOrder;

/**
 * 退库管理Service接口
 *
 * @author Yangk
 */
public interface IAmsReturnOrderService
{
    public AmsReturnOrder selectAmsReturnOrderByOrderId(Long orderId);

    public List<AmsReturnOrder> selectAmsReturnOrderList(AmsReturnOrder amsReturnOrder);

    /** 查询未被其他有效退库单占用的在用资产。 */
    public List<AmsReturnAssetCandidate> selectAvailableReturnAssetList(AmsAsset amsAsset, Long currentOrderId,
            Long originWarehouseId, Boolean missingOriginOnly);

    public int insertAmsReturnOrder(AmsReturnOrder amsReturnOrder, Long applicantId,
            String applicantName, Long applyDeptId);

    public int updateAmsReturnOrder(AmsReturnOrder amsReturnOrder);

    /** 提交退库单（草稿 → 待确认）。 */
    public int submitReturn(Long orderId, String operateLoginName);

    /** 确认退库（待确认 → 已退库）。 */
    public int confirmReturn(Long orderId, Long operateUserId, String operateUserName,
            String operateLoginName);

    public int deleteAmsReturnOrderByOrderIds(String orderIds);

    public int deleteAmsReturnOrderByOrderId(Long orderId);
}
