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

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

/// <summary>
/// 人员综合服务接口
/// </summary>
public interface IPersonService
{
    /// <summary>
    /// 根据资质IDs、班次ID、工作日期，查询非请假的、有资质的人员
    /// </summary>
    /// <param name="qualificationIds">资质ID字符串，使用逗号分隔</param>
    /// <param name="shiftId">班次ID</param>
    /// <param name="workStartTime">工作日期（将结合班次时间计算实际工作时间段）</param>
    /// <returns></returns>
    Task<List<AvailablePersonnelOutput>> GetAvailablePersonnelAsync(
        string qualificationIds, 
        long shiftId, 
        DateTime workStartTime);

    /// <summary>
    /// 检查人员是否具备指定资质
    /// </summary>
    /// <param name="personnelId">人员ID</param>
    /// <param name="qualificationId">资质ID</param>
    /// <returns></returns>
    Task<bool> HasQualificationAsync(long personnelId, long qualificationId);

    /// <summary>
    /// 获取所有人员池（用于智能分配）
    /// 深度业务思考：从资质表获取所有关联人员并去重，确保五层决策模型的完整性
    /// </summary>
    /// <param name="includeQualifications">是否包含资质信息</param>
    /// <returns>完整的人员池，用于后续的五层决策筛选</returns>
    Task<List<PersonnelPoolOutput>> GetAllPersonnelPoolAsync(bool includeQualifications = false);
}