|  | @@ -13,7 +13,9 @@ using System.Text;
 | 
	
		
			
				|  |  |  using System.Threading;
 | 
	
		
			
				|  |  |  using System.Threading.Tasks;
 | 
	
		
			
				|  |  |  using WCS.Core;
 | 
	
		
			
				|  |  | +using WCS.Core.DataTrans;
 | 
	
		
			
				|  |  |  using WCS.Entity;
 | 
	
		
			
				|  |  | +using WCS.Entity.Protocol;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  namespace WCS.Service
 | 
	
		
			
				|  |  |  {
 | 
	
	
		
			
				|  | @@ -34,10 +36,12 @@ namespace WCS.Service
 | 
	
		
			
				|  |  |              #region 启用日志
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              var logConfig = JsonConvert.DeserializeObject<LogConfig>(await File.ReadAllTextAsync("config.json", Encoding.Default, stoppingToken));
 | 
	
		
			
				|  |  | -            Logs.LogHelper.SetConfigInfo(logConfig!);
 | 
	
		
			
				|  |  | +            LogHelper.SetConfigInfo(logConfig!);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              #endregion 启用日志
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +            InfoLog.INFO_INIT("1111");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              _logger.LogInformation("WCS开始启动");
 | 
	
		
			
				|  |  |              //InfoLog.INFO_INIT("WCS开始启动");
 | 
	
		
			
				|  |  |              Configs.DebugRedisUrl = "127.0.0.1";
 | 
	
	
		
			
				|  | @@ -57,10 +61,31 @@ namespace WCS.Service
 | 
	
		
			
				|  |  |                  db.Default.CodeFirst.InitTables(typeof(WCS_CMD));
 | 
	
		
			
				|  |  |                  db.Default.CodeFirst.InitTables(typeof(WCS_PLC));
 | 
	
		
			
				|  |  |                  db.Default.CodeFirst.InitTables(typeof(WCS_DATABLOCK));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_DEVICE));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_PATH));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_PATHPOINT));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_ROUTE));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_TASK));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_TASK_OLD));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_EXCEPTION));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_SystemConfig));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_AGVTask));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_DEVICEPROTOCOL));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_GROUPMEMBER));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_MAPPINGENTRY));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_USERS));
 | 
	
		
			
				|  |  | +                db.Default.CodeFirst.InitTables(typeof(WCS_StatusLog));
 | 
	
		
			
				|  |  | +                //db.Default.CodeFirst.InitTables(typeof(WCS_DATABLOCK));
 | 
	
		
			
				|  |  | +                //db.Default.CodeFirst.InitTables(typeof(WCS_DATABLOCK));
 | 
	
		
			
				|  |  | +                //db.Default.CodeFirst.InitTables(typeof(WCS_DATABLOCK));
 | 
	
		
			
				|  |  | +                //db.Default.CodeFirst.InitTables(typeof(WCS_DATABLOCK));
 | 
	
		
			
				|  |  | +                //db.Default.CodeFirst.InitTables(typeof(WCS_DATABLOCK));
 | 
	
		
			
				|  |  | +                //db.Default.CodeFirst.InitTables(typeof(WCS_DATABLOCK));
 | 
	
		
			
				|  |  | +                //db.Default.CodeFirst.InitTables(typeof(WCS_DATABLOCK));
 | 
	
		
			
				|  |  |                  //db.Default.CodeFirst.InitTables(typeof(WCS_DATABLOCK));
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            //日志发布事件
 | 
	
		
			
				|  |  | +            //日志发布事件s
 | 
	
		
			
				|  |  |              Configs.PublishEvent += () =>
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  WMS.UploadDevInfo();
 | 
	
	
		
			
				|  | @@ -81,7 +106,7 @@ namespace WCS.Service
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              //LogicHandler.DbLog = Helpers.LogHelper.AddWCS_EXCEPTION;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            PLCAccessor.Creater = new PLCAccessors.PLCAccessorsCreater();
 | 
	
		
			
				|  |  | +            PlcAccessor.Creater = new PLCAccessors.PlcAccessorsCreater();
 | 
	
		
			
				|  |  |              try
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  Db.Do(db =>
 | 
	
	
		
			
				|  | @@ -90,7 +115,7 @@ namespace WCS.Service
 | 
	
		
			
				|  |  |                     .Includes(v => v.DEVICE.ROUTES)
 | 
	
		
			
				|  |  |                     .Includes(v => v.DEVICE.PATHS)
 | 
	
		
			
				|  |  |                     .Includes(v => v.DB.PLC).ToArray();
 | 
	
		
			
				|  |  | -                    var objects = items.Select(v => v.Data()).ToArray();
 | 
	
		
			
				|  |  | +                    items.Select(v => v.Data()).ToArray();
 | 
	
		
			
				|  |  |                      LogicHandler.AllObjects.AddRange(items);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                      var devices = db.Default.Queryable<WCS_DEVICE>().Includes(v => v.ROUTES).Includes(v => v.PATHS).Includes(v => v.DEVICEGROUP).ToArray();
 |