From fbde0b947b4641081b558302ea77d88c902c4cd1 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 30 四月 2025 10:03:24 +0800
Subject: [PATCH] 可靠性计划优化检验项
---
cnas-device/src/main/java/com/ruoyi/device/utils/NA7672LTCPClientUtils.java | 100 +++++++++++++++++++++++++-------------------------
1 files changed, 50 insertions(+), 50 deletions(-)
diff --git a/cnas-device/src/main/java/com/ruoyi/device/utils/NA7672LTCPClientUtils.java b/cnas-device/src/main/java/com/ruoyi/device/utils/NA7672LTCPClientUtils.java
index 06ec86f..2e1cfb1 100644
--- a/cnas-device/src/main/java/com/ruoyi/device/utils/NA7672LTCPClientUtils.java
+++ b/cnas-device/src/main/java/com/ruoyi/device/utils/NA7672LTCPClientUtils.java
@@ -526,56 +526,56 @@
/*鑾峰彇琛板噺锛堟柊锛�*/
- public List<NA7672LValueVO> getDecayListNew(int channelId, int traceId, int fetchType, String returnType, double temperture, double length) {
- List<NA7672LValueVO> returnValueList = new ArrayList<>();
- try {
- this.initTCP();
- InputStream inputStream = this.socket.getInputStream();
- OutputStream outputStream = this.socket.getOutputStream();
- // 鎶婂瓧鑺傛祦杞崲鎴愬瓧绗︽祦
- PrintWriter printWriter = new PrintWriter(outputStream);
- Scanner inFromSocket = new Scanner(inputStream);
- //鑾峰彇mark鐨剎
- for (int markId = 1; markId <= 16; markId++) {
- NA7672LValueVO returnValue = new NA7672LValueVO();
- String requestString = ":CALC" + channelId + ":TRAC" + traceId + ":MARK" + markId + ":X?";
- printWriter.println(requestString);
- printWriter.flush();
- String responseString = inFromSocket.next();
- BigDecimal val = new BigDecimal(responseString);
- BigDecimal valRound = val.divide(new BigDecimal(1000 * 1000), 0, RoundingMode.CEILING);
- returnValue.setLabel(returnType + "_" + valRound.toString() + "m");
- //鑾峰彇mark鐨剏
- requestString = ":CALC" + channelId + ":TRAC" + traceId + ":MARK" + markId + ":Y?";
- printWriter.println(requestString);
- printWriter.flush();
- responseString = inFromSocket.next();
- String[] valList = responseString.split(",");
- val = new BigDecimal(valList[0]);
- val.setScale(4, RoundingMode.HALF_UP);
- returnValue.setDecimalVal(val);
- /*绫诲埆琛板噺銆侀�氶亾銆佽建杩圭嚎銆乵ark*/
- returnValue.setFetchType(fetchType);
- returnValue.setChannel(channelId);
- returnValue.setTrace(traceId);
- returnValue.setChannel(channelId);
- returnValue.setMark(markId);
- returnValueList.add(returnValue);
- }
- this.closeTcp();
- } catch (IOException e) {
- e.printStackTrace();
- }
- for (NA7672LValueVO one : returnValueList) {
- /*鑾峰彇璁$畻鍊�*/
- /*琛板噺鐨勬俯搴︾郴鏁版崲绠楀叕寮� = 1+0.002脳锛堝疄闄呮俯搴�-20鈩冿級
- 娴嬭瘯鍊济烽暱搴γ锋俯搴︾郴鏁懊�100*/
- double wd = 1 + 0.002 * (temperture - 20);
- double decay_cal = one.getDecimalVal().doubleValue() / length / wd * 100;
- one.setMeasureValue(new BigDecimal(decay_cal).setScale(4, RoundingMode.HALF_UP));
- }
- return returnValueList;
- }
+// public List<NA7672LValueVO> getDecayListNew(int channelId, int traceId, int fetchType, String returnType, double temperture, double length) {
+// List<NA7672LValueVO> returnValueList = new ArrayList<>();
+// try {
+// this.initTCP();
+// InputStream inputStream = this.socket.getInputStream();
+// OutputStream outputStream = this.socket.getOutputStream();
+// // 鎶婂瓧鑺傛祦杞崲鎴愬瓧绗︽祦
+// PrintWriter printWriter = new PrintWriter(outputStream);
+// Scanner inFromSocket = new Scanner(inputStream);
+// //鑾峰彇mark鐨剎
+// for (int markId = 1; markId <= 16; markId++) {
+// NA7672LValueVO returnValue = new NA7672LValueVO();
+// String requestString = ":CALC" + channelId + ":TRAC" + traceId + ":MARK" + markId + ":X?";
+// printWriter.println(requestString);
+// printWriter.flush();
+// String responseString = inFromSocket.next();
+// BigDecimal val = new BigDecimal(responseString);
+// BigDecimal valRound = val.divide(new BigDecimal(1000 * 1000), 0, RoundingMode.CEILING);
+// returnValue.setLabel(returnType + "_" + valRound.toString() + "m");
+// //鑾峰彇mark鐨剏
+// requestString = ":CALC" + channelId + ":TRAC" + traceId + ":MARK" + markId + ":Y?";
+// printWriter.println(requestString);
+// printWriter.flush();
+// responseString = inFromSocket.next();
+// String[] valList = responseString.split(",");
+// val = new BigDecimal(valList[0]);
+// val.setScale(4, RoundingMode.HALF_UP);
+// returnValue.setDecimalVal(val);
+// /*绫诲埆琛板噺銆侀�氶亾銆佽建杩圭嚎銆乵ark*/
+// returnValue.setFetchType(fetchType);
+// returnValue.setChannel(channelId);
+// returnValue.setTrace(traceId);
+// returnValue.setChannel(channelId);
+// returnValue.setMark(markId);
+// returnValueList.add(returnValue);
+// }
+// this.closeTcp();
+// } catch (IOException e) {
+// e.printStackTrace();
+// }
+// for (NA7672LValueVO one : returnValueList) {
+// /*鑾峰彇璁$畻鍊�*/
+// /*琛板噺鐨勬俯搴︾郴鏁版崲绠楀叕寮� = 1+0.002脳锛堝疄闄呮俯搴�-20鈩冿級
+// 娴嬭瘯鍊济烽暱搴γ锋俯搴︾郴鏁懊�100*/
+// double wd = 1 + 0.002 * (temperture - 20);
+// double decay_cal = one.getDecimalVal().doubleValue() / length / wd * 100;
+// one.setMeasureValue(new BigDecimal(decay_cal).setScale(4, RoundingMode.HALF_UP));
+// }
+// return returnValueList;
+// }
/*鑾峰彇椹绘尝姣旓紙鏂帮級*/
public NA7672LValueVO getSWRNew(int channelId, int fetchType) {
--
Gitblit v1.9.3