|  |  | 
 |  |  |                             } | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                     else if (task.TaskType == (int)TaskOutboundTypeEnum.InToOut&& taskDTO.RoadWay.Contains("CW")) | 
 |  |  |                     { | 
 |  |  |                         var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationPLC == "1006" && 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.NextAddress = stationinfo.stationChildCode; | 
 |  |  |                         task.SourceAddress = taskDTO.SourceAddress; | 
 |  |  |                         task.TargetAddress = taskDTO.TargetAddress; | 
 |  |  |                         //if (taskDTO.TaskType == (int)TaskOutboundTypeEnum.InToOut) | 
 |  |  |                         //{ | 
 |  |  |                         //    task.TaskState = (int)TaskInStatusEnum.Line_InFinish; | 
 |  |  |                         //} | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |                 else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |