using System; using System.Collections.Generic; using NPP.SmartSchedue.Api.Contracts.Core.Enums; namespace NPP.SmartSchedue.Api.Contracts.Services.Integration.Output; /// /// 整合记录详细信息 /// 包含完整的任务分配详情、人员信息、设备信息等 /// public class IntegrationRecordDetail { /// /// 记录ID /// public long Id { get; set; } /// /// 整合批次编码 /// public string IntegrationBatchCode { get; set; } = string.Empty; /// /// 整合时间 /// public DateTime IntegrationTime { get; set; } /// /// 操作员用户ID /// public long OperatorUserId { get; set; } /// /// 操作员用户名 /// public string OperatorUserName { get; set; } = string.Empty; /// /// 操作员真实姓名 /// public string OperatorRealName { get; set; } = string.Empty; /// /// 策略配置详情 /// public IntegrationStrategyConfig StrategyConfig { get; set; } = new(); /// /// 人员分配结果详情 /// public PersonnelAllocationResult? PersonnelAllocationResult { get; set; } /// /// 设备分配结果详情 /// public EquipmentAllocationResult? EquipmentAllocationResult { get; set; } /// /// 任务详细信息列表 /// public List TaskDetails { get; set; } = new(); /// /// 成功任务数 /// public int SuccessTaskCount { get; set; } /// /// 失败任务数 /// public int FailedTaskCount { get; set; } /// /// 执行耗时(毫秒) /// public long ElapsedMilliseconds { get; set; } /// /// 公平性评分 /// public int FairnessScore { get; set; } /// /// 设备利用率 /// public decimal UtilizationRate { get; set; } /// /// 备注信息 /// public string Remarks { get; set; } = string.Empty; /// /// 创建时间 /// public DateTime CreatedTime { get; set; } } /// /// 整合策略配置 /// 用于展示策略详细配置信息 /// public class IntegrationStrategyConfig { /// /// 人员分配策略 /// public string PersonnelStrategy { get; set; } = string.Empty; /// /// 设备分配策略 /// public string EquipmentStrategy { get; set; } = string.Empty; /// /// 是否强制执行班次规则 /// public bool EnforceShiftRules { get; set; } /// /// 是否优先处理高优先级任务 /// public bool PrioritizeHighPriorityTasks { get; set; } /// /// 是否考虑资质匹配度 /// public bool ConsiderQualificationMatch { get; set; } /// /// 是否启用负载均衡 /// public bool EnableLoadBalancing { get; set; } /// /// 最大连续工作天数 /// public int MaxContinuousWorkDays { get; set; } /// /// 目标设备利用率 /// public decimal TargetEquipmentUtilization { get; set; } } /// /// 记录中的任务详细信息 /// 用于展示任务在整合记录中的完整信息 /// public class TaskDetailForRecord { /// /// 任务ID /// public long TaskId { get; set; } /// /// 任务代码 /// public string TaskCode { get; set; } = string.Empty; /// /// 项目号 /// public string ProjectNumber { get; set; } = string.Empty; /// /// 项目类别 /// public string ProjectCategory { get; set; } = string.Empty; /// /// 班次ID /// public long? ShiftId { get; set; } /// /// 班次名称 /// public string ShiftName { get; set; } = string.Empty; /// /// 工序ID /// public long ProcessId { get; set; } /// /// 工序名称 /// public string ProcessName { get; set; } = string.Empty; /// /// 工作日期 /// public DateTime WorkOrderDate { get; set; } /// /// 优先级 /// public int Priority { get; set; } /// /// 紧急程度 /// public int Urgency { get; set; } /// /// 复杂度 /// public int Complexity { get; set; } /// /// 预计工时 /// public decimal? EstimatedHours { get; set; } /// /// 任务状态 /// public int Status { get; set; } /// /// 分配的人员ID /// public long? AssignedPersonnelId { get; set; } /// /// 分配的人员姓名 /// public string AssignedPersonnelName { get; set; } = string.Empty; /// /// 分配的设备ID /// public long? AssignedEquipmentId { get; set; } /// /// 分配的设备名称 /// public string AssignedEquipmentName { get; set; } = string.Empty; /// /// 权重 /// public double WeightFactor { get; set; } /// /// 备注 /// public string Remarks { get; set; } = string.Empty; }