using System;
using System.Collections.Generic;
using NPP.SmartSchedue.Api.Contracts.Core.Enums;

namespace NPP.SmartSchedue.Api.Contracts.Services.Integration.Input
{
    /// <summary>
    /// 加载待整合任务输入
    /// </summary>
    public class LoadPendingTasksInput
    {
        /// <summary>
        /// 项目号列表（支持多个项目号筛选）
        /// </summary>
        public List<string> ProjectNumbers { get; set; } = new();
        
        /// <summary>
        /// 任务日期范围
        /// </summary>
        public DateTime? StartDate { get; set; }
        public DateTime? EndDate { get; set; }
        
        /// <summary>
        /// 工序代码列表
        /// </summary>
        public List<string> ProcessCodes { get; set; } = new();
        
        /// <summary>
        /// 班次ID列表
        /// </summary>
        public List<long> ShiftIds { get; set; } = new();
        
        /// <summary>
        /// 任务状态（默认查询待整合状态）
        /// </summary>
        public WorkOrderStatusEnum Status { get; set; } = WorkOrderStatusEnum.PendingIntegration;
        
        /// <summary>
        /// 分页参数
        /// </summary>
        public int PageIndex { get; set; } = 1;
        public int PageSize { get; set; } = 50;
    }
    
    /// <summary>
    /// 任务整合前自检输入
    /// </summary>
    public class TaskIntegrationPreCheckInput
    {
        /// <summary>
        /// 选中的项目号列表
        /// </summary>
        public List<string> SelectedProjectNumbers { get; set; } = new();
        
        /// <summary>
        /// 选中的任务ID列表
        /// </summary>
        public List<long> SelectedTaskIds { get; set; } = new();
        
        /// <summary>
        /// 是否检查人员资源充足性
        /// </summary>
        public bool CheckPersonnelSufficiency { get; set; } = true;
        
        /// <summary>
        /// 是否检查设备资源充足性
        /// </summary>
        public bool CheckEquipmentSufficiency { get; set; } = true;
        
        /// <summary>
        /// 检查的时间范围（按日和周）
        /// </summary>
        public DateTime CheckStartDate { get; set; }
        public DateTime CheckEndDate { get; set; }
    }
    
    /// <summary>
    /// 项目资源对比输入
    /// </summary>
    public class ProjectResourceComparisonInput
    {
        /// <summary>
        /// 项目号列表
        /// </summary>
        public List<string> ProjectNumbers { get; set; } = new();
        
        /// <summary>
        /// 对比时间范围
        /// </summary>
        public DateTime StartDate { get; set; }
        public DateTime EndDate { get; set; }
        
        /// <summary>
        /// 对比维度（按日、按周）
        /// </summary>
        public ComparisonDimension Dimension { get; set; } = ComparisonDimension.Daily;
    }
    
    /// <summary>
    /// 对比维度枚举
    /// </summary>
    public enum ComparisonDimension
    {
        /// <summary>
        /// 按日对比
        /// </summary>
        Daily = 1,
        
        /// <summary>
        /// 按周对比
        /// </summary>
        Weekly = 2
    }
}