From d0f01f571918ae942349068776fa7fb70f3ab5cd Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期三, 28 八月 2024 16:20:18 +0800
Subject: [PATCH] 更新设备信息表从表导入问题

---
 WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs
index 8ba525a..ccf896d 100644
--- a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs
+++ b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs
@@ -108,7 +108,7 @@
             throw new NotImplementedException();
         }
 
-        public bool SendCommand(DeviceCommand command, string deviceChildCode)
+        public bool SendCommand<T>(T command, string deviceChildCode) where T : IDataTransfer, new()
         {
             DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == nameof(DeviceCommand) && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
             if (devicePro == null)
@@ -124,11 +124,11 @@
 
         public T ReadCustomer<T>(string deviceChildCode) where T : IDataTransfer, new()
         {
-            DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == nameof(DeviceCommand) && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
+            DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == "ReadDeviceCommand" && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
 
             if (devicePro == null)
             {
-                throw new Exception();
+                throw new Exception("鏈壘鍒板崗璁俊鎭�");
             }
             else
             {

--
Gitblit v1.9.3