1、完善代码;
2、数据库IP地址修改;
3、江海协议实现阀开工作报最新数据存储和历史数据存储。
| | |
| | | |
| | | public Object subData ; |
| | | |
| | | public String dt ;//通信中间件产生收报时间(yyyy-MM-dd hh:mm:ss) |
| | | public String dt ;//通信中间件产生的收报时间(yyyy-MM-dd hh:mm:ss) |
| | | |
| | | public String toString(){ |
| | | StringBuffer sb = new StringBuffer() ; |
| | |
| | | private static final Logger log = LogManager.getLogger(GlParse.class); |
| | | |
| | | public static DataAlarmVo parseAlarm(byte[] bs, short index){ |
| | | /* |
| | | 11011111 (DF) + 11111001 (F9) |
| | | 报警: |
| | | 蓄电池电压:报警 |
| | | 漏损:报警 |
| | | 仪表:报警 |
| | | 阀门:报警 |
| | | */ |
| | | DataAlarmVo avo = new DataAlarmVo() ; |
| | | byte b = bs[index] ; |
| | | index++ ; |
| | | avo.batteryVolt = (byte)(b & 0x2 >> 1) ; |
| | | avo.meter = (byte)(b & 0x20 >> 5) ; |
| | | byte b = bs[index + 1] ; |
| | | avo.batteryVolt = (byte)((b & 0x2) >> 1) ; |
| | | avo.meter = (byte)((b & 0x20) >> 5) ; |
| | | |
| | | b = bs[index] ; |
| | | avo.loss = (byte)(b & 0x2 >> 1) ; |
| | | avo.valve = (byte)(b & 0x4 >> 2) ; |
| | | avo.loss = (byte)((b & 0x2) >> 1) ; |
| | | avo.valve = (byte)((b & 0x4) >> 2) ; |
| | | return avo ; |
| | | } |
| | | |
| | | public static DataStateVo parseState(byte[] bs, short index){ |
| | | DataStateVo avo = new DataStateVo() ; |
| | | byte b = bs[index] ; |
| | | index++ ; |
| | | avo.icCard = (byte)(b & 0x4 >> 2) ; |
| | | avo.working = (byte)(b & 0x10 >> 4) ; |
| | | avo.powerType = (byte)(b & 0x40 >> 6) ; |
| | | byte b = bs[index + 1] ; |
| | | avo.icCard = (byte)((b & 0x4) >> 2) ; |
| | | avo.working = (byte)((b & 0x10) >> 4) ; |
| | | avo.powerType = (byte)((b & 0x40) >> 6) ; |
| | | return avo ; |
| | | } |
| | | |
| | |
| | | |
| | | public Object subData ; |
| | | |
| | | public String dt ;//通信中间件产生收报时间(yyyy-MM-dd hh:mm:ss) |
| | | public String dt ;//通信中间件产生的收报时间(yyyy-MM-dd hh:mm:ss) |
| | | |
| | | public String toString(){ |
| | | StringBuffer sb = new StringBuffer() ; |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/2/28 8:52 |
| | | * @LastEditTime 2024/2/28 8:52 |
| | | * @Author: liurunyu |
| | | * @Date: 2024/6/14 10:58 |
| | | * @Description |
| | | */ |
| | | */ |
| | | @Mapper |
| | | public interface RmWorkReportHistoryMapper { |
| | | /** |
| | | * delete by primary key |
| | | * |
| | | * @param id primaryKey |
| | | * @return deleteCount |
| | | */ |
| | |
| | | |
| | | /** |
| | | * insert record to table |
| | | * |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | |
| | | |
| | | /** |
| | | * insert record to table selective |
| | | * |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | |
| | | |
| | | /** |
| | | * select by primary key |
| | | * |
| | | * @param id primary key |
| | | * @return object by primary key |
| | | */ |
| | |
| | | |
| | | /** |
| | | * update record selective |
| | | * |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | |
| | | |
| | | /** |
| | | * update record |
| | | * |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/2/28 8:52 |
| | | * @LastEditTime 2024/2/28 8:52 |
| | | * @Author: liurunyu |
| | | * @Date: 2024/6/14 10:11 |
| | | * @Description |
| | | */ |
| | | */ |
| | | @Mapper |
| | | public interface RmWorkReportLastMapper { |
| | | /** |
| | | * delete by primary key |
| | | * |
| | | * @param id primaryKey |
| | | * @return deleteCount |
| | | */ |
| | |
| | | |
| | | /** |
| | | * insert record to table |
| | | * |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | |
| | | |
| | | /** |
| | | * insert record to table selective |
| | | * |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | |
| | | |
| | | /** |
| | | * select by primary key |
| | | * |
| | | * @param id primary key |
| | | * @return object by primary key |
| | | */ |
| | | RmWorkReportLast selectByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * select by primary key |
| | | * @param rtuAddr 控制器地址 |
| | | * @return object by rtuAddr |
| | | */ |
| | | List<RmWorkReportLast> selectByRtuAddr(String rtuAddr); |
| | | |
| | | /** |
| | | * update record selective |
| | | * |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | |
| | | |
| | | /** |
| | | * update record |
| | | * |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKey(RmWorkReportLast record); |
| | | |
| | | /** |
| | | * select by primary key |
| | | * |
| | | * @param rtuAddr 控制器地址 |
| | | * @return object by rtuAddr |
| | | */ |
| | | List<RmWorkReportLast> selectByRtuAddr(String rtuAddr); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.mw.protocol.p206V202404.DataV202404; |
| | | import com.dy.common.mw.protocol.p206V202404.upVos.DataCd80_5BVo; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.dy.common.util.DateTime; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/2/28 8:52 |
| | | * @LastEditTime 2024/2/28 8:52 |
| | | * @Description 终端工作报历史数据 |
| | | * @Author: liurunyu |
| | | * @Date: 2024/6/14 10:58 |
| | | * @Description 终端阀开工作报历史数据 |
| | | */ |
| | | |
| | | @TableName(value="rm_work_report_history", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "终端工作报历史数据") |
| | | public class RmWorkReportHistory implements BaseEntity { |
| | | |
| | | @Schema(name = "终端阀开工作报历史数据") |
| | | public class RmWorkReportHistory implements BaseEntity { |
| | | public static final long serialVersionUID = 202402280859001L; |
| | | /** |
| | | * 主键 |
| | |
| | | public Date rtuDt; |
| | | |
| | | /** |
| | | * 订单号(16位数字) |
| | | */ |
| | | @Schema(hidden=true) |
| | | @JSONField(serialize = false) |
| | | public String orderNo; |
| | | |
| | | /** |
| | | * IC卡地址(远程开泵/阀时全为0) |
| | | */ |
| | | @Schema(description = "IC卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String icCardAddr; |
| | | |
| | | /** |
| | | * IC卡编号 |
| | | */ |
| | | @Schema(description = "IC卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String icCardNo; |
| | | |
| | | /** |
| | | * 累计流量 |
| | | * 水位(单位0.001米) |
| | | */ |
| | | @Schema(description = "累计流量(m3)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double totalAmount; |
| | | @Schema(description = "水位(单位0.001米)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterLevel; |
| | | |
| | | /** |
| | | * 瞬时流量 |
| | | * 水压(单位0.01千帕) |
| | | */ |
| | | @Schema(description = "瞬时流量(m3/h)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double instantAmount; |
| | | @Schema(description = "水压(单位0.01千帕)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterPress; |
| | | |
| | | /** |
| | | * 剩余金额 |
| | | * 瞬时流量(单位0.01m3/小时) |
| | | */ |
| | | @Schema(description = "剩余蒂金额(元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double remainMoney; |
| | | @Schema(description = "瞬时流量(单位0.01m3/小时)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterInstant; |
| | | |
| | | /** |
| | | * 水表累计流量(单位0.01m3) |
| | | */ |
| | | @Schema(description = "水表累计流量(单位0.01m3)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterTotal; |
| | | |
| | | /** |
| | | * 电表累计电量(单位0.01度) |
| | | */ |
| | | @Schema(description = "电表累计电量(单位0.01度)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double eleTotal; |
| | | |
| | | /** |
| | | * 用户剩余金额(单位0.01元) |
| | | */ |
| | | @Schema(description = "用户剩余金额(单位0.01元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double moneyRemain; |
| | | |
| | | /** |
| | | * 用户剩余水量(单位0.01m3) |
| | | */ |
| | | @Schema(description = "用户剩余水量(单位0.01m3)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterRemain; |
| | | |
| | | /** |
| | | * 本次使用电量(单位0.01度) |
| | | */ |
| | | @Schema(description = "本次使用电量(单位0.01度)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double thisEle; |
| | | |
| | | /** |
| | | * 本次使用水量(单位0.01m3) |
| | | */ |
| | | @Schema(description = "本次使用水量(单位0.01m3)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double thisWater; |
| | | |
| | | /** |
| | | * 本次使用金额(单位0.01元) |
| | | */ |
| | | @Schema(description = "本次使用金额(单位0.01元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double thisMoney; |
| | | |
| | | /** |
| | | * 本次使用时长(单位:分钟 最大9999分钟) |
| | | */ |
| | | @Schema(description = "本次使用时长(单位:分钟 最大9999分钟)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Integer thisDuration; |
| | | |
| | | /** |
| | | * 当前水量单价(单位0.01元 最大99.99元) |
| | | */ |
| | | @Schema(description = "当前水量单价(单位0.01元 最大99.99元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterPrice; |
| | | |
| | | /** |
| | | * 当前电量单价(单位0.01元 最大99.99元) |
| | | */ |
| | | @Schema(description = "当前电量单价(单位0.01元 最大99.99元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double elePrice; |
| | | |
| | | /** |
| | | * 交流A相电压(单位0.1伏特) |
| | | */ |
| | | @Schema(description = "交流A相电压(单位0.1伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double aVolt; |
| | | |
| | | /** |
| | | * 交流B相电压(单位0.1伏特) |
| | | */ |
| | | @Schema(description = "交流B相电压(单位0.1伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double bVolt; |
| | | |
| | | /** |
| | | * 交流C相电压(单位0.1伏特) |
| | | */ |
| | | @Schema(description = "交流C相电压(单位0.1伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double cVolt; |
| | | |
| | | /** |
| | | * 交流A相电流(单位0.1安培) |
| | | */ |
| | | @Schema(description = "交流A相电流(单位0.1安培)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double aCurrent; |
| | | |
| | | /** |
| | | * 交流B相电流数据(单位0.1安培) |
| | | */ |
| | | @Schema(description = "交流B相电流数据(单位0.1安培)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double bCurrent; |
| | | |
| | | /** |
| | | * 交流C相电流(单位0.1安培) |
| | | */ |
| | | @Schema(description = "交流C相电流(单位0.1安培)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double cCurrent; |
| | | |
| | | /** |
| | | * 后备电池电压(单位0.01伏特) |
| | | */ |
| | | @Schema(description = "后备电池电压(单位0.01伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double batteryVolt; |
| | | |
| | | /** |
| | | * 水表远传电压(单位0.01伏特) |
| | | */ |
| | | @Schema(description = "水表远传电压(单位0.01伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterMeterTransVolt; |
| | | |
| | | /** |
| | | * 水表工作电压(单位0.01伏特) |
| | | */ |
| | | @Schema(description = "水表工作电压(单位0.01伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterMeterWorkVolt; |
| | | |
| | | public void valueFrom(DataV202404 dataV202404, DataCd80_5BVo cdData) throws Exception{ |
| | | this.dt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataV202404.dt); |
| | | this.rtuDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.rtuDt); |
| | | this.orderNo = cdData.orderNo ; |
| | | this.icCardAddr = cdData.icCardAddr ; |
| | | this.icCardNo = cdData.icCardNo ; |
| | | this.waterLevel = cdData.waterLevel ; |
| | | this.waterPress = cdData.waterPress ; |
| | | this.waterInstant = cdData.waterInstant ; |
| | | this.waterTotal = cdData.waterTotal ; |
| | | this.eleTotal = cdData.eleTotal ; |
| | | this.moneyRemain = cdData.moneyRemain ; |
| | | this.waterRemain = cdData.waterRemain ; |
| | | this.thisEle = cdData.thisEle ; |
| | | this.thisWater = cdData.thisWater ; |
| | | this.thisMoney = cdData.thisMoney ; |
| | | this.thisDuration = cdData.thisDuration ; |
| | | this.waterPrice = cdData.waterPrice ; |
| | | this.elePrice = cdData.elePrice ; |
| | | this.aVolt = cdData.aVolt ; |
| | | this.bVolt = cdData.bVolt ; |
| | | this.cVolt = cdData.cVolt ; |
| | | this.aCurrent = cdData.aCurrent ; |
| | | this.bCurrent = cdData.bCurrent ; |
| | | this.cCurrent = cdData.cCurrent ; |
| | | this.batteryVolt = cdData.batteryVolt ; |
| | | this.waterMeterTransVolt = cdData.waterMeterTransVolt ; |
| | | this.waterMeterWorkVolt = cdData.waterMeterWorkVolt ; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.mw.protocol.p206V202404.DataV202404; |
| | | import com.dy.common.mw.protocol.p206V202404.upVos.DataCd80_5BVo; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.dy.common.util.DateTime; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/2/28 8:52 |
| | | * @LastEditTime 2024/2/28 8:52 |
| | | * @Description 终端最新工作报 |
| | | * @Author: liurunyu |
| | | * @Date: 2024/6/14 10:11 |
| | | * @Description 控制器阀开工作报最新数据 |
| | | */ |
| | | |
| | | @TableName(value="rm_work_report_last", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "终端最新工作报") |
| | | public class RmWorkReportLast implements BaseEntity { |
| | | |
| | | @Schema(name = "终端阀开工作报最新数据") |
| | | public class RmWorkReportLast implements BaseEntity { |
| | | public static final long serialVersionUID = 202402280855001L; |
| | | /** |
| | | * 主键 |
| | |
| | | public Long id; |
| | | |
| | | /** |
| | | * 控制器实体ID(外键) |
| | | */ |
| | | * 控制器实体ID(外键) |
| | | */ |
| | | @Schema(description = "控制器实体外键", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long controllerId; |
| | | |
| | | /** |
| | | * 取水口实体ID(外键) |
| | | */ |
| | | * 取水口实体ID(外键) |
| | | */ |
| | | @Schema(description = "取水口实体外键", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeId; |
| | | |
| | | /** |
| | | * 控制器地址 |
| | | */ |
| | | * 控制器地址 |
| | | */ |
| | | @Schema(description = "控制器地址", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public String rtuAddr; |
| | | |
| | | /** |
| | | * 数据接收日期时间 |
| | | */ |
| | | * 数据接收日期时间 |
| | | */ |
| | | @Schema(description = "上报日期时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date dt; |
| | |
| | | public Date rtuDt; |
| | | |
| | | /** |
| | | * IC卡编号 |
| | | */ |
| | | * 订单号(16位数字) |
| | | */ |
| | | @Schema(hidden=true) |
| | | @JSONField(serialize = false) |
| | | public String orderNo; |
| | | |
| | | /** |
| | | * IC卡地址(远程开泵/阀时全为0) |
| | | */ |
| | | @Schema(description = "IC卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String icCardAddr; |
| | | |
| | | /** |
| | | * IC卡编号 |
| | | */ |
| | | @Schema(description = "IC卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String icCardNo; |
| | | |
| | | /** |
| | | * 累计流量 |
| | | */ |
| | | @Schema(description = "累计流量(m3)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double totalAmount; |
| | | * 水位(单位0.001米) |
| | | */ |
| | | @Schema(description = "水位(单位0.001米)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterLevel; |
| | | |
| | | /** |
| | | * 瞬时流量 |
| | | */ |
| | | @Schema(description = "瞬时流量(m3/h)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double instantAmount; |
| | | * 水压(单位0.01千帕) |
| | | */ |
| | | @Schema(description = "水压(单位0.01千帕)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterPress; |
| | | |
| | | /** |
| | | * 剩余金额 |
| | | */ |
| | | @Schema(description = "剩余蒂金额(元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double remainMoney; |
| | | * 瞬时流量(单位0.01m3/小时) |
| | | */ |
| | | @Schema(description = "瞬时流量(单位0.01m3/小时)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterInstant; |
| | | |
| | | /** |
| | | * 水表累计流量(单位0.01m3) |
| | | */ |
| | | @Schema(description = "水表累计流量(单位0.01m3)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterTotal; |
| | | |
| | | /** |
| | | * 电表累计电量(单位0.01度) |
| | | */ |
| | | @Schema(description = "电表累计电量(单位0.01度)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double eleTotal; |
| | | |
| | | /** |
| | | * 用户剩余金额(单位0.01元) |
| | | */ |
| | | @Schema(description = "用户剩余金额(单位0.01元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double moneyRemain; |
| | | |
| | | /** |
| | | * 用户剩余水量(单位0.01m3) |
| | | */ |
| | | @Schema(description = "用户剩余水量(单位0.01m3)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterRemain; |
| | | |
| | | /** |
| | | * 本次使用电量(单位0.01度) |
| | | */ |
| | | @Schema(description = "本次使用电量(单位0.01度)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double thisEle; |
| | | |
| | | /** |
| | | * 本次使用水量(单位0.01m3) |
| | | */ |
| | | @Schema(description = "本次使用水量(单位0.01m3)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double thisWater; |
| | | |
| | | /** |
| | | * 本次使用金额(单位0.01元) |
| | | */ |
| | | @Schema(description = "本次使用金额(单位0.01元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double thisMoney; |
| | | |
| | | /** |
| | | * 本次使用时长(单位:分钟 最大9999分钟) |
| | | */ |
| | | @Schema(description = "本次使用时长(单位:分钟 最大9999分钟)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Integer thisDuration; |
| | | |
| | | /** |
| | | * 当前水量单价(单位0.01元 最大99.99元) |
| | | */ |
| | | @Schema(description = "当前水量单价(单位0.01元 最大99.99元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterPrice; |
| | | |
| | | /** |
| | | * 当前电量单价(单位0.01元 最大99.99元) |
| | | */ |
| | | @Schema(description = "当前电量单价(单位0.01元 最大99.99元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double elePrice; |
| | | |
| | | /** |
| | | * 交流A相电压(单位0.1伏特) |
| | | */ |
| | | @Schema(description = "交流A相电压(单位0.1伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double aVolt; |
| | | |
| | | /** |
| | | * 交流B相电压(单位0.1伏特) |
| | | */ |
| | | @Schema(description = "交流B相电压(单位0.1伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double bVolt; |
| | | |
| | | /** |
| | | * 交流C相电压(单位0.1伏特) |
| | | */ |
| | | @Schema(description = "交流C相电压(单位0.1伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double cVolt; |
| | | |
| | | /** |
| | | * 交流A相电流(单位0.1安培) |
| | | */ |
| | | @Schema(description = "交流A相电流(单位0.1安培)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double aCurrent; |
| | | |
| | | /** |
| | | * 交流B相电流数据(单位0.1安培) |
| | | */ |
| | | @Schema(description = "交流B相电流数据(单位0.1安培)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double bCurrent; |
| | | |
| | | /** |
| | | * 交流C相电流(单位0.1安培) |
| | | */ |
| | | @Schema(description = "交流C相电流(单位0.1安培)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double cCurrent; |
| | | |
| | | /** |
| | | * 后备电池电压(单位0.01伏特) |
| | | */ |
| | | @Schema(description = "后备电池电压(单位0.01伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double batteryVolt; |
| | | |
| | | /** |
| | | * 水表远传电压(单位0.01伏特) |
| | | */ |
| | | @Schema(description = "水表远传电压(单位0.01伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterMeterTransVolt; |
| | | |
| | | /** |
| | | * 水表工作电压(单位0.01伏特) |
| | | */ |
| | | @Schema(description = "水表工作电压(单位0.01伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterMeterWorkVolt; |
| | | |
| | | public void valueFrom(DataV202404 dataV202404, DataCd80_5BVo cdData) throws Exception{ |
| | | this.dt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataV202404.dt); |
| | | this.rtuDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.rtuDt); |
| | | this.orderNo = cdData.orderNo ; |
| | | this.icCardAddr = cdData.icCardAddr ; |
| | | this.icCardNo = cdData.icCardNo ; |
| | | this.waterLevel = cdData.waterLevel ; |
| | | this.waterPress = cdData.waterPress ; |
| | | this.waterInstant = cdData.waterInstant ; |
| | | this.waterTotal = cdData.waterTotal ; |
| | | this.eleTotal = cdData.eleTotal ; |
| | | this.moneyRemain = cdData.moneyRemain ; |
| | | this.waterRemain = cdData.waterRemain ; |
| | | this.thisEle = cdData.thisEle ; |
| | | this.thisWater = cdData.thisWater ; |
| | | this.thisMoney = cdData.thisMoney ; |
| | | this.thisDuration = cdData.thisDuration ; |
| | | this.waterPrice = cdData.waterPrice ; |
| | | this.elePrice = cdData.elePrice ; |
| | | this.aVolt = cdData.aVolt ; |
| | | this.bVolt = cdData.bVolt ; |
| | | this.cVolt = cdData.cVolt ; |
| | | this.aCurrent = cdData.aCurrent ; |
| | | this.bCurrent = cdData.bCurrent ; |
| | | this.cCurrent = cdData.cCurrent ; |
| | | this.batteryVolt = cdData.batteryVolt ; |
| | | this.waterMeterTransVolt = cdData.waterMeterTransVolt ; |
| | | this.waterMeterWorkVolt = cdData.waterMeterWorkVolt ; |
| | | } |
| | | } |
| | |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | # url: jdbc:mysql://192.168.91.73:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://127.0.0.1:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://192.168.40.166:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | username: root |
| | | password: dysql,;.abc!@# |
| | | druid: |
| | |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | # url: jdbc:mysql://192.168.91.73:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | username: root |
| | | password: dysql,;.abc!@# |
| | | druid: |
| | |
| | | <result column="intake_id" jdbcType="BIGINT" property="intakeId" /> |
| | | <result column="rtu_addr" jdbcType="VARCHAR" property="rtuAddr" /> |
| | | <result column="dt" jdbcType="TIMESTAMP" property="dt" /> |
| | | <result column="ic_card_no" jdbcType="VARCHAR" property="icCardNo" /> |
| | | <result column="total_amount" jdbcType="DOUBLE" property="totalAmount" /> |
| | | <result column="instant_amount" jdbcType="DOUBLE" property="instantAmount" /> |
| | | <result column="remain_money" jdbcType="DOUBLE" property="remainMoney" /> |
| | | <result column="rtu_dt" jdbcType="TIMESTAMP" property="rtuDt" /> |
| | | <result column="order_no" jdbcType="VARCHAR" property="orderNo" /> |
| | | <result column="ic_card_addr" jdbcType="VARCHAR" property="icCardAddr" /> |
| | | <result column="ic_card_no" jdbcType="VARCHAR" property="icCardNo" /> |
| | | <result column="water_level" jdbcType="FLOAT" property="waterLevel" /> |
| | | <result column="water_press" jdbcType="FLOAT" property="waterPress" /> |
| | | <result column="water_instant" jdbcType="FLOAT" property="waterInstant" /> |
| | | <result column="water_total" jdbcType="FLOAT" property="waterTotal" /> |
| | | <result column="ele_total" jdbcType="FLOAT" property="eleTotal" /> |
| | | <result column="money_remain" jdbcType="FLOAT" property="moneyRemain" /> |
| | | <result column="water_remain" jdbcType="FLOAT" property="waterRemain" /> |
| | | <result column="this_ele" jdbcType="FLOAT" property="thisEle" /> |
| | | <result column="this_water" jdbcType="FLOAT" property="thisWater" /> |
| | | <result column="this_money" jdbcType="FLOAT" property="thisMoney" /> |
| | | <result column="this_duration" jdbcType="INTEGER" property="thisDuration" /> |
| | | <result column="water_price" jdbcType="FLOAT" property="waterPrice" /> |
| | | <result column="ele_price" jdbcType="FLOAT" property="elePrice" /> |
| | | <result column="a_volt" jdbcType="FLOAT" property="aVolt" /> |
| | | <result column="b_volt" jdbcType="FLOAT" property="bVolt" /> |
| | | <result column="c_volt" jdbcType="FLOAT" property="cVolt" /> |
| | | <result column="a_current" jdbcType="FLOAT" property="aCurrent" /> |
| | | <result column="b_current" jdbcType="FLOAT" property="bCurrent" /> |
| | | <result column="c_current" jdbcType="FLOAT" property="cCurrent" /> |
| | | <result column="battery_volt" jdbcType="FLOAT" property="batteryVolt" /> |
| | | <result column="water_meter_trans_volt" jdbcType="FLOAT" property="waterMeterTransVolt" /> |
| | | <result column="water_meter_work_volt" jdbcType="FLOAT" property="waterMeterWorkVolt" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, controller_id, intake_id, rtu_addr, dt, ic_card_no, total_amount, instant_amount, |
| | | remain_money, rtu_dt |
| | | id, controller_id, intake_id, rtu_addr, dt, rtu_dt, order_no, ic_card_addr, ic_card_no, |
| | | water_level, water_press, water_instant, water_total, ele_total, money_remain, water_remain, |
| | | this_ele, this_water, this_money, this_duration, water_price, ele_price, a_volt, |
| | | b_volt, c_volt, a_current, b_current, c_current, battery_volt, water_meter_trans_volt, |
| | | water_meter_work_volt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmWorkReportHistory"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_work_report_history (id, controller_id, intake_id, |
| | | rtu_addr, dt, ic_card_no, |
| | | total_amount, instant_amount, remain_money, |
| | | rtu_dt) |
| | | rtu_addr, dt, rtu_dt, |
| | | order_no, ic_card_addr, ic_card_no, |
| | | water_level, water_press, water_instant, |
| | | water_total, ele_total, money_remain, |
| | | water_remain, this_ele, this_water, |
| | | this_money, this_duration, water_price, |
| | | ele_price, a_volt, b_volt, c_volt, |
| | | a_current, b_current, c_current, |
| | | battery_volt, water_meter_trans_volt, water_meter_work_volt |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, |
| | | #{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{icCardNo,jdbcType=VARCHAR}, |
| | | #{totalAmount,jdbcType=DOUBLE}, #{instantAmount,jdbcType=DOUBLE}, #{remainMoney,jdbcType=DOUBLE}, |
| | | #{rtuDt,jdbcType=TIMESTAMP}) |
| | | #{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{rtuDt,jdbcType=TIMESTAMP}, |
| | | #{orderNo,jdbcType=VARCHAR}, #{icCardAddr,jdbcType=VARCHAR}, #{icCardNo,jdbcType=VARCHAR}, |
| | | #{waterLevel,jdbcType=FLOAT}, #{waterPress,jdbcType=FLOAT}, #{waterInstant,jdbcType=FLOAT}, |
| | | #{waterTotal,jdbcType=FLOAT}, #{eleTotal,jdbcType=FLOAT}, #{moneyRemain,jdbcType=FLOAT}, |
| | | #{waterRemain,jdbcType=FLOAT}, #{thisEle,jdbcType=FLOAT}, #{thisWater,jdbcType=FLOAT}, |
| | | #{thisMoney,jdbcType=FLOAT}, #{thisDuration,jdbcType=INTEGER}, #{waterPrice,jdbcType=FLOAT}, |
| | | #{elePrice,jdbcType=FLOAT}, #{aVolt,jdbcType=FLOAT}, #{bVolt,jdbcType=FLOAT}, #{cVolt,jdbcType=FLOAT}, |
| | | #{aCurrent,jdbcType=FLOAT}, #{bCurrent,jdbcType=FLOAT}, #{cCurrent,jdbcType=FLOAT}, |
| | | #{batteryVolt,jdbcType=FLOAT}, #{waterMeterTransVolt,jdbcType=FLOAT}, #{waterMeterWorkVolt,jdbcType=FLOAT} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmWorkReportHistory"> |
| | | <!--@mbg.generated--> |
| | |
| | | <if test="dt != null"> |
| | | dt, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | rtu_dt, |
| | | </if> |
| | | <if test="orderNo != null"> |
| | | order_no, |
| | | </if> |
| | | <if test="icCardAddr != null"> |
| | | ic_card_addr, |
| | | </if> |
| | | <if test="icCardNo != null"> |
| | | ic_card_no, |
| | | </if> |
| | | <if test="totalAmount != null"> |
| | | total_amount, |
| | | <if test="waterLevel != null"> |
| | | water_level, |
| | | </if> |
| | | <if test="instantAmount != null"> |
| | | instant_amount, |
| | | <if test="waterPress != null"> |
| | | water_press, |
| | | </if> |
| | | <if test="remainMoney != null"> |
| | | remain_money, |
| | | <if test="waterInstant != null"> |
| | | water_instant, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | rtu_dt, |
| | | <if test="waterTotal != null"> |
| | | water_total, |
| | | </if> |
| | | <if test="eleTotal != null"> |
| | | ele_total, |
| | | </if> |
| | | <if test="moneyRemain != null"> |
| | | money_remain, |
| | | </if> |
| | | <if test="waterRemain != null"> |
| | | water_remain, |
| | | </if> |
| | | <if test="thisEle != null"> |
| | | this_ele, |
| | | </if> |
| | | <if test="thisWater != null"> |
| | | this_water, |
| | | </if> |
| | | <if test="thisMoney != null"> |
| | | this_money, |
| | | </if> |
| | | <if test="thisDuration != null"> |
| | | this_duration, |
| | | </if> |
| | | <if test="waterPrice != null"> |
| | | water_price, |
| | | </if> |
| | | <if test="elePrice != null"> |
| | | ele_price, |
| | | </if> |
| | | <if test="aVolt != null"> |
| | | a_volt, |
| | | </if> |
| | | <if test="bVolt != null"> |
| | | b_volt, |
| | | </if> |
| | | <if test="cVolt != null"> |
| | | c_volt, |
| | | </if> |
| | | <if test="aCurrent != null"> |
| | | a_current, |
| | | </if> |
| | | <if test="bCurrent != null"> |
| | | b_current, |
| | | </if> |
| | | <if test="cCurrent != null"> |
| | | c_current, |
| | | </if> |
| | | <if test="batteryVolt != null"> |
| | | battery_volt, |
| | | </if> |
| | | <if test="waterMeterTransVolt != null"> |
| | | water_meter_trans_volt, |
| | | </if> |
| | | <if test="waterMeterWorkVolt != null"> |
| | | water_meter_work_volt, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="dt != null"> |
| | | #{dt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | #{rtuDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="orderNo != null"> |
| | | #{orderNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="icCardAddr != null"> |
| | | #{icCardAddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="icCardNo != null"> |
| | | #{icCardNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="totalAmount != null"> |
| | | #{totalAmount,jdbcType=DOUBLE}, |
| | | <if test="waterLevel != null"> |
| | | #{waterLevel,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="instantAmount != null"> |
| | | #{instantAmount,jdbcType=DOUBLE}, |
| | | <if test="waterPress != null"> |
| | | #{waterPress,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="remainMoney != null"> |
| | | #{remainMoney,jdbcType=DOUBLE}, |
| | | <if test="waterInstant != null"> |
| | | #{waterInstant,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | #{rtuDt,jdbcType=TIMESTAMP}, |
| | | <if test="waterTotal != null"> |
| | | #{waterTotal,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="eleTotal != null"> |
| | | #{eleTotal,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="moneyRemain != null"> |
| | | #{moneyRemain,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterRemain != null"> |
| | | #{waterRemain,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisEle != null"> |
| | | #{thisEle,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisWater != null"> |
| | | #{thisWater,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisMoney != null"> |
| | | #{thisMoney,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisDuration != null"> |
| | | #{thisDuration,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="waterPrice != null"> |
| | | #{waterPrice,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="elePrice != null"> |
| | | #{elePrice,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="aVolt != null"> |
| | | #{aVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="bVolt != null"> |
| | | #{bVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="cVolt != null"> |
| | | #{cVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="aCurrent != null"> |
| | | #{aCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="bCurrent != null"> |
| | | #{bCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="cCurrent != null"> |
| | | #{cCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="batteryVolt != null"> |
| | | #{batteryVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterMeterTransVolt != null"> |
| | | #{waterMeterTransVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterMeterWorkVolt != null"> |
| | | #{waterMeterWorkVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="dt != null"> |
| | | dt = #{dt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | rtu_dt = #{rtuDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="orderNo != null"> |
| | | order_no = #{orderNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="icCardAddr != null"> |
| | | ic_card_addr = #{icCardAddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="icCardNo != null"> |
| | | ic_card_no = #{icCardNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="totalAmount != null"> |
| | | total_amount = #{totalAmount,jdbcType=DOUBLE}, |
| | | <if test="waterLevel != null"> |
| | | water_level = #{waterLevel,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="instantAmount != null"> |
| | | instant_amount = #{instantAmount,jdbcType=DOUBLE}, |
| | | <if test="waterPress != null"> |
| | | water_press = #{waterPress,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="remainMoney != null"> |
| | | remain_money = #{remainMoney,jdbcType=DOUBLE}, |
| | | <if test="waterInstant != null"> |
| | | water_instant = #{waterInstant,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | rtu_dt = #{rtuDt,jdbcType=TIMESTAMP}, |
| | | <if test="waterTotal != null"> |
| | | water_total = #{waterTotal,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="eleTotal != null"> |
| | | ele_total = #{eleTotal,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="moneyRemain != null"> |
| | | money_remain = #{moneyRemain,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterRemain != null"> |
| | | water_remain = #{waterRemain,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisEle != null"> |
| | | this_ele = #{thisEle,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisWater != null"> |
| | | this_water = #{thisWater,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisMoney != null"> |
| | | this_money = #{thisMoney,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisDuration != null"> |
| | | this_duration = #{thisDuration,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="waterPrice != null"> |
| | | water_price = #{waterPrice,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="elePrice != null"> |
| | | ele_price = #{elePrice,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="aVolt != null"> |
| | | a_volt = #{aVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="bVolt != null"> |
| | | b_volt = #{bVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="cVolt != null"> |
| | | c_volt = #{cVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="aCurrent != null"> |
| | | a_current = #{aCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="bCurrent != null"> |
| | | b_current = #{bCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="cCurrent != null"> |
| | | c_current = #{cCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="batteryVolt != null"> |
| | | battery_volt = #{batteryVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterMeterTransVolt != null"> |
| | | water_meter_trans_volt = #{waterMeterTransVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterMeterWorkVolt != null"> |
| | | water_meter_work_volt = #{waterMeterWorkVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | |
| | | intake_id = #{intakeId,jdbcType=BIGINT}, |
| | | rtu_addr = #{rtuAddr,jdbcType=VARCHAR}, |
| | | dt = #{dt,jdbcType=TIMESTAMP}, |
| | | rtu_dt = #{rtuDt,jdbcType=TIMESTAMP}, |
| | | order_no = #{orderNo,jdbcType=VARCHAR}, |
| | | ic_card_addr = #{icCardAddr,jdbcType=VARCHAR}, |
| | | ic_card_no = #{icCardNo,jdbcType=VARCHAR}, |
| | | total_amount = #{totalAmount,jdbcType=DOUBLE}, |
| | | instant_amount = #{instantAmount,jdbcType=DOUBLE}, |
| | | remain_money = #{remainMoney,jdbcType=DOUBLE}, |
| | | rtu_dt = #{rtuDt,jdbcType=TIMESTAMP} |
| | | water_level = #{waterLevel,jdbcType=FLOAT}, |
| | | water_press = #{waterPress,jdbcType=FLOAT}, |
| | | water_instant = #{waterInstant,jdbcType=FLOAT}, |
| | | water_total = #{waterTotal,jdbcType=FLOAT}, |
| | | ele_total = #{eleTotal,jdbcType=FLOAT}, |
| | | money_remain = #{moneyRemain,jdbcType=FLOAT}, |
| | | water_remain = #{waterRemain,jdbcType=FLOAT}, |
| | | this_ele = #{thisEle,jdbcType=FLOAT}, |
| | | this_water = #{thisWater,jdbcType=FLOAT}, |
| | | this_money = #{thisMoney,jdbcType=FLOAT}, |
| | | this_duration = #{thisDuration,jdbcType=INTEGER}, |
| | | water_price = #{waterPrice,jdbcType=FLOAT}, |
| | | ele_price = #{elePrice,jdbcType=FLOAT}, |
| | | a_volt = #{aVolt,jdbcType=FLOAT}, |
| | | b_volt = #{bVolt,jdbcType=FLOAT}, |
| | | c_volt = #{cVolt,jdbcType=FLOAT}, |
| | | a_current = #{aCurrent,jdbcType=FLOAT}, |
| | | b_current = #{bCurrent,jdbcType=FLOAT}, |
| | | c_current = #{cCurrent,jdbcType=FLOAT}, |
| | | battery_volt = #{batteryVolt,jdbcType=FLOAT}, |
| | | water_meter_trans_volt = #{waterMeterTransVolt,jdbcType=FLOAT}, |
| | | water_meter_work_volt = #{waterMeterWorkVolt,jdbcType=FLOAT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | <result column="intake_id" jdbcType="BIGINT" property="intakeId" /> |
| | | <result column="rtu_addr" jdbcType="VARCHAR" property="rtuAddr" /> |
| | | <result column="dt" jdbcType="TIMESTAMP" property="dt" /> |
| | | <result column="ic_card_no" jdbcType="VARCHAR" property="icCardNo" /> |
| | | <result column="total_amount" jdbcType="DOUBLE" property="totalAmount" /> |
| | | <result column="instant_amount" jdbcType="DOUBLE" property="instantAmount" /> |
| | | <result column="remain_money" jdbcType="DOUBLE" property="remainMoney" /> |
| | | <result column="rtu_dt" jdbcType="TIMESTAMP" property="rtuDt" /> |
| | | <result column="order_no" jdbcType="VARCHAR" property="orderNo" /> |
| | | <result column="ic_card_addr" jdbcType="VARCHAR" property="icCardAddr" /> |
| | | <result column="ic_card_no" jdbcType="VARCHAR" property="icCardNo" /> |
| | | <result column="water_level" jdbcType="FLOAT" property="waterLevel" /> |
| | | <result column="water_press" jdbcType="FLOAT" property="waterPress" /> |
| | | <result column="water_instant" jdbcType="FLOAT" property="waterInstant" /> |
| | | <result column="water_total" jdbcType="FLOAT" property="waterTotal" /> |
| | | <result column="ele_total" jdbcType="FLOAT" property="eleTotal" /> |
| | | <result column="money_remain" jdbcType="FLOAT" property="moneyRemain" /> |
| | | <result column="water_remain" jdbcType="FLOAT" property="waterRemain" /> |
| | | <result column="this_ele" jdbcType="FLOAT" property="thisEle" /> |
| | | <result column="this_water" jdbcType="FLOAT" property="thisWater" /> |
| | | <result column="this_money" jdbcType="FLOAT" property="thisMoney" /> |
| | | <result column="this_duration" jdbcType="INTEGER" property="thisDuration" /> |
| | | <result column="water_price" jdbcType="FLOAT" property="waterPrice" /> |
| | | <result column="ele_price" jdbcType="FLOAT" property="elePrice" /> |
| | | <result column="a_volt" jdbcType="FLOAT" property="aVolt" /> |
| | | <result column="b_volt" jdbcType="FLOAT" property="bVolt" /> |
| | | <result column="c_volt" jdbcType="FLOAT" property="cVolt" /> |
| | | <result column="a_current" jdbcType="FLOAT" property="aCurrent" /> |
| | | <result column="b_current" jdbcType="FLOAT" property="bCurrent" /> |
| | | <result column="c_current" jdbcType="FLOAT" property="cCurrent" /> |
| | | <result column="battery_volt" jdbcType="FLOAT" property="batteryVolt" /> |
| | | <result column="water_meter_trans_volt" jdbcType="FLOAT" property="waterMeterTransVolt" /> |
| | | <result column="water_meter_work_volt" jdbcType="FLOAT" property="waterMeterWorkVolt" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, controller_id, intake_id, rtu_addr, dt, ic_card_no, total_amount, instant_amount, |
| | | remain_money, rtu_dt |
| | | id, controller_id, intake_id, rtu_addr, dt, rtu_dt, order_no, ic_card_addr, ic_card_no, |
| | | water_level, water_press, water_instant, water_total, ele_total, money_remain, water_remain, |
| | | this_ele, this_water, this_money, this_duration, water_price, ele_price, a_volt, |
| | | b_volt, c_volt, a_current, b_current, c_current, battery_volt, water_meter_trans_volt, |
| | | water_meter_work_volt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | <include refid="Base_Column_List" /> |
| | | from rm_work_report_last |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectByRtuAddr" parameterType="java.lang.String" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rm_work_report_last |
| | | where rtu_addr = #{rtuAddr,jdbcType=VARCHAR} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmWorkReportLast"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_work_report_last (id, controller_id, intake_id, |
| | | rtu_addr, dt, ic_card_no, |
| | | total_amount, instant_amount, remain_money, |
| | | rtu_dt) |
| | | rtu_addr, dt, rtu_dt, |
| | | order_no, ic_card_addr, ic_card_no, |
| | | water_level, water_press, water_instant, |
| | | water_total, ele_total, money_remain, |
| | | water_remain, this_ele, this_water, |
| | | this_money, this_duration, water_price, |
| | | ele_price, a_volt, b_volt, c_volt, |
| | | a_current, b_current, c_current, |
| | | battery_volt, water_meter_trans_volt, water_meter_work_volt |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, |
| | | #{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{icCardNo,jdbcType=VARCHAR}, |
| | | #{totalAmount,jdbcType=DOUBLE}, #{instantAmount,jdbcType=DOUBLE}, #{remainMoney,jdbcType=DOUBLE}, |
| | | #{rtuDt,jdbcType=TIMESTAMP}) |
| | | #{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{rtuDt,jdbcType=TIMESTAMP}, |
| | | #{orderNo,jdbcType=VARCHAR}, #{icCardAddr,jdbcType=VARCHAR}, #{icCardNo,jdbcType=VARCHAR}, |
| | | #{waterLevel,jdbcType=FLOAT}, #{waterPress,jdbcType=FLOAT}, #{waterInstant,jdbcType=FLOAT}, |
| | | #{waterTotal,jdbcType=FLOAT}, #{eleTotal,jdbcType=FLOAT}, #{moneyRemain,jdbcType=FLOAT}, |
| | | #{waterRemain,jdbcType=FLOAT}, #{thisEle,jdbcType=FLOAT}, #{thisWater,jdbcType=FLOAT}, |
| | | #{thisMoney,jdbcType=FLOAT}, #{thisDuration,jdbcType=INTEGER}, #{waterPrice,jdbcType=FLOAT}, |
| | | #{elePrice,jdbcType=FLOAT}, #{aVolt,jdbcType=FLOAT}, #{bVolt,jdbcType=FLOAT}, #{cVolt,jdbcType=FLOAT}, |
| | | #{aCurrent,jdbcType=FLOAT}, #{bCurrent,jdbcType=FLOAT}, #{cCurrent,jdbcType=FLOAT}, |
| | | #{batteryVolt,jdbcType=FLOAT}, #{waterMeterTransVolt,jdbcType=FLOAT}, #{waterMeterWorkVolt,jdbcType=FLOAT} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmWorkReportLast"> |
| | | <!--@mbg.generated--> |
| | |
| | | <if test="dt != null"> |
| | | dt, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | rtu_dt, |
| | | </if> |
| | | <if test="orderNo != null"> |
| | | order_no, |
| | | </if> |
| | | <if test="icCardAddr != null"> |
| | | ic_card_addr, |
| | | </if> |
| | | <if test="icCardNo != null"> |
| | | ic_card_no, |
| | | </if> |
| | | <if test="totalAmount != null"> |
| | | total_amount, |
| | | <if test="waterLevel != null"> |
| | | water_level, |
| | | </if> |
| | | <if test="instantAmount != null"> |
| | | instant_amount, |
| | | <if test="waterPress != null"> |
| | | water_press, |
| | | </if> |
| | | <if test="remainMoney != null"> |
| | | remain_money, |
| | | <if test="waterInstant != null"> |
| | | water_instant, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | rtu_dt, |
| | | <if test="waterTotal != null"> |
| | | water_total, |
| | | </if> |
| | | <if test="eleTotal != null"> |
| | | ele_total, |
| | | </if> |
| | | <if test="moneyRemain != null"> |
| | | money_remain, |
| | | </if> |
| | | <if test="waterRemain != null"> |
| | | water_remain, |
| | | </if> |
| | | <if test="thisEle != null"> |
| | | this_ele, |
| | | </if> |
| | | <if test="thisWater != null"> |
| | | this_water, |
| | | </if> |
| | | <if test="thisMoney != null"> |
| | | this_money, |
| | | </if> |
| | | <if test="thisDuration != null"> |
| | | this_duration, |
| | | </if> |
| | | <if test="waterPrice != null"> |
| | | water_price, |
| | | </if> |
| | | <if test="elePrice != null"> |
| | | ele_price, |
| | | </if> |
| | | <if test="aVolt != null"> |
| | | a_volt, |
| | | </if> |
| | | <if test="bVolt != null"> |
| | | b_volt, |
| | | </if> |
| | | <if test="cVolt != null"> |
| | | c_volt, |
| | | </if> |
| | | <if test="aCurrent != null"> |
| | | a_current, |
| | | </if> |
| | | <if test="bCurrent != null"> |
| | | b_current, |
| | | </if> |
| | | <if test="cCurrent != null"> |
| | | c_current, |
| | | </if> |
| | | <if test="batteryVolt != null"> |
| | | battery_volt, |
| | | </if> |
| | | <if test="waterMeterTransVolt != null"> |
| | | water_meter_trans_volt, |
| | | </if> |
| | | <if test="waterMeterWorkVolt != null"> |
| | | water_meter_work_volt, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="dt != null"> |
| | | #{dt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | #{rtuDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="orderNo != null"> |
| | | #{orderNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="icCardAddr != null"> |
| | | #{icCardAddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="icCardNo != null"> |
| | | #{icCardNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="totalAmount != null"> |
| | | #{totalAmount,jdbcType=DOUBLE}, |
| | | <if test="waterLevel != null"> |
| | | #{waterLevel,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="instantAmount != null"> |
| | | #{instantAmount,jdbcType=DOUBLE}, |
| | | <if test="waterPress != null"> |
| | | #{waterPress,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="remainMoney != null"> |
| | | #{remainMoney,jdbcType=DOUBLE}, |
| | | <if test="waterInstant != null"> |
| | | #{waterInstant,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | #{rtuDt,jdbcType=TIMESTAMP}, |
| | | <if test="waterTotal != null"> |
| | | #{waterTotal,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="eleTotal != null"> |
| | | #{eleTotal,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="moneyRemain != null"> |
| | | #{moneyRemain,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterRemain != null"> |
| | | #{waterRemain,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisEle != null"> |
| | | #{thisEle,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisWater != null"> |
| | | #{thisWater,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisMoney != null"> |
| | | #{thisMoney,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisDuration != null"> |
| | | #{thisDuration,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="waterPrice != null"> |
| | | #{waterPrice,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="elePrice != null"> |
| | | #{elePrice,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="aVolt != null"> |
| | | #{aVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="bVolt != null"> |
| | | #{bVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="cVolt != null"> |
| | | #{cVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="aCurrent != null"> |
| | | #{aCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="bCurrent != null"> |
| | | #{bCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="cCurrent != null"> |
| | | #{cCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="batteryVolt != null"> |
| | | #{batteryVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterMeterTransVolt != null"> |
| | | #{waterMeterTransVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterMeterWorkVolt != null"> |
| | | #{waterMeterWorkVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="dt != null"> |
| | | dt = #{dt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | rtu_dt = #{rtuDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="orderNo != null"> |
| | | order_no = #{orderNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="icCardAddr != null"> |
| | | ic_card_addr = #{icCardAddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="icCardNo != null"> |
| | | ic_card_no = #{icCardNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="totalAmount != null"> |
| | | total_amount = #{totalAmount,jdbcType=DOUBLE}, |
| | | <if test="waterLevel != null"> |
| | | water_level = #{waterLevel,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="instantAmount != null"> |
| | | instant_amount = #{instantAmount,jdbcType=DOUBLE}, |
| | | <if test="waterPress != null"> |
| | | water_press = #{waterPress,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="remainMoney != null"> |
| | | remain_money = #{remainMoney,jdbcType=DOUBLE}, |
| | | <if test="waterInstant != null"> |
| | | water_instant = #{waterInstant,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="rtuDt != null"> |
| | | rtu_dt = #{rtuDt,jdbcType=TIMESTAMP}, |
| | | <if test="waterTotal != null"> |
| | | water_total = #{waterTotal,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="eleTotal != null"> |
| | | ele_total = #{eleTotal,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="moneyRemain != null"> |
| | | money_remain = #{moneyRemain,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterRemain != null"> |
| | | water_remain = #{waterRemain,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisEle != null"> |
| | | this_ele = #{thisEle,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisWater != null"> |
| | | this_water = #{thisWater,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisMoney != null"> |
| | | this_money = #{thisMoney,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="thisDuration != null"> |
| | | this_duration = #{thisDuration,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="waterPrice != null"> |
| | | water_price = #{waterPrice,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="elePrice != null"> |
| | | ele_price = #{elePrice,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="aVolt != null"> |
| | | a_volt = #{aVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="bVolt != null"> |
| | | b_volt = #{bVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="cVolt != null"> |
| | | c_volt = #{cVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="aCurrent != null"> |
| | | a_current = #{aCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="bCurrent != null"> |
| | | b_current = #{bCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="cCurrent != null"> |
| | | c_current = #{cCurrent,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="batteryVolt != null"> |
| | | battery_volt = #{batteryVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterMeterTransVolt != null"> |
| | | water_meter_trans_volt = #{waterMeterTransVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="waterMeterWorkVolt != null"> |
| | | water_meter_work_volt = #{waterMeterWorkVolt,jdbcType=FLOAT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | |
| | | intake_id = #{intakeId,jdbcType=BIGINT}, |
| | | rtu_addr = #{rtuAddr,jdbcType=VARCHAR}, |
| | | dt = #{dt,jdbcType=TIMESTAMP}, |
| | | rtu_dt = #{rtuDt,jdbcType=TIMESTAMP}, |
| | | order_no = #{orderNo,jdbcType=VARCHAR}, |
| | | ic_card_addr = #{icCardAddr,jdbcType=VARCHAR}, |
| | | ic_card_no = #{icCardNo,jdbcType=VARCHAR}, |
| | | total_amount = #{totalAmount,jdbcType=DOUBLE}, |
| | | instant_amount = #{instantAmount,jdbcType=DOUBLE}, |
| | | remain_money = #{remainMoney,jdbcType=DOUBLE}, |
| | | rtu_dt = #{rtuDt,jdbcType=TIMESTAMP} |
| | | water_level = #{waterLevel,jdbcType=FLOAT}, |
| | | water_press = #{waterPress,jdbcType=FLOAT}, |
| | | water_instant = #{waterInstant,jdbcType=FLOAT}, |
| | | water_total = #{waterTotal,jdbcType=FLOAT}, |
| | | ele_total = #{eleTotal,jdbcType=FLOAT}, |
| | | money_remain = #{moneyRemain,jdbcType=FLOAT}, |
| | | water_remain = #{waterRemain,jdbcType=FLOAT}, |
| | | this_ele = #{thisEle,jdbcType=FLOAT}, |
| | | this_water = #{thisWater,jdbcType=FLOAT}, |
| | | this_money = #{thisMoney,jdbcType=FLOAT}, |
| | | this_duration = #{thisDuration,jdbcType=INTEGER}, |
| | | water_price = #{waterPrice,jdbcType=FLOAT}, |
| | | ele_price = #{elePrice,jdbcType=FLOAT}, |
| | | a_volt = #{aVolt,jdbcType=FLOAT}, |
| | | b_volt = #{bVolt,jdbcType=FLOAT}, |
| | | c_volt = #{cVolt,jdbcType=FLOAT}, |
| | | a_current = #{aCurrent,jdbcType=FLOAT}, |
| | | b_current = #{bCurrent,jdbcType=FLOAT}, |
| | | c_current = #{cCurrent,jdbcType=FLOAT}, |
| | | battery_volt = #{batteryVolt,jdbcType=FLOAT}, |
| | | water_meter_trans_volt = #{waterMeterTransVolt,jdbcType=FLOAT}, |
| | | water_meter_work_volt = #{waterMeterWorkVolt,jdbcType=FLOAT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | Object subD = d.getSubData(); |
| | | if (subD != null) { |
| | | DataV1_0_1 dV1_0_1 = (DataV1_0_1) subD; |
| | | // if (dV1_0_1 != null && dV1_0_1.dataCdC0Vo != null) { |
| | | // Object[] objs = this.getTaskResults(TkPreGenObjs.taskId); |
| | | // DbSv sv = (DbSv) objs[0]; |
| | | // PrController controller = (PrController) objs[1]; |
| | | // try { |
| | | // this.doDeal(sv, controller, d.getRtuAddr(), dV1_0_1, dV1_0_1.dataCdC0Vo); |
| | | // } catch (Exception e) { |
| | | // log.error("保存控制器开阀上报时发生异常", e); |
| | | // } |
| | | // } |
| | | if (dV1_0_1 != null && dV1_0_1.subData != null) { |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId); |
| | | DbSv sv = (DbSv) objs[0]; |
| | | PrController controller = (PrController) objs[1]; |
| | | try { |
| | | this.doDeal(sv, controller, d.getRtuAddr(), dV1_0_1, (DataCdC0Vo)dV1_0_1.subData); |
| | | } catch (Exception e) { |
| | | log.error("保存遥测站自报实时数据中的漏损数据时发生异常", e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | * @param dataCd84Vo 工作报数据对象 |
| | | */ |
| | | private void doDeal(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCd84Vo dataCd84Vo) throws Exception { |
| | | this.saveLast(sv, controller, rtuAddr, dV1_0_1, dataCd84Vo); |
| | | this.saveOrUpdateLast(sv, controller, rtuAddr, dV1_0_1, dataCd84Vo); |
| | | this.saveHistory(sv, controller, rtuAddr, dV1_0_1, dataCd84Vo); |
| | | } |
| | | |
| | |
| | | * @param dV1_0_1 |
| | | * @param dataCd84Vo |
| | | */ |
| | | private void saveLast(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCd84Vo dataCd84Vo) throws Exception { |
| | | RmWorkReportLast po = sv.getRmWorkReportLast(rtuAddr) ; |
| | | if(po == null){ |
| | | po = new RmWorkReportLast(null, controller==null?null:controller.getId(), controller==null?null:controller.getIntakeId(), |
| | | rtuAddr, |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd84Vo.rtuDt), |
| | | dataCd84Vo.cardNo, |
| | | dataCd84Vo.totalAmount, |
| | | dataCd84Vo.instantAmount, |
| | | dataCd84Vo.remainMoney) ; |
| | | sv.saveRmWorkReportLast(po) ; |
| | | }else{ |
| | | po.controllerId = controller==null?null:controller.getId(); |
| | | po.intakeId = controller==null?null:controller.getIntakeId(); |
| | | |
| | | po.dt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt); |
| | | po.rtuDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd84Vo.rtuDt); |
| | | po.icCardNo = dataCd84Vo.cardNo; |
| | | po.totalAmount = dataCd84Vo.totalAmount; |
| | | po.instantAmount = dataCd84Vo.instantAmount; |
| | | po.remainMoney = dataCd84Vo.remainMoney; |
| | | sv.updateRmWorkReportLast(po); |
| | | } |
| | | private void saveOrUpdateLast(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCd84Vo dataCd84Vo) throws Exception { |
| | | // RmWorkReportLast po = sv.getRmWorkReportLast(rtuAddr) ; |
| | | // if(po == null){ |
| | | // po = new RmWorkReportLast(null, controller==null?null:controller.getId(), controller==null?null:controller.getIntakeId(), |
| | | // rtuAddr, |
| | | // DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | // DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd84Vo.rtuDt), |
| | | // dataCd84Vo.cardNo, |
| | | // dataCd84Vo.totalAmount, |
| | | // dataCd84Vo.instantAmount, |
| | | // dataCd84Vo.remainMoney) ; |
| | | // sv.saveRmWorkReportLast(po) ; |
| | | // }else{ |
| | | // po.controllerId = controller==null?null:controller.getId(); |
| | | // po.intakeId = controller==null?null:controller.getIntakeId(); |
| | | // |
| | | // po.dt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt); |
| | | // po.rtuDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd84Vo.rtuDt); |
| | | // po.icCardNo = dataCd84Vo.cardNo; |
| | | // po.totalAmount = dataCd84Vo.totalAmount; |
| | | // po.instantAmount = dataCd84Vo.instantAmount; |
| | | // po.remainMoney = dataCd84Vo.remainMoney; |
| | | // sv.updateRmWorkReportLast(po); |
| | | // } |
| | | } |
| | | /** |
| | | * 保存阀开工作报历史数据 |
| | |
| | | * @param dataCd84Vo |
| | | */ |
| | | private void saveHistory(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCd84Vo dataCd84Vo) throws Exception { |
| | | RmWorkReportHistory po = new RmWorkReportHistory(null, controller==null?null:controller.getId(), controller==null?null:controller.getIntakeId(), |
| | | rtuAddr, |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd84Vo.rtuDt), |
| | | dataCd84Vo.cardNo, |
| | | dataCd84Vo.totalAmount, |
| | | dataCd84Vo.instantAmount, |
| | | dataCd84Vo.remainMoney) ; |
| | | sv.saveRmWorkReportHistory(po) ; |
| | | // RmWorkReportHistory po = new RmWorkReportHistory(null, controller==null?null:controller.getId(), controller==null?null:controller.getIntakeId(), |
| | | // rtuAddr, |
| | | // DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | // DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd84Vo.rtuDt), |
| | | // dataCd84Vo.cardNo, |
| | | // dataCd84Vo.totalAmount, |
| | | // dataCd84Vo.instantAmount, |
| | | // dataCd84Vo.remainMoney) ; |
| | | // sv.saveRmWorkReportHistory(po) ; |
| | | } |
| | | |
| | | |
| | |
| | | Data d = (Data)data ; |
| | | if(d.getCommandId() == null || d.getCommandId().trim().equals("")){ |
| | | //无命令ID |
| | | this.toNextTasks(data); |
| | | Object dataP206V1_0_0 = d.getSubData() ; |
| | | if(dataP206V1_0_0 != null) { |
| | | this.toNextTasks(data); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public void execute(Object data) { |
| | | Data d = (Data)data ; |
| | | DataV202404 dV202404 = (DataV202404)d.getSubData() ;//前面任务已经判断不为null |
| | | DataV202404 dV202404 = (DataV202404)d.getSubData() ; |
| | | Object cdObj = dV202404.subData ; |
| | | if(cdObj != null){ |
| | | try{ |
| | | Object[] objs = this.getTaskResults(TkPreGenObjsV202404.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | if(cdObj instanceof DataCd81Vo){ |
| | | //设备终端随机自报 |
| | | DataCd81Vo cdData = (DataCd81Vo)(cdObj) ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | }else if(cdObj instanceof DataCd80_5BVo){ |
| | | //设备终端工作上报 + 查询设备终端实时值 |
| | | DataCd80_5BVo cdData = (DataCd80_5BVo)(cdObj) ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | }else if(cdObj instanceof DataCd93_A3Vo){ |
| | | //平台/APP远程关闭水泵/阀门 + 刷卡关泵/阀上报 |
| | | DataCd93_A3Vo cdData = (DataCd93_A3Vo)(cdObj) ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), cdData.endDt, cdData, dV202404.dt) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), cdData.endDt, cdData, dV202404.dt) ; |
| | | }else if(cdObj instanceof DataCd84Vo){ |
| | | //设备终端随机自报 |
| | | DataCd84Vo cdData = (DataCd84Vo)(cdObj) ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), cdData.opDt, cdData, dV202404.dt) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), cdData.opDt, cdData, dV202404.dt) ; |
| | | }else if(cdObj instanceof DataCdC2Vo){ |
| | | //设备终端随机自报 |
| | | DataCdC2Vo cdData = (DataCdC2Vo)(cdObj) ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("保存控制器报警和状态数据时发生异常", e); |
| | | //前面任务已经判断cdObj不为null |
| | | try{ |
| | | Object[] objs = this.getTaskResults(TkPreGenObjsV202404.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | if(cdObj instanceof DataCd81Vo){ |
| | | //设备终端随机自报 |
| | | DataCd81Vo cdData = (DataCd81Vo)(cdObj) ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | }else if(cdObj instanceof DataCd80_5BVo){ |
| | | //设备终端工作上报 + 查询设备终端实时值 |
| | | DataCd80_5BVo cdData = (DataCd80_5BVo)(cdObj) ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | }else if(cdObj instanceof DataCd93_A3Vo){ |
| | | //平台/APP远程关闭水泵/阀门 + 刷卡关泵/阀上报 |
| | | DataCd93_A3Vo cdData = (DataCd93_A3Vo)(cdObj) ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), cdData.endDt, cdData, dV202404.dt) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), cdData.endDt, cdData, dV202404.dt) ; |
| | | }else if(cdObj instanceof DataCd84Vo){ |
| | | //设备终端刷卡开泵/阀上报 |
| | | DataCd84Vo cdData = (DataCd84Vo)(cdObj) ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), cdData.opDt, cdData, dV202404.dt) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), cdData.opDt, cdData, dV202404.dt) ; |
| | | }else if(cdObj instanceof DataCdC2Vo){ |
| | | //设备终端开关水泵/阀门成功/失败上报 |
| | | DataCdC2Vo cdData = (DataCdC2Vo)(cdObj) ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), cdData.rtuDt, cdData, dV202404.dt) ; |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("保存控制器报警和状态数据时发生异常", e); |
| | | } |
| | | } |
| | | /** |
New file |
| | |
| | | package com.dy.rtuMw.server.rtuData.p206V202404; |
| | | |
| | | import com.dy.common.mw.protocol.Data; |
| | | import com.dy.common.mw.protocol.p206V202404.DataV202404; |
| | | import com.dy.common.mw.protocol.p206V202404.upVos.DataCd80_5BVo; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmWorkReportHistory; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmWorkReportLast; |
| | | import com.dy.rtuMw.server.rtuData.TaskSurpport; |
| | | import com.dy.rtuMw.server.rtuData.dbSv.DbSv; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | | * @Date: 2024/6/14 9:19 |
| | | * @Description 处理控制器工作报(功能码80) |
| | | */ |
| | | public class TkDealWorkingReportV202404 extends TaskSurpport { |
| | | |
| | | private static final Logger log = LogManager.getLogger(TkDealWorkingReportV202404.class.getName()); |
| | | |
| | | //类ID,一定与Tree.xml配置文件中配置一致 |
| | | public static final String taskId = "TkDealWorkingReportV202404"; |
| | | |
| | | /** |
| | | * 执行节点任务:报警及状态 |
| | | * |
| | | * @param data 需要处理的数据 |
| | | */ |
| | | @Override |
| | | public void execute(Object data) { |
| | | Data d = (Data)data ; |
| | | DataV202404 dV202404 = (DataV202404)d.getSubData() ; |
| | | Object cdObj = dV202404.subData ; |
| | | //前面任务已经判断cdObj不为null |
| | | try { |
| | | Object[] objs = this.getTaskResults(TkPreGenObjsV202404.taskId); |
| | | DbSv sv = (DbSv) objs[0]; |
| | | PrController controller = (PrController) objs[1]; |
| | | if (cdObj instanceof DataCd80_5BVo) { |
| | | //设备终端定点上报, 每天12点上报数据 |
| | | DataCd80_5BVo cdData = (DataCd80_5BVo) (cdObj); |
| | | this.doDeal(sv, controller, d.getRtuAddr(), dV202404, (DataCd80_5BVo)cdObj); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("保存控制器报警和状态数据时发生异常", e); |
| | | } |
| | | } |
| | | /** |
| | | * 处理阀开工作报数据 |
| | | * @param sv 服务 |
| | | * @param controller 控制器对象 |
| | | * @param rtuAddr 控制器地址 |
| | | * @param dataV202404 协议数据 |
| | | * @param cdData 功能数据 |
| | | */ |
| | | private void doDeal(DbSv sv, PrController controller, String rtuAddr, DataV202404 dataV202404, DataCd80_5BVo cdData) throws Exception { |
| | | this.saveOrUpdateLast(sv, controller, rtuAddr, dataV202404, cdData); |
| | | this.saveHistory(sv, controller, rtuAddr, dataV202404, cdData); |
| | | } |
| | | |
| | | /** |
| | | * 保存或更新控制器工作报最新数据 |
| | | * @param sv 服务bean |
| | | * @param controller 控制器对象 |
| | | * @param rtuAddr 控制器地址 |
| | | * @param dataV202404 协议数据 |
| | | * @param cdData 功能数据 |
| | | */ |
| | | private void saveOrUpdateLast(DbSv sv, PrController controller, String rtuAddr, DataV202404 dataV202404, DataCd80_5BVo cdData)throws Exception { |
| | | RmWorkReportLast po = sv.getRmWorkReportLast(rtuAddr) ; |
| | | if(po == null){ |
| | | po = new RmWorkReportLast(); |
| | | po.controllerId = controller==null?null:controller.getId(); |
| | | po.intakeId = controller==null?null:controller.getIntakeId(); |
| | | po.rtuAddr = rtuAddr; |
| | | po.valueFrom(dataV202404, cdData); |
| | | sv.saveRmWorkReportLast(po) ; |
| | | }else{ |
| | | po.controllerId = controller==null?null:controller.getId(); |
| | | po.intakeId = controller==null?null:controller.getIntakeId(); |
| | | po.valueFrom(dataV202404, cdData); |
| | | sv.updateRmWorkReportLast(po); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存控制器工作报历史数据 |
| | | * @param sv 服务bean |
| | | * @param controller 控制器对象 |
| | | * @param rtuAddr 控制器地址 |
| | | * @param dataV202404 协议数据 |
| | | * @param cdData 功能数据 |
| | | */ |
| | | private void saveHistory(DbSv sv, PrController controller, String rtuAddr, DataV202404 dataV202404, DataCd80_5BVo cdData)throws Exception { |
| | | RmWorkReportHistory po = new RmWorkReportHistory(); |
| | | po.controllerId = controller==null?null:controller.getId(); |
| | | po.intakeId = controller==null?null:controller.getIntakeId(); |
| | | po.rtuAddr = rtuAddr; |
| | | po.valueFrom(dataV202404, cdData); |
| | | sv.saveRmWorkReportHistory(po); ; |
| | | } |
| | | } |
| | |
| | | Data d = (Data)data ; |
| | | if(d.getCommandId() == null || d.getCommandId().trim().equals("")){ |
| | | //无命令ID |
| | | Object protocolData = d.getSubData() ; |
| | | if(protocolData != null) { |
| | | DataV202404 dataP206V202404 = (DataV202404)d.getSubData() ; |
| | | if(dataP206V202404 != null && dataP206V202404.subData != null) { |
| | | this.toNextTasks(data); |
| | | } |
| | | } |
| | |
| | | <task id="TkDealControllerNoTrampV202404" name="非流浪者RTU" enable="true" class="com.dy.rtuMw.server.rtuData.p206V202404.TkDealControllerNoTrampV202404"> |
| | | <!-- 识别非命令应答上行数据 --> |
| | | <task id="TkFindReportV202404" name="识别非命令应答上行数据" enable="true" class="com.dy.rtuMw.server.rtuData.p206V202404.TkFindReportV202404"> |
| | | <task id="TkDealAlarmStatusV202404" name="控制器报警与状态数据" enable="true" class="com.dy.rtuMw.server.rtuData.p206V202404.TkDealAlarmStatusV202404" /> |
| | | <task id="TkDealTimingReportV202404" name="控制器定时上报数据" enable="true" class="com.dy.rtuMw.server.rtuData.p206V202404.TkDealTimingReportV202404" /> |
| | | <task id="TkDealAlarmStatusV202404" name="控制器报警与状态" enable="true" class="com.dy.rtuMw.server.rtuData.p206V202404.TkDealAlarmStatusV202404" /> |
| | | <task id="TkDealWorkingReportV202404" name="控制器工作报(功能码80)" enable="true" class="com.dy.rtuMw.server.rtuData.p206V202404.TkDealWorkingReportV202404" /> |
| | | <task id="TkDealTimingReportV202404" name="控制器定时上报(功能码83)" enable="true" class="com.dy.rtuMw.server.rtuData.p206V202404.TkDealTimingReportV202404" /> |
| | | </task> |
| | | <!-- 识别命令响应数据 --> |
| | | <task id="TkFindComResponseV202404" name="识别响应命令数据" enable="true" class="com.dy.rtuMw.server.rtuData.p206V202404.TkFindComResponseV202404"> |