From b09ebfb0bc5fc72af0b58bb29764ee89afceff97 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周日, 01 12月 2024 15:59:06 +0800
Subject: [PATCH] 1

---
 SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs |   48 ++++++++++++++++++++++++++----------------------
 1 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
index 0aaa888..90dac1a 100644
--- a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -278,28 +278,32 @@
                     return false;
                 }
 
+                if (value)
+                {
+                    b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, false, view_stationObj.W_ReqOut);
+                    if (!b2.result)
+                    {
+                        msg = string.Format("鍚慡tation W_ReqOut 鍦板潃{0} 鍐�  " + false + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
+                            stationObj.W_ReqOut);
+                        return false;
+                    }
+                    b2 = this.plcService.WriteValuePoint(stationObj.W_Destination_Out, 0, view_stationObj.W_Destination_Out);
+                    if (!b2.result)
+                    {
+                        msg = string.Format("鍚慡tation W_Destination_Out 鍦板潃{0} 鍐�  " + 0 + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
+                            stationObj.W_Destination_Out);
+                        return false;
+                    }
+                    b2 = this.plcService.WriteValuePoint(stationObj.W_Outbound_TaskID, 0, view_stationObj.W_Outbound_TaskID);
+                    if (!b2.result)
+                    {
+                        msg = string.Format("鍚慡tation W_Outbound_TaskID 鍦板潃{0} 鍐�  " + 0 + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
+                            stationObj.W_Outbound_TaskID);
+                        return false;
+                    }
+                }
 
-                b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, false, view_stationObj.W_ReqOut);
-                if (!b2.result)
-                {
-                    msg = string.Format("鍚慡tation W_ReqOut 鍦板潃{0} 鍐�  " + false + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
-                        stationObj.W_ReqOut);
-                    return false;
-                }
-                b2 = this.plcService.WriteValuePoint(stationObj.W_Destination_Out, 0, view_stationObj.W_Destination_Out);
-                if (!b2.result)
-                {
-                    msg = string.Format("鍚慡tation W_Destination_Out 鍦板潃{0} 鍐�  " + 0 + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
-                        stationObj.W_Destination_Out);
-                    return false;
-                }
-                b2 = this.plcService.WriteValuePoint(stationObj.W_Outbound_TaskID, 0, view_stationObj.W_Outbound_TaskID);
-                if (!b2.result)
-                {
-                    msg = string.Format("鍚慡tation W_Outbound_TaskID 鍦板潃{0} 鍐�  " + 0 + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
-                        stationObj.W_Outbound_TaskID);
-                    return false;
-                }
+
 
 
                 return true;
@@ -547,7 +551,7 @@
         /// <param name="placey"></param>
         /// <param name="msg"></param>
         /// <returns></returns>
-        public bool WriteSurroundTaskInfo(string stationCode, int taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey, out string msg)
+        public bool WriteSurroundTaskInfo(string stationCode, short taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey, out string msg)
         {
             try
             {

--
Gitblit v1.9.3