Administrator
2024-06-18 26d63d120e517624be6fcf70ae9620c3582a91dd
2024-06-18 朱宝民 优化开关阀逻辑
18个文件已修改
1524 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandHistoryMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveHistory.java 239 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveLast.java 393 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/application-database-ym.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml 337 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml 362 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealCloseValveReport.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealOpenValveReport.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java
@@ -40,6 +40,10 @@
        return buildResult(ResultCodeMsg.RsCode.ERROR_CODE,ResultCodeMsg.RsMsg.ERROR_MESSAGE, message);
    }
    public static BaseResponse buildErrorMsg(String msg) {
        return buildResult(ResultCodeMsg.RsCode.ERROR_CODE, msg, null);
    }
    public static BaseResponse buildError(Object obj){
        return buildResult(ResultCodeMsg.RsCode.ERROR_CODE,ResultCodeMsg.RsMsg.ERROR_MESSAGE, obj);
    }
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java
@@ -185,7 +185,7 @@
        try {
            CompletableFuture<Data> feature = (CompletableFuture<Data>) features.get(comId);
            System.out.println("receive result ID:" + comId);
            Data resultData = feature.get(30, TimeUnit.SECONDS);
            Data resultData = feature.get(180, TimeUnit.SECONDS);
            features.remove(comId);
            Long commandId = Long.parseLong(resultData.getCommandId());
            if(commandId.equals(comId)) {
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandHistoryMapper.java
@@ -43,5 +43,6 @@
     * @param intakeId
     * @return
     */
    VoUnclosedParam getUncloseParam(Long intakeId);
    //VoUnclosedParam getUncloseParam(Long intakeId);
    VoUnclosedParam getUncloseParam(@Param("onLineMap") String onLineMap, @Param("intakeId")Long intakeId);
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java
@@ -1,27 +1,61 @@
package com.dy.pipIrrGlobal.daoRm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory;
import org.apache.ibatis.annotations.Mapper;
/**
 * @author ZhuBaoMin
 * @date 2024-06-17 11:27
 * @LastEditTime 2024-06-17 11:27
 * @Author liurunyu
 * @Date 2024/2/23 15:42
 * @LastEditTime 2024/2/23 15:42
 * @Description
 */
@Mapper
public interface RmOpenCloseValveHistoryMapper extends BaseMapper<RmOpenCloseValveHistory> {
public interface RmOpenCloseValveHistoryMapper {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Long id);
    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(RmOpenCloseValveHistory record);
    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(RmOpenCloseValveHistory record);
    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    RmOpenCloseValveHistory selectByPrimaryKey(Long id);
    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(RmOpenCloseValveHistory record);
    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(RmOpenCloseValveHistory record);
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java
@@ -1,35 +1,64 @@
package com.dy.pipIrrGlobal.daoRm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast;
import org.apache.ibatis.annotations.Mapper;
/**
 * @author ZhuBaoMin
 * @date 2024-06-17 11:28
 * @LastEditTime 2024-06-17 11:28
 * @Description
 */
import java.util.List;
/**
 * @Author liurunyu
 * @Date 2024/2/23 16:00
 * @LastEditTime 2024/2/23 16:00
 * @Description
 */
@Mapper
public interface RmOpenCloseValveLastMapper extends BaseMapper<RmOpenCloseValveLast> {
public interface RmOpenCloseValveLastMapper {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Long id);
    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(RmOpenCloseValveLast record);
    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(RmOpenCloseValveLast record);
    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    RmOpenCloseValveLast selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(RmOpenCloseValveLast record);
    int updateByPrimaryKey(RmOpenCloseValveLast record);
    /**
     * select by rtuAddr
     *
     * @param rtuAddr rtuAddr
     * @return object by rtuAddr
     */
    //List<RmOpenCloseValveLast> selectByRtuAddr(String rtuAddr);
    List<RmOpenCloseValveLast> selectByRtuAddr(String rtuAddr);
    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(RmOpenCloseValveLast record);
    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(RmOpenCloseValveLast record);
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveHistory.java
@@ -5,10 +5,7 @@
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.DataCd84Vo;
import com.dy.common.mw.protocol.p206V202404.upVos.DataCd85Vo;
import com.dy.common.util.DateTime;
import com.dy.common.po.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@@ -16,201 +13,155 @@
import java.util.Date;
/**
 * @author ZhuBaoMin
 * @date 2024-06-17 11:27
 * @LastEditTime 2024-06-17 11:27
 * @Description
 * @Author liurunyu
 * @Date 2024/2/23 15:42
 * @LastEditTime 2024/2/23 15:42
 * @Description 控制器开关阀上报数据
 */
/**
 * 开关阀报历史数据表
 */
@TableName(value="rm_open_close_valve_history", autoResultMap = true)
@TableName(value="rm_open_close_valve_report", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "开关阀报历史数据表")
public class RmOpenCloseValveHistory {
    public static final long serialVersionUID = 202406171339001L;
@Schema(name = "控制器开关阀上报数据")
public class RmOpenCloseValveHistory implements BaseEntity {
    public static final long serialVersionUID = 202402231450001L;
    /**
     * 主键
     */
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    private Long id;
    public Long id;
    /**
     * 控制器实体ID(外键)
     */
    * 控制器实体ID(外键)
    */
    @Schema(description = "控制器实体外键", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    private Long controllerId;
    public Long controllerId;
    /**
     * 取水口实体ID(外键)
     */
    * 取水口实体ID(外键)
    */
    @Schema(description = "取水口实体外键", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    private Long intakeId;
    public Long intakeId;
    /**
     * 控制器地址
     */
    private String rtuAddr;
    * 控制器地址
    */
    @Schema(description = "控制器地址", requiredMode = Schema.RequiredMode.REQUIRED)
    public String rtuAddr;
    /**
     * 开阀数据接收日期时间
     */
    * 开阀数据接收日期时间
    */
    @Schema(description = "数据接收日期时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date opDt;
    public Date opDt;
    /**
     * 开阀控制器时钟
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date opRtuDt;
    * 开阀类型
    */
    @Schema(description = "开阀类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte opType;
    /**
     * IC卡地址(远程关闭时为0)
     */
    private String opIcCardAddr;
    * 开阀时累计流量
    */
    @Schema(description = "开阀时累计流量", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double opTotalAmount;
    /**
     * IC卡编号(17位数字)
     */
    private String opIcCardNo;
    * 开阀IC卡编号
    */
    @Schema(description = "开阀IC卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String opIcCardNo;
    /**
     * 开阀订单号(16位数字)
     */
    private String opOrderNo;
    * 开阀ic卡地址
    */
    @Schema(description = "开阀ic卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String opIcCardAddr;
    /**
     * 开泵/阀时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date openDt;
    * 开阀时剩余金额
    */
    @Schema(description = "开阀时剩余金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double opRemainMoney;
    /**
     * 开阀水表累计水量
     */
    private Double opWaterTotalAmount;
    * 开阀时控制器时钟
    */
    @Schema(description = "开阀时控制器时钟", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Date openDt;
    /**
     * 开阀电表累计电量
     */
    private Double opEleTotalAmount;
    * 关阀数据接收日期时间
    */
    @Schema(description = "关阀数据接收日期时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Date clDt;
    /**
     * 开阀用户剩余金额
     */
    private Double opMoneyRemainUser;
    * 关阀类型
    */
    @Schema(description = "关阀类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte clType;
    /**
     * 开阀用户剩余水量
     */
    private Double opWaterRemainUser;
    * 关阀时累计流量
    */
    @Schema(description = "关阀时累计流量", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double clTotalAmount;
    /**
     * 关泵/阀方式
     */
    private Byte opType;
    * 关阀时IC卡编号
    */
    @Schema(description = "关阀时IC卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String clIcCardNo;
    /**
     * 关阀IC卡地址(远程关闭时为0)
     */
    private String clIcCardAddr;
    * 关阀时IC卡地址
    */
    @Schema(description = "关阀时IC卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String clIcCardAddr;
    /**
     * 关阀IC卡编号(17位数字)
     */
    private String clIcCardNo;
    * 关阀时剩余金额
    */
    @Schema(description = "关阀时剩余金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double clRemainMoney;
    /**
     * 关阀订单号(16位数字)
     */
    private String clOrderNo;
    * 关阀报中本次用水量
    */
    @Schema(description = "关阀时本次用水量", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double clThisAmount;
    /**
     * 开始时间(分时日月)
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDt;
    * 关阀报中本次消费金额
    */
    @Schema(description = "关阀时本次消费金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double clThisMoney;
    /**
     * 结束时间(分时日月)
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDt;
    * 关阀报中本次用水时长(分钟)
    */
    @Schema(description = "关阀时本次用水时长(分钟)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Integer clThisTime;
    /**
     * 水表累计流量
     */
    private Double clWaterTotalAmount;
    * 关阀报中的开阀时控制器时钟
    */
    @Schema(description = "关阀报中的开阀时控制器时钟", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Date clOpenDt;
    /**
     * 电表累计电量
     */
    private Double clEleTotalAmount;
    * 关阀时控制器时钟
    */
    @Schema(description = "关阀时控制器时钟", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Date closeDt;
    /**
     * 用户剩余金额
     */
    private Double clMoneyRemainUser;
    /**
     * 用户剩余水量
     */
    private Double clWaterRemainUser;
    /**
     * 本次使用电量
     */
    private Double thisEle;
    /**
     * 本次使用水量
     */
    private Double thisWater;
    /**
     * 本次使用金额
     */
    private Double thisMoney;
    /**
     * 本次使用时间长
     */
    private Integer thisDuration;
    public void valueFrom84(DataV202404 dataV202404, DataCd84Vo cdData) throws Exception{
        this.opDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataV202404.dt);
        this.openDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.opDt);
        this.opIcCardAddr = cdData.icCardAddr;;
        this.opIcCardNo = cdData.icCardNo;
        this.opOrderNo = cdData.orderNo;
        this.opWaterTotalAmount = cdData.waterTotalAmount;
        this.opEleTotalAmount = cdData.eleTotalAmount;
        this.opMoneyRemainUser = cdData.moneyRemainUser;
        this.opWaterRemainUser = cdData.waterRemainUser;
    }
    public void valueFrom85(DataV202404 dataV202404, DataCd85Vo cdData) throws Exception{
        this.startDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.startDt);
        this.endDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.endDt);
        this.opType = cdData.opType;
        this.clIcCardAddr = cdData.icCardAddr;
        this.clIcCardNo = cdData.icCardNo;
        this.clOrderNo = cdData.orderNo;
        this.clWaterTotalAmount = cdData.waterTotalAmount;
        this.clEleTotalAmount = cdData.eleTotalAmount;
        this.clMoneyRemainUser = cdData.moneyRemain;;
        this.clWaterRemainUser = cdData.waterRemain;
        this.thisEle = cdData.thisEle;
        this.thisWater = cdData.thisWater;
        this.thisMoney = cdData.thisMoney;
        this.thisDuration = cdData.thisDuration;;
    }
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveLast.java
@@ -1,380 +1,175 @@
package com.dy.pipIrrGlobal.pojoRm;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.Date;
/**
 * @author ZhuBaoMin
 * @date 2024-06-17 11:28
 * @LastEditTime 2024-06-17 11:28
 * @Author liurunyu
 * @Date 2024/2/23 16:00
 * @LastEditTime 2024/2/23 16:00
 * @Description
 */
/**
 * 开关阀报最新数据表
 */
@TableName(value="rm_open_close_valve_last", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "控制器开关阀上报最新数据")
public class RmOpenCloseValveLast {
    public static final long serialVersionUID = 202402231602001L;
    /**
     * 主键
     */
    private Long id;
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    public Long id;
    /**
     * 由最新数据持有历史数据中的最新记录ID,以方便快速查询
     * json不序列化此属性,即不向前端页面发送及显示
     */
    @Schema(hidden=true)
    @JSONField(serialize = false)
    public Long lastHistoryId;
    /**
     * 控制器实体ID(外键)
     */
    private Long controllerId;
    @Schema(description = "控制器实体外键", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long controllerId;
    /**
     * 取水口实体ID(外键)
     */
    private Long intakeId;
    @Schema(description = "取水口实体外键", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long intakeId;
    /**
     * 控制器地址
     */
    private String rtuAddr;
    @Schema(description = "控制器地址", requiredMode = Schema.RequiredMode.REQUIRED)
    public String rtuAddr;
    /**
     * 开阀数据接收日期时间
     */
    private Date opDt;
    @Schema(description = "数据接收日期时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date opDt;
    /**
     * 开阀控制器时钟
     * 开阀类型
     */
    private Date opRtuDt;
    @Schema(description = "开阀类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte opType;
    /**
     * IC卡地址(远程关闭时为0)
     * 开阀时累计流量
     */
    private String opIcCardAddr;
    @Schema(description = "开阀时累计流量", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double opTotalAmount;
    /**
     * IC卡编号(17位数字)
     * 开阀IC卡编号
     */
    private String opIcCardNo;
    @Schema(description = "开阀IC卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String opIcCardNo;
    /**
     * 开阀订单号(16位数字)
     * 开阀ic卡地址
     */
    private String opOrderNo;
    @Schema(description = "开阀ic卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String opIcCardAddr;
    /**
     * 开泵/阀时间
     * 开阀时剩余金额
     */
    private Date openDt;
    @Schema(description = "开阀时剩余金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double opRemainMoney;
    /**
     * 开阀水表累计水量
     * 开阀时控制器时钟
     */
    private Double opWaterTotalAmount;
    @Schema(description = "开阀时控制器时钟", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Date openDt;
    /**
     * 开阀电表累计电量
     * 关阀数据接收日期时间
     */
    private Double opEleTotalAmount;
    @Schema(description = "关阀数据接收日期时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Date clDt;
    /**
     * 开阀用户剩余金额
     * 关阀类型
     */
    private Double opMoneyRemainUser;
    @Schema(description = "关阀类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte clType;
    /**
     * 开阀用户剩余水量
     * 关阀时累计流量
     */
    private Double opWaterRemainUser;
    @Schema(description = "关阀时累计流量", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double clTotalAmount;
    /**
     * 关泵/阀方式
     * 关阀时IC卡编号
     */
    private String opType;
    @Schema(description = "关阀时IC卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String clIcCardNo;
    /**
     * 关阀IC卡地址(远程关闭时为0)
     * 关阀时IC卡地址
     */
    private String clIcCardAddr;
    @Schema(description = "关阀时IC卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String clIcCardAddr;
    /**
     * 关阀IC卡编号(17位数字)
     * 关阀时剩余金额
     */
    private String clIcCardNo;
    @Schema(description = "关阀时剩余金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double clRemainMoney;
    /**
     * 关阀订单号(16位数字)
     * 关阀报中本次用水量
     */
    private String clOrderNo;
    @Schema(description = "关阀时本次用水量", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double clThisAmount;
    /**
     * 开始时间(分时日月)
     * 关阀报中本次消费金额
     */
    private Date startDt;
    @Schema(description = "关阀时本次消费金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double clThisMoney;
    /**
     * 结束时间(分时日月)
     * 关阀报中本次用水时长(分钟)
     */
    private Date endDt;
    @Schema(description = "关阀时本次用水时长(分钟)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Integer clThisTime;
    /**
     * 水表累计流量
     * 关阀报中的开阀时控制器时钟
     */
    private Double clWaterTotalAmount;
    @Schema(description = "关阀报中的开阀时控制器时钟", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Date clOpenDt;
    /**
     * 电表累计电量
     * 关阀时控制器时钟
     */
    private Double clEleTotalAmount;
    @Schema(description = "关阀时控制器时钟", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Date closeDt;
    /**
     * 用户剩余金额
     */
    private Double clMoneyRemainUser;
    /**
     * 用户剩余水量
     */
    private Double clWaterRemainUser;
    /**
     * 本次使用电量
     */
    private Double thisEle;
    /**
     * 本次使用水量
     */
    private Double thisWater;
    /**
     * 本次使用金额
     */
    private Double thisMoney;
    /**
     * 本次使用时间长
     */
    private Integer thisDuration;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getControllerId() {
        return controllerId;
    }
    public void setControllerId(Long controllerId) {
        this.controllerId = controllerId;
    }
    public Long getIntakeId() {
        return intakeId;
    }
    public void setIntakeId(Long intakeId) {
        this.intakeId = intakeId;
    }
    public String getRtuAddr() {
        return rtuAddr;
    }
    public void setRtuAddr(String rtuAddr) {
        this.rtuAddr = rtuAddr;
    }
    public Date getOpDt() {
        return opDt;
    }
    public void setOpDt(Date opDt) {
        this.opDt = opDt;
    }
    public Date getOpRtuDt() {
        return opRtuDt;
    }
    public void setOpRtuDt(Date opRtuDt) {
        this.opRtuDt = opRtuDt;
    }
    public String getOpIcCardAddr() {
        return opIcCardAddr;
    }
    public void setOpIcCardAddr(String opIcCardAddr) {
        this.opIcCardAddr = opIcCardAddr;
    }
    public String getOpIcCardNo() {
        return opIcCardNo;
    }
    public void setOpIcCardNo(String opIcCardNo) {
        this.opIcCardNo = opIcCardNo;
    }
    public String getOpOrderNo() {
        return opOrderNo;
    }
    public void setOpOrderNo(String opOrderNo) {
        this.opOrderNo = opOrderNo;
    }
    public Date getOpenDt() {
        return openDt;
    }
    public void setOpenDt(Date openDt) {
        this.openDt = openDt;
    }
    public Double getOpWaterTotalAmount() {
        return opWaterTotalAmount;
    }
    public void setOpWaterTotalAmount(Double opWaterTotalAmount) {
        this.opWaterTotalAmount = opWaterTotalAmount;
    }
    public Double getOpEleTotalAmount() {
        return opEleTotalAmount;
    }
    public void setOpEleTotalAmount(Double opEleTotalAmount) {
        this.opEleTotalAmount = opEleTotalAmount;
    }
    public Double getOpMoneyRemainUser() {
        return opMoneyRemainUser;
    }
    public void setOpMoneyRemainUser(Double opMoneyRemainUser) {
        this.opMoneyRemainUser = opMoneyRemainUser;
    }
    public Double getOpWaterRemainUser() {
        return opWaterRemainUser;
    }
    public void setOpWaterRemainUser(Double opWaterRemainUser) {
        this.opWaterRemainUser = opWaterRemainUser;
    }
    public String getOpType() {
        return opType;
    }
    public void setOpType(String opType) {
        this.opType = opType;
    }
    public String getClIcCardAddr() {
        return clIcCardAddr;
    }
    public void setClIcCardAddr(String clIcCardAddr) {
        this.clIcCardAddr = clIcCardAddr;
    }
    public String getClIcCardNo() {
        return clIcCardNo;
    }
    public void setClIcCardNo(String clIcCardNo) {
        this.clIcCardNo = clIcCardNo;
    }
    public String getClOrderNo() {
        return clOrderNo;
    }
    public void setClOrderNo(String clOrderNo) {
        this.clOrderNo = clOrderNo;
    }
    public Date getStartDt() {
        return startDt;
    }
    public void setStartDt(Date startDt) {
        this.startDt = startDt;
    }
    public Date getEndDt() {
        return endDt;
    }
    public void setEndDt(Date endDt) {
        this.endDt = endDt;
    }
    public Double getClWaterTotalAmount() {
        return clWaterTotalAmount;
    }
    public void setClWaterTotalAmount(Double clWaterTotalAmount) {
        this.clWaterTotalAmount = clWaterTotalAmount;
    }
    public Double getClEleTotalAmount() {
        return clEleTotalAmount;
    }
    public void setClEleTotalAmount(Double clEleTotalAmount) {
        this.clEleTotalAmount = clEleTotalAmount;
    }
    public Double getClMoneyRemainUser() {
        return clMoneyRemainUser;
    }
    public void setClMoneyRemainUser(Double clMoneyRemainUser) {
        this.clMoneyRemainUser = clMoneyRemainUser;
    }
    public Double getClWaterRemainUser() {
        return clWaterRemainUser;
    }
    public void setClWaterRemainUser(Double clWaterRemainUser) {
        this.clWaterRemainUser = clWaterRemainUser;
    }
    public Double getThisEle() {
        return thisEle;
    }
    public void setThisEle(Double thisEle) {
        this.thisEle = thisEle;
    }
    public Double getThisWater() {
        return thisWater;
    }
    public void setThisWater(Double thisWater) {
        this.thisWater = thisWater;
    }
    public Double getThisMoney() {
        return thisMoney;
    }
    public void setThisMoney(Double thisMoney) {
        this.thisMoney = thisMoney;
    }
    public Integer getThisDuration() {
        return thisDuration;
    }
    public void setThisDuration(Integer thisDuration) {
        this.thisDuration = thisDuration;
    }
}
pipIrr-platform/pipIrr-global/src/main/resources/application-database-ym.yml
@@ -5,8 +5,8 @@
            #name: ym
            type: com.alibaba.druid.pool.DruidDataSource
            driverClassName: com.mysql.cj.jdbc.Driver
            url: jdbc:mysql://192.168.40.166: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
            url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
            username: root
            password: dysql,;.abc!@#
            druid:
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
@@ -227,7 +227,8 @@
      INNER JOIN pr_controller con ON com.rtu_addr = con.rtuAddr
      INNER JOIN pr_intake inta ON con.intakeId = inta.id
      INNER JOIN JSON_TABLE(
      '[{"rtuAddr":"620201000029","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',
<!--      '[{"rtuAddr":"620201000029","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
        #{onLineMap},
      '$[*]' COLUMNS(
      rtuAddr VARCHAR(20) PATH '$.rtuAddr',
      isOnLine BOOLEAN PATH '$.isOnLine'
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
@@ -9,37 +9,30 @@
    <result column="intake_id" jdbcType="BIGINT" property="intakeId" />
    <result column="rtu_addr" jdbcType="VARCHAR" property="rtuAddr" />
    <result column="op_dt" jdbcType="TIMESTAMP" property="opDt" />
    <result column="op_rtu_dt" jdbcType="TIMESTAMP" property="opRtuDt" />
    <result column="op_ic_card_addr" jdbcType="VARCHAR" property="opIcCardAddr" />
    <result column="op_type" jdbcType="TINYINT" property="opType" />
    <result column="op_total_amount" jdbcType="DOUBLE" property="opTotalAmount" />
    <result column="op_ic_card_no" jdbcType="VARCHAR" property="opIcCardNo" />
    <result column="op_order_no" jdbcType="VARCHAR" property="opOrderNo" />
    <result column="op_ic_card_addr" jdbcType="VARCHAR" property="opIcCardAddr" />
    <result column="op_remain_money" jdbcType="DOUBLE" property="opRemainMoney" />
    <result column="open_dt" jdbcType="TIMESTAMP" property="openDt" />
    <result column="op_water_total_amount" jdbcType="FLOAT" property="opWaterTotalAmount" />
    <result column="op_ele_total_amount" jdbcType="FLOAT" property="opEleTotalAmount" />
    <result column="op_money_remain_user" jdbcType="FLOAT" property="opMoneyRemainUser" />
    <result column="op_water_remain_user" jdbcType="FLOAT" property="opWaterRemainUser" />
    <result column="op_type" jdbcType="VARCHAR" property="opType" />
    <result column="cl_ic_card_addr" jdbcType="VARCHAR" property="clIcCardAddr" />
    <result column="cl_dt" jdbcType="TIMESTAMP" property="clDt" />
    <result column="cl_type" jdbcType="TINYINT" property="clType" />
    <result column="cl_total_amount" jdbcType="DOUBLE" property="clTotalAmount" />
    <result column="cl_ic_card_no" jdbcType="VARCHAR" property="clIcCardNo" />
    <result column="cl_order_no" jdbcType="VARCHAR" property="clOrderNo" />
    <result column="start_dt" jdbcType="TIMESTAMP" property="startDt" />
    <result column="end_dt" jdbcType="TIMESTAMP" property="endDt" />
    <result column="cl_water_total_amount" jdbcType="FLOAT" property="clWaterTotalAmount" />
    <result column="cl_ele_total_amount" jdbcType="FLOAT" property="clEleTotalAmount" />
    <result column="cl_money_remain_user" jdbcType="FLOAT" property="clMoneyRemainUser" />
    <result column="cl_water_remain_user" jdbcType="FLOAT" property="clWaterRemainUser" />
    <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="cl_ic_card_addr" jdbcType="VARCHAR" property="clIcCardAddr" />
    <result column="cl_remain_money" jdbcType="DOUBLE" property="clRemainMoney" />
    <result column="cl_this_amount" jdbcType="DOUBLE" property="clThisAmount" />
    <result column="cl_this_money" jdbcType="DOUBLE" property="clThisMoney" />
    <result column="cl_this_time" jdbcType="INTEGER" property="clThisTime" />
    <result column="cl_open_dt" jdbcType="TIMESTAMP" property="clOpenDt" />
    <result column="close_dt" jdbcType="TIMESTAMP" property="closeDt" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, controller_id, intake_id, rtu_addr, op_dt, op_rtu_dt, op_ic_card_addr, op_ic_card_no,
    op_order_no, open_dt, op_water_total_amount, op_ele_total_amount, op_money_remain_user,
    op_water_remain_user, op_type, cl_ic_card_addr, cl_ic_card_no, cl_order_no, start_dt,
    end_dt, cl_water_total_amount, cl_ele_total_amount, cl_money_remain_user, cl_water_remain_user,
    this_ele, this_water, this_money, this_duration
    id, controller_id, intake_id, rtu_addr, op_dt, op_type, op_total_amount, op_ic_card_no,
    op_ic_card_addr, op_remain_money, open_dt, cl_dt, cl_type, cl_total_amount, cl_ic_card_no,
    cl_ic_card_addr, cl_remain_money, cl_this_amount, cl_this_money, cl_this_time, cl_open_dt,
    close_dt
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
@@ -56,25 +49,21 @@
  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory">
    <!--@mbg.generated-->
    insert into rm_open_close_valve_history (id, controller_id, intake_id, 
      rtu_addr, op_dt, op_rtu_dt,
      op_ic_card_addr, op_ic_card_no, op_order_no,
      open_dt, op_water_total_amount, op_ele_total_amount,
      op_money_remain_user, op_water_remain_user, op_type,
      cl_ic_card_addr, cl_ic_card_no, cl_order_no,
      start_dt, end_dt, cl_water_total_amount,
      cl_ele_total_amount, cl_money_remain_user, cl_water_remain_user,
      this_ele, this_water, this_money,
      this_duration)
      rtu_addr, op_dt, op_type,
      op_total_amount, op_ic_card_no, op_ic_card_addr,
      op_remain_money, open_dt, cl_dt,
      cl_type, cl_total_amount, cl_ic_card_no,
      cl_ic_card_addr, cl_remain_money, cl_this_amount,
      cl_this_money, cl_this_time, cl_open_dt,
      close_dt)
    values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, 
      #{rtuAddr,jdbcType=VARCHAR}, #{opDt,jdbcType=TIMESTAMP}, #{opRtuDt,jdbcType=TIMESTAMP},
      #{opIcCardAddr,jdbcType=VARCHAR}, #{opIcCardNo,jdbcType=VARCHAR}, #{opOrderNo,jdbcType=VARCHAR},
      #{openDt,jdbcType=TIMESTAMP}, #{opWaterTotalAmount,jdbcType=FLOAT}, #{opEleTotalAmount,jdbcType=FLOAT},
      #{opMoneyRemainUser,jdbcType=FLOAT}, #{opWaterRemainUser,jdbcType=FLOAT}, #{opType,jdbcType=VARCHAR},
      #{clIcCardAddr,jdbcType=VARCHAR}, #{clIcCardNo,jdbcType=VARCHAR}, #{clOrderNo,jdbcType=VARCHAR},
      #{startDt,jdbcType=TIMESTAMP}, #{endDt,jdbcType=TIMESTAMP}, #{clWaterTotalAmount,jdbcType=FLOAT},
      #{clEleTotalAmount,jdbcType=FLOAT}, #{clMoneyRemainUser,jdbcType=FLOAT}, #{clWaterRemainUser,jdbcType=FLOAT},
      #{thisEle,jdbcType=FLOAT}, #{thisWater,jdbcType=FLOAT}, #{thisMoney,jdbcType=FLOAT},
      #{thisDuration,jdbcType=INTEGER})
      #{rtuAddr,jdbcType=VARCHAR}, #{opDt,jdbcType=TIMESTAMP}, #{opType,jdbcType=TINYINT},
      #{opTotalAmount,jdbcType=DOUBLE}, #{opIcCardNo,jdbcType=VARCHAR}, #{opIcCardAddr,jdbcType=VARCHAR},
      #{opRemainMoney,jdbcType=DOUBLE}, #{openDt,jdbcType=TIMESTAMP}, #{clDt,jdbcType=TIMESTAMP},
      #{clType,jdbcType=TINYINT}, #{clTotalAmount,jdbcType=DOUBLE}, #{clIcCardNo,jdbcType=VARCHAR},
      #{clIcCardAddr,jdbcType=VARCHAR}, #{clRemainMoney,jdbcType=DOUBLE}, #{clThisAmount,jdbcType=DOUBLE},
      #{clThisMoney,jdbcType=DOUBLE}, #{clThisTime,jdbcType=INTEGER}, #{clOpenDt,jdbcType=TIMESTAMP},
      #{closeDt,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory">
    <!--@mbg.generated-->
@@ -95,74 +84,56 @@
      <if test="opDt != null">
        op_dt,
      </if>
      <if test="opRtuDt != null">
        op_rtu_dt,
      <if test="opType != null">
        op_type,
      </if>
      <if test="opIcCardAddr != null">
        op_ic_card_addr,
      <if test="opTotalAmount != null">
        op_total_amount,
      </if>
      <if test="opIcCardNo != null">
        op_ic_card_no,
      </if>
      <if test="opOrderNo != null">
        op_order_no,
      <if test="opIcCardAddr != null">
        op_ic_card_addr,
      </if>
      <if test="opRemainMoney != null">
        op_remain_money,
      </if>
      <if test="openDt != null">
        open_dt,
      </if>
      <if test="opWaterTotalAmount != null">
        op_water_total_amount,
      <if test="clDt != null">
        cl_dt,
      </if>
      <if test="opEleTotalAmount != null">
        op_ele_total_amount,
      <if test="clType != null">
        cl_type,
      </if>
      <if test="opMoneyRemainUser != null">
        op_money_remain_user,
      </if>
      <if test="opWaterRemainUser != null">
        op_water_remain_user,
      </if>
      <if test="opType != null">
        op_type,
      </if>
      <if test="clIcCardAddr != null">
        cl_ic_card_addr,
      <if test="clTotalAmount != null">
        cl_total_amount,
      </if>
      <if test="clIcCardNo != null">
        cl_ic_card_no,
      </if>
      <if test="clOrderNo != null">
        cl_order_no,
      <if test="clIcCardAddr != null">
        cl_ic_card_addr,
      </if>
      <if test="startDt != null">
        start_dt,
      <if test="clRemainMoney != null">
        cl_remain_money,
      </if>
      <if test="endDt != null">
        end_dt,
      <if test="clThisAmount != null">
        cl_this_amount,
      </if>
      <if test="clWaterTotalAmount != null">
        cl_water_total_amount,
      <if test="clThisMoney != null">
        cl_this_money,
      </if>
      <if test="clEleTotalAmount != null">
        cl_ele_total_amount,
      <if test="clThisTime != null">
        cl_this_time,
      </if>
      <if test="clMoneyRemainUser != null">
        cl_money_remain_user,
      <if test="clOpenDt != null">
        cl_open_dt,
      </if>
      <if test="clWaterRemainUser != null">
        cl_water_remain_user,
      </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 test="closeDt != null">
        close_dt,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -181,74 +152,56 @@
      <if test="opDt != null">
        #{opDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opRtuDt != null">
        #{opRtuDt,jdbcType=TIMESTAMP},
      <if test="opType != null">
        #{opType,jdbcType=TINYINT},
      </if>
      <if test="opIcCardAddr != null">
        #{opIcCardAddr,jdbcType=VARCHAR},
      <if test="opTotalAmount != null">
        #{opTotalAmount,jdbcType=DOUBLE},
      </if>
      <if test="opIcCardNo != null">
        #{opIcCardNo,jdbcType=VARCHAR},
      </if>
      <if test="opOrderNo != null">
        #{opOrderNo,jdbcType=VARCHAR},
      <if test="opIcCardAddr != null">
        #{opIcCardAddr,jdbcType=VARCHAR},
      </if>
      <if test="opRemainMoney != null">
        #{opRemainMoney,jdbcType=DOUBLE},
      </if>
      <if test="openDt != null">
        #{openDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opWaterTotalAmount != null">
        #{opWaterTotalAmount,jdbcType=FLOAT},
      <if test="clDt != null">
        #{clDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opEleTotalAmount != null">
        #{opEleTotalAmount,jdbcType=FLOAT},
      <if test="clType != null">
        #{clType,jdbcType=TINYINT},
      </if>
      <if test="opMoneyRemainUser != null">
        #{opMoneyRemainUser,jdbcType=FLOAT},
      </if>
      <if test="opWaterRemainUser != null">
        #{opWaterRemainUser,jdbcType=FLOAT},
      </if>
      <if test="opType != null">
        #{opType,jdbcType=VARCHAR},
      </if>
      <if test="clIcCardAddr != null">
        #{clIcCardAddr,jdbcType=VARCHAR},
      <if test="clTotalAmount != null">
        #{clTotalAmount,jdbcType=DOUBLE},
      </if>
      <if test="clIcCardNo != null">
        #{clIcCardNo,jdbcType=VARCHAR},
      </if>
      <if test="clOrderNo != null">
        #{clOrderNo,jdbcType=VARCHAR},
      <if test="clIcCardAddr != null">
        #{clIcCardAddr,jdbcType=VARCHAR},
      </if>
      <if test="startDt != null">
        #{startDt,jdbcType=TIMESTAMP},
      <if test="clRemainMoney != null">
        #{clRemainMoney,jdbcType=DOUBLE},
      </if>
      <if test="endDt != null">
        #{endDt,jdbcType=TIMESTAMP},
      <if test="clThisAmount != null">
        #{clThisAmount,jdbcType=DOUBLE},
      </if>
      <if test="clWaterTotalAmount != null">
        #{clWaterTotalAmount,jdbcType=FLOAT},
      <if test="clThisMoney != null">
        #{clThisMoney,jdbcType=DOUBLE},
      </if>
      <if test="clEleTotalAmount != null">
        #{clEleTotalAmount,jdbcType=FLOAT},
      <if test="clThisTime != null">
        #{clThisTime,jdbcType=INTEGER},
      </if>
      <if test="clMoneyRemainUser != null">
        #{clMoneyRemainUser,jdbcType=FLOAT},
      <if test="clOpenDt != null">
        #{clOpenDt,jdbcType=TIMESTAMP},
      </if>
      <if test="clWaterRemainUser != null">
        #{clWaterRemainUser,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 test="closeDt != null">
        #{closeDt,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
@@ -268,74 +221,56 @@
      <if test="opDt != null">
        op_dt = #{opDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opRtuDt != null">
        op_rtu_dt = #{opRtuDt,jdbcType=TIMESTAMP},
      <if test="opType != null">
        op_type = #{opType,jdbcType=TINYINT},
      </if>
      <if test="opIcCardAddr != null">
        op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
      <if test="opTotalAmount != null">
        op_total_amount = #{opTotalAmount,jdbcType=DOUBLE},
      </if>
      <if test="opIcCardNo != null">
        op_ic_card_no = #{opIcCardNo,jdbcType=VARCHAR},
      </if>
      <if test="opOrderNo != null">
        op_order_no = #{opOrderNo,jdbcType=VARCHAR},
      <if test="opIcCardAddr != null">
        op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
      </if>
      <if test="opRemainMoney != null">
        op_remain_money = #{opRemainMoney,jdbcType=DOUBLE},
      </if>
      <if test="openDt != null">
        open_dt = #{openDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opWaterTotalAmount != null">
        op_water_total_amount = #{opWaterTotalAmount,jdbcType=FLOAT},
      <if test="clDt != null">
        cl_dt = #{clDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opEleTotalAmount != null">
        op_ele_total_amount = #{opEleTotalAmount,jdbcType=FLOAT},
      <if test="clType != null">
        cl_type = #{clType,jdbcType=TINYINT},
      </if>
      <if test="opMoneyRemainUser != null">
        op_money_remain_user = #{opMoneyRemainUser,jdbcType=FLOAT},
      </if>
      <if test="opWaterRemainUser != null">
        op_water_remain_user = #{opWaterRemainUser,jdbcType=FLOAT},
      </if>
      <if test="opType != null">
        op_type = #{opType,jdbcType=VARCHAR},
      </if>
      <if test="clIcCardAddr != null">
        cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
      <if test="clTotalAmount != null">
        cl_total_amount = #{clTotalAmount,jdbcType=DOUBLE},
      </if>
      <if test="clIcCardNo != null">
        cl_ic_card_no = #{clIcCardNo,jdbcType=VARCHAR},
      </if>
      <if test="clOrderNo != null">
        cl_order_no = #{clOrderNo,jdbcType=VARCHAR},
      <if test="clIcCardAddr != null">
        cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
      </if>
      <if test="startDt != null">
        start_dt = #{startDt,jdbcType=TIMESTAMP},
      <if test="clRemainMoney != null">
        cl_remain_money = #{clRemainMoney,jdbcType=DOUBLE},
      </if>
      <if test="endDt != null">
        end_dt = #{endDt,jdbcType=TIMESTAMP},
      <if test="clThisAmount != null">
        cl_this_amount = #{clThisAmount,jdbcType=DOUBLE},
      </if>
      <if test="clWaterTotalAmount != null">
        cl_water_total_amount = #{clWaterTotalAmount,jdbcType=FLOAT},
      <if test="clThisMoney != null">
        cl_this_money = #{clThisMoney,jdbcType=DOUBLE},
      </if>
      <if test="clEleTotalAmount != null">
        cl_ele_total_amount = #{clEleTotalAmount,jdbcType=FLOAT},
      <if test="clThisTime != null">
        cl_this_time = #{clThisTime,jdbcType=INTEGER},
      </if>
      <if test="clMoneyRemainUser != null">
        cl_money_remain_user = #{clMoneyRemainUser,jdbcType=FLOAT},
      <if test="clOpenDt != null">
        cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP},
      </if>
      <if test="clWaterRemainUser != null">
        cl_water_remain_user = #{clWaterRemainUser,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 test="closeDt != null">
        close_dt = #{closeDt,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
@@ -347,29 +282,23 @@
      intake_id = #{intakeId,jdbcType=BIGINT},
      rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
      op_dt = #{opDt,jdbcType=TIMESTAMP},
      op_rtu_dt = #{opRtuDt,jdbcType=TIMESTAMP},
      op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
      op_type = #{opType,jdbcType=TINYINT},
      op_total_amount = #{opTotalAmount,jdbcType=DOUBLE},
      op_ic_card_no = #{opIcCardNo,jdbcType=VARCHAR},
      op_order_no = #{opOrderNo,jdbcType=VARCHAR},
      op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
      op_remain_money = #{opRemainMoney,jdbcType=DOUBLE},
      open_dt = #{openDt,jdbcType=TIMESTAMP},
      op_water_total_amount = #{opWaterTotalAmount,jdbcType=FLOAT},
      op_ele_total_amount = #{opEleTotalAmount,jdbcType=FLOAT},
      op_money_remain_user = #{opMoneyRemainUser,jdbcType=FLOAT},
      op_water_remain_user = #{opWaterRemainUser,jdbcType=FLOAT},
      op_type = #{opType,jdbcType=VARCHAR},
      cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
      cl_dt = #{clDt,jdbcType=TIMESTAMP},
      cl_type = #{clType,jdbcType=TINYINT},
      cl_total_amount = #{clTotalAmount,jdbcType=DOUBLE},
      cl_ic_card_no = #{clIcCardNo,jdbcType=VARCHAR},
      cl_order_no = #{clOrderNo,jdbcType=VARCHAR},
      start_dt = #{startDt,jdbcType=TIMESTAMP},
      end_dt = #{endDt,jdbcType=TIMESTAMP},
      cl_water_total_amount = #{clWaterTotalAmount,jdbcType=FLOAT},
      cl_ele_total_amount = #{clEleTotalAmount,jdbcType=FLOAT},
      cl_money_remain_user = #{clMoneyRemainUser,jdbcType=FLOAT},
      cl_water_remain_user = #{clWaterRemainUser,jdbcType=FLOAT},
      this_ele = #{thisEle,jdbcType=FLOAT},
      this_water = #{thisWater,jdbcType=FLOAT},
      this_money = #{thisMoney,jdbcType=FLOAT},
      this_duration = #{thisDuration,jdbcType=INTEGER}
      cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
      cl_remain_money = #{clRemainMoney,jdbcType=DOUBLE},
      cl_this_amount = #{clThisAmount,jdbcType=DOUBLE},
      cl_this_money = #{clThisMoney,jdbcType=DOUBLE},
      cl_this_time = #{clThisTime,jdbcType=INTEGER},
      cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP},
      close_dt = #{closeDt,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml
@@ -5,41 +5,35 @@
    <!--@mbg.generated-->
    <!--@Table rm_open_close_valve_last-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="last_history_id" jdbcType="BIGINT" property="lastHistoryId" />
    <result column="controller_id" jdbcType="BIGINT" property="controllerId" />
    <result column="intake_id" jdbcType="BIGINT" property="intakeId" />
    <result column="rtu_addr" jdbcType="VARCHAR" property="rtuAddr" />
    <result column="op_dt" jdbcType="TIMESTAMP" property="opDt" />
    <result column="op_rtu_dt" jdbcType="TIMESTAMP" property="opRtuDt" />
    <result column="op_ic_card_addr" jdbcType="VARCHAR" property="opIcCardAddr" />
    <result column="op_type" jdbcType="TINYINT" property="opType" />
    <result column="op_total_amount" jdbcType="DOUBLE" property="opTotalAmount" />
    <result column="op_ic_card_no" jdbcType="VARCHAR" property="opIcCardNo" />
    <result column="op_order_no" jdbcType="VARCHAR" property="opOrderNo" />
    <result column="op_ic_card_addr" jdbcType="VARCHAR" property="opIcCardAddr" />
    <result column="op_remain_money" jdbcType="DOUBLE" property="opRemainMoney" />
    <result column="open_dt" jdbcType="TIMESTAMP" property="openDt" />
    <result column="op_water_total_amount" jdbcType="FLOAT" property="opWaterTotalAmount" />
    <result column="op_ele_total_amount" jdbcType="FLOAT" property="opEleTotalAmount" />
    <result column="op_money_remain_user" jdbcType="FLOAT" property="opMoneyRemainUser" />
    <result column="op_water_remain_user" jdbcType="FLOAT" property="opWaterRemainUser" />
    <result column="op_type" jdbcType="VARCHAR" property="opType" />
    <result column="cl_ic_card_addr" jdbcType="VARCHAR" property="clIcCardAddr" />
    <result column="cl_dt" jdbcType="TIMESTAMP" property="clDt" />
    <result column="cl_type" jdbcType="TINYINT" property="clType" />
    <result column="cl_total_amount" jdbcType="DOUBLE" property="clTotalAmount" />
    <result column="cl_ic_card_no" jdbcType="VARCHAR" property="clIcCardNo" />
    <result column="cl_order_no" jdbcType="VARCHAR" property="clOrderNo" />
    <result column="start_dt" jdbcType="TIMESTAMP" property="startDt" />
    <result column="end_dt" jdbcType="TIMESTAMP" property="endDt" />
    <result column="cl_water_total_amount" jdbcType="FLOAT" property="clWaterTotalAmount" />
    <result column="cl_ele_total_amount" jdbcType="FLOAT" property="clEleTotalAmount" />
    <result column="cl_money_remain_user" jdbcType="FLOAT" property="clMoneyRemainUser" />
    <result column="cl_water_remain_user" jdbcType="FLOAT" property="clWaterRemainUser" />
    <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="cl_ic_card_addr" jdbcType="VARCHAR" property="clIcCardAddr" />
    <result column="cl_remain_money" jdbcType="DOUBLE" property="clRemainMoney" />
    <result column="cl_this_amount" jdbcType="DOUBLE" property="clThisAmount" />
    <result column="cl_this_money" jdbcType="DOUBLE" property="clThisMoney" />
    <result column="cl_this_time" jdbcType="INTEGER" property="clThisTime" />
    <result column="cl_open_dt" jdbcType="TIMESTAMP" property="clOpenDt" />
    <result column="close_dt" jdbcType="TIMESTAMP" property="closeDt" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, controller_id, intake_id, rtu_addr, op_dt, op_rtu_dt, op_ic_card_addr, op_ic_card_no,
    op_order_no, open_dt, op_water_total_amount, op_ele_total_amount, op_money_remain_user,
    op_water_remain_user, op_type, cl_ic_card_addr, cl_ic_card_no, cl_order_no, start_dt,
    end_dt, cl_water_total_amount, cl_ele_total_amount, cl_money_remain_user, cl_water_remain_user,
    this_ele, this_water, this_money, this_duration
    id, last_history_id, controller_id, intake_id, rtu_addr, op_dt, op_type, op_total_amount, op_ic_card_no,
    op_ic_card_addr, op_remain_money, open_dt, cl_dt, cl_type, cl_total_amount, cl_ic_card_no,
    cl_ic_card_addr, cl_remain_money, cl_this_amount, cl_this_money, cl_this_time, cl_open_dt,
    close_dt
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
@@ -48,6 +42,14 @@
    from rm_open_close_valve_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_open_close_valve_last
    where rtu_addr = #{rtuAddr,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--@mbg.generated-->
    delete from rm_open_close_valve_last
@@ -55,26 +57,22 @@
  </delete>
  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast">
    <!--@mbg.generated-->
    insert into rm_open_close_valve_last (id, controller_id, intake_id,
      rtu_addr, op_dt, op_rtu_dt,
      op_ic_card_addr, op_ic_card_no, op_order_no,
      open_dt, op_water_total_amount, op_ele_total_amount,
      op_money_remain_user, op_water_remain_user, op_type,
      cl_ic_card_addr, cl_ic_card_no, cl_order_no,
      start_dt, end_dt, cl_water_total_amount,
      cl_ele_total_amount, cl_money_remain_user, cl_water_remain_user,
      this_ele, this_water, this_money,
      this_duration)
    values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT},
      #{rtuAddr,jdbcType=VARCHAR}, #{opDt,jdbcType=TIMESTAMP}, #{opRtuDt,jdbcType=TIMESTAMP},
      #{opIcCardAddr,jdbcType=VARCHAR}, #{opIcCardNo,jdbcType=VARCHAR}, #{opOrderNo,jdbcType=VARCHAR},
      #{openDt,jdbcType=TIMESTAMP}, #{opWaterTotalAmount,jdbcType=FLOAT}, #{opEleTotalAmount,jdbcType=FLOAT},
      #{opMoneyRemainUser,jdbcType=FLOAT}, #{opWaterRemainUser,jdbcType=FLOAT}, #{opType,jdbcType=VARCHAR},
      #{clIcCardAddr,jdbcType=VARCHAR}, #{clIcCardNo,jdbcType=VARCHAR}, #{clOrderNo,jdbcType=VARCHAR},
      #{startDt,jdbcType=TIMESTAMP}, #{endDt,jdbcType=TIMESTAMP}, #{clWaterTotalAmount,jdbcType=FLOAT},
      #{clEleTotalAmount,jdbcType=FLOAT}, #{clMoneyRemainUser,jdbcType=FLOAT}, #{clWaterRemainUser,jdbcType=FLOAT},
      #{thisEle,jdbcType=FLOAT}, #{thisWater,jdbcType=FLOAT}, #{thisMoney,jdbcType=FLOAT},
      #{thisDuration,jdbcType=INTEGER})
    insert into rm_open_close_valve_last (id, last_history_id, controller_id, intake_id,
      rtu_addr, op_dt, op_type,
      op_total_amount, op_ic_card_no, op_ic_card_addr,
      op_remain_money, open_dt, cl_dt,
      cl_type, cl_total_amount, cl_ic_card_no,
      cl_ic_card_addr, cl_remain_money, cl_this_amount,
      cl_this_money, cl_this_time, cl_open_dt,
      close_dt)
    values (#{id,jdbcType=BIGINT}, #{lastHistoryId,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT},
      #{intakeId,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR}, #{opDt,jdbcType=TIMESTAMP},
      #{opType,jdbcType=TINYINT}, #{opTotalAmount,jdbcType=DOUBLE}, #{opIcCardNo,jdbcType=VARCHAR},
      #{opIcCardAddr,jdbcType=VARCHAR}, #{opRemainMoney,jdbcType=DOUBLE}, #{openDt,jdbcType=TIMESTAMP},
      #{clDt,jdbcType=TIMESTAMP}, #{clType,jdbcType=TINYINT}, #{clTotalAmount,jdbcType=DOUBLE},
      #{clIcCardNo,jdbcType=VARCHAR}, #{clIcCardAddr,jdbcType=VARCHAR}, #{clRemainMoney,jdbcType=DOUBLE},
      #{clThisAmount,jdbcType=DOUBLE}, #{clThisMoney,jdbcType=DOUBLE}, #{clThisTime,jdbcType=INTEGER},
      #{clOpenDt,jdbcType=TIMESTAMP}, #{closeDt,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast">
    <!--@mbg.generated-->
@@ -82,6 +80,9 @@
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="lastHistoryId != null">
        last_history_id,
      </if>
      <if test="controllerId != null">
        controller_id,
@@ -95,79 +96,64 @@
      <if test="opDt != null">
        op_dt,
      </if>
      <if test="opRtuDt != null">
        op_rtu_dt,
      <if test="opType != null">
        op_type,
      </if>
      <if test="opIcCardAddr != null">
        op_ic_card_addr,
      <if test="opTotalAmount != null">
        op_total_amount,
      </if>
      <if test="opIcCardNo != null">
        op_ic_card_no,
      </if>
      <if test="opOrderNo != null">
        op_order_no,
      <if test="opIcCardAddr != null">
        op_ic_card_addr,
      </if>
      <if test="opRemainMoney != null">
        op_remain_money,
      </if>
      <if test="openDt != null">
        open_dt,
      </if>
      <if test="opWaterTotalAmount != null">
        op_water_total_amount,
      <if test="clDt != null">
        cl_dt,
      </if>
      <if test="opEleTotalAmount != null">
        op_ele_total_amount,
      <if test="clType != null">
        cl_type,
      </if>
      <if test="opMoneyRemainUser != null">
        op_money_remain_user,
      </if>
      <if test="opWaterRemainUser != null">
        op_water_remain_user,
      </if>
      <if test="opType != null">
        op_type,
      </if>
      <if test="clIcCardAddr != null">
        cl_ic_card_addr,
      <if test="clTotalAmount != null">
        cl_total_amount,
      </if>
      <if test="clIcCardNo != null">
        cl_ic_card_no,
      </if>
      <if test="clOrderNo != null">
        cl_order_no,
      <if test="clIcCardAddr != null">
        cl_ic_card_addr,
      </if>
      <if test="startDt != null">
        start_dt,
      <if test="clRemainMoney != null">
        cl_remain_money,
      </if>
      <if test="endDt != null">
        end_dt,
      <if test="clThisAmount != null">
        cl_this_amount,
      </if>
      <if test="clWaterTotalAmount != null">
        cl_water_total_amount,
      <if test="clThisMoney != null">
        cl_this_money,
      </if>
      <if test="clEleTotalAmount != null">
        cl_ele_total_amount,
      <if test="clThisTime != null">
        cl_this_time,
      </if>
      <if test="clMoneyRemainUser != null">
        cl_money_remain_user,
      <if test="clOpenDt != null">
        cl_open_dt,
      </if>
      <if test="clWaterRemainUser != null">
        cl_water_remain_user,
      </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 test="closeDt != null">
        close_dt,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="lastHistoryId != null">
        #{lastHistoryId,jdbcType=BIGINT},
      </if>
      <if test="controllerId != null">
        #{controllerId,jdbcType=BIGINT},
@@ -181,74 +167,56 @@
      <if test="opDt != null">
        #{opDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opRtuDt != null">
        #{opRtuDt,jdbcType=TIMESTAMP},
      <if test="opType != null">
        #{opType,jdbcType=TINYINT},
      </if>
      <if test="opIcCardAddr != null">
        #{opIcCardAddr,jdbcType=VARCHAR},
      <if test="opTotalAmount != null">
        #{opTotalAmount,jdbcType=DOUBLE},
      </if>
      <if test="opIcCardNo != null">
        #{opIcCardNo,jdbcType=VARCHAR},
      </if>
      <if test="opOrderNo != null">
        #{opOrderNo,jdbcType=VARCHAR},
      <if test="opIcCardAddr != null">
        #{opIcCardAddr,jdbcType=VARCHAR},
      </if>
      <if test="opRemainMoney != null">
        #{opRemainMoney,jdbcType=DOUBLE},
      </if>
      <if test="openDt != null">
        #{openDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opWaterTotalAmount != null">
        #{opWaterTotalAmount,jdbcType=FLOAT},
      <if test="clDt != null">
        #{clDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opEleTotalAmount != null">
        #{opEleTotalAmount,jdbcType=FLOAT},
      <if test="clType != null">
        #{clType,jdbcType=TINYINT},
      </if>
      <if test="opMoneyRemainUser != null">
        #{opMoneyRemainUser,jdbcType=FLOAT},
      </if>
      <if test="opWaterRemainUser != null">
        #{opWaterRemainUser,jdbcType=FLOAT},
      </if>
      <if test="opType != null">
        #{opType,jdbcType=VARCHAR},
      </if>
      <if test="clIcCardAddr != null">
        #{clIcCardAddr,jdbcType=VARCHAR},
      <if test="clTotalAmount != null">
        #{clTotalAmount,jdbcType=DOUBLE},
      </if>
      <if test="clIcCardNo != null">
        #{clIcCardNo,jdbcType=VARCHAR},
      </if>
      <if test="clOrderNo != null">
        #{clOrderNo,jdbcType=VARCHAR},
      <if test="clIcCardAddr != null">
        #{clIcCardAddr,jdbcType=VARCHAR},
      </if>
      <if test="startDt != null">
        #{startDt,jdbcType=TIMESTAMP},
      <if test="clRemainMoney != null">
        #{clRemainMoney,jdbcType=DOUBLE},
      </if>
      <if test="endDt != null">
        #{endDt,jdbcType=TIMESTAMP},
      <if test="clThisAmount != null">
        #{clThisAmount,jdbcType=DOUBLE},
      </if>
      <if test="clWaterTotalAmount != null">
        #{clWaterTotalAmount,jdbcType=FLOAT},
      <if test="clThisMoney != null">
        #{clThisMoney,jdbcType=DOUBLE},
      </if>
      <if test="clEleTotalAmount != null">
        #{clEleTotalAmount,jdbcType=FLOAT},
      <if test="clThisTime != null">
        #{clThisTime,jdbcType=INTEGER},
      </if>
      <if test="clMoneyRemainUser != null">
        #{clMoneyRemainUser,jdbcType=FLOAT},
      <if test="clOpenDt != null">
        #{clOpenDt,jdbcType=TIMESTAMP},
      </if>
      <if test="clWaterRemainUser != null">
        #{clWaterRemainUser,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 test="closeDt != null">
        #{closeDt,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
@@ -256,6 +224,9 @@
    <!--@mbg.generated-->
    update rm_open_close_valve_last
    <set>
      <if test="lastHistoryId != null">
        last_history_id = #{lastHistoryId,jdbcType=BIGINT},
      </if>
      <if test="controllerId != null">
        controller_id = #{controllerId,jdbcType=BIGINT},
      </if>
@@ -268,74 +239,56 @@
      <if test="opDt != null">
        op_dt = #{opDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opRtuDt != null">
        op_rtu_dt = #{opRtuDt,jdbcType=TIMESTAMP},
      <if test="opType != null">
        op_type = #{opType,jdbcType=TINYINT},
      </if>
      <if test="opIcCardAddr != null">
        op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
      <if test="opTotalAmount != null">
        op_total_amount = #{opTotalAmount,jdbcType=DOUBLE},
      </if>
      <if test="opIcCardNo != null">
        op_ic_card_no = #{opIcCardNo,jdbcType=VARCHAR},
      </if>
      <if test="opOrderNo != null">
        op_order_no = #{opOrderNo,jdbcType=VARCHAR},
      <if test="opIcCardAddr != null">
        op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
      </if>
      <if test="opRemainMoney != null">
        op_remain_money = #{opRemainMoney,jdbcType=DOUBLE},
      </if>
      <if test="openDt != null">
        open_dt = #{openDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opWaterTotalAmount != null">
        op_water_total_amount = #{opWaterTotalAmount,jdbcType=FLOAT},
      <if test="clDt != null">
        cl_dt = #{clDt,jdbcType=TIMESTAMP},
      </if>
      <if test="opEleTotalAmount != null">
        op_ele_total_amount = #{opEleTotalAmount,jdbcType=FLOAT},
      <if test="clType != null">
        cl_type = #{clType,jdbcType=TINYINT},
      </if>
      <if test="opMoneyRemainUser != null">
        op_money_remain_user = #{opMoneyRemainUser,jdbcType=FLOAT},
      </if>
      <if test="opWaterRemainUser != null">
        op_water_remain_user = #{opWaterRemainUser,jdbcType=FLOAT},
      </if>
      <if test="opType != null">
        op_type = #{opType,jdbcType=VARCHAR},
      </if>
      <if test="clIcCardAddr != null">
        cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
      <if test="clTotalAmount != null">
        cl_total_amount = #{clTotalAmount,jdbcType=DOUBLE},
      </if>
      <if test="clIcCardNo != null">
        cl_ic_card_no = #{clIcCardNo,jdbcType=VARCHAR},
      </if>
      <if test="clOrderNo != null">
        cl_order_no = #{clOrderNo,jdbcType=VARCHAR},
      <if test="clIcCardAddr != null">
        cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
      </if>
      <if test="startDt != null">
        start_dt = #{startDt,jdbcType=TIMESTAMP},
      <if test="clRemainMoney != null">
        cl_remain_money = #{clRemainMoney,jdbcType=DOUBLE},
      </if>
      <if test="endDt != null">
        end_dt = #{endDt,jdbcType=TIMESTAMP},
      <if test="clThisAmount != null">
        cl_this_amount = #{clThisAmount,jdbcType=DOUBLE},
      </if>
      <if test="clWaterTotalAmount != null">
        cl_water_total_amount = #{clWaterTotalAmount,jdbcType=FLOAT},
      <if test="clThisMoney != null">
        cl_this_money = #{clThisMoney,jdbcType=DOUBLE},
      </if>
      <if test="clEleTotalAmount != null">
        cl_ele_total_amount = #{clEleTotalAmount,jdbcType=FLOAT},
      <if test="clThisTime != null">
        cl_this_time = #{clThisTime,jdbcType=INTEGER},
      </if>
      <if test="clMoneyRemainUser != null">
        cl_money_remain_user = #{clMoneyRemainUser,jdbcType=FLOAT},
      <if test="clOpenDt != null">
        cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP},
      </if>
      <if test="clWaterRemainUser != null">
        cl_water_remain_user = #{clWaterRemainUser,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 test="closeDt != null">
        close_dt = #{closeDt,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
@@ -343,33 +296,28 @@
  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast">
    <!--@mbg.generated-->
    update rm_open_close_valve_last
    set controller_id = #{controllerId,jdbcType=BIGINT},
    set last_history_id = #{lastHistoryId,jdbcType=BIGINT},
      controller_id = #{controllerId,jdbcType=BIGINT},
      intake_id = #{intakeId,jdbcType=BIGINT},
      rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
      op_dt = #{opDt,jdbcType=TIMESTAMP},
      op_rtu_dt = #{opRtuDt,jdbcType=TIMESTAMP},
      op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
      op_type = #{opType,jdbcType=TINYINT},
      op_total_amount = #{opTotalAmount,jdbcType=DOUBLE},
      op_ic_card_no = #{opIcCardNo,jdbcType=VARCHAR},
      op_order_no = #{opOrderNo,jdbcType=VARCHAR},
      op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
      op_remain_money = #{opRemainMoney,jdbcType=DOUBLE},
      open_dt = #{openDt,jdbcType=TIMESTAMP},
      op_water_total_amount = #{opWaterTotalAmount,jdbcType=FLOAT},
      op_ele_total_amount = #{opEleTotalAmount,jdbcType=FLOAT},
      op_money_remain_user = #{opMoneyRemainUser,jdbcType=FLOAT},
      op_water_remain_user = #{opWaterRemainUser,jdbcType=FLOAT},
      op_type = #{opType,jdbcType=VARCHAR},
      cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
      cl_dt = #{clDt,jdbcType=TIMESTAMP},
      cl_type = #{clType,jdbcType=TINYINT},
      cl_total_amount = #{clTotalAmount,jdbcType=DOUBLE},
      cl_ic_card_no = #{clIcCardNo,jdbcType=VARCHAR},
      cl_order_no = #{clOrderNo,jdbcType=VARCHAR},
      start_dt = #{startDt,jdbcType=TIMESTAMP},
      end_dt = #{endDt,jdbcType=TIMESTAMP},
      cl_water_total_amount = #{clWaterTotalAmount,jdbcType=FLOAT},
      cl_ele_total_amount = #{clEleTotalAmount,jdbcType=FLOAT},
      cl_money_remain_user = #{clMoneyRemainUser,jdbcType=FLOAT},
      cl_water_remain_user = #{clWaterRemainUser,jdbcType=FLOAT},
      this_ele = #{thisEle,jdbcType=FLOAT},
      this_water = #{thisWater,jdbcType=FLOAT},
      this_money = #{thisMoney,jdbcType=FLOAT},
      this_duration = #{thisDuration,jdbcType=INTEGER}
      cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
      cl_remain_money = #{clRemainMoney,jdbcType=DOUBLE},
      cl_this_amount = #{clThisAmount,jdbcType=DOUBLE},
      cl_this_money = #{clThisMoney,jdbcType=DOUBLE},
      cl_this_time = #{clThisTime,jdbcType=INTEGER},
      cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP},
      close_dt = #{closeDt,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealCloseValveReport.java
@@ -1,14 +1,14 @@
package com.dy.rtuMw.server.rtuData.p206V1_0_0;
import com.dy.rtuMw.server.rtuData.TaskSurpport;
import com.dy.rtuMw.server.rtuData.dbSv.DbSv;
import com.dy.common.mw.protocol.Data;
import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd83CloseVo;
import com.dy.common.mw.protocol.p206V1_0_0.DataV1_0_1;
import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd83CloseVo;
import com.dy.common.util.DateTime;
import com.dy.pipIrrGlobal.pojoPr.PrController;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast;
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;
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealOpenValveReport.java
@@ -1,14 +1,14 @@
package com.dy.rtuMw.server.rtuData.p206V1_0_0;
import com.dy.rtuMw.server.rtuData.TaskSurpport;
import com.dy.rtuMw.server.rtuData.dbSv.DbSv;
import com.dy.common.mw.protocol.Data;
import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd83OpenVo;
import com.dy.common.mw.protocol.p206V1_0_0.DataV1_0_1;
import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd83OpenVo;
import com.dy.common.util.DateTime;
import com.dy.pipIrrGlobal.pojoPr.PrController;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast;
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;
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml
@@ -3,8 +3,8 @@
    datasource: #配置数据源
        type: com.alibaba.druid.pool.DruidDataSource
        driver-class-name: 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
        url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
        username: root
        password: dysql,;.abc!@#
        druid:
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java
@@ -140,6 +140,32 @@
     * @return
     */
    public VoUnclosedParam getUncloseParam(Long intakeId) {
        return rmCommandHistoryMapper.getUncloseParam(intakeId);
        Command com = new Command() ;
        com.id = Command.defaultId;
        com.code = "LCD0001";
        com.type = "innerCommand";
        JSONObject response = (JSONObject) JSON.toJSON(sendCom2Mw(com));
        if(response != null && response.getString("code").equals("0001")) {
            JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment").getJSONObject("onLineMap");
            HashMap<String, Boolean> onLineMap = JSON.parseObject(attachment.toJSONString(), HashMap.class);
            JSONArray jsonArray = new JSONArray();
            for (Map.Entry<String, Boolean> entry : onLineMap.entrySet()) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("rtuAddr", entry.getKey());
                jsonObject.put("isOnLine", entry.getValue());
                jsonArray.add(jsonObject);
            }
            System.out.println(jsonArray);
            return rmCommandHistoryMapper.getUncloseParam(jsonArray.toJSONString(), intakeId);
        } else {
            QueryResultVo<List<VoOnLineIntake>> rsVo = new QueryResultVo<>();
            VoUnclosedParam voUnclosedParam = new VoUnclosedParam();
            return voUnclosedParam;
        }
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java
@@ -75,7 +75,7 @@
        // 取水口ID换阀控器地址及通讯协议
        JSONObject job_rtu = getRtu(intakeId, null);
        if(job_rtu == null) {
            return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
        }
        String rtuAddr = job_rtu.getString("rtuAddr");
        String protocol = job_rtu.getString("protocol");
@@ -184,7 +184,7 @@
        // 取水口ID换阀控器地址及通讯协议
        //PrController prController = commandSv.getControllerByIntakeId(intakeId);
        //if(prController == null) {
        //    return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
        //    return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
        //}
        //String rtuAddr = prController.getRtuAddr();
        //String protocol = prController.getProtocol();
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java
@@ -111,7 +111,7 @@
        // 取水口ID换阀控器地址及通讯协议
        JSONObject job_rtu = getRtu(intakeId, null);
        if(job_rtu == null) {
            return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
        }
        String rtuAddr = job_rtu.getString("rtuAddr");
        String protocol = job_rtu.getString("protocol");
@@ -343,7 +343,7 @@
        // 阀控器地址换取水口ID和通讯协议
        JSONObject job_rtu = getRtu(null, rtuAddr);
        if(job_rtu == null) {
            return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
        }
        Long intakeId = job_rtu.getLong("intakeId");
        String protocol = job_rtu.getString("protocol");
@@ -384,7 +384,7 @@
                    //rmCommandHistory.setResult((byte)0);
                    //commandSv.updateCommandResult(rmCommandHistory);
                    return BaseResponseUtils.buildFail(response_CallBack.getMsg());
                    //return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage());
                    //return BaseResponseUtils.buildErrorMsgMsg(WechatResultCode.GET_RESULT_ERROR.getMessage());
                }
                // 回调成功,再判断执行是否成功
@@ -527,7 +527,13 @@
        Long intakeId = dtoBase.getIntakeId();
        Long operator = dtoBase.getOperator();
        VoUnclosedParam voUnclosedParam = commandSv.getUncloseParam(intakeId);
        VoUnclosedParam voUnclosedParam = null;
        try {
            voUnclosedParam = commandSv.getUncloseParam(intakeId);
        }catch (Exception e) {
            return BaseResponseUtils.buildErrorMsg("获取未关阀信息错误");
        }
        if(voUnclosedParam == null) {
            return BaseResponseUtils.buildSuccess(RemoteResultCode.VALVE_CLOSED.getMessage());
        }
@@ -544,7 +550,7 @@
        // 阀控器地址换取水口ID和通讯协议
        JSONObject job_rtu = getRtu(null, rtuAddr);
        if(job_rtu == null) {
            return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
        }
        //Long intakeId = job_rtu.getLong("intakeId");
        String protocol = job_rtu.getString("protocol");
@@ -585,7 +591,7 @@
                    //rmCommandHistory.setResult((byte)0);
                    //commandSv.updateCommandResult(rmCommandHistory);
                    return BaseResponseUtils.buildFail(response_CallBack.getMsg());
                    //return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage());
                    //return BaseResponseUtils.buildErrorMsgMsg(WechatResultCode.GET_RESULT_ERROR.getMessage());
                }
                // 回调成功,再判断执行是否成功
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
@@ -108,7 +108,7 @@
        // 取水口ID换阀控器地址及通讯协议
        JSONObject job_rtu = getRtu(intakeId, null);
        if(job_rtu == null) {
            return BaseResponseUtils.buildError(WechatResultCode.RTU_NOT_EXIST.getMessage());
            return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_EXIST.getMessage());
        }
        String rtuAddr = job_rtu.getString("rtuAddr");
        String protocol = job_rtu.getString("protocol");
@@ -290,7 +290,7 @@
    public BaseResponse<Boolean> close(@RequestBody @Valid ValveClose valve, BindingResult bindingResult) {
        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyMMddHHmmss");
        if(bindingResult != null && bindingResult.hasErrors()){
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
        String rtuAddr = valve.getRtuAddr();
@@ -307,7 +307,7 @@
        // 阀控器地址换取水口ID和通讯协议
        JSONObject job_rtu = getRtu(null, rtuAddr);
        if(job_rtu == null) {
            return BaseResponseUtils.buildError(WechatResultCode.RTU_NOT_EXIST.getMessage());
            return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_EXIST.getMessage());
        }
        Long intakeId = job_rtu.getLong("intakeId");
        String protocol = job_rtu.getString("protocol");
@@ -343,7 +343,7 @@
                // 回调失败
                if(!response_CallBack.getCode().equals("0001")) {
                    return BaseResponseUtils.buildFail(response_CallBack.getMsg());
                    //return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage());
                    //return BaseResponseUtils.buildErrorMsg(WechatResultCode.GET_RESULT_ERROR.getMessage());
                }
                // 回调成功,再判断执行是否成功