From a66d0c0a9a3dcd4b888d7481fe2e538c6dd6865a Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Tue, 16 Jul 2024 10:11:26 +0800 Subject: [PATCH] ... --- ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs index 5286bf22..55add93a 100644 --- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs @@ -280,6 +280,9 @@ namespace Tnb.ProductionMgr .Where((x, y) => x.code == "ZSJ") .Select((x, y) => y).ToListAsync(); + int? cs01Count = await _redisData.TryGetValueByKeyField("YTCS", "EmptyNo_CS01"); + int? cs03Count = await _redisData.TryGetValueByKeyField("YTCS", "EmptyNo_CS03"); + List eqpIds = equipments.Select(x => x.id).ToList(); List eqpDaqs = await _db.Queryable().Where(x => eqpIds.Contains(x.equip_id) && x.label_name.Contains("允许入空箱")).ToListAsync(); //BasFactoryConfig config = await _db.Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN); @@ -475,7 +478,16 @@ namespace Tnb.ProductionMgr stopwatch.Stop(); elapsedMilliseconds = stopwatch.ElapsedMilliseconds; - thirdResult = JsonConvert.DeserializeObject(response); + try + { + thirdResult = JsonConvert.DeserializeObject(response); + } + catch (Exception e) + { + thirdResult.Code = 500; + thirdResult.msgResult = response; + } + if (thirdResult.Code == 200) { await _db.Updateable()