1
czw
2025-07-05 8d25be31906e458a5a8a2a3627184e3adc49e395
2025Äê6ÔÂ12ÈÕ/AuxAllWCS/Build/Project/´úÂë/VS×Ô¶¨ÒåÀà/AutoThread.cs
@@ -255,6 +255,8 @@
            if (VERX != null)
            {
                if (tag.wxr1.R44)
                    LogHelper.Info($"{VERX.deviceName} R44>{tag.wxr1.R44} R44LAST>{tag.wxr1.R44_LAST} R10>{tag.wxr1.R10}");
                if (tag.wxr1.R44 && !tag.wxr1.R44_LAST && tag.wxr1.R10)
                {
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
@@ -293,6 +295,8 @@
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                        {
                            //上报校验。
                            LogHelper.Info($"{VERX.deviceNo[0]} ä¸ŠæŠ¥æ ¡éªŒ>{traycode}");
                            ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson);
                            var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/202", JsonConvert.SerializeObject(new
                            {
@@ -313,6 +317,10 @@
                        }
                        else { TcpServer.TcpServerSend(VERX.deviceNo[0], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); }
                    }
                    else if (!tag.wxr1.R10)
                    {
                        TcpServer.TrayIps.Remove(VERX.deviceNo[0]);
                    }
                }
            }
        }
@@ -328,6 +336,8 @@
            if (VERX != null)
            {
                if (tag.wxr1.R46)
                    LogHelper.Info($"{VERX.deviceName} R44>{tag.wxr1.R46} R44LAST>{tag.wxr1.R46_LAST} R10>{tag.wxr1.R11}");
                if (tag.wxr1.R46 && !tag.wxr1.R46_LAST && tag.wxr1.R11)
                {
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
@@ -365,6 +375,7 @@
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                        {
                            //上报校验。
                            LogHelper.Info($"{VERX.deviceNo[1]} ä¸ŠæŠ¥æ ¡éªŒ>{traycode}");
                            ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson);
                            var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/202", JsonConvert.SerializeObject(new
                            {
@@ -385,6 +396,10 @@
                        }
                        else { TcpServer.TcpServerSend(VERX.deviceNo[1], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); }
                    }
                    else if (!tag.wxr1.R11)
                    {
                        TcpServer.TrayIps.Remove(VERX.deviceNo[1]);
                    }
                }
            }
        }
@@ -400,6 +415,8 @@
            if (VERX != null)
            {
                if (tag.wxr2.R44)
                    LogHelper.Info($"{VERX.deviceName} R44>{tag.wxr2.R44} R44LAST>{tag.wxr2.R44_LAST} R10>{tag.wxr2.R10}");
                if (tag.wxr2.R44 && !tag.wxr2.R44_LAST && tag.wxr2.R10)
                {
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
@@ -437,6 +454,7 @@
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                        {
                            //上报校验。
                            LogHelper.Info($"{VERX.deviceNo[0]} ä¸ŠæŠ¥æ ¡éªŒ>{traycode}");
                            ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson);
                            var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/202", JsonConvert.SerializeObject(new
                            {
@@ -457,6 +475,10 @@
                        }
                        else { TcpServer.TcpServerSend(VERX.deviceNo[0], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); }
                    }
                    else if (!tag.wxr2.R10)
                    {
                        TcpServer.TrayIps.Remove(VERX.deviceNo[0]);
                    }
                }
            }
        }
@@ -473,6 +495,8 @@
            if (VERX != null)
            {
                if (tag.wxr2.R46)
                    LogHelper.Info($"{VERX.deviceName} R44>{tag.wxr2.R46} R44LAST>{tag.wxr2.R46_LAST} R10>{tag.wxr2.R11}");
                if (tag.wxr2.R46 && !tag.wxr2.R46_LAST && tag.wxr2.R11)
                {
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
@@ -511,7 +535,7 @@
                        else
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                        {
                            LogHelper.Info($"Threadwxr2R ä¸ŠæŠ¥æ ¡éªŒ>{traycode}");
                            LogHelper.Info($"{VERX.deviceNo[1]} ä¸ŠæŠ¥æ ¡éªŒ>{traycode}");
                            //上报校验。
                            ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson);
                            var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/202", JsonConvert.SerializeObject(new
@@ -537,6 +561,10 @@
                            TcpServer.TcpServerSend(VERX.deviceNo[1], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E"));
                        }
                    }
                    else if (!tag.wxr2.R11)
                    {
                        TcpServer.TrayIps.Remove(VERX.deviceNo[1]);
                    }
                }
            }
            else