From c368e24d9e2750bb1fa28775aa83dc6c7fa98025 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Thu, 13 Jun 2024 14:39:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=A1=91=E5=AE=9A=E7=82=B9=E9=85=8D?= =?UTF-8?q?=E9=80=81=E6=8D=A2=E6=88=90=E5=B7=A6=E5=8F=B3=E8=BD=AE=E7=9D=80?= =?UTF-8?q?=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs index 7bb42985..3dc77241 100644 --- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs @@ -267,6 +267,18 @@ namespace Tnb.ProductionMgr bool? cs01 = await _redisData.TryGetValueByKeyField("YTCS", "AllowAgvEmptyOut_CS01"); bool? cs03 = await _redisData.TryGetValueByKeyField("YTCS", "AllowAgvEmptyOut_CS03"); string startLocationCode = cs01==true ? "ZSSSXCTU01" : cs03==true ? "ZSSSXCTU02" : ""; + if (cs01==true && cs03==true) + { + string last_fixed_point_delivery = _redisData.Exists("last_fixed_point_delivery") ? _redisData.Get("last_fixed_point_delivery") : ""; + if (string.IsNullOrEmpty(last_fixed_point_delivery)) + { + startLocationCode = "ZSSSXCTU01"; + } + else + { + startLocationCode = "ZSSSXCTU01ZSSSXCTU02".Replace(last_fixed_point_delivery, ""); + } + } if (startLocationCode.IsEmpty()) { Log.Error($"输送线无空载具"); @@ -289,6 +301,7 @@ namespace Tnb.ProductionMgr msg += $"{equipment.name}注塑定点配送成功,"; Log.Information($"【FixedPointDelivery】{equipment.name}注塑定点配送成功"); _redisData.Set($"{eqpDaq.equip_code}_{eqpDaq.label_name}_flag", true, TimeSpan.FromMinutes(20)); + _redisData.Set($"last_fixed_point_delivery", startLocationCode); } else {