using System.Threading.Tasks;
using System.Collections.Generic;
using ZhonTai.Admin.Core.Dto;
using NPP.SmartSchedue.Api.Contracts.Services.Work.Input;
using NPP.SmartSchedue.Api.Contracts.Services.Work.Output;

namespace NPP.SmartSchedue.Api.Contracts.Services.Work;

/// <summary>
/// 工序组服务接口
/// </summary>
public interface IProcessGroupService
{
    Task<ProcessGroupGetOutput> GetAsync(long id);

    Task<PageOutput<ProcessGroupGetPageOutput>> GetPageAsync(PageInput<ProcessGroupGetPageInput> input);

    /// <summary>
    /// 获取所有工序组列表
    /// </summary>
    /// <returns>工序组列表</returns>
    Task<List<ProcessGroupGetPageOutput>> GetAllAsync();

    Task<long> AddAsync(ProcessGroupAddInput input);

    Task UpdateAsync(ProcessGroupUpdateInput input);

    Task DeleteAsync(long id);

    Task SoftDeleteAsync(long id);

    Task BatchSoftDeleteAsync(long[] ids);

    /// <summary>
    /// 获取工序组的所有工序
    /// </summary>
    /// <param name="groupId">工序组ID</param>
    /// <returns>工序列表</returns>
    Task<List<ProcessInfo>> GetGroupProcessesAsync(long groupId);

    /// <summary>
    /// 为工序组添加工序
    /// </summary>
    /// <param name="input">添加工序参数</param>
    /// <returns>添加结果</returns>
    Task<bool> AddProcessToGroupAsync(ProcessGroupRelationInput input);

    /// <summary>
    /// 从工序组移除工序
    /// </summary>
    /// <param name="groupId">工序组ID</param>
    /// <param name="processId">工序ID</param>
    /// <returns>移除结果</returns>
    Task<bool> RemoveProcessFromGroupAsync(long groupId, long processId);
} 