From 433be346b919561abd521467faee1d2249de19e7 Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Thu, 8 Aug 2024 11:48:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BA=8C=E6=A5=BC=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E4=BB=93=E5=92=8C=E6=9A=82=E5=AD=98=E4=BB=93=E5=87=BA=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/RedisBackGround.cs | 28 +++++++++---------- .../IWareHouseService.cs | 8 ++++++ .../Tnb.WarehouseMgr/BaseWareHouseService.cs | 11 ++++++-- .../Tnb.WarehouseMgr/WareHouseService.cs | 11 ++++++++ .../WmsMaterialTransferService.cs | 21 ++++++++++++-- .../WmsPDAEmptyOutstockService .cs | 9 +++--- .../Tnb.WarehouseMgr/WmsPrdInstockHService.cs | 22 +++++++-------- 7 files changed, 76 insertions(+), 34 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs index 58ff1fa7..df2b1125 100644 --- a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs +++ b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs @@ -1229,9 +1229,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA /// public async void 送空托到上升降区(object? args) { - if (s_task送空托到上升降区.CurrentCount == 0) + if (_wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.CurrentCount == 0) return; - await s_task送空托到上升降区.WaitAsync(); + await _wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.WaitAsync(); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); try @@ -1355,7 +1355,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA } finally { - s_task送空托到上升降区.Release(); + _wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.Release(); if (!db_Floor2timer送空托到上升降区.Ado.Transaction.IsNull()) try { await db_Floor2timer送空托到上升降区.Ado.CommitTranAsync(); } catch { }; _wareHouseService.GenTaskExecute(); @@ -1371,9 +1371,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA /// public async void 送满托到下升降区(object? args) { - if (s_task送满托到下升降区.CurrentCount == 0) + if (_wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.CurrentCount == 0) return; - await s_task送满托到下升降区.WaitAsync(); + await _wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.WaitAsync(); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); try @@ -1533,7 +1533,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA } finally { - s_task送满托到下升降区.Release(); + _wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.Release(); if (!db_Floor2timer送满托到下升降区.Ado.Transaction.IsNull()) try { await db_Floor2timer送满托到下升降区.Ado.CommitTranAsync(); } catch { }; _wareHouseService.GenTaskExecute(); @@ -1550,9 +1550,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA /// public async void 移走上升降区未生成预任务且满托的料架(object? args) { - if (s_task移走上升降区未生成预任务且满托的料架.CurrentCount == 0) + if (_wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.CurrentCount == 0) return; - await s_task移走上升降区未生成预任务且满托的料架.WaitAsync(); + await _wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.WaitAsync(); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); try @@ -1658,7 +1658,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA } finally { - s_task移走上升降区未生成预任务且满托的料架.Release(); + _wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.Release(); if (!db_Floor2timer移走上升降区未生成预任务且满托的料架.Ado.Transaction.IsNull()) // 数据库连接断开时会报错 try { await db_Floor2timer移走上升降区未生成预任务且满托的料架.Ado.CommitTranAsync(); } catch { }; @@ -1676,9 +1676,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA /// public async void 移走下升降区未生成预任务且空托的料架(object? args) { - if (s_task移走下升降区未生成预任务且空托的料架.CurrentCount == 0) + if (_wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.CurrentCount == 0) return; - await s_task移走下升降区未生成预任务且空托的料架.WaitAsync(); + await _wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.WaitAsync(); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); try @@ -1789,7 +1789,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA } finally { - s_task移走下升降区未生成预任务且空托的料架.Release(); + _wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.Release(); if (!db_Floor2timer移走下升降区未生成预任务且空托的料架.Ado.Transaction.IsNull()) try { await db_Floor2timer移走下升降区未生成预任务且空托的料架.Ado.CommitTranAsync(); } catch { }; _wareHouseService.GenTaskExecute(); @@ -2539,9 +2539,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA // 二楼料架配送 Floor2timer送空托到上升降区 = new Timer(送空托到上升降区, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); - Floor2timer送满托到下升降区 = new Timer(送满托到下升降区, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); + Floor2timer送满托到下升降区 = new Timer(送满托到下升降区, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30)); Floor2timer移走上升降区未生成预任务且满托的料架 = new Timer(移走上升降区未生成预任务且满托的料架, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); - Floor2timer移走下升降区未生成预任务且空托的料架 = new Timer(移走下升降区未生成预任务且空托的料架, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); + Floor2timer移走下升降区未生成预任务且空托的料架 = new Timer(移走下升降区未生成预任务且空托的料架, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30)); GenTaskExecutetimer = new Timer(GenTaskExecute, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Interfaces/IWareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr.Interfaces/IWareHouseService.cs index 180542c7..3b9d8b97 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr.Interfaces/IWareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr.Interfaces/IWareHouseService.cs @@ -23,6 +23,14 @@ namespace Tnb.WarehouseMgr.Interfaces /// 原材料出库 /// SemaphoreSlim s_taskExecuteSemaphore_YCLOutstock { get; } + /// + /// 暂存仓入库 + /// + SemaphoreSlim s_taskExecuteSemaphore_F2ZCCInstock { get; } + /// + /// 暂存仓出库 + /// + SemaphoreSlim s_taskExecuteSemaphore_F2ZCCOutstock { get; } /// /// 入库策略 diff --git a/WarehouseMgr/Tnb.WarehouseMgr/BaseWareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/BaseWareHouseService.cs index 15091b79..1bbe0997 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/BaseWareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/BaseWareHouseService.cs @@ -47,14 +47,21 @@ namespace Tnb.WarehouseMgr public static SemaphoreSlim s_taskExecuteSemaphore = new(1); public static SemaphoreSlim s_elevatorStatusSemaphore = new(1); - public static SemaphoreSlim _s_taskExecuteSemaphore_YCLInstock = new(1); public static SemaphoreSlim _s_taskExecuteSemaphore_YCLOutstock = new(1); - public static SemaphoreSlim _s_taskExecuteSemaphore_F1ZCCInstock = new(1); public static SemaphoreSlim _s_taskExecuteSemaphore_F1ZCCOutstock = new(1); + public static SemaphoreSlim _s_taskExecuteSemaphore_F2ZCCInstock = new(1); + public static SemaphoreSlim _s_taskExecuteSemaphore_F2ZCCOutstock = new(1); + + public static SemaphoreSlim _s_taskExecuteSemaphore_F2HCCInstock = new(1); + public static SemaphoreSlim _s_taskExecuteSemaphore_F2HCCOutstock = new(1); + + public static SemaphoreSlim _s_taskExecuteSemaphore_F4DMJCInstock = new(1); + public static SemaphoreSlim _s_taskExecuteSemaphore_F4DMJCOutstock = new(1); + protected static Dictionary _s_eleUseStatusDic; protected IEventPublisher? EventPublisher { set; get; } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index d5d2e423..09e0198e 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -109,6 +109,17 @@ namespace Tnb.WarehouseMgr get { return _s_taskExecuteSemaphore_F1ZCCOutstock; } } + public SemaphoreSlim s_taskExecuteSemaphore_F2ZCCInstock + { + get { return _s_taskExecuteSemaphore_F2ZCCInstock; } + } + + public SemaphoreSlim s_taskExecuteSemaphore_F2ZCCOutstock + { + get { return _s_taskExecuteSemaphore_F2ZCCOutstock; } + } + + public WareHouseService(ISqlSugarRepository repository, IDictionaryDataService dictionaryDataService, StackExRedisHelper redisData, IBillRullService billRullService, IUserManager userManager, ICacheManager cacheManager, IElevatorControlService elevatorControlService, diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs index 101b9668..022b8892 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs @@ -580,6 +580,8 @@ namespace Tnb.WarehouseMgr { try { + await _s_taskExecuteSemaphore_F2HCCOutstock.WaitAsync(); + if (string.IsNullOrEmpty(input.source_id)) { throw new AppFriendlyException("来源单据id不可为空", 500); @@ -642,8 +644,6 @@ namespace Tnb.WarehouseMgr PrdMoTask prdMoTask = organizeEntityCXs.First(); - - await s_taskExecuteSemaphore.WaitAsync(); await _db.Ado.BeginTranAsync(); //入库取终点 //出库起点 @@ -711,7 +711,7 @@ namespace Tnb.WarehouseMgr } finally { - _ = s_taskExecuteSemaphore.Release(); + _s_taskExecuteSemaphore_F2HCCOutstock.Release(); InvokeGenPretaskExcute(); } @@ -1532,6 +1532,7 @@ namespace Tnb.WarehouseMgr { try { + await _s_taskExecuteSemaphore_F2ZCCOutstock.WaitAsync(); OrganizeEntity organizeEntity = _db.Queryable().Where(r => r.Id == input.workstation_id).First(); if (organizeEntity == null) { @@ -1632,6 +1633,10 @@ namespace Tnb.WarehouseMgr Logger.LogError("【CallRackToProductionLine】" + ex.StackTrace); return await ToApiResult(HttpStatusCode.InternalServerError, ex.Message); } + finally + { + _s_taskExecuteSemaphore_F2ZCCOutstock.Release(); + } return await ToApiResult(HttpStatusCode.OK, "成功"); } @@ -1738,6 +1743,7 @@ namespace Tnb.WarehouseMgr { try { + await _s_taskExecuteSemaphore_F2ZCCInstock.WaitAsync(); List wmsCarryDs = _db.Queryable().Where(r => r.carry_id == wmsCarryH.id).ToList(); if (wmsCarryDs.Count > 0) { @@ -1839,6 +1845,10 @@ namespace Tnb.WarehouseMgr await _db.Ado.RollbackTranAsync(); return await ToApiResult(HttpStatusCode.InternalServerError, ex.Message); } + finally + { + _s_taskExecuteSemaphore_F2ZCCInstock.Release(); + } return await ToApiResult(HttpStatusCode.OK, "成功"); } @@ -1846,6 +1856,7 @@ namespace Tnb.WarehouseMgr { try { + await _s_taskExecuteSemaphore_F2HCCInstock.WaitAsync(); BasLocation startlocation = _db.Queryable().Where(r => r.id == input.startlocation_id).First(); if (startlocation == null) { @@ -1898,6 +1909,10 @@ namespace Tnb.WarehouseMgr await _db.Ado.RollbackTranAsync(); return await ToApiResult(HttpStatusCode.InternalServerError, ex.Message); } + finally + { + _s_taskExecuteSemaphore_F2HCCInstock.Release(); + } return await ToApiResult(HttpStatusCode.OK, "成功"); } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyOutstockService .cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyOutstockService .cs index 1c580d87..1dad4786 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyOutstockService .cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyOutstockService .cs @@ -60,9 +60,9 @@ namespace Tnb.WarehouseMgr { if (input.data[nameof(OutStockStrategyQuery.warehouse_id)].ToString() == WmsWareHouseConst.WAREHOUSE_ZC_ID) - { await _s_taskExecuteSemaphore_F1ZCCOutstock.WaitAsync(); - } + else if (input.data[nameof(OutStockStrategyQuery.warehouse_id)].ToString() == WmsWareHouseConst.WAREHOUSE_HCC_ID) + await _s_taskExecuteSemaphore_F2HCCOutstock.WaitAsync(); try { Logger.Information("开始PDA空载具出库"); @@ -236,9 +236,10 @@ namespace Tnb.WarehouseMgr finally { if (input.data[nameof(OutStockStrategyQuery.warehouse_id)].ToString() == WmsWareHouseConst.WAREHOUSE_ZC_ID) - { _s_taskExecuteSemaphore_F1ZCCOutstock.Release(); - } + else if (input.data[nameof(OutStockStrategyQuery.warehouse_id)].ToString() == WmsWareHouseConst.WAREHOUSE_HCC_ID) + _s_taskExecuteSemaphore_F2HCCOutstock.Release(); + await InvokeGenPretaskExcute(); } return Task.FromResult(true); diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs index 43ac200e..ba7b5454 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs @@ -143,15 +143,15 @@ namespace Tnb.WarehouseMgr await db.Insertable(WmsPrdInstockCodes).ExecuteCommandAsync(); - if (type == "25019163616533") + if (type == DictConst.PrdMoTypeZS) { await _s_taskExecuteSemaphore_F1ZCCInstock.WaitAsync(); } - else if (type == "25019172714005") + else if (type == DictConst.PrdMoTypeJC) { - await _s_taskExecuteSemaphore_F1ZCCInstock.WaitAsync(); + await _s_taskExecuteSemaphore_F2HCCInstock.WaitAsync(); } - else if (type == "25019191681045") + else if (type == DictConst.PrdMoTypeBZ) { } @@ -177,7 +177,7 @@ namespace Tnb.WarehouseMgr string startlocation_id_ssx = null; - if (type == "25019163616533") + if (type == DictConst.PrdMoTypeZS) { Logger.LogInformation($"【PrdInstock】注塑车间生产提报"); // 注塑线边库到2,4输送线 @@ -231,7 +231,7 @@ namespace Tnb.WarehouseMgr throw new Exception($"注塑车间生成到中储仓的任务失败 {res2.msg}"); } } - else if (type == "25019172714005") + else if (type == DictConst.PrdMoTypeJC) { Logger.LogInformation($"【PrdInstock】挤出车间生产提报"); WmsCarryH wmsCarryH = await db.Queryable().Where(r => r.id == wmsPrdInstockD.carry_id).FirstAsync(); @@ -253,7 +253,7 @@ namespace Tnb.WarehouseMgr throw new Exception($"挤出车间生成到中储仓的任务失败 {res2.msg}"); } } - else if (type == "25019191681045") + else if (type == DictConst.PrdMoTypeBZ) { Logger.LogInformation($"【PrdInstock】包装车间生产提报"); WmsCarryH wmsCarryH = await db.Queryable().Where(r => r.id == wmsPrdInstockD.carry_id).FirstAsync(); @@ -289,15 +289,15 @@ namespace Tnb.WarehouseMgr } finally { - if (type == "25019163616533") + if (type == DictConst.PrdMoTypeZS) { _s_taskExecuteSemaphore_F1ZCCInstock.Release(); } - else if (type == "25019172714005") + else if (type == DictConst.PrdMoTypeJC) { - _s_taskExecuteSemaphore_F1ZCCInstock.Release(); + _s_taskExecuteSemaphore_F2HCCInstock.Release(); } - else if (type == "25019191681045") + else if (type == DictConst.PrdMoTypeBZ) { } From ef4449d5064964d1f5160e151f06123fd5c51d0c Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Thu, 8 Aug 2024 16:28:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8B=E5=8D=87=E9=99=8D=E6=9C=BA?= =?UTF-8?q?=E5=BB=B6=E6=97=B6=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/RedisBackGround.cs | 111 +++++++++++++----- 1 file changed, 84 insertions(+), 27 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs index df2b1125..1e3a1939 100644 --- a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs +++ b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs @@ -6,6 +6,7 @@ using System.Dynamic; using System.Security.Cryptography.X509Certificates; using System.Security.Policy; using System.Text; +using System.Text.Json.Nodes; using System.Text.RegularExpressions; using System.Threading; using Aop.Api.Domain; @@ -945,16 +946,47 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA { var strs = dic.Where(p => p.Key == key).First().Value; - bool re = await GetBoolTag(key, strs[0]); + JObject reObj = await GetObjectTag(key, strs[0]); + if (reObj == null) + continue; + bool re = false; + DateTime timestamp_judgeCode = DateTime.MinValue; + if (reObj.TryGetValue("Value", out JToken valueToken1)) + { + re = bool.Parse(valueToken1.ToString()); + if (reObj.TryGetValue("TimeStamp", out JToken valueToken2)) + timestamp_judgeCode = DateTime.Parse(valueToken2.ToString()); + } + if (!re) continue; - string? result = await GetStringTag(key, strs[1]); + + JObject reObj_code = await GetObjectTag(key, strs[1]); + if (reObj_code == null) + continue; + string? result = ""; + DateTime timestamp_code = DateTime.MinValue; + if (reObj_code.TryGetValue("Value", out JToken valueToken3)) + { + result = valueToken3.ToString(); + if (reObj_code.TryGetValue("TimeStamp", out JToken valueToken4)) + timestamp_code = DateTime.Parse(valueToken4.ToString()); + } + if (!string.IsNullOrEmpty(result)) { + if (result.Length < 5) { result = "LX" + result.Replace("\r", ""); } + + if (timestamp_judgeCode > timestamp_code) + { + LoggerSSX.LogInformation($"【定时任务SSXcode】下升降机入中储仓 判定料箱{result}的条码判断请求信号时间{timestamp_judgeCode.ToString("yyyy-MM-dd HH:mm:ss")} 大于条码更新的时间{timestamp_code.ToString("yyyy-MM-dd HH:mm:ss")},将跳过此次执行"); + continue; + } + var DistaskH = db_SSXcodetimer.Queryable().Where(p => p.carry_code == result && p.status != WmsWareHouseConst.TASK_BILL_STATUS_COMPLE_ID).OrderByDescending(p => p.create_time).First(); if (DistaskH != null) { @@ -2066,6 +2098,31 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA //return true; } + + public async Task GetObjectTag(string DevName, string field) + { + #region + try + { + string jsonString = await _redisData.GetHash(DevName, field); + Log.Information($"查询X2Server数据 {DevName} {field}:" + jsonString); + JObject jsonObject = JObject.Parse(jsonString); + if (jsonObject.TryGetValue("StatusCode", out JToken valueToken1)) + { + if (valueToken1.ToString() == "-1") + return null; + } + return jsonObject; + } + catch (Exception ex) + { + // 捕获并处理异常 + Console.WriteLine($"发生异常: {ex.Message}"); + } + + return null; + #endregion + } #endregion @@ -2522,41 +2579,41 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA public Task StartAsync(CancellationToken cancellationToken) { - CheckGettimer = new Timer(CheckGet, null, TimeSpan.Zero, TimeSpan.FromSeconds(10)); - Scantimer = new Timer(ScanInStock, null, TimeSpan.Zero, TimeSpan.FromSeconds(60)); + //CheckGettimer = new Timer(CheckGet, null, TimeSpan.Zero, TimeSpan.FromSeconds(10)); + //Scantimer = new Timer(ScanInStock, null, TimeSpan.Zero, TimeSpan.FromSeconds(60)); SSXcodetimer = new Timer(SSXcode, null, TimeSpan.Zero, TimeSpan.FromSeconds(10)); - // 八工位缓存区补充空托盘 - BGWCarrySupplementtimer = new Timer(BGWCarrySupplement, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); + //// 八工位缓存区补充空托盘 + //BGWCarrySupplementtimer = new Timer(BGWCarrySupplement, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); - // 供料叠盘机空托盘自动入库 - YCLGLDPJInstocktimer = new Timer(YCLGLDPJInstock, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30)); + //// 供料叠盘机空托盘自动入库 + //YCLGLDPJInstocktimer = new Timer(YCLGLDPJInstock, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30)); - // 外协叠盘机空托盘自动入库 - YCLWXDPJInstocktimer = new Timer(YCLWXDPJInstock, null, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(30)); + //// 外协叠盘机空托盘自动入库 + //YCLWXDPJInstocktimer = new Timer(YCLWXDPJInstock, null, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(30)); - // 二楼上升降机 - Floor2UpMachinecodetimer = new Timer(Floor2UpMachinecode, null, TimeSpan.Zero, TimeSpan.FromSeconds(20)); + //// 二楼上升降机 + //Floor2UpMachinecodetimer = new Timer(Floor2UpMachinecode, null, TimeSpan.Zero, TimeSpan.FromSeconds(20)); - // 二楼料架配送 - Floor2timer送空托到上升降区 = new Timer(送空托到上升降区, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); - Floor2timer送满托到下升降区 = new Timer(送满托到下升降区, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30)); - Floor2timer移走上升降区未生成预任务且满托的料架 = new Timer(移走上升降区未生成预任务且满托的料架, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); - Floor2timer移走下升降区未生成预任务且空托的料架 = new Timer(移走下升降区未生成预任务且空托的料架, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30)); + //// 二楼料架配送 + //Floor2timer送空托到上升降区 = new Timer(送空托到上升降区, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); + //Floor2timer送满托到下升降区 = new Timer(送满托到下升降区, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30)); + //Floor2timer移走上升降区未生成预任务且满托的料架 = new Timer(移走上升降区未生成预任务且满托的料架, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); + //Floor2timer移走下升降区未生成预任务且空托的料架 = new Timer(移走下升降区未生成预任务且空托的料架, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30)); - GenTaskExecutetimer = new Timer(GenTaskExecute, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); + //GenTaskExecutetimer = new Timer(GenTaskExecute, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); - // 停用 - //PackOutstockServicetimer = new Timer(PackOutstockService, null, TimeSpan.Zero, TimeSpan.FromSeconds(60)); + //// 停用 + ////PackOutstockServicetimer = new Timer(PackOutstockService, null, TimeSpan.Zero, TimeSpan.FromSeconds(60)); - ElevatorTaskExceptionHandleThread = new Thread(ElevatorTaskExceptionHandle); - ElevatorTaskExceptionHandleThread.Start(); + //ElevatorTaskExceptionHandleThread = new Thread(ElevatorTaskExceptionHandle); + //ElevatorTaskExceptionHandleThread.Start(); - Floor4DMJ2MJXtimer = new Timer(Floor4DMJ2MJX, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); - Floor4MJX2MJCtimer = new Timer(Floor4MJX2MJC, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); - Floor4DMC2CPKtimer = new Timer(Floor4DMC2CPK, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); + //Floor4DMJ2MJXtimer = new Timer(Floor4DMJ2MJX, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); + //Floor4MJX2MJCtimer = new Timer(Floor4MJX2MJC, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); + //Floor4DMC2CPKtimer = new Timer(Floor4DMC2CPK, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); - F2KTPsupplementtimer = new Timer(F2KTPsupplement, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); - YCLInternalTransfertimer = new Timer(YCLInternalTransfer, null, TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(185)); + //F2KTPsupplementtimer = new Timer(F2KTPsupplement, null, TimeSpan.Zero, TimeSpan.FromSeconds(30)); + //YCLInternalTransfertimer = new Timer(YCLInternalTransfer, null, TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(185)); return Task.CompletedTask; }