From d7ad50a2e9fb4713fd9350ab6475cb1c89060370 Mon Sep 17 00:00:00 2001
From: qiuyao <qiuyao@hnkhzn.com>
Date: 星期五, 28 二月 2025 16:40:52 +0800
Subject: [PATCH] 命名空间

---
 项目代码/WIDESEAWCS_Server 正式/SerialPortService/SerialPortService.cs |   36 +++++++++++++++++-------------------
 1 files changed, 17 insertions(+), 19 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/SerialPortService/SerialPortService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/SerialPortService/SerialPortService.cs"
index 7ef37ba..5eb7267 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/SerialPortService/SerialPortService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/SerialPortService/SerialPortService.cs"
@@ -10,36 +10,33 @@
 using WIDESEA_ISerialPortService;
 using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseServices;
-using WIDESEAWCS_Model.Models.SerialPort;
+using WIDESEAWCS_Model.Models;
+
+
 
 namespace WIDESEA_SerialPortService
 {
     public class SerialPortService : ServiceBase<Dt_TorqueOp, ISerialPortRepository>, ISerialPortService
     {
-        private SerialPortTestService _serialPortTestService;  // 涓插彛鏈嶅姟
+        //private SerialPortTestJob _SerialPortTestJob;  // 涓插彛鏈嶅姟
         public SerialPortService(ISerialPortRepository BaseDal) : base(BaseDal)
         {
+            //_SerialPortTestJob = new SerialPortTestJob("COM3", this);
 
-            _serialPortTestService = new SerialPortTestService("COM3");
         }
 
         public WebResponseContent AddSerialPort(Dt_TorqueOp TorqueOp)
         {
             WebResponseContent content = new WebResponseContent();
-            BaseDal.Db.Insertable(TorqueOp).ExecuteCommand();
+            //BaseDal.Db.Insertable(TorqueOp).ExecuteCommand();
+
+            BaseDal.AddData(TorqueOp);
+           
+
+            content = WebResponseContent.Instance.OK("鎴愬姛");
             return content;
         }
 
-        //// 鍚姩涓插彛閫氫俊
-        //public WebResponseContent StartSerialPortCom()
-        //{
-        //    WebResponseContent content = new WebResponseContent();
-
-        //    // 鎵撳紑涓插彛骞跺紑濮嬪彂閫佹暟鎹�
-        //    _serialPortTestService.OpenSerialPort();
-
-        //    return content;
-        //}
 
         // 鍚姩涓插彛閫氫俊
         public void StartSerialPortCom()
@@ -47,7 +44,7 @@
             //WebResponseContent content = new WebResponseContent();
 
             // 鎵撳紑涓插彛骞跺紑濮嬪彂閫佹暟鎹�
-            _serialPortTestService.OpenSerialPort();
+            //_SerialPortTestJob.OpenSerialPort();
 
             //return content;
         }
@@ -58,15 +55,16 @@
         public void StopSerialPortCom()
         {
             //WebResponseContent content = new WebResponseContent();
-            _serialPortTestService.CloseSerialPort();  // 鍏抽棴涓插彛
-            //return content;
+            //_SerialPortTestJob.CloseSerialPort();  // 鍏抽棴涓插彛
+           // return content;
         }
 
 
         public List<string> GetSerialPortCom()
         {
-           
-          return  _serialPortTestService.GetReceivedData();
+
+            //return  _serialPortTestService.GetReceivedData();
+            return null;
          
         }
 

--
Gitblit v1.9.3