1
huangxiaoqiang
2025-11-10 8f7e6826d51a25c7b368c210dbb321d423d24a85
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -3,6 +3,7 @@
using LogLibrary.Log;
using Mapster;
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using SqlSugar;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
@@ -123,17 +124,13 @@
                            task.NextAddress = station.stationChildCode;
                            task.Floor = "1F";
                            task.Floor = item.Floor;
                            task.AGVSign = "";
                        }
                        else if (task.TaskState.GetTaskStateGroup() == TaskStateGroup.AcrossFloorGroup)
                        {
                            var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == item.SourceAddress);
                            if (station != null)
                            {
                                var next = _stationManagerRepository.QueryFirst(x => x.stationType == 5 && x.stationFloor == station.stationFloor);
                            var next = _stationManagerRepository.QueryFirst(x => x.stationType == 5 && x.stationFloor == item.Floor);
                                task.TaskState = (int)TaskAcrossFloorStatusEnum.CarryNew;
@@ -141,10 +138,9 @@
                                task.NextAddress = next.stationChildCode;
                                task.Floor = station.stationFloor;
                            task.Floor = item.Floor;
                                task.AGVSign = "";
                            }
                        }
                        else if (task.TaskState.GetTaskStateGroup() == TaskStateGroup.CarryGroup)
                        {
@@ -180,11 +176,7 @@
                        }
                        else if (task.TaskState.GetTaskStateGroup() == TaskStateGroup.AcrossFloorGroup)
                        {
                            var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == item.SourceAddress);
                            if (station != null)
                            {
                                var next = _stationManagerRepository.QueryFirst(x => x.stationType == 5 && x.stationFloor == station.stationFloor);
                            var next = _stationManagerRepository.QueryFirst(x => x.stationType == 5 && x.stationFloor == item.Floor);
                                task.TaskState = (int)TaskAcrossFloorStatusEnum.CarryNew;
@@ -192,10 +184,9 @@
                                task.NextAddress = next.stationChildCode;
                                task.Floor = station.stationFloor;
                            task.Floor = item.Floor;
                                task.AGVSign = "";
                            }
                        }
                        else if (task.TaskState.GetTaskStateGroup() == TaskStateGroup.CarryGroup)
                        {
@@ -230,11 +221,7 @@
                        }
                        else if (task.TaskState.GetTaskStateGroup() == TaskStateGroup.AcrossFloorGroup)
                        {
                            var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == item.SourceAddress);
                            if (station != null)
                            {
                                var next = _stationManagerRepository.QueryFirst(x => x.stationType == 5 && x.stationFloor == station.stationFloor);
                            var next = _stationManagerRepository.QueryFirst(x => x.stationType == 5 && x.stationFloor == item.Floor);
                                task.TaskState = (int)TaskAcrossFloorStatusEnum.CarryNew;
@@ -242,14 +229,12 @@
                                task.NextAddress = next.stationChildCode;
                                task.Floor = station.stationFloor;
                            task.Floor = item.Floor;
                                task.AGVSign = "";
                            }
                        }
                        else if (task.TaskState.GetTaskStateGroup() == TaskStateGroup.CarryGroup)
                        {
                            var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == item.SourceAddress);
                            task.TaskState = (int)TaskAGVCarryStatusEnum.CarryNew;
@@ -257,7 +242,7 @@
                            task.NextAddress = task.TargetAddress;
                            task.Floor = station.stationFloor;
                            task.Floor = item.Floor;
                            task.AGVSign = "";
                        }
@@ -267,11 +252,7 @@
                    {
                        if (task.TaskState.GetTaskStateGroup() == TaskStateGroup.AcrossFloorGroup)
                        {
                            var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == item.SourceAddress);
                            if (station != null)
                            {
                                var next = _stationManagerRepository.QueryFirst(x => x.stationType == 5 && x.stationFloor == station.stationFloor);
                            var next = _stationManagerRepository.QueryFirst(x => x.stationType == 5 && x.stationFloor == item.Floor);
                                task.TaskState = (int)TaskAcrossFloorStatusEnum.CarryNew;
@@ -279,11 +260,11 @@
                                task.NextAddress = next.stationChildCode;
                                task.Floor = station.stationFloor;
                            task.Floor = item.Floor;
                                task.AGVSign = "";
                            }
                        }
                    }
                    // å°†è½¬æ¢åŽçš„任务添加到任务列表中