From 30b41e5c97c0c4a50077e926612ec156b50c8461 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 14 五月 2025 15:49:03 +0800
Subject: [PATCH] 表阀一体协议同步新版本
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/DataCdC2Vo.java | 4 ++--
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/CommonV202404.java | 49 +++++++++++++++++++++++--------------------------
2 files changed, 25 insertions(+), 28 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/CommonV202404.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/CommonV202404.java
index b27c2be..03165ac 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/CommonV202404.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/CommonV202404.java
@@ -290,69 +290,66 @@
}
/**
- * 寰楀埌鍏冲紑闃�绫诲瀷鍚嶇О
- * 0x00:鍒峰崱闂�
- * 0x01:骞冲彴鍏�
- * 0x02:APP鍏�
+ * 寰楀埌鍏抽榾绫诲瀷鍚嶇О
+ * 0x01:鍒峰崱闂�
+ * 0x02:骞冲彴鍏�
* 0x03:闈炴硶鍗″叧
- * 0x04:姘磋〃閫氳寮傚父鍏�
- * 0x05:鐢佃〃寮傚父鍏�
+ * 0x04:姘磋〃閫氳寮傚父鍏筹紝
+ * 0x05:鐢佃〃寮傚父鍏筹紝
* 0x06:鍓╀綑姘撮噺涓嶈冻鍏�
- * 0x07:鍓╀綑閲戦涓�0鍏�
- * 0x08:寮�娉�/闃�鍚庣閬撴病鏈夋祦閲忓叧
- * 0x09:鎺夌數鍐嶄笂鐢靛叧
- * 0x0a:姘磋〃鐬椂娴侀噺涓�0鍏�
- * 0x0b:鍒峰崱寮�娉碉紝杩滅▼鍏�
- * 0x0c:鐢垫睜浣庣數鍘嬪叧
+ * 0x07:鍓╀綑閲戦涓�0鍏筹紝
+ * 0x08:APP鍏� 锛�
+ * 0x09:鎺夌數鍐嶄笂鐢靛叧锛�
+ * 0x0a:姘磋〃鐬椂娴侀噺涓�0鍏筹紝
+ * 0x0b:宸℃鍏筹紝
+ * 0x0c:鐢垫睜浣庣數鍘嬪叧銆�
* @param type 瀛楄妭
* @return 鍚嶇О
*/
public static String closeValveType(byte type){
return switch (type) {
- case 0 -> "鍒峰崱鍏抽榾";
- case 1 -> "骞冲彴鍏抽榾";
- case 2 -> "APP鍏抽榾";
+ case 1 -> "鍒峰崱鍏抽榾";
+ case 2 -> "骞冲彴鍏抽榾";
case 3 -> "闈炴硶鍗″叧闃�";
case 4 -> "姘磋〃閫氳寮傚父鍏抽榾";
case 5 -> "鐢佃〃寮傚父鍏抽榾";
case 6 -> "鍓╀綑姘撮噺涓嶈冻鍏抽榾";
case 7 -> "鍓╀綑閲戦涓�0鍏抽榾";
- case 8 -> "绠¢亾娌℃湁娴侀噺鍏抽榾";
+ case 8 -> "APP鍏抽榾";
case 9 -> "鎺夌數鍐嶄笂鐢靛叧闃�";
case 10 -> "姘磋〃鐬椂娴侀噺涓�0鍏抽榾";
- case 11 -> "鍒峰崱寮�杩滅▼鍏抽榾";
+ case 11 -> "宸℃鍏抽榾";
case 12 -> "鐢垫睜浣庣數鍘嬪叧闃�";
default -> "鏈煡";
};
}
/**
* 寰楀埌鍏冲紑闃�绫诲瀷鍚嶇О
- * 0x00:鍒峰崱闂� => p206V1 2
- * 0x01:骞冲彴鍏� => p206V1 4
- * 0x02:APP鍏� => p206V1 4
+ * 0x01:鍒峰崱闂� => p206V1 2
+ * 0x02:骞冲彴鍏� => p206V1 4
* 0x03:闈炴硶鍗″叧 => p206V1 12
* 0x04:姘磋〃閫氳寮傚父鍏� => p206V1 6
* 0x05:鐢佃〃寮傚父鍏� => p206V1 6
* 0x06:鍓╀綑姘撮噺涓嶈冻鍏� => p206V1 5
* 0x07:鍓╀綑閲戦涓�0鍏� => p206V1 5
- * 0x08:寮�娉�/闃�鍚庣閬撴病鏈夋祦閲忓叧 => p206V1 16
+ * 0x08:APP鍏� => p206V1 9
* 0x09:鎺夌數鍐嶄笂鐢靛叧锛� => p206V1 7
* 0x0a:姘磋〃鐬椂娴侀噺涓�0鍏筹紝 => p206V1 5
- * 0x0b:鍒峰崱寮�娉碉紝杩滅▼鍏炽�� => p206V1 9
+ * 0x0b:宸℃鍏炽�� => p206V1 10
* 0x0c:鐢垫睜浣庣數鍘嬪叧銆� => p206V1 7
* @param type 瀛楄妭
* @return 鍚嶇О
*/
public static byte closeType2P206V1(byte type){
return switch (type) {
- case 0 -> (byte)2;
- case 1,11 -> (byte)4;
- case 2 -> (byte)9;
+ case 1 -> (byte)2;
+ case 2 -> (byte)4;
case 3 -> (byte)12;
case 4,5,10 -> (byte)6;
case 6,7 -> (byte)5;
- case 8 -> (byte)16;
+ case 8 -> (byte)9;
case 9,12 -> (byte)7;
+ case 11 -> (byte)10;
default -> (byte)-1;
};
}
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/DataCdC2Vo.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/DataCdC2Vo.java
index 612fc7f..1417879 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/DataCdC2Vo.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/DataCdC2Vo.java
@@ -39,10 +39,10 @@
sb.append(orderNo == null?"鏈煡":orderNo) ;
sb.append("\n") ;
sb.append(" 鎿嶄綔鏂瑰紡 : ") ;
- sb.append(opType1 == null?"鏈煡":(opType1.byteValue()==0?"鍒峰崱":(opType1.byteValue()==1?"杩滅▼":(opType1.byteValue()==2?"App":"鏈煡")))) ;
+ sb.append(opType1 == null?"鏈煡":(opType1.byteValue()==1?"鍒峰崱":(opType1.byteValue()==2?"杩滅▼":(opType1.byteValue()==8?"App":"鏈煡")))) ;
sb.append("\n") ;
sb.append(" 寮�鍚叧闂� : ") ;
- sb.append(opType2 == null?"鏈煡":(opType2.byteValue()==0?"寮�鍚按娉�/闃�闂�":(opType2.byteValue()==1?"鍏抽棴姘存车/闃�闂�":"鏈煡"))) ;
+ sb.append(opType2 == null?"鏈煡":(opType2.byteValue()==0?"寮�鍚按娉�/闃�闂�":(opType2.byteValue()==-1?"鍏抽棴姘存车/闃�闂�":"鏈煡"))) ;
sb.append("\n") ;
sb.append(" 璁惧鏃堕挓 : ") ;
sb.append(rtuDt == null?"鏈煡": rtuDt) ;
--
Gitblit v1.8.0