1
czw
2025-07-02 4cca6af72fa2288f433a7c4d604f9639d3fbfc63
2025Äê6ÔÂ12ÈÕ/AuxAllWCS/Build/Project/´úÂë/VS×Ô¶¨ÒåÀà/AutoThread.cs
@@ -122,7 +122,7 @@
        public string WriteLine(string value = "")
        {
            // åœ¨è¿™é‡Œæ‹¦æˆªå¤„理输出
@@ -251,7 +251,7 @@
            {
                if (tag.wxr1.R44 && !tag.wxr1.R44_LAST && tag.wxr1.R10)
                {
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode))
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                    {
                        var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/200", JsonConvert.SerializeObject(new
                        {
@@ -284,7 +284,7 @@
                            RedisHelper.Add($"维希尔抓臂1.R10_LAST", "false", out string msg);
                        }
                        else
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode))
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                        {
                            //上报校验。
                            ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson);
@@ -324,7 +324,7 @@
            {
                if (tag.wxr1.R46 && !tag.wxr1.R46_LAST && tag.wxr1.R11)
                {
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode))
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                    {
                        var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/200", JsonConvert.SerializeObject(new
                        {
@@ -356,7 +356,7 @@
                            RedisHelper.Add($"维希尔抓臂1.R11_LAST", "false", out string msg);
                        }
                        else
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode))
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                        {
                            //上报校验。
                            ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson);
@@ -396,7 +396,7 @@
            {
                if (tag.wxr2.R44 && !tag.wxr2.R44_LAST && tag.wxr2.R10)
                {
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode))
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                    {
                        var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/200", JsonConvert.SerializeObject(new
                        {
@@ -428,7 +428,7 @@
                            RedisHelper.Add($"维希尔抓臂2.R10_LAST", "false", out string msg);
                        }
                        else
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode))
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                        {
                            //上报校验。
                            ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson);
@@ -469,7 +469,7 @@
            {
                if (tag.wxr2.R46 && !tag.wxr2.R46_LAST && tag.wxr2.R11)
                {
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode))
                    if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                    {
                        var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/200", JsonConvert.SerializeObject(new
                        {
@@ -493,16 +493,19 @@
                }
                else
                {
                    //LogHelper.Info($"Threadwxr2R æ‰˜ç›˜æ”¾ç½®ä¿¡å·1。。  -{tag.wxr2.R11_LAST}");
                    if (tag.wxr2.R11_LAST) //托盘放置信号。。
                    {
                        //LogHelper.Info($"Threadwxr2R æ‰˜ç›˜æ”¾ç½®ä¿¡å·1。。  -{tag.wxr2.R11}");
                        if (tag.wxr2.R11)
                        {
                            //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))
                        if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim()))
                        {
                            LogHelper.Info($"Threadwxr2R ä¸ŠæŠ¥æ ¡éªŒ>{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
@@ -522,10 +525,18 @@
                                //报警。
                            }
                        }
                        else { TcpServer.TcpServerSend(VERX.deviceNo[1], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); }
                        else
                        {
                            LogHelper.Info($"Threadwxr2R。。  -发送扫码");
                            TcpServer.TcpServerSend(VERX.deviceNo[1], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E"));
                        }
                    }
                }
            }
            else
            {
                Console.WriteLine($"Threadwxr2R ç»´å¸Œå°”2 å³  è®¾å¤‡æœªæ‰¾åˆ°ã€‚ =================> ");
            }
        }
        public void ThreadTaskRun(Tag tag, Func<TaskEntity, bool> action)