huangxiaoqiang
10 小时以前 c3ed42924f19d383dd643814b754d60b392496d3
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
@@ -443,12 +443,24 @@
                if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                {
                    var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationLocation == taskDTO.TargetAddress && x.Roadway == taskDTO.RoadWay);
                    task.TaskState = (int)TaskOutStatusEnum.OutNew;
                    task.CurrentAddress = taskDTO.RoadWay;
                    task.NextAddress = stationinfo.stationChildCode;
                    task.SourceAddress = taskDTO.SourceAddress;
                    task.TargetAddress = taskDTO.TargetAddress;
                    if (task.TaskType == (int)TaskOutboundTypeEnum.InToOut)
                    {
                        var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationPLC == "1017" && x.stationType == 10&&x.Roadway==taskDTO.RoadWay);
                        task.TaskState = (int)TaskOutStatusEnum.OutNew;
                        task.CurrentAddress = taskDTO.SourceAddress;
                        task.NextAddress = stationinfo.stationChildCode;
                        task.SourceAddress = taskDTO.SourceAddress;
                        task.TargetAddress = taskDTO.TargetAddress;
                    }
                    else
                    {
                        var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationLocation == taskDTO.TargetAddress && x.Roadway == taskDTO.RoadWay);
                        task.TaskState = (int)TaskOutStatusEnum.OutNew;
                        task.CurrentAddress = taskDTO.RoadWay;
                        task.NextAddress = stationinfo.stationChildCode;
                        task.SourceAddress = taskDTO.SourceAddress;
                        task.TargetAddress = taskDTO.TargetAddress;
                    }
                }
                else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                {