From c733a6f12bc6f8e7f206ef8173e8991041248c36 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周二, 10 12月 2024 14:47:19 +0800
Subject: [PATCH] 22

---
 SDA/iWareSda/Devices/4-Station/StationService/StationService.cs |   38 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
index 743998f..8803522 100644
--- a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
@@ -684,7 +684,8 @@
         /// <param name="deviceId"></param>
         /// <param name="value"></param>
         /// <returns></returns>
-        public SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, short taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey)
+        public SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, short taskID, short length, short width, 
+            short cartonhigh, short cartonwidth, short placex, short placey, bool isNgFlag)
         {
             SdaResEntity _SdaResEntity = new SdaResEntity();
             try
@@ -697,7 +698,7 @@
                 var Station = StationResult.resData as StationEntity;
 
                 string msg = "";
-                var result = Station.WriteSurroundTaskInfo(stationCode, taskID, length, width, cartonhigh, cartonwidth, placex, placey, out msg);
+                var result = Station.WriteSurroundTaskInfo(stationCode, taskID, length, width, cartonhigh, cartonwidth, placex, placey, out msg, isNgFlag);
                 _SdaResEntity.result = result;
                 _SdaResEntity.resMsg = msg;
                 return _SdaResEntity;
@@ -800,6 +801,39 @@
         }
 
         /// <summary>
+        /// 鍐欏叆NG鍖呮爣璁�
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="value"></param>
+        /// <param name="stationCode"></param>
+        /// <returns></returns>
+        public SdaResEntity WriteStation_NgFlag(int deviceId, bool value, string stationCode)
+        {
+            SdaResEntity _SdaResEntity = new SdaResEntity();
+            try
+            {
+                var StationResult = Station_CacheEntity.GetDeviceObj(deviceId);
+                if (!StationResult.result)
+                {
+                    return StationResult;
+                }
+                var Station = StationResult.resData as StationEntity;
+
+                string msg = "";
+                var result = Station.WriteStation_NgFlag(stationCode, value, out msg);
+                _SdaResEntity.result = result;
+                _SdaResEntity.resMsg = msg;
+                return _SdaResEntity;
+            }
+            catch (Exception ex)
+            {
+                _SdaResEntity.result = false;
+                _SdaResEntity.resMsg = ex.Message;
+                return _SdaResEntity;
+            }
+        }
+
+        /// <summary>
         /// 鍐欏叆 浜哄伐鏀捐
         /// </summary>
         /// <param name="deviceId"></param>

--
Gitblit v1.9.3