From 327dbcbe3e6ee5fea207422c7792fc35a1027638 Mon Sep 17 00:00:00 2001
From: zongzhibin <zongzhibin@weben-smart.com>
Date: 周二, 26 11月 2024 09:15:24 +0800
Subject: [PATCH] add

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

diff --git a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
index e58342b..9700a68 100644
--- a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
@@ -572,7 +572,7 @@
         /// <param name="deviceId"></param>
         /// <param name="value"></param>
         /// <returns></returns>
-        public SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode,int taskID, bool isLast, short length, short width, short height,short rotate,short toplace,short placeX,short placeY)
+        public SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode,int taskID, bool isLast, bool isFirst, short length, short width, short height,short rotate,short toplace,short placeX,short placeY, short placeZ)
         {
             SdaResEntity _SdaResEntity = new SdaResEntity();
             try
@@ -585,7 +585,7 @@
                 var Station = StationResult.resData as StationEntity;
 
                 string msg = "";
-                var result = Station.WritePalletizingTaskInfo(stationCode, taskID,isLast, length, width, height,rotate,toplace,placeX,placeY,out msg);
+                var result = Station.WritePalletizingTaskInfo(stationCode, taskID,isLast,isFirst, length, width, height,rotate,toplace,placeX,placeY,placeZ, out msg);
                 _SdaResEntity.result = result;
                 _SdaResEntity.resMsg = msg;
                 return _SdaResEntity;
@@ -628,6 +628,69 @@
                 return _SdaResEntity;
             }
         }
+       
+        /// <summary>
+        /// 鍐欏叆鍚堝寘浠诲姟淇℃伅
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="value"></param>
+        /// <returns></returns>
+        public SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey)
+        {
+            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.WriteSurroundTaskInfo(stationCode, taskID, length, width,  cartonhigh, cartonwidth, placex, placey, 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>
+        /// <param name="value"></param>
+        /// <returns></returns>
+        public SdaResEntity SetSurroundTaskFinishAck(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.WriteSurround_FinishACK(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>

--
Gitblit v1.9.3