From 6cf06cfb2d8de5cbf9d913ed009291da80aba4ec Mon Sep 17 00:00:00 2001 From: czw <selecti@yeah.net> Date: 星期五, 18 七月 2025 15:59:51 +0800 Subject: [PATCH] 1 --- 2025年6月12日/AuxAllWCS/Build/Project/代码/VS自定义类/AutoThread.cs | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" index c30433a..5d1efbc 100644 --- "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" +++ "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" @@ -340,7 +340,7 @@ if (VERX != null) { - LogHelper.Info($"{VERX.deviceName} 鏃堕棿鎴�{RedisHelper.Get<string>("Js鎹烽『2#Timestamp", out string mg)} D1212>{tag.Js2.D1212} 宸︽弧淇″彿:{TcpServer.GetBitdata(tag.Js2.D1212, 2)} D1212_LAST>{tag.Js2.D1212_LAST} 鍙虫弧淇″彿>{TcpServer.GetBitdata(tag.Js2.D1212, 2)} D1213_LAST>{tag.Js2.D1213_LAST}"); + LogHelper.Info($"{VERX.deviceName} 鏃堕棿鎴�{RedisHelper.Get<string>("Js鎹烽『2#Timestamp", out string mg)} D1212>{tag.Js2.D1212} 宸︽弧淇″彿:{TcpServer.GetBitdata(tag.Js2.D1212, 2)} D1212_LAST>{tag.Js2.D1212_LAST} 鍙虫弧淇″彿>{TcpServer.GetBitdata(tag.Js2.D1212, 3)} D1213_LAST>{tag.Js2.D1213_LAST}"); if (tag.Js2.D1212_LAST == 0 && TcpServer.GetBitdata(tag.Js2.D1212, 2) == 1) { @@ -377,7 +377,7 @@ RedisHelper.Add($"Js鎹烽『2.D1203_LAST", "1", out string msg); } } - if (tag.Js2.D1213_LAST == 1 && TcpServer.GetBitdata(tag.Js2.D1213, 2) == 0) + if (tag.Js2.D1213_LAST == 1 && TcpServer.GetBitdata(tag.Js2.D1212, 3) == 0) { //tag.Js2.D1213_LAST = 0; tag.Js2.D1225 = 0; @@ -1977,7 +1977,7 @@ LogHelper.Info($" FN1 鏃堕棿鎴�{RedisHelper.Get<string>("p鍙戦偅绉�涓嬬嚎#Timestamp", out string mg)}"); LogHelper.Info($" FN1 D2217>{tag.FNK1.D2217} D2217LAST>{tag.FNK1.D2217_LAST} D2215>{tag.FNK1.D2215} D2216>{tag.FNK1.D2216} D2218>{tag.FNK1.D2218}"); //LogHelper.Info($" FN1 .D2217=1,2217_LAST=0 鍐�2215=0锛孌2217_LAST=1锛學Release1005=1 RArrive1005_LAST=0"); - + if (tag.FNK1.D2217 == 1 && tag.FNK1.D2217_LAST == 0) { //tag.FNK1.D2215 = 0; @@ -2737,6 +2737,7 @@ // sord = "desc", // rows = 1 // }).FirstOrDefault(); + bool canReq = true; var tf = Conn.榛樿Redis.GetValue(sx.deviceName + ".D1202"); var V = sx.location.ToList().FindIndex(x => x == task.S_END_LOC) == 0; @@ -2766,6 +2767,8 @@ endLoc = endloc; //break; } + else + LogHelper.Info($"瑙i噴MES浠诲姟 ->{task.S_TASK_NO} 缂撳瓨浣峽ssloc} 涓嶅彲鐢ㄣ�"); } if (endLoc != null) { @@ -2779,6 +2782,7 @@ } else { + LogHelper.Info($"瑙i噴MES浠诲姟 ->{task.S_TASK_NO} 鐢熸垚绗笁娈典换鍔°�"); if (t1.S_START_LOC != task.S_START_LOC) { t1 = taskservice.FindEntity(x => x.S_SRC_NO == task.S_TASK_NO && x.S_START_LOC == task.S_START_LOC && x.S_B_STATE == "瀹屾垚"); @@ -2808,6 +2812,8 @@ endLoc = endloc; //break; } + else + LogHelper.Info($"瑙i噴MES浠诲姟 ->{task.S_TASK_NO} 缂撳瓨浣峽ssloc} 涓嶅彲鐢ㄣ�"); } if (endLoc != null) { @@ -2998,6 +3004,8 @@ // else tag.Js2.D1225 = 1; //} } + //Task.Run(() => + //{ var ssloc = device2.deviceNo[1]; var endloc = locrep.FindEntity(x => x.S_LOC_CODE == ssloc); LogHelper.Info($"鎹烽『鍗歌揣鍚庯紝 鏌ョ湅缂撳瓨浣�{ssloc}-{endloc?.N_CURRENT_NUM}>0? 鍒欑敵璇穖es鎼蛋銆�); @@ -3009,7 +3017,13 @@ startBit = ssloc })); LogHelper.Info($"{ssloc}鐢宠mes浠诲姟缁撴灉{str}"); + var strr = JsonConvert.DeserializeObject<Messss>(str); + if (strr != null && strr.success && strr.data?.state == 0) + { + //return; + } } + //}); } else switch (device2.deviceType) -- Gitblit v1.9.1