1
czw
2025-06-25 a1b06327f7259957b21cfc35c46578229258680a
1
1个文件已修改
44 ■■■■■ 已修改文件
2025年6月12日/AuxAllWCS/Build/Project/代码/VS自定义类/AutoThread.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
2025Äê6ÔÂ12ÈÕ/AuxAllWCS/Build/Project/´úÂë/VS×Ô¶¨ÒåÀà/AutoThread.cs
@@ -237,7 +237,8 @@
                        LogHelper.Info($"{VERX.location[0]}申请mes任务结果{str}");
                        if (str.Contains("true"))
                        {
                            tag.wxr1.R44_LAST = true;
                            //tag.wxr1.R44_LAST = true;
                            RedisHelper.Add($"维希尔抓臂1.R44_LAST", "true", out string msg);
                        }
                    }
                    else
@@ -252,7 +253,8 @@
                    {
                        if (tag.wxr1.R10)
                        {
                            tag.wxr1.R10_LAST = false;
                            //tag.wxr1.R10_LAST = false;
                            RedisHelper.Add($"维希尔抓臂1.R10_LAST", "false", out string msg);
                        }
                        else
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode))
@@ -268,7 +270,8 @@
                            {
                                //Conn.默认Redis.SetValue("维希尔抓臂1.R10", "true", "维希尔抓臂1Queue");
                                tag.wxr1.R10 = true;
                                tag.wxr1.R44_LAST = false;
                                //tag.wxr1.R44_LAST = false;
                                RedisHelper.Add($"维希尔抓臂1.R44_LAST", "false", out string msg);
                            }
                            else
                            {
@@ -306,7 +309,8 @@
                        LogHelper.Info($"{VERX.location[1]}申请mes任务结果{str}");
                        if (str.Contains("true"))
                        {
                            tag.wxr1.R46_LAST = true;
                            //tag.wxr1.R46_LAST = true;
                            RedisHelper.Add($"维希尔抓臂1.R46_LAST", "true", out string msg);
                        }
                    }
                    else
@@ -320,7 +324,8 @@
                    {
                        if (tag.wxr1.R11)
                        {
                            tag.wxr1.R11_LAST = false;
                            //tag.wxr1.R11_LAST = false;
                            RedisHelper.Add($"维希尔抓臂1.R11_LAST", "false", out string msg);
                        }
                        else
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode))
@@ -336,7 +341,8 @@
                            {
                                //Conn.默认Redis.SetValue("维希尔抓臂1.R10", "true", "维希尔抓臂1Queue");
                                tag.wxr1.R11 = true;
                                tag.wxr1.R46_LAST = false;
                                //tag.wxr1.R46_LAST = false;
                                RedisHelper.Add($"维希尔抓臂1.R46_LAST", "false", out string msg);
                            }
                            else
                            {
@@ -374,7 +380,8 @@
                        LogHelper.Info($"{VERX.location[0]}申请mes任务结果{str}");
                        if (str.Contains("true"))
                        {
                            tag.wxr2.R44_LAST = true;
                            //tag.wxr2.R44_LAST = true;
                            RedisHelper.Add($"维希尔抓臂2.R44_LAST", "true", out string msg);
                        }
                    }
                    else
@@ -388,7 +395,8 @@
                    {
                        if (tag.wxr2.R10)
                        {
                            tag.wxr2.R10_LAST = false;
                            //tag.wxr2.R10_LAST = false;
                            RedisHelper.Add($"维希尔抓臂2.R10_LAST", "false", out string msg);
                        }
                        else
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode))
@@ -404,7 +412,8 @@
                            {
                                //Conn.默认Redis.SetValue("维希尔抓臂1.R10", "true", "维希尔抓臂1Queue");
                                tag.wxr2.R10 = true;
                                tag.wxr2.R44_LAST = false;
                                //tag.wxr2.R44_LAST = false;
                                RedisHelper.Add($"维希尔抓臂2.R44_LAST", "false", out string msg);
                            }
                            else
                            {
@@ -443,7 +452,8 @@
                        LogHelper.Info($"{VERX.location[1]}申请mes任务结果{str}");
                        if (str.Contains("true"))
                        {
                            tag.wxr2.R46_LAST = true;
                            //tag.wxr2.R46_LAST = true;
                            RedisHelper.Add($"维希尔抓臂2.R46_LAST", "true", out string msg);
                        }
                    }
                    else
@@ -457,7 +467,8 @@
                    {
                        if (tag.wxr2.R11)
                        {
                            tag.wxr2.R11_LAST = false;
                            //tag.wxr2.R11_LAST = false;
                            RedisHelper.Add($"维希尔抓臂2.R11_LAST", "false", out string msg);
                        }
                        else
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode))
@@ -473,7 +484,8 @@
                            {
                                //Conn.默认Redis.SetValue("维希尔抓臂1.R10", "true", "维希尔抓臂1Queue");
                                tag.wxr2.R11 = true;
                                tag.wxr2.R46_LAST = false;
                                //tag.wxr2.R46_LAST = false;
                                RedisHelper.Add($"维希尔抓臂2.R46_LAST", "false", out string msg);
                            }
                            else
                            {
@@ -597,7 +609,7 @@
                    string tno = "TN" + (DateTime.Now.ToString("yy")) + ((taskno.ToString()).PadLeft(8, '0'));
                    task1 = taskservice.FindEntity(x => x.S_TASK_NO == tno);
                    LogHelper.Info($"RGV 1工位任务{JsonConvert.SerializeObject(task1)}.bit1taskOver_LAST:{tag.RGV.bit1taskOver_LAST}");
                    LogHelper.Info($"RGV 1工位任务{task1?.S_TASK_NO}.bit1taskOver_LAST:{tag.RGV.bit1taskOver_LAST}");
                    if (tag.RGV.bit1taskOver_LAST == 0 && task1 != null)
                    {
                        if (task1.S_B_STATE != "完成")
@@ -882,6 +894,7 @@
        public void ThreadGrats(Tag tag, Action<HaiKangOrderInfo> continueTask)
        {
            Console.WriteLine($"ThreadGrats å…‰æ …处理 =================> ");
            var taskCOdes = new List<string> { "Sarrive", "Srelease", "Earrive", "Erelease" };
            TaskActRepository taskActRepository = new TaskActRepository();
            TaskRepository taskRepository = new TaskRepository();
@@ -918,8 +931,7 @@
                        if (dev.deviceType == 1)
                        {
                            LogHelper.Info($"{dev.deviceName}{(V ? "å·¦" : "右")} å…‰æ …{(goin ? "关闭" : "开启")} ç”³è¯·ã€‚" + string.Format("{0}{1}{2}", dev.deviceName + "." + (V ? "R02" : "R04"), "true", dev.deviceName + "Queue"));
                            Conn.默认Redis.SetValue(dev.deviceName + "." + (V ? "R02" : "R04"), "true", dev.deviceName + "Queue");
                            Conn.默认Redis.SetValue(dev.deviceName + "." + (V ? "R02" : "R04"), "true", dev.deviceName + "Queue", false);
                        }
                        else if (dev.deviceType == 2)
                        {
@@ -944,7 +956,7 @@
                            else
                            {
                                LogHelper.Info($"{dev.deviceName}{(V ? "å·¦" : "右")} å…‰æ …{(goin ? "关闭" : "开启")} ç”³è¯·ã€‚" + string.Format("{0}{1}{2}", dev.deviceName + "." + (V ? "R01" : "R03"), "true", dev.deviceName + "Queue"));
                                Conn.默认Redis.SetValue(dev.deviceName + "." + (V ? "R01" : "R03"), "true", dev.deviceName + "Queue");
                                Conn.默认Redis.SetValue(dev.deviceName + "." + (V ? "R01" : "R03"), "true", dev.deviceName + "Queue", false);
                            }
                        }