From 9d75314e88f8aac494d57715e3231fe3540cb867 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期二, 23 九月 2025 03:03:03 +0800 Subject: [PATCH] 优化更新 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" index 575691f..a87eda0 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" @@ -78,6 +78,8 @@ public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 100 && x < 500).ToList(); + public List<int> TaskRelocationTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 900 && x < 100).ToList(); + public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IApiInfoRepository apiInfoRepository) : base(BaseDal) { _mapper = mapper; @@ -207,6 +209,17 @@ continue; } Dt_Task task = _mapper.Map<Dt_Task>(item); + if (task.TaskType == TaskTypeEnum.Relocation.ObjToInt()) + { + task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); + task.CurrentAddress = item.SourceAddress; + task.NextAddress = item.TargetAddress; + task.DeviceCode = task.Roadway; + task.TaskType = TaskTypeEnum.Relocation.ObjToInt(); + task.Creater = "WMS"; + tasks.Add(task); + continue; + } task.Creater = "WMS"; task.TaskState = (int)TaskStatusEnum.New; task.CurrentAddress = item.SourceAddress; @@ -817,6 +830,14 @@ } /// <summary> + /// 鏍规嵁璁惧缂栧彿鍒涘缓鏃堕棿鎺掑簭鏌ヨ浠诲姟姹犵Щ搴撲换鍔� + /// </summary> + public Dt_Task QueryStackerCraneRelocationTask(string deviceNo) + { + return BaseDal.QueryFirst(x => x.DeviceCode == deviceNo && TaskRelocationTypes.Contains(x.TaskType) && x.TaskState == (int)TaskStatusEnum.SC_Execute, TaskOrderBy); + } + + /// <summary> /// 鏍规嵁璁惧缂栧彿銆佸綋鍓嶅湴鍧�鎸夌収浼樺厛绾т互鍙婂垱寤烘椂闂存帓搴忔煡璇换鍔℃睜鍑哄簱绫诲瀷鐨勬柊澧炵殑浠诲姟 /// </summary> /// <param name="deviceNo">璁惧缂栧彿</param> -- Gitblit v1.9.3