From 0639f7feede9614a98f64450792cc83f58f80a84 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 14 五月 2025 17:00:54 +0800
Subject: [PATCH] 与测控一体阀兼容
---
pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V202404test/CommandP206V202404Ctrl.java | 95 +++++++++++++++++++++++++----------------------
1 files changed, 50 insertions(+), 45 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V202404test/CommandP206V202404Ctrl.java b/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V202404test/CommandP206V202404Ctrl.java
index 1a4430f..e6715af 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V202404test/CommandP206V202404Ctrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V202404test/CommandP206V202404Ctrl.java
@@ -18,53 +18,58 @@
public class CommandP206V202404Ctrl extends ComSupportP206V202404 {
@GetMapping(path = "test")
- public BaseResponse<String> test(String com) {
+ public BaseResponse<String> test(String rtuAddr, String com) {
BaseResponse<String> rt = null ;
- if(com == null){
+ if(rtuAddr == null || rtuAddr.trim().equals("")){
rt = this.connect() ;//杩炴帴閫氫俊涓棿浠舵祴璇�
}else{
- try{
- if(com.equals("10")){
- rt = this.cd10() ;
- }else if(com.equals("15")){
- rt = this.cd15() ;
- }else if(com.equals("16")){
- rt = this.cd16() ;
- }else if(com.equals("21")){
- rt = this.cd21() ;
- }else if(com.equals("22")){
- rt = this.cd22() ;
- }else if(com.equals("23")){
- rt = this.cd23() ;
- }else if(com.equals("24")){
- rt = this.cd24() ;
- }else if(com.equals("26")){
- rt = this.cd26() ;
- }else if(com.equals("31")){
- rt = this.cd31() ;
- }else if(com.equals("55")){
- rt = this.cd55(1) ;
- }else if(com.equals("65")){
- rt = this.cd65(1) ;
- }else if(com.equals("86")){
- rt = this.cd86() ;
- }else if(com.equals("87")){
- rt = this.cd87() ;
- }else if(com.equals("92")){
- rt = this.cd92() ;
- }else if(com.equals("93")){
- rt = this.cd93() ;
- }else if(com.equals("9C")){
- rt = this.cd9C() ;
- }else if(com.equals("A2")){
- rt = this.cdA2() ;
- }else if(com.equals("A3")){
- rt = this.cdA3() ;
- }else{
- rt = this.cdXY(com) ;//鍙戦�佸浐瀹氬弬鏁癤Y鐨勫懡浠�, 渚嬪懡浠odeV202404.cd_9C
+ this.rtuAddr = rtuAddr ;
+ if(com == null || com.trim().equals("")){
+ rt = this.connect() ;//杩炴帴閫氫俊涓棿浠舵祴璇�
+ }else{
+ try{
+ if(com.equals("10")){
+ rt = this.cd10() ;
+ }else if(com.equals("15")){
+ rt = this.cd15() ;
+ }else if(com.equals("16")){
+ rt = this.cd16() ;
+ }else if(com.equals("21")){
+ rt = this.cd21() ;
+ }else if(com.equals("22")){
+ rt = this.cd22() ;
+ }else if(com.equals("23")){
+ rt = this.cd23() ;
+ }else if(com.equals("24")){
+ rt = this.cd24() ;
+ }else if(com.equals("26")){
+ rt = this.cd26() ;
+ }else if(com.equals("31")){
+ rt = this.cd31() ;
+ }else if(com.equals("55")){
+ rt = this.cd55(1) ;
+ }else if(com.equals("65")){
+ rt = this.cd65(1) ;
+ }else if(com.equals("86")){
+ rt = this.cd86() ;
+ }else if(com.equals("87")){
+ rt = this.cd87() ;
+ }else if(com.equals("92")){
+ rt = this.cd92() ;
+ }else if(com.equals("93")){
+ rt = this.cd93() ;
+ }else if(com.equals("9C")){
+ rt = this.cd9C() ;
+ }else if(com.equals("A2")){
+ rt = this.cdA2() ;
+ }else if(com.equals("A3")){
+ rt = this.cdA3() ;
+ }else{
+ rt = this.cdXY(com) ;//鍙戦�佸浐瀹氬弬鏁癤Y鐨勫懡浠�, 渚嬪懡浠odeV202404.cd_9C
+ }
+ }catch (Exception e){
+ e.printStackTrace();
}
- }catch (Exception e){
- e.printStackTrace();
}
}
return rt ;
@@ -213,8 +218,8 @@
comVo.projectNo = CommandP206V202404Ctrl.projectNo ;
//comVo.icCardAddr = Test.icCardAddr ;//IC鍗″湴鍧�(8浣嶆暟瀛楁垨瀛楁瘝)
comVo.icCardNo = CommandP206V202404Ctrl.icCardNo ;//鐢ㄦ埛鍗″簭鍒楀彿锛�17浣嶆暟瀛楋級锛�6瀛楄妭BCD锛�2瀛楄妭HEX锛�
- comVo.waterRemain = 123.45 ;//鍗曚綅:鍏� 2浣嶅皬鏁扮偣(鏈�澶у�� 99999999.99)
- comVo.moneyRemain = 234.56 ;//鍗曚綅:m3 2浣嶅皬鏁扮偣(鏈�澶у�� 99999999.99)
+ comVo.waterRemain = 123.45 ;//鍗曚綅:m3 2浣嶅皬鏁扮偣(鏈�澶у�� 99999999.99)
+ comVo.moneyRemain = 12345.67 ;//鍗曚綅:鍏� 2浣嶅皬鏁扮偣(鏈�澶у�� 99999999.99)
comVo.waterPrice = 0.8 ;//姘撮噺鍗曚环 鍗曚綅:鍏�, 2涓皬鏁扮偣
comVo.elePrice = 1.2 ;//鐢甸噺鍗曚环 鍗曚綅:鍏�, 2涓皬鏁扮偣
comVo.orderNo = "1234567890123456" ;//璁㈠崟鍙凤紙16浣嶆暟瀛楋級
--
Gitblit v1.8.0