From 8f7e6826d51a25c7b368c210dbb321d423d24a85 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期一, 10 十一月 2025 17:24:12 +0800
Subject: [PATCH] 1

---
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs"
index 77d8a03..83f20d6 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs"
@@ -69,5 +69,24 @@
             List<Dt_DeviceInfo> deviceInfos = await Db.Queryable<Dt_DeviceInfo>().Where(x => x.DeviceStatus == ((int)DeviceStatusEnum.Enable).ToString()).Includes(x => x.ProtocolList).ToListAsync();
             return _mapper.Map<List<DeviceInfoDTO>>(deviceInfos);
         }
+
+        public WebResponseContent ControlConveyorLine(int num)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                CommonConveyorLine? conveyorLine = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1001") as CommonConveyorLine;
+                if (conveyorLine != null)
+                {
+                    conveyorLine.Communicator.WriteNoRead("DB100.0", num);
+                    return content.OK("鎴愬姛");
+                }
+                return content.Error("澶辫触");
+            }
+            catch (Exception ex)
+            {
+                return content.Error(ex.Message);
+            }
+        }
     }
 }

--
Gitblit v1.9.3