From 880766ff5ccc98f1def11cd3c6e15e860f143ada Mon Sep 17 00:00:00 2001 From: yanjinhui <3306209981@qq.com> Date: 星期五, 28 二月 2025 14:51:41 +0800 Subject: [PATCH] 扭矩 --- 项目代码/WIDESEAWCS_Server 正式/SerialPortService/SerialPortService.cs | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 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 55f5c4e..6b8fc3b 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" @@ -8,22 +8,21 @@ using RJCP.IO.Ports; using WIDESEA_ISerialPortRepository; using WIDESEA_ISerialPortService; -using WIDESEA_SerialPortTestService; using WIDESEAWCS_Core; using WIDESEAWCS_Core.BaseServices; using WIDESEAWCS_Model.Models.SerialPort; + + 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"); - // 浼犻�� SerialPortService 鍒� SerialPortTestService - _serialPortTestService = new SerialPortTestService("COM3", this); } public WebResponseContent AddSerialPort(Dt_TorqueOp TorqueOp) @@ -32,6 +31,7 @@ //BaseDal.Db.Insertable(TorqueOp).ExecuteCommand(); BaseDal.AddData(TorqueOp); + content = WebResponseContent.Instance.OK("鎴愬姛"); return content; @@ -44,7 +44,7 @@ //WebResponseContent content = new WebResponseContent(); // 鎵撳紑涓插彛骞跺紑濮嬪彂閫佹暟鎹� - _serialPortTestService.OpenSerialPort(); + //_SerialPortTestJob.OpenSerialPort(); //return content; } @@ -55,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