From 81c361a3fab7d43fc14ad46777a18a1ab9215c06 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周四, 21 11月 2024 17:57:46 +0800
Subject: [PATCH] 222

---
 SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs |   88 ++++++++++++++++++++++---------------------
 1 files changed, 45 insertions(+), 43 deletions(-)

diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
index fadb236..8d0dff3 100644
--- a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -92,56 +92,58 @@
         /// <returns></returns>
         public bool SendTask(int deviceId, int taskId, string sourcePlce, string toPlace, out string msg)
         {
-            try
-            {
-                msg = "";
-                if (!CanSendTask(deviceId, out msg))
-                {
-                    return false;
-                }
+            msg = "";
+            return false;
+            //try
+            //{
+            //    msg = "";
+            //    if (!CanSendTask(deviceId, out msg))
+            //    {
+            //        return false;
+            //    }
 
-                //杩欓噷鐗规畩杞崲涓�涓�
-                if (toPlace == ((int)EDevice.鍑哄簱鍙�1012).ToString())
-                {
-                    toPlace = ((int)EDevice.鎻愬崌鏈�1030).ToString();
-                }
+            //    //杩欓噷鐗规畩杞崲涓�涓�
+            //    if (toPlace == ((int)EDevice.鍑哄簱鍙�1012).ToString())
+            //    {
+            //        toPlace = ((int)EDevice.鎻愬崌鏈�1030).ToString();
+            //    }
 
 
-                StationDBForWriteComm w_db_source = this.DBBlockForWrite.W_StationForWriteCommList.FirstOrDefault(x => x.StationCode == sourcePlce);
-                StationDB2ObjForWriteComm w_dbObj_source = this.View.W_StationForWriteCommList.FirstOrDefault(x => x.StationCode == sourcePlce);
+            //    StationDBForWriteComm w_db_source = this.DBBlockForWrite.W_StationForWriteCommList.FirstOrDefault(x => x.StationCode == sourcePlce);
+            //    StationDB2ObjForWriteComm w_dbObj_source = this.View.W_StationForWriteCommList.FirstOrDefault(x => x.StationCode == sourcePlce);
 
-                //StationDBForWriteComm w_db_to = this.DBBlockForWrite.W_StationForWriteCommList.FirstOrDefault(x => x.StationCode == toPlace);
-                //StationDB2ObjForWriteComm w_dbObj_to = this.View.W_StationForWriteCommList.FirstOrDefault(x => x.StationCode == toPlace);
-                //濡傛灉ACK涓簍rue锛岃〃绀轰笉鑳藉彂浠诲姟
-                var readObj = this.View.R_StationForReadCommList.FirstOrDefault(x => x.StationCode == sourcePlce);
-                if (readObj.R_ACK == true)
-                {
-                    msg = "ACK涓篢RUE锛屼笉鍏佽鍙戜换鍔�";
-                    return false;
-                }
+            //    //StationDBForWriteComm w_db_to = this.DBBlockForWrite.W_StationForWriteCommList.FirstOrDefault(x => x.StationCode == toPlace);
+            //    //StationDB2ObjForWriteComm w_dbObj_to = this.View.W_StationForWriteCommList.FirstOrDefault(x => x.StationCode == toPlace);
+            //    //濡傛灉ACK涓簍rue锛岃〃绀轰笉鑳藉彂浠诲姟
+            //    var readObj = this.View.R_StationForReadCommList.FirstOrDefault(x => x.StationCode == sourcePlce);
+            //    if (readObj.R_ACK == true)
+            //    {
+            //        msg = "ACK涓篢RUE锛屼笉鍏佽鍙戜换鍔�";
+            //        return false;
+            //    }
 
-                MessageModel b2 = null;
-                if (!b2.result)
-                {
-                    msg = string.Format("鍚慡tation{0},璧风偣{1}鍙戦�佷换鍔2},鍐欏叆鐩爣绔欑偣{3}澶辫触,杩斿洖缁撴灉:" + b2.resMsg, this.View.DeviceName, sourcePlce, taskId, toPlace);
-                    return false;
-                }
-                b2 = this.plcService.WriteValuePoint(w_db_source.W_TaskID, Convert.ToInt32(taskId), w_dbObj_source.W_TaskID);
-                if (!b2.result)
-                {
-                    msg = string.Format("鍚慡tation{0},璧风偣{1}锛岀洰鏍囩偣{2},鍐欏叆浠诲姟鍙穥3}澶辫触,杩斿洖缁撴灉:" + b2.resMsg, this.View.DeviceName, sourcePlce, toPlace, taskId);
-                    return false;
-                }
+            //    MessageModel b2 = null;
+            //    if (!b2.result)
+            //    {
+            //        msg = string.Format("鍚慡tation{0},璧风偣{1}鍙戦�佷换鍔2},鍐欏叆鐩爣绔欑偣{3}澶辫触,杩斿洖缁撴灉:" + b2.resMsg, this.View.DeviceName, sourcePlce, taskId, toPlace);
+            //        return false;
+            //    }
+            //    b2 = this.plcService.WriteValuePoint(w_db_source.W_TaskID, Convert.ToInt32(taskId), w_dbObj_source.W_TaskID);
+            //    if (!b2.result)
+            //    {
+            //        msg = string.Format("鍚慡tation{0},璧风偣{1}锛岀洰鏍囩偣{2},鍐欏叆浠诲姟鍙穥3}澶辫触,杩斿洖缁撴灉:" + b2.resMsg, this.View.DeviceName, sourcePlce, toPlace, taskId);
+            //        return false;
+            //    }
 
 
-                return true;
-            }
-            catch (Exception ex)
-            {
-                msg = ex.Message;
-                Log4NetHelper.WriteErrorLog(Station_CacheEntity.curLogType, "鍙戦�佷换鍔″嚭鐜板紓甯�:" + ex.Message, ex);
-                return false;
-            }
+            //    return true;
+            //}
+            //catch (Exception ex)
+            //{
+            //    msg = ex.Message;
+            //    Log4NetHelper.WriteErrorLog(Station_CacheEntity.curLogType, "鍙戦�佷换鍔″嚭鐜板紓甯�:" + ex.Message, ex);
+            //    return false;
+            //}
         }
 
 

--
Gitblit v1.9.3