// APS 优化任务类型定义 export interface OptimizationTaskVO { taskId: string; taskType: TaskType; status: TaskStatus; progress: number; currentPhase?: TaskPhase; progressDesc?: string; inputParams: TaskInputParams; resultRef?: string; errorMessage?: string; createdBy: string; createTime: string; updateTime: string; } export type TaskType = 'SINGLE_COIL' | 'GLOBAL_OPTIMIZATION'; export type TaskStatus = 'PENDING' | 'RUNNING' | 'PAUSED' | 'COMPLETED' | 'FAILED' | 'CANCELLED'; export type TaskPhase = 'PRE_PLANNING' | 'COIL_SCREENING' | 'DETAILED_ENUMERATION' | 'GLOBAL_OPTIMIZATION'; export interface TaskInputParams { coilIds: string[]; orderIds: string[]; strategy?: 'AUTO' | 'LENGTH_FIRST' | 'WIDTH_FIRST'; } export interface TaskSubmitParams { coilIds: string[]; orderIds: string[]; strategy?: 'AUTO' | 'LENGTH_FIRST' | 'WIDTH_FIRST'; } export interface TaskPageParams { pageNo: number; pageSize: number; taskType?: TaskType; status?: TaskStatus; createdBy?: string; } // 任务状态枚举 export const TASK_STATUS = { PENDING: { label: '排队中', color: 'default' }, RUNNING: { label: '运行中', color: 'processing' }, PAUSED: { label: '已暂停', color: 'warning' }, COMPLETED: { label: '已完成', color: 'success' }, FAILED: { label: '失败', color: 'error' }, CANCELLED: { label: '已取消', color: 'default' }, } as const; // 任务类型枚举 export const TASK_TYPE = { SINGLE_COIL: { label: '单卷方案', color: 'blue' }, GLOBAL_OPTIMIZATION: { label: '全局优化', color: 'purple' }, } as const; // 任务阶段枚举 export const TASK_PHASE = { PRE_PLANNING: { label: '预规划', color: 'cyan' }, COIL_SCREENING: { label: '母卷筛选', color: 'geekblue' }, DETAILED_ENUMERATION: { label: '详细枚举', color: 'volcano' }, GLOBAL_OPTIMIZATION: { label: '全局寻优', color: 'purple' }, } as const;