| 
					
				 | 
			
			
				@@ -1,4 +1,5 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-using ServiceCenter.SqlSugars; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using ServiceCenter.Extensions; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using ServiceCenter.SqlSugars; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using System.ComponentModel; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using WCS.Core; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using WCS.Entity; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -87,16 +88,6 @@ namespace WCS.WorkEngineering.Systems 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                 && !v.Data3.Status.HasFlag(StatusEunm.OT_Status) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                 && !v.Data3.Status.HasFlag(StatusEunm.Run)).ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    //var a = stations.Select(v => v.Entity.Sources) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    //                     .SelectMany(v => v) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    //                     .Where(v => v.IsTunnel()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    //                     .Select(v => v.Sources) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    //                     .SelectMany(v => v) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    //                     .Where(v => v.HasProtocol(typeof(ISRM520))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    //                     .Select(v => new SRM(v, this.World)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    //srm = a.Where(v => !v.Data2.Status.HasFlag(SrmStatus.Alarm) && v.Data2.RunStatus == SrmRunStatus.Idle && v.Data2.AutoStatus == SrmAutoStatus.Automatic) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    //                    .MinBy(v => tunnelNo.IndexOf(v.Entity.Code)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     //可用堆垛机 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     srm = stations.Select(v => v.Entity.Sources) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                          .SelectMany(v => v) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -114,6 +105,7 @@ namespace WCS.WorkEngineering.Systems 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 if (srm == null) throw new KnownException("无可用堆垛机", LogLevelEnum.Mid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 task.Device = srm.Entity.Code; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                task.Tunnel = task.Device.GetLastDigit().ToString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 agv.Status = AGVTaskStatus.Complete1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 var nextPos = stations.FirstOrDefault(v => v.Entity.Sources.Where(t => t.IsTunnel()) //上一个地址是巷道的 
			 |