| | |
| | | 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) ;//发送固定参数XY的命令, 例命令CodeV202404.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) ;//发送固定参数XY的命令, 例命令CodeV202404.cd_9C |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return rt ; |
| | |
| | | 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位数字) |