From 2c8d4b1ec7969ffbcaf84002c45cb056fa232728 Mon Sep 17 00:00:00 2001
From: whycxzp <perryhsu@163.com>
Date: 星期一, 19 六月 2023 15:56:55 +0800
Subject: [PATCH] 接入LD6参数控制逻辑-读取,设置,启动/停止测试

---
 src/main/java/com/whyc/service/Fbs9100SetparamService.java |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/whyc/service/Fbs9100SetparamService.java b/src/main/java/com/whyc/service/Fbs9100SetparamService.java
index ac53627..45a9faf 100644
--- a/src/main/java/com/whyc/service/Fbs9100SetparamService.java
+++ b/src/main/java/com/whyc/service/Fbs9100SetparamService.java
@@ -696,4 +696,39 @@
     public Response updatePWRestartDevice(int devId) {
         return updateOpCmd(devId,FBS9100_ComBase.CMD_ResetSystem);
     }
+
+    public Response searchLD6(int devId) {
+        int opCmd = FBS9100_ComBase.LD6_CMD_GETPARAM;
+        return searchParam(devId,opCmd);
+    }
+
+    public Response updateLD6(Fbs9100Setparam param) {
+        Long devId = param.getDevId();
+        UpdateWrapper<Fbs9100Setparam> update = Wrappers.update();
+        update
+                .set("GroupVol_LOW",param.getGroupvolLow())
+                .set("MonomerVol_LOW",param.getMonomervolLow())
+                .set("MonomerLowCount",param.getMonomerLowCount())
+                .set("MonomerTmp_High",param.getMonomertmpHigh())
+                .set("DisTime",param.getDisTime())
+                .set("DisCap",param.getDisCap())
+                .set("AutoTestStartVol",param.getAutoTestStartVol())
+                .set("ChargeCurrSet",param.getChargeCurrSet())
+                .set("DisCurr",param.getDisCurr())
+                .set("BattGroupNum",param.getBattGroupNum())
+                .set("DCVolHighLimit",param.getDCVolHighLimit())
+                .eq("dev_id",devId);
+        mapper.update(null,update);
+
+        boolean res = sendCmdToDev(FBS9100_ComBase.CMD_SetDischargeParm, devId.intValue());
+        return new Response().set(1, res, res ? "淇敼鍙傛暟鎴愬姛" : "璁剧疆鍙傛暟澶辫触,璇锋鏌ョ綉缁�");
+    }
+
+    public Response updateLD6StartTest(int devId) {
+        return updateOpCmd(devId,FBS9100_ComBase.LD6_CMD_STARTTEST);
+    }
+
+    public Response updateLD6StopTest(int devId) {
+        return updateOpCmd(devId,FBS9100_ComBase.LD6_CMD_STOPTEST);
+    }
 }

--
Gitblit v1.9.1