| | |
| | | if(com == null){ |
| | | rt = this.connect() ;//连接通信中间件测试 |
| | | }else{ |
| | | if(com.equals("21")){ |
| | | if(com.equals("10")){ |
| | | rt = this.cd10() ; |
| | | }else if(com.equals("21")){ |
| | | rt = this.cd21() ; |
| | | }else if(com.equals("37")){ |
| | | rt = this.cd37() ; |
| | |
| | | rt = this.cd97() ; |
| | | }else if(com.equals("98")){ |
| | | rt = this.cd98() ; |
| | | }else if(com.equals("99")){ |
| | | rt = this.cd99() ; |
| | | }else if(com.equals("A0")){ |
| | | rt = this.cdA0() ; |
| | | }else if(com.equals("B0")){ |
| | | rt = this.cdB0() ; |
| | | } |
| | |
| | | */ |
| | | private BaseResponse connect(){ |
| | | return this.sendTest() ; |
| | | } |
| | | |
| | | private BaseResponse cd10(){ |
| | | Com10Vo comVo = new Com10Vo() ; |
| | | comVo.rtuAddr = "532328059995" ;//前6位是行政区划码,后6位是序列号最大是065535 |
| | | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_10, comVo, null)) ; |
| | | } |
| | | |
| | | private BaseResponse cd21(){ |
| | |
| | | |
| | | private BaseResponse cd3C(){ |
| | | Com3CVo comVo = new Com3CVo() ; |
| | | comVo.minute = 60 ; |
| | | comVo.minute = 5 ; |
| | | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_3C, comVo, null)) ; |
| | | } |
| | | |
| | |
| | | //APP远程开阀 |
| | | private BaseResponse cd97(){ |
| | | Com97Vo comVo = new Com97Vo() ; |
| | | comVo.icCardNo = CommandP206V1_0_0Ctrl.icCardNo ; |
| | | comVo.icCardNo = CommandP206V1_0_0Ctrl.vsIcCardNo; |
| | | comVo.moneyRemain = 234.56 ; |
| | | comVo.waterPrice = 1.2 ; |
| | | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_97, comVo, null)) ; |
| | |
| | | //APP远程关阀 |
| | | private BaseResponse cd98(){ |
| | | Com98Vo comVo = new Com98Vo() ; |
| | | comVo.icCardNo = CommandP206V1_0_0Ctrl.icCardNo ; |
| | | comVo.icCardNo = CommandP206V1_0_0Ctrl.vsIcCardNo; |
| | | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_98, comVo, null)) ; |
| | | } |
| | | |
| | | //定时关阀开阀 |
| | | private BaseResponse cd99(){ |
| | | Com99Vo comVo = new Com99Vo() ; |
| | | comVo.icCardNo = CommandP206V1_0_0Ctrl.vsIcCardNo; |
| | | comVo.moneyRemain = 234.56 ; |
| | | comVo.waterPrice = 1.2 ; |
| | | comVo.minutes = 5 ; |
| | | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_99, comVo, null)) ; |
| | | } |
| | | |
| | | //定量关阀开阀 |
| | | private BaseResponse cdA0(){ |
| | | ComA0Vo comVo = new ComA0Vo() ; |
| | | comVo.icCardNo = CommandP206V1_0_0Ctrl.vsIcCardNo; |
| | | comVo.moneyRemain = 234.56 ; |
| | | comVo.waterPrice = 1.2 ; |
| | | comVo.waterAmount = 10 ; |
| | | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_98, comVo, null)) ; |
| | | } |
| | | |