From 7f078e66be9959d94fc78344f195b7b4656812be Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期日, 29 十二月 2024 11:22:10 +0800 Subject: [PATCH] 任务表添加AGV任务号(AGV-年月日+任务号),修改测试架仓AGV交互逻辑 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 13 +++++++++++-- 1 files changed, 11 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..f218473 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" @@ -161,6 +161,7 @@ if (string.IsNullOrEmpty(item.AGVArea)) { + task.AgvTaskNum = "AGV-" + DateTime.Now.ToString("YYMMDD") + item.TaskNum; Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == item.SourceAddress || x.StackerCraneCode == item.RoadWay); if (stationManger == null) { @@ -186,7 +187,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 +198,7 @@ task.NextAddress = router?.StartPosi ?? ""; task.DeviceCode = item.RoadWay; + task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); } else { @@ -206,9 +208,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