From 89051aef8a2c1a85d457914cf6317fe70e0e321c Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期日, 29 十二月 2024 04:33:10 +0800 Subject: [PATCH] 1 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 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 f7e3c24..f5ec2dd 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" @@ -186,7 +186,7 @@ } else { - if(item.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) + if (item.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.NextPosi); if (routers.FirstOrDefault() == null) @@ -197,6 +197,7 @@ task.NextAddress = router?.StartPosi ?? ""; task.DeviceCode = item.RoadWay; + task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); } else { @@ -206,9 +207,16 @@ return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�"); } router = routers.FirstOrDefault(); + string stationCode = router?.NextPosi ?? ""; + Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == stationCode); + if (stationManger == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒扮珯鍙伴厤缃俊鎭�"); + } - task.NextAddress = router?.NextPosi ?? ""; + task.NextAddress = stationManger?.AGVStationCode ?? ""; task.DeviceCode = "AGV"; + task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt(); } } -- Gitblit v1.9.3