|  | @@ -825,6 +825,8 @@ namespace wms.service.Service
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              var taskMax = Convert.ToInt32(_sysconfigrepository.AsQueryable().With(SqlWith.NoLock)
 | 
	
		
			
				|  |  |                  .First(x => x.Code == "FullPalletInMax").SContent);
 | 
	
		
			
				|  |  | +            var sameSideTaskNum = Convert.ToInt32(_sysconfigrepository.AsQueryable().With(SqlWith.NoLock)
 | 
	
		
			
				|  |  | +                .First(x => x.Code == "SameSideTaskInNum").SContent);
 | 
	
		
			
				|  |  |              //var station_Use = _sysconfigrepository.AsQueryable().With(SqlWith.NoLock)
 | 
	
		
			
				|  |  |              //    .First(x => x.Code == "InStation" && x.SContent == "1").Name;
 | 
	
		
			
				|  |  |              var taskCount = _taskrepository.AsQueryable().With(SqlWith.NoLock).Count(x =>
 | 
	
	
		
			
				|  | @@ -1052,7 +1054,7 @@ namespace wms.service.Service
 | 
	
		
			
				|  |  |                  var count_1S = invnowCount_1S - taskInfoCount_1S;
 | 
	
		
			
				|  |  |                  var count_2S = invnowCount_2S - taskInfoCount_2S;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                var wCode = Max(count_1N,count_1S,count_2N,count_2S);//count_1N >= count_2N ? "1N" : "2N";
 | 
	
		
			
				|  |  | +                var wCode = Max(count_1N,count_1S,count_2N,count_2S);
 | 
	
		
			
				|  |  |                  if ( taskCount > 0)
 | 
	
		
			
				|  |  |                      if ((wCode == "1N" && taskMax <= taskInfoCount_1N) ||
 | 
	
		
			
				|  |  |                          (wCode == "1S" && taskMax <= taskInfoCount_1S) ||
 | 
	
	
		
			
				|  | @@ -1063,6 +1065,28 @@ namespace wms.service.Service
 | 
	
		
			
				|  |  |                          res.ResMsg = $"禁止入库,最大入库任务数量已达{taskMax}";
 | 
	
		
			
				|  |  |                          return res;
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  | +                if (wCode == "1N" && taskInfoCount_1N > sameSideTaskNum)
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    wCode = taskInfoCount_1N > taskInfoCount_1S ? "1S" : "1N";
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                else if (wCode == "1S" && taskInfoCount_1S > sameSideTaskNum)
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    wCode = taskInfoCount_1S > taskInfoCount_1N ? "1N" : "1S";
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                else if (wCode == "2N" && taskInfoCount_2N > sameSideTaskNum)
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    wCode = taskInfoCount_2N > taskInfoCount_2S ? "2S" : "2N";
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                else if (wCode == "2S" && taskInfoCount_2S > sameSideTaskNum)
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    wCode = taskInfoCount_2S > taskInfoCount_2N ? "2N" : "2S";
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                //增加一个入库口配置,判断是否往这里分配任务
 | 
	
		
			
				|  |  | +                var noIn = "";
 | 
	
		
			
				|  |  | +                if (wCode == "1N" && noIn.Contains("1N") && !noIn.Contains("1S"))
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    wCode = "1S";
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  //if (station_Use != null && !string.IsNullOrEmpty(station_Use))
 | 
	
		
			
				|  |  |                  //{
 |