From b9666d03ea4ac6ac1073f8b7b7959e3b507b82a6 Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Tue, 25 Jun 2024 11:39:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/RedisBackGround.cs | 40 +++++++++---------- .../Tnb.WarehouseMgr/WareHouseService.cs | 30 +++++++------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs index 1ab74ea8..c9e6b25f 100644 --- a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs +++ b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs @@ -1593,26 +1593,26 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA private async Task Floor2UpDownMachinecode_SetTag(string tag, string value) { - //string DevName = "东面提升机输送线"; - //Dictionary dicCommand = new(StringComparer.OrdinalIgnoreCase) - //{ - // ["DevName"] = DevName, - // ["token"] = _eleCtlCfg.token, - // ["TagName"] = tag, - // ["Value"] = value, - //}; - //string result = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand); + string DevName = "东面提升机输送线"; + Dictionary dicCommand = new(StringComparer.OrdinalIgnoreCase) + { + ["DevName"] = DevName, + ["token"] = _eleCtlCfg.token, + ["TagName"] = tag, + ["Value"] = value, + }; + string result = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand); - //return result.Contains("Ok"); + return result.Contains("Ok"); //测试 - string DevName = "东面提升机输送线"; + //string DevName = "东面提升机输送线"; - JObject valueJson = new JObject(); - valueJson["Value"] = value; + //JObject valueJson = new JObject(); + //valueJson["Value"] = value; - _redisData.SetHash(DevName, tag, valueJson.ToString()); - return true; + //_redisData.SetHash(DevName, tag, valueJson.ToString()); + //return true; } #endregion @@ -1636,13 +1636,13 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA //YCLWXDPJInstocktimer = new Timer(YCLWXDPJInstock, null, TimeSpan.Zero, TimeSpan.FromSeconds(100000)); // 二楼上升降机 - Floor2UpMachinecodetimer = new Timer(Floor2UpMachinecode, null, TimeSpan.Zero, TimeSpan.FromSeconds(1)); + Floor2UpMachinecodetimer = new Timer(Floor2UpMachinecode, null, TimeSpan.Zero, TimeSpan.FromSeconds(20)); // 二楼料架配送 - Floor2timer送空托到上升降区 = new Timer(送空托到上升降区, null, TimeSpan.Zero, TimeSpan.FromSeconds(10)); - Floor2timer送满托到下升降区 = new Timer(送满托到下升降区, null, TimeSpan.Zero, TimeSpan.FromSeconds(10)); - Floor2timer移走上升降区未生成预任务且满托的料架 = new Timer(移走上升降区未生成预任务且满托的料架, null, TimeSpan.Zero, TimeSpan.FromSeconds(10)); - Floor2timer移走下升降区未生成预任务且空托的料架 = new Timer(移走下升降区未生成预任务且空托的料架, null, TimeSpan.Zero, TimeSpan.FromSeconds(10)); + Floor2timer送空托到上升降区 = new Timer(送空托到上升降区, null, TimeSpan.Zero, 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.Zero, TimeSpan.FromSeconds(30)); return Task.CompletedTask; } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index 1bcf09b4..e21a8382 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -994,26 +994,26 @@ namespace Tnb.WarehouseMgr private async Task Floor2UpDownMachinecode_SetTag(string tag, string value) { - //string DevName = "东面提升机输送线"; - //Dictionary dicCommand = new(StringComparer.OrdinalIgnoreCase) - //{ - // ["DevName"] = DevName, - // ["token"] = _eleCtlCfg.token, - // ["TagName"] = tag, - // ["Value"] = value, - //}; - //string result = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand); + string DevName = "东面提升机输送线"; + Dictionary dicCommand = new(StringComparer.OrdinalIgnoreCase) + { + ["DevName"] = DevName, + ["token"] = _eleCtlCfg.token, + ["TagName"] = tag, + ["Value"] = value, + }; + string result = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand); - //return result.Contains("Ok"); + return result.Contains("Ok"); // 测试 - string DevName = "东面提升机输送线"; + //string DevName = "东面提升机输送线"; - JObject valueJson = new JObject(); - valueJson["Value"] = value; + //JObject valueJson = new JObject(); + //valueJson["Value"] = value; - _redisData.SetHash(DevName, tag, valueJson.ToString()); - return true; + //_redisData.SetHash(DevName, tag, valueJson.ToString()); + //return true; }