|  |  |  | 
|---|
|  |  |  | rt = this.connect() ;//连接通信中间件测试 | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | if(com.equals("10")){ | 
|---|
|  |  |  | if(com.equals(CodeLocal.stopTcpSv)){ | 
|---|
|  |  |  | rt = this.stopTcpSv() ; | 
|---|
|  |  |  | }else if(com.equals(CodeLocal.recoverTcpSv)){ | 
|---|
|  |  |  | rt = this.recoverTcpSv() ; | 
|---|
|  |  |  | }else if(com.equals(CodeLocal.mwState)){ | 
|---|
|  |  |  | rt = this.mwState() ; | 
|---|
|  |  |  | }else if(com.equals("10")){ | 
|---|
|  |  |  | rt = this.cd10() ; | 
|---|
|  |  |  | }else if(com.equals("21")){ | 
|---|
|  |  |  | rt = this.cd21() ; | 
|---|
|  |  |  | 
|---|
|  |  |  | return this.sendTest() ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse stopTcpSv(){ | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandLocal(CodeLocal.stopTcpSv, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse recoverTcpSv(){ | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandLocal(CodeLocal.recoverTcpSv, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse mwState(){ | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandLocal(CodeLocal.mwState, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_10, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd21(){ | 
|---|
|  |  |  | Com21Vo comVo = new Com21Vo() ; | 
|---|
|  |  |  | comVo.ip = "8.140.180.59" ;//IP(例如 125.235.35.89) | 
|---|
|  |  |  | comVo.port = 6001 ;///端口号(0~65536) | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_21, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_21, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd37(){ | 
|---|
|  |  |  | Com37Vo comVo = new Com37Vo() ; | 
|---|
|  |  |  | comVo.seconds = 20 ;//单位秒 | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_37, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_37, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | private BaseResponse cd67(){ | 
|---|
|  |  |  | Com37Vo comVo = new Com37Vo() ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_67, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_67, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd38(){ | 
|---|
|  |  |  | Com38Vo comVo = new Com38Vo() ; | 
|---|
|  |  |  | comVo.remainMoneyAlarm = 10.0 ;//用户余额报警值(大于1.0) | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_38, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_38, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd68(){ | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_68, null, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_68, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd39(){ | 
|---|
|  |  |  | Com39Vo comVo = new Com39Vo() ; | 
|---|
|  |  |  | comVo.batteryVoltAlarm = 7.0 ;//电池电压报警值(大于0.1) | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_39, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_39, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd69(){ | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_69, null, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_69, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd3A(){ | 
|---|
|  |  |  | Com3AVo comVo = new Com3AVo() ; | 
|---|
|  |  |  | comVo.current = 1.0 ;//阀门堵转电流(大于0) | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_3A, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_3A, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd6A(){ | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_6A, null, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_6A, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd3B(){ | 
|---|
|  |  |  | Com3BVo comVo = new Com3BVo() ; | 
|---|
|  |  |  | comVo.second = 120 ;//阀门超时时间(秒)(大于1) | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_3B, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_3B, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd6B(){ | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_6B, null, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_6B, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd3C(){ | 
|---|
|  |  |  | Com3CVo comVo = new Com3CVo() ; | 
|---|
|  |  |  | comVo.minute = 5 ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_3C, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_3C, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd65(){ | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_65, null, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_65, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse<String> cd91() { | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_91, null, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_91, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd92(){ | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_92, null, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_92, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cd93(){ | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_93, null, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_93, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //APP远程开阀 | 
|---|
|  |  |  | 
|---|
|  |  |  | 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)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_97, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //APP远程关阀 | 
|---|
|  |  |  | private BaseResponse cd98(){ | 
|---|
|  |  |  | Com98Vo comVo = new Com98Vo() ; | 
|---|
|  |  |  | comVo.icCardNo = CommandP206V1_0_0Ctrl.vsIcCardNo; | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_98, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_98, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //定时关阀开阀 | 
|---|
|  |  |  | 
|---|
|  |  |  | comVo.moneyRemain = 234.56 ; | 
|---|
|  |  |  | comVo.waterPrice = 1.2 ; | 
|---|
|  |  |  | comVo.minutes = 3 ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_99, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_99, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //定量关阀开阀 | 
|---|
|  |  |  | 
|---|
|  |  |  | comVo.moneyRemain = 234.56 ; | 
|---|
|  |  |  | comVo.waterPrice = 1.2 ; | 
|---|
|  |  |  | comVo.waterAmount = 10 ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_A0, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_A0, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | comVo.day = nextDt[2] ; | 
|---|
|  |  |  | comVo.hour = nextDt[3] ; | 
|---|
|  |  |  | comVo.minute = nextDt[4] ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_A1, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_A1, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //定量关阀计划开阀 | 
|---|
|  |  |  | 
|---|
|  |  |  | comVo.day = nextDt[2] ; | 
|---|
|  |  |  | comVo.hour = nextDt[3] ; | 
|---|
|  |  |  | comVo.minute = nextDt[4] ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_A2, comVo, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_A2, comVo, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaseResponse cdB0(){ | 
|---|
|  |  |  | return this.sendCom2Mw(this.command(CodeV1_0_1.cd_B0, null, null)) ; | 
|---|
|  |  |  | return this.sendCom2Mw(this.commandOuter(CodeV1_0_1.cd_B0, null, null)) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //在线情况 | 
|---|