|  |  |  | 
|---|
|  |  |  | package com.dy.common.mw.protocol.p206V202404.upVos; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.mw.protocol.UpComResVo; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.p206V202404.CodeV202404; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.p206V202404.CommonV202404; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import lombok.EqualsAndHashCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //平台/APP远程关闭水泵/阀门   +  刷卡关泵/阀上报 | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | public class DataCd93_A3Vo extends AlarmVo { | 
|---|
|  |  |  | @EqualsAndHashCode(callSuper=false) | 
|---|
|  |  |  | public class DataCd93_A3Vo extends AlarmVo implements UpComResVo { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String controllerType;//控制器类型 01(0x01):测控一体阀;57(0x57):井电控制器 | 
|---|
|  |  |  | public String controllerType;//控制器类型 | 
|---|
|  |  |  | public Integer projectNo ;//项目编号 | 
|---|
|  |  |  | public Byte opResult ;//关泵/阀结果: 0x00:成功 0x81:失败 | 
|---|
|  |  |  | public Byte opType ;//关泵/阀方式:  0x00:刷卡闭 0x01:平台关 0x02:APP关  0x03:非法卡关 0x04:水表异常关 0x05:电表异常关 0x06:剩余水量不足关 0x07:剩余金额不足关 0x08:开泵/阀后管道没有流量关 0x09:掉电再上电。 | 
|---|
|  |  |  | public Byte clResult;//关泵/阀结果: 0x00:成功 0x81:失败 | 
|---|
|  |  |  | public Byte clType;//关泵/阀方式:  0x00:刷卡闭 0x01:平台关 0x02:APP关  0x03:非法卡关 0x04:水表异常关 0x05:电表异常关 0x06:剩余水量不足关 0x07:剩余金额不足关 0x08:开泵/阀后管道没有流量关 0x09:掉电再上电。 | 
|---|
|  |  |  | public String icCardAddr ;//IC卡地址(远程关闭时为0) | 
|---|
|  |  |  | public String icCardNo ;//IC卡编号(17位数字) | 
|---|
|  |  |  | public String orderNo ;//订单号(16位数字) | 
|---|
|  |  |  | 
|---|
|  |  |  | public Integer thisDuration;//本次使用时间长, 单位:分钟 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String comName ;//命令名称 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public DataCd93_A3Vo(){ | 
|---|
|  |  |  | this.comName = CodeV202404.getCodeName(CodeV202404.cd_93) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public DataCd93_A3Vo(String comName){ | 
|---|
|  |  |  | this.comName = comName ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | StringBuffer sb = new StringBuffer() ; | 
|---|
|  |  |  | sb.append("      " + comName + " : \n") ; | 
|---|
|  |  |  | sb.append("      控制器类型 : ") ; | 
|---|
|  |  |  | sb.append(controllerType == null?"未知":(controllerType.equals("01")?"测控一体阀":(controllerType.equals("57")?"井电控制器":"未知"))) ; | 
|---|
|  |  |  | sb.append(CommonV202404.ctrlDevType(controllerType)) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("      项目编号 : ") ; | 
|---|
|  |  |  | sb.append(projectNo == null?"未知":projectNo) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("      关泵/阀类型 : ") ; | 
|---|
|  |  |  | sb.append(opType == null?"未知":(opType.byteValue() == 0x00 ? "刷卡":(opType.byteValue() == 0x01 ? "平台":(opType.byteValue() == 0x02 ? "APP":(opType.byteValue() == 0x03 ? "非法卡":(opType.byteValue() == 0x04 ? "水表异常":(opType.byteValue() == 0x05 ? "电表异常":(opType.byteValue() == 0x06 ? "剩余水量不足":(opType.byteValue() == 0x07 ? "剩余金额不足":(opType.byteValue() == 0x08 ? "无流量":(opType.byteValue() == 0x09 ? "掉电再上电":"未知"))))))))))) ; | 
|---|
|  |  |  | sb.append(clType == null?"未知":(CommonV202404.closeValveType(clType))) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("      关启泵/阀结果 : ") ; | 
|---|
|  |  |  | sb.append(opResult == null?"未知":(opResult.byteValue() == 0x01 ? "成功":"失败")) ; | 
|---|
|  |  |  | sb.append(clResult == null?"未知":(clResult.byteValue() == 0x01 ? "成功":"失败")) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("      IC卡地址 : ") ; | 
|---|
|  |  |  | sb.append(icCardAddr == null?"未知":icCardAddr) ; | 
|---|
|  |  |  | 
|---|
|  |  |  | sb.append("      本次使用金额 : ") ; | 
|---|
|  |  |  | sb.append(thisMoney == null?"未知":thisMoney) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("      本次使用时间长 : ") ; | 
|---|
|  |  |  | sb.append("      本次使用时长 : ") ; | 
|---|
|  |  |  | sb.append(thisDuration == null?"未知": thisDuration) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | return sb.toString() + super.toString() ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String toStr(boolean showBase){ | 
|---|
|  |  |  | StringBuffer sb = new StringBuffer() ; | 
|---|
|  |  |  | if(showBase){ | 
|---|
|  |  |  | sb.append(comName + " : \n") ; | 
|---|
|  |  |  | sb.append("控制器类型 : ") ; | 
|---|
|  |  |  | sb.append(CommonV202404.ctrlDevType(controllerType)) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("项目编号 : ") ; | 
|---|
|  |  |  | sb.append(projectNo == null?"未知":projectNo) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | sb.append("关泵/阀类型 : ") ; | 
|---|
|  |  |  | sb.append(clType == null?"未知":(CommonV202404.closeValveType(clType))) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("关启泵/阀结果 : ") ; | 
|---|
|  |  |  | sb.append(clResult == null?"未知":(clResult.byteValue() == 0x01 ? "成功":"失败")) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("IC卡地址 : ") ; | 
|---|
|  |  |  | sb.append(icCardAddr == null?"未知":icCardAddr) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("IC卡编号 : ") ; | 
|---|
|  |  |  | sb.append(icCardNo == null?"未知":icCardNo) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("订单号 : ") ; | 
|---|
|  |  |  | sb.append(orderNo == null?"未知":orderNo) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("开始时间 : ") ; | 
|---|
|  |  |  | sb.append(startDt == null?"未知":startDt) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("结束时间 : ") ; | 
|---|
|  |  |  | sb.append(endDt == null?"未知":endDt) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("水表累计流量 : ") ; | 
|---|
|  |  |  | sb.append(waterTotalAmount == null?"未知":waterTotalAmount) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("电表累计电量 : ") ; | 
|---|
|  |  |  | sb.append(eleTotalAmount == null?"未知":eleTotalAmount) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("用户剩余金额 : ") ; | 
|---|
|  |  |  | sb.append(moneyRemain == null?"未知":moneyRemain) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("用户剩余水量 : ") ; | 
|---|
|  |  |  | sb.append(waterRemain == null?"未知":waterRemain) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("本次使用电量 : ") ; | 
|---|
|  |  |  | sb.append(thisEle == null?"未知":thisEle) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("本次使用水量 : ") ; | 
|---|
|  |  |  | sb.append(thisWater == null?"未知":thisWater) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("本次使用金额 : ") ; | 
|---|
|  |  |  | sb.append(thisMoney == null?"未知":thisMoney) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | sb.append("本次使用时长 : ") ; | 
|---|
|  |  |  | sb.append(thisDuration == null?"未知": thisDuration) ; | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | return sb.toString() + super.toString() ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String comLog(){ | 
|---|
|  |  |  | StringBuilder sb = new StringBuilder() ; | 
|---|
|  |  |  | sb.append("远程关阀命令回复:\n"); | 
|---|
|  |  |  | sb.append(clResult == null?"未知":(clResult.byteValue() == 0x01 ? "成功":"失败")); | 
|---|
|  |  |  | sb.append("\n"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return sb.toString() ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public String comLog(String code) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|