From ece89a101e3fe488473c2d4f5f5530c34c20052b Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Wed, 26 Jun 2024 09:58:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E8=BD=BD=E5=85=B7=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/TimeWorkService.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs index 24191b7c..16898a23 100644 --- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs @@ -108,9 +108,13 @@ namespace Tnb.ProductionMgr bool? cs01 = await _redisData.TryGetValueByKeyField("YTCS", "CallCtuEmptyIn_CS01"); bool? cs03 = await _redisData.TryGetValueByKeyField("YTCS", "CallCtuEmptyIn_CS03"); bool? cs06 = await _redisData.TryGetValueByKeyField("YTCS", "CallCtuEmptyIn_CS06"); - bool cs01Flag = _redisData.Get("YTCS_CallCtuEmptyIn_CS01_flag"); - bool cs03Flag = _redisData.Get("YTCS_CallCtuEmptyIn_CS03_flag"); - bool cs06Flag = _redisData.Get("YTCS_CallCtuEmptyIn_CS06_flag"); + // bool cs01Flag = _redisData.Get("YTCS_CallCtuEmptyIn_CS01_flag"); + // bool cs03Flag = _redisData.Get("YTCS_CallCtuEmptyIn_CS03_flag"); + // bool cs06Flag = _redisData.Get("YTCS_CallCtuEmptyIn_CS06_flag"); + List statusList = new List(){WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID,WmsWareHouseConst.PRETASK_BILL_STATUS_YXF_ID}; + bool cs01Flag = await _db.Queryable().AnyAsync(x => x.endlocation_code == "SSX-021-001" && statusList.Contains(x.status) ); + bool cs03Flag = await _db.Queryable().AnyAsync(x => x.endlocation_code == "SSX-021-003" && statusList.Contains(x.status) ); + bool cs06Flag = await _db.Queryable().AnyAsync(x => x.endlocation_code == "SSX-011-006" && statusList.Contains(x.status) ); if (cs01==true && !cs01Flag) { BasFactoryConfig config = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN); @@ -160,7 +164,7 @@ namespace Tnb.ProductionMgr { msg = "ctu1空箱入呼叫成功"; Log.Information("【EmptyCarryOutStk】ctu1空箱入呼叫成功"); - _redisData.Set("YTCS_CallCtuEmptyIn_CS01_flag", true, TimeSpan.FromMinutes(20)); + //_redisData.Set("YTCS_CallCtuEmptyIn_CS01_flag", true, TimeSpan.FromMinutes(20)); } else { @@ -189,7 +193,7 @@ namespace Tnb.ProductionMgr { msg = "ctu3空箱入呼叫成功"; Log.Information("【EmptyCarryOutStk】ctu3空箱入呼叫成功"); - _redisData.Set("YTCS_CallCtuEmptyIn_CS03_flag", true, TimeSpan.FromMinutes(20)); + //_redisData.Set("YTCS_CallCtuEmptyIn_CS03_flag", true, TimeSpan.FromMinutes(20)); } else { @@ -218,7 +222,7 @@ namespace Tnb.ProductionMgr { msg = "ctu6空箱入呼叫成功"; Log.Information("【EmptyCarryOutStk】ctu6空箱入呼叫成功"); - _redisData.Set("YTCS_CallCtuEmptyIn_CS03_flag", true, TimeSpan.FromMinutes(20)); + //_redisData.Set("YTCS_CallCtuEmptyIn_CS06_flag", true, TimeSpan.FromMinutes(20)); } else {