liurunyu
2024-08-03 bd448b121e9b7636daa4ec1d1629c3c2615fb2b9
Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
1 文件已重命名
39个文件已修改
13个文件已添加
3个文件已删除
1454 ■■■■ 已修改文件
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryConditionVo.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoOp/OpeFeedbackReplyMapper.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportHistoryMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportLastMapper.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoOp/OpeFeedbackReply.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voOp/VofeedbackReply.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoOnLineIntake.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoClientAmountDay.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoIntakeAmountDay.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoLossDay.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoBatteryVolt.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoCumulativeFlow.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoIntake.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeFeedbackMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeFeedbackReplyMapper.xml 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateLastMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayLastMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayLastMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/PipIrrOperationApplication.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackCtrl.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackSv.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/QueryVo.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/ReplyQueryVo.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedbackReply/FeedbackReplyCtrl.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedbackReply/FeedbackReplySv.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedbackReply/QueryVo.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/qo/OnLineIntakesQO.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/qo/QoCommand.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayCtrl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayQueryVo.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateQueryVo.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayCtrl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayQueryVo.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayCtrl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayQueryVo.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/config/WebFilterConfiguration.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/config/WebListenerConfiguration.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntkeCtrl.java 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/qo/BatteryVoltQO.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/qo/CumulativeFlowQO.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/qo/IntakeQO.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/result/StatisticlResultCode.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryConditionVo.java
@@ -15,13 +15,34 @@
     */
    @Schema(description = "当前页", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "当前页不能为空") //不能为空也不能为null
    public Integer pageCurr ;
    public Integer pageCurr;
    /**
     * 每页数据条数
     */
    @Schema(description = "每页记录数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "每页记录数不能为空") //不能为空也不能为null
    public Integer pageSize ;
    public Integer pageSize;
    /**
     * 设置当前默认第一页
     * @return
     */
    public Integer getPageCurr() {
        if (pageCurr == null){
            return 1;
        }
        return pageCurr;
    }
    /**
     * 设置当前默认一页十条
     * @return
     */
    public Integer getPageSize() {
        if (pageSize == null){
            return 10;
        }
        return pageSize;
    }
}
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java
@@ -69,7 +69,7 @@
             * 未传入分页参数时,取全部记录
             */
            //this.pageSize = 1 ;//供下面作为除数
            this.pageSize = 10000 ;//供下面作为除数
            this.pageSize = 10 ;//供下面作为除数
        }
        pageTotal = (int)Math.ceil((itemTotal==null?0.0D:itemTotal.doubleValue())/pageSize);
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoOp/OpeFeedbackReplyMapper.java
@@ -2,7 +2,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoOp.OpeFeedbackReply;
import com.dy.pipIrrGlobal.voOp.Vofeedback;
import com.dy.pipIrrGlobal.voOp.VofeedbackReply;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@@ -28,7 +28,17 @@
    int updateByPrimaryKey(OpeFeedbackReply record);
    /**
     * 获取反馈回复数量
     * @param params
     * @return
     */
    Long getRecordCount(Map<String, Object> params);
    List<Vofeedback> getFeedbackReplys(Map<String, Object> params);
    /**
     * 获取反馈回复
     * @param params
     * @return
     */
    List<VofeedbackReply> getFeedbackReply(Map<String, Object> params);
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeMapper.java
@@ -162,4 +162,5 @@
     * @return
     */
    List<Long> getIntakeIdByNameExcludeId(@Param("id")Long id, @Param("intakeName")String intakeName);
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportHistoryMapper.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoRm.RmOnHourReportHistory;
import com.dy.pipIrrGlobal.voRm.VoOnHour;
import com.dy.pipIrrGlobal.voSt.VoIntake;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@@ -71,4 +72,18 @@
     */
    List<VoOnHour> getOnHourReports_history(Map<?, ?> params);
    /**
     * 获取指定时间段内未上线取水口数量
     * @param params
     * @return
     */
    Long getNotOnlineIntakesCount(Map<?, ?> params);
    /**
     * 获取指定时间段内未上线的取水口
     * @param params
     * @return
     */
    List<VoIntake> getNotOnlineIntakes(Map<?, ?> params);
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOnHourReportLastMapper.java
@@ -3,6 +3,8 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoRm.RmOnHourReportLast;
import com.dy.pipIrrGlobal.voRm.VoOnHour;
import com.dy.pipIrrGlobal.voSt.VoBatteryVolt;
import com.dy.pipIrrGlobal.voSt.VoCumulativeFlow;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@@ -79,4 +81,46 @@
     * @return
     */
    List<VoOnHour> getOnHourReports_last(Map<?, ?> params);
    /**
     * 获取累计流量超过指定值的取水口数量
     * @param params
     * @return
     */
    Long getLargeFlowIntakesCount(Map<?, ?> params);
    /**
     * 获取累计流量超过指定值的取水口
     * @param params
     * @return
     */
    List<VoCumulativeFlow> getLargeFlowIntakes(Map<?, ?> params);
    /**
     * 获取累计流量低于指定值的取水口数量
     * @param params
     * @return
     */
    Long getSmallFlowIntakesCount(Map<?, ?> params);
    /**
     * 获取累计流量低于指定值的取水口
     * @param params
     * @return
     */
    List<VoCumulativeFlow> getSmallFlowIntakes(Map<?, ?> params);
    /**
     * 获取欠压取水口数量
     * @param params
     * @return
     */
    Long getUnderVoltIntakesCount(Map<?, ?> params);
    /**
     * 获取欠压取水口
     * @param params
     * @return
     */
    List<VoBatteryVolt> getUnderVoltIntakes(Map<?, ?> params);
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoOp/OpeFeedbackReply.java
@@ -9,6 +9,7 @@
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import org.apache.logging.log4j.core.config.plugins.validation.constraints.NotBlank;
import java.util.Date;
@@ -45,7 +46,7 @@
    /**
    * 回复内容
    */
    @NotNull
    @NotBlank
    private String replyContent;
    /**
@@ -57,6 +58,7 @@
    * 回复人ID
    */
    @NotNull
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    private Long replierId;
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voOp/VofeedbackReply.java
New file
@@ -0,0 +1,40 @@
package com.dy.pipIrrGlobal.voOp;
import com.dy.common.po.BaseEntity;
import lombok.Data;
import java.util.Date;
/**
 * @author :WuZeYu
 * @Date :2024/8/1  20:07
 * @LastEditTime :2024/8/1  20:07
 * @Description
 */
@Data
public class VofeedbackReply implements BaseEntity {
    private static final long serialVersionUID = 202408012009001L;
    /**
     * 主键id
     */
    private String id;
    /**
     * 反馈编号
     */
    private String feedbackId;
    /**
     * 回复内容
     */
    private String replyContent;
    /**
     * 回复时间
     */
    private Date replyTime;
    /**
     * 回复人ID
     */
    private String replierId;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoOnLineIntake.java
@@ -30,7 +30,28 @@
    private String intakeNum;
    /**
     * 取水口经度
     */
    private Double lng;
    /**
     * 取水口纬度
     */
    private Double lat;
    /**
     * 是否在线
     */
    private Boolean isOnLine;
    /**
     * 是否绑定
     */
    private Boolean isBinded;
    /**
     * 报警信息Json数组
     */
    private String alarm;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoClientAmountDay.java
@@ -30,7 +30,9 @@
    private Double money;
    @Schema(description = "统计日期(yyyy-mm-dd)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private java.sql.Date dt;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private java.util.Date dt;
    @Schema(description = "统计日最后一次开阀日期时间(yyyy-mm-dd HH:MM:SS)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoIntakeAmountDay.java
@@ -6,6 +6,8 @@
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
 * @author :WuZeYu
 * @Date :2024/7/24  10:27
@@ -29,7 +31,9 @@
    private Double amount;
    @Schema(description = "统计日期(yyyy-mm-dd)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private java.sql.Date dt;
//    private java.sql.Date dt;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date dt;
    @Schema(description = "最后计水量上报数据接收时间(yyyy-mm-dd hh:mm:ss)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoLossDay.java
@@ -31,6 +31,8 @@
    private String rtuAddr;
    @Schema(description = "统计日期(yyyy-mm-dd)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private java.sql.Date dt;
    @Schema(description = "控制器最后上报数据日期时间(yyyy-mm-dd hh:mm:ss)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoBatteryVolt.java
New file
@@ -0,0 +1,28 @@
package com.dy.pipIrrGlobal.voSt;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
 * @author ZhuBaoMin
 * @date 2024-08-03 10:10
 * @LastEditTime 2024-08-03 10:10
 * @Description 电池电压视图
 */
@Data
public class VoBatteryVolt extends VoIntake {
    /**
     * 电池电压
     */
    private Double batteryVolt;
    /**
     * 数据获取日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date getDate;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoCumulativeFlow.java
New file
@@ -0,0 +1,28 @@
package com.dy.pipIrrGlobal.voSt;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
 * @author ZhuBaoMin
 * @date 2024-08-01 16:12
 * @LastEditTime 2024-08-01 16:12
 * @Description 累计流量视图
 */
@Data
public class VoCumulativeFlow extends VoIntake {
    /**
     * 累计流量
     */
    private Double cumulativeFlow;
    /**
     * 数据获取日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date getDate;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoIntake.java
New file
@@ -0,0 +1,34 @@
package com.dy.pipIrrGlobal.voSt;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import lombok.Data;
/**
 * @author ZhuBaoMin
 * @date 2024-08-01 14:03
 * @LastEditTime 2024-08-01 14:03
 * @Description 取水口统计结果视图对象
 */
@Data
public class VoIntake {
    private static final long serialVersionUID = 202408311404001L;
    /**
     * 取水口ID
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    private Long intakeId;
    /**
     * 取水口编号
     */
    private String intakeNum;
    /**
     * 取水口所属片区
     */
    private String blockName;
}
pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
@@ -72,7 +72,7 @@
pipIrr:
    global:
        dev: true   #是否开发阶段,true或false
        dev: false   #是否开发阶段,true或false
        dsName: ym  #开发阶段,设置临时的数据库名称
    mw:
        webPort: 8070
@@ -175,4 +175,8 @@
        access-token: fecef8e7725998f8912af05419580861aafc73413c4920036c07c050fa33055f
        secret: SEC6042bc964d08899a5853eb321eb5a4d842a395982777f815bd07451c879228b7
    at-all: true
    mobile: 18602657034
    mobile: 18602657034
#阀控器参数
rtu:
    batteryVolt: 17
pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeFeedbackMapper.xml
@@ -212,10 +212,10 @@
    from ope_feedback ofb
    left join se_client sc on ofb.feedbacker_id = sc.id
    <where>
      <if test="feedbackerId != null">
      <if test="feedbackerId != null and feedbackerId != '' ">
        and ofb.feedbacker_id = #{feedbackerId,jdbcType=BIGINT}
      </if>
      <if test="feedbackerName != null">
      <if test="feedbackerName != null and feedbackerName != '' ">
        and sc.name = #{feedbackerName,jdbcType=VARCHAR}
      </if>
      <if test="timeStart != null">
pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeFeedbackReplyMapper.xml
@@ -99,4 +99,52 @@
      replier_id = #{replierId,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="getRecordCount" resultType="java.lang.Long">
    select count(*) from ope_feedback_reply ofbr
    inner join ope_feedback ofb on ofbr.feedback_id = ofb.id
    <where>
      <if test="feedbackId != null and feedbackId != '' ">
        and ofbr.feedback_id = #{feedbackId,jdbcType=BIGINT}
      </if>
      <if test="replierId != null and replierId != '' ">
        and ofbr.replier_id = #{replierId,jdbcType=BIGINT}
      </if>
      <if test="replyTimeStart != null">
        and ofbr.reply_time &gt;= #{replyTimeStart}
      </if>
      <if test="replyTimeStop != null">
        and ofbr.reply_time &lt;= #{replyTimeStop}
      </if>
    </where>
    </select>
  <select id="getFeedbackReply" resultType="com.dy.pipIrrGlobal.voOp.VofeedbackReply">
    select
    CAST(ofbr.id as char) AS id,
    CAST(ofbr.feedback_id as char) AS feedbackId,
    ofbr.reply_content as replyContent,
    ofbr.reply_time as replyTime,
    CAST(ofbr.replier_id as char) AS replierId
    from ope_feedback_reply ofbr
    inner join ope_feedback ofb on ofbr.feedback_id = ofb.id
    <where>
      <if test="feedbackId != null and feedbackId != '' ">
        and ofbr.feedback_id = #{feedbackId,jdbcType=BIGINT}
      </if>
      <if test="replierId != null and replierId != '' ">
        and ofbr.replier_id = #{replierId,jdbcType=BIGINT}
      </if>
      <if test="replyTimeStart != null">
        and ofbr.reply_time &gt;= #{replyTimeStart}
      </if>
      <if test="replyTimeStop != null">
        and ofbr.reply_time &lt;= #{replyTimeStop}
      </if>
    </where>
    order by ofbr.id desc
    <if test="pageCurr != null and pageSize != null">
      LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
    </if>
  </select>
</mapper>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -362,10 +362,23 @@
  <select id="getOnLineIntakesCount" resultType="java.lang.Long">
    SELECT
        COUNT(*) AS recordCount
    FROM pr_controller con
        INNER JOIN pr_intake inta ON con.intakeId = inta.id
        left JOIN JSON_TABLE(
            <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
    FROM pr_intake inta
        LEFT JOIN pr_controller con ON con.intakeId = inta.id
        LEFT JOIN(
            SELECT
                intake_id AS intakeId,
                CONCAT(
                    IF(alarm_loss = 1, IF(alarm_water_meter_fault = 1, '流量计故障,', ''), IF(alarm_water_meter_fault = 1, '流量计故障', '')),
                    IF(alarm_battery_volt = 1, IF(alarm_loss = 1, '漏损(偷水)报警,', ''), IF(alarm_loss = 1, '漏损(偷水)报警', '')),
                    IF(alarm_valve = 1, IF(alarm_battery_volt = 1, '蓄电池电压报警,', ''), IF(alarm_battery_volt = 1, '蓄电池电压报警', '')),
                    IF(alarm_valve = 1, '阀门报警', '')
                ) AS alarm
            FROM rm_alarm_state_last
            WHERE (alarm_water_meter_fault = 1 OR alarm_loss = 1 OR alarm_battery_volt = 1 OR alarm_valve = 1)
            AND dt >= DATE_SUB(NOW(),INTERVAL 12 HOUR)
        ) alarm ON alarm.intakeId = inta.id
        LEFT JOIN JSON_TABLE(
             <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
            #{onLineMap},
            '$[*]' COLUMNS(
                rtuAddr VARCHAR(20) PATH '$.rtuAddr',
@@ -379,26 +392,52 @@
      <if test="intakeNum != null and intakeNum != ''">
        AND inta.name = #{intakeNum}
      </if>
      <if test="isBinded == false ">
        AND con.rtuAddr IS  NULL
      </if>
      <if test="isBinded == true ">
        AND con.rtuAddr IS NOT NULL
      </if>
    </where>
  </select>
  <!--获取取水口列表(在线和不在先)-->
  <select id="getOnLineIntakes" resultType="com.dy.pipIrrGlobal.voPr.VoOnLineIntake">
    SELECT
      con.intakeId,
      con.rtuAddr,
      inta.name AS intakeNum,
      rtus.isOnLine
    FROM pr_controller con
        INNER JOIN pr_intake inta ON con.intakeId = inta.id
        left JOIN JSON_TABLE(
            <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
            #{onLineMap},
            '$[*]' COLUMNS(
                rtuAddr VARCHAR(20) PATH '$.rtuAddr',
                isOnLine BOOLEAN PATH '$.isOnLine'
            )
        ) rtus ON con.rtuAddr = rtus.rtuAddr
        inta.id AS intakeId,
        con.rtuAddr,
        inta.name AS intakeNum,
        inta.lng,
        inta.lat,
        (CASE
            WHEN con.rtuAddr IS  NULL  THEN "false"
            WHEN con.rtuAddr IS NOT NULL THEN "true"
        END) AS isBinded,
        rtus.isOnLine,
        alarm.alarm
    FROM pr_intake inta
        LEFT JOIN pr_controller con ON con.intakeId = inta.id
        LEFT JOIN(
            SELECT
                intake_id AS intakeId,
                CONCAT(
                    IF(alarm_loss = 1, IF(alarm_water_meter_fault = 1, '流量计故障,', ''), IF(alarm_water_meter_fault = 1, '流量计故障', '')),
                    IF(alarm_battery_volt = 1, IF(alarm_loss = 1, '漏损(偷水)报警,', ''), IF(alarm_loss = 1, '漏损(偷水)报警', '')),
                    IF(alarm_valve = 1, IF(alarm_battery_volt = 1, '蓄电池电压报警,', ''), IF(alarm_battery_volt = 1, '蓄电池电压报警', '')),
                    IF(alarm_valve = 1, '阀门报警', '')
                ) AS alarm
            FROM rm_alarm_state_last
            WHERE (alarm_water_meter_fault = 1 OR alarm_loss = 1 OR alarm_battery_volt = 1 OR alarm_valve = 1)
            AND dt >= DATE_SUB(NOW(),INTERVAL 12 HOUR)
        ) alarm ON alarm.intakeId = inta.id
    LEFT JOIN JSON_TABLE(
    <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
    #{onLineMap},
    '$[*]' COLUMNS(
    rtuAddr VARCHAR(20) PATH '$.rtuAddr',
    isOnLine BOOLEAN PATH '$.isOnLine'
    )
    ) rtus ON con.rtuAddr = rtus.rtuAddr
    <where>
      <if test="isOnLine != null">
        rtus.isOnLine = #{isOnLine}
@@ -406,6 +445,12 @@
      <if test="intakeNum != null and intakeNum != ''">
        AND inta.name = #{intakeNum}
      </if>
      <if test="isBinded == false ">
        AND con.rtuAddr IS  NULL
      </if>
      <if test="isBinded == true ">
        AND con.rtuAddr IS NOT NULL
      </if>
    </where>
    order by con.id ASC
    <if test="pageCurr != null and pageSize != null">
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml
@@ -396,10 +396,10 @@
        <if test="valveState != null">
            and rash.valve_state = #{valveState,jdbcType=TINYINT}
        </if>
        <if test="intakeId != null">
        <if test="intakeId != null and intakeId != '' ">
            and rash.intake_id = #{intakeId}
        </if>
        <if test="intakeName != null">
        <if test="intakeName != null and intakeName != '' ">
            and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
        </if>
        <if test="startDt != null">
@@ -480,10 +480,10 @@
            <if test="valveState != null">
                and rash.valve_state = #{valveState,jdbcType=TINYINT}
            </if>
            <if test="intakeId != null">
            <if test="intakeId != null and intakeId != '' ">
                and rash.intake_id = #{intakeId}
            </if>
            <if test="intakeName != null">
            <if test="intakeName != null and intakeName != '' ">
                and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
            </if>
            <if test="startDt != null">
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateLastMapper.xml
@@ -390,10 +390,10 @@
      <if test="valveState != null">
        and rasl.valve_state = #{valveState,jdbcType=TINYINT}
      </if>
      <if test="intakeId != null">
        and rasl.intake_id = #{intakeId}
      <if test="intakeId != null and intakeId != '' ">
        and rash.intake_id = #{intakeId}
      </if>
      <if test="intakeName != null">
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="startDt != null">
@@ -474,10 +474,10 @@
      <if test="valveState != null">
        and rasl.valve_state = #{valveState,jdbcType=TINYINT}
      </if>
      <if test="intakeId != null">
        and rasl.intake_id = #{intakeId}
      <if test="intakeId != null and intakeId != '' ">
        and rash.intake_id = #{intakeId}
      </if>
      <if test="intakeName != null">
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="startDt != null">
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayLastMapper.xml
@@ -194,11 +194,11 @@
    from rm_client_amount_day_last rcadl
    Left join se_client sc on sc.id = rcadl.client_id
    <where>
      <if test="clientName != null">
      <if test="clientName != null and clientName != '' ">
        and sc.name like CONCAT('%',#{clientName,jdbcType=VARCHAR},'%')
      </if>
      <if test="clientId != null">
        and rcadl.client_id = #{clientId}
      <if test="clientId != null and clientId != ''">
        and rcad.client_id = #{clientId}
      </if>
      <if test="startDt != null">
        and rcadl.dt &gt;= #{startDt,jdbcType=DATE}
@@ -225,11 +225,11 @@
    from rm_client_amount_day_last rcadl
    Left join se_client sc on sc.id = rcadl.client_id
    <where>
      <if test="clientName != null">
      <if test="clientName != null and clientName != '' ">
        and sc.name like CONCAT('%',#{clientName,jdbcType=VARCHAR},'%')
      </if>
      <if test="clientId != null">
        and rcadl.client_id = #{clientId}
      <if test="clientId != null and clientId != ''">
        and rcad.client_id = #{clientId}
      </if>
      <if test="startDt != null">
        and rcadl.dt &gt;= #{startDt,jdbcType=DATE}
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmClientAmountDayMapper.xml
@@ -184,10 +184,10 @@
    from rm_client_amount_day rcad
           Left join se_client sc on sc.id = rcad.client_id
    <where>
      <if test="clientName != null">
      <if test="clientName != null and clientName != '' ">
        and sc.name like CONCAT('%',#{clientName,jdbcType=VARCHAR},'%')
      </if>
      <if test="clientId != null">
      <if test="clientId != null and clientId != ''">
        and rcad.client_id = #{clientId}
      </if>
      <if test="startDt != null">
@@ -215,10 +215,10 @@
    from rm_client_amount_day rcad
    Left join se_client sc on sc.id = rcad.client_id
    <where>
      <if test="clientName != null">
      <if test="clientName != null and clientName != '' ">
        and sc.name like CONCAT('%',#{clientName,jdbcType=VARCHAR},'%')
      </if>
      <if test="clientId != null">
      <if test="clientId != null and clientId != ''">
        and rcad.client_id = #{clientId}
      </if>
      <if test="startDt != null">
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
@@ -255,6 +255,9 @@
      LEFT JOIN se_client cli ON cli.id = his.operator
      LEFT JOIN ba_user  user ON user.id = his.operator
    <where>
      <if test="intakeId != null">
        AND his.intake_id = #{intakeId}
      </if>
      <if test = "commandName != null and commandName !=''">
        AND his.command_name LIKE CONCAT('%',#{commandName},'%')
      </if>
@@ -288,6 +291,9 @@
        LEFT JOIN se_client cli ON cli.id = his.operator
        LEFT JOIN ba_user  user ON user.id = his.operator
    <where>
      <if test="intakeId != null">
        AND his.intake_id = #{intakeId}
      </if>
      <if test = "commandName != null and commandName !=''">
        AND his.command_name LIKE CONCAT('%',#{commandName},'%')
      </if>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml
@@ -173,11 +173,11 @@
    from rm_intake_amount_day_last riadl
    Left join pr_intake pint on pint.id = riadl.intake_id
    <where>
      <if test="intakeName != null">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      <if test="intakeId != null and intakeId != '' ">
        and rash.intake_id = #{intakeId}
      </if>
      <if test="intakeId != null">
        and riadl.intake_id = #{intakeId}
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="startDt != null">
        and riadl.dt &gt;= #{startDt,jdbcType=DATE}
@@ -202,11 +202,11 @@
    from rm_intake_amount_day_last riadl
    Left join pr_intake pint on pint.id = riadl.intake_id
    <where>
      <if test="intakeName != null">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      <if test="intakeId != null and intakeId != '' ">
        and rash.intake_id = #{intakeId}
      </if>
      <if test="intakeId != null">
        and riadl.intake_id = #{intakeId}
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="startDt != null">
        and riadl.dt &gt;= #{startDt,jdbcType=DATE}
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayMapper.xml
@@ -161,11 +161,11 @@
    from rm_intake_amount_day riad
    Left join pr_intake pint on pint.id = riad.intake_id
    <where>
      <if test="intakeName != null">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      <if test="intakeId != null and intakeId != '' ">
        and rash.intake_id = #{intakeId}
      </if>
      <if test="intakeId != null">
        and riad.intake_id = #{intakeId}
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="startDt != null">
        and riad.dt &gt;= #{startDt,jdbcType=DATE}
@@ -190,11 +190,11 @@
    from rm_intake_amount_day riad
    Left join pr_intake pint on pint.id = riad.intake_id
    <where>
      <if test="intakeName != null">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      <if test="intakeId != null and intakeId != '' ">
        and rash.intake_id = #{intakeId}
      </if>
      <if test="intakeId != null">
        and riad.intake_id = #{intakeId}
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="startDt != null">
        and riad.dt &gt;= #{startDt,jdbcType=DATE}
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayLastMapper.xml
@@ -165,11 +165,11 @@
    from rm_loss_day_last rldl
    Left join pr_intake pint on pint.id = rldl.intake_id
    <where>
      <if test="intakeName != null">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      <if test="intakeId != null and intakeId != '' ">
        and rash.intake_id = #{intakeId}
      </if>
      <if test="intakeId != null">
        and rldl.intake_id = #{intakeId}
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="startDt != null">
        and rldl.dt &gt;= #{startDt,jdbcType=DATE}
@@ -193,11 +193,11 @@
    from rm_loss_day_last rldl
    Left join pr_intake pint on pint.id = rldl.intake_id
    <where>
      <if test="intakeName != null">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      <if test="intakeId != null and intakeId != '' ">
        and rash.intake_id = #{intakeId}
      </if>
      <if test="intakeId != null">
        and rldl.intake_id = #{intakeId}
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="startDt != null">
        and rldl.dt &gt;= #{startDt,jdbcType=DATE}
@@ -206,7 +206,7 @@
        and rldl.dt &lt;= #{endDt,jdbcType=DATE}
      </if>
    </where>
    ORDER BY rld.dt DESC , rld.loss_amount DESC
    ORDER BY rldl.dt DESC , rldl.loss_amount DESC
    <if test="pageCurr != null and pageSize != null">
      LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
    </if>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayMapper.xml
@@ -155,11 +155,11 @@
    from rm_loss_day rld
    Left join pr_intake pint on pint.id = rld.intake_id
    <where>
      <if test="intakeName != null">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      <if test="intakeId != null and intakeId != '' ">
        and rash.intake_id = #{intakeId}
      </if>
      <if test="intakeId != null">
        and rld.intake_id = #{intakeId}
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="startDt != null">
        and rld.dt &gt;= #{startDt,jdbcType=DATE}
@@ -183,11 +183,11 @@
    from rm_loss_day rld
    Left join pr_intake pint on pint.id = rld.intake_id
    <where>
      <if test="intakeName != null">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      <if test="intakeId != null and intakeId != '' ">
        and rash.intake_id = #{intakeId}
      </if>
      <if test="intakeId != null">
        and rld.intake_id = #{intakeId}
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="startDt != null">
        and rld.dt &gt;= #{startDt,jdbcType=DATE}
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportHistoryMapper.xml
@@ -255,4 +255,35 @@
    </trim>
  </select>
  <!--获取指定时间段内未上线取水口数量-->
  <select id="getNotOnlineIntakesCount" resultType="java.lang.Long">
    SELECT
        COUNT(*) AS recordCount
    FROM pr_intake inta
        LEFT JOIN (SELECT * FROM rm_on_hour_report_history WHERE dt BETWEEN #{timeStart} AND #{timeStop}) his ON his.intake_id = inta.id
        INNER JOIN ba_block blo ON blo.id = inta.blockId
    WHERE his.intake_id IS NULL AND inta.deleted = 0
  </select>
  <!--获取指定时间段内未上线的取水口-->
  <select id="getNotOnlineIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoIntake">
    SELECT
      inta.id AS intakeId,
      inta.name AS intakeNum,
      blo.name AS blockName
    FROM pr_intake inta
           LEFT JOIN (SELECT * FROM rm_on_hour_report_history WHERE dt BETWEEN #{timeStart} AND #{timeStop}) his ON his.intake_id = inta.id
           INNER JOIN ba_block blo ON blo.id = inta.blockId
    WHERE his.intake_id IS NULL AND inta.deleted = 0
    ORDER BY inta.id
    <trim prefix="limit " >
      <if test="start != null and count != null">
        #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
      </if>
    </trim>
  </select>
</mapper>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml
@@ -262,4 +262,95 @@
      </if>
    </trim>
  </select>
  <!--获取累计流量超过指定值的取水口数量-->
  <select id="getLargeFlowIntakesCount" resultType="java.lang.Long">
    SELECT
    COUNT(*) AS recordCount
    FROM pr_intake inta
    INNER JOIN rm_on_hour_report_last hou ON hou.intake_id = inta.id
    INNER JOIN ba_block blo ON blo.id = inta.blockId
    WHERE inta.deleted = 0 AND hou.total_amount > #{totalAmount}
  </select>
  <!--获取累计流量超过指定值的取水口-->
  <select id="getLargeFlowIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoCumulativeFlow">
    SELECT
    inta.id AS intakeId,
    inta.name AS intakeNum,
    blo.name AS blockName,
    CAST(hou.total_amount AS DECIMAL(10, 2)) AS cumulativeFlow,
    hou.dt AS getDate
    FROM pr_intake inta
    INNER JOIN rm_on_hour_report_last hou ON hou.intake_id = inta.id
    INNER JOIN ba_block blo ON blo.id = inta.blockId
    WHERE inta.deleted = 0 AND hou.total_amount > #{totalAmount}
    ORDER BY hou.dt
    <trim prefix="limit " >
      <if test="start != null and count != null">
        #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
      </if>
    </trim>
  </select>
  <!--获取累计流量低于指定值的取水口数量-->
  <select id="getSmallFlowIntakesCount" resultType="java.lang.Long">
    SELECT
    COUNT(*) AS recordCount
    FROM pr_intake inta
    INNER JOIN rm_on_hour_report_last hou ON hou.intake_id = inta.id
    INNER JOIN ba_block blo ON blo.id = inta.blockId
    WHERE inta.deleted = 0 AND hou.total_amount &lt; #{totalAmount}
  </select>
  <!--获取累计流量低于指定值的取水口-->
  <select id="getSmallFlowIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoCumulativeFlow">
    SELECT
    inta.id AS intakeId,
    inta.name AS intakeNum,
    blo.name AS blockName,
    <!--    FORMAT(hou.total_amount,2) AS cumulativeFlow,-->
    CAST(hou.total_amount AS DECIMAL(10, 2)) AS cumulativeFlow,
    hou.dt AS getDate
    FROM pr_intake inta
    INNER JOIN rm_on_hour_report_last hou ON hou.intake_id = inta.id
    INNER JOIN ba_block blo ON blo.id = inta.blockId
    WHERE inta.deleted = 0 AND hou.total_amount &lt; #{totalAmount}
    ORDER BY hou.dt
    <trim prefix="limit " >
      <if test="start != null and count != null">
        #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
      </if>
    </trim>
  </select>
  <!--获取欠压取水口数量-->
  <select id="getUnderVoltIntakesCount" resultType="java.lang.Long">
    SELECT
    COUNT(*) AS recordCount
    FROM pr_intake inta
    INNER JOIN rm_on_hour_report_last hou ON hou.intake_id = inta.id
    INNER JOIN ba_block blo ON blo.id = inta.blockId
    WHERE inta.deleted = 0 AND hou.battery_volt &lt; #{batteryVolt}
  </select>
  <!--获取欠压取水口-->
  <select id="getUnderVoltIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoBatteryVolt">
    SELECT
    inta.id AS intakeId,
    inta.name AS intakeNum,
    blo.name AS blockName,
    hou.battery_volt AS batteryVolt,
    hou.dt AS getDate
    FROM pr_intake inta
    INNER JOIN rm_on_hour_report_last hou ON hou.intake_id = inta.id
    INNER JOIN ba_block blo ON blo.id = inta.blockId
    WHERE inta.deleted = 0 AND hou.battery_volt &lt; #{batteryVolt}
    ORDER BY hou.dt
    <trim prefix="limit " >
      <if test="start != null and count != null">
        #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
      </if>
    </trim>
  </select>
</mapper>
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/PipIrrOperationApplication.java
File was renamed from pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/PipIrrWebOperationApplication.java
@@ -19,10 +19,10 @@
        }
)
@MapperScan(basePackages={"com.dy.pipIrrGlobal.daoRm", "com.dy.pipIrrGlobal.daoPr", "com.dy.pipIrrGlobal.daoSe", "com.dy.pipIrrGlobal.daoBa","com.dy.pipIrrGlobal.daoOp"})
public class PipIrrWebOperationApplication {
public class PipIrrOperationApplication {
    public static void main(String[] args) {
        SpringApplication.run(PipIrrWebOperationApplication.class, args);
        SpringApplication.run(PipIrrOperationApplication.class, args);
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackCtrl.java
@@ -5,7 +5,9 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.pojoOp.OpeFeedback;
import com.dy.pipIrrGlobal.pojoOp.OpeFeedbackReply;
import com.dy.pipIrrGlobal.voOp.Vofeedback;
import com.dy.pipIrrGlobal.voOp.VofeedbackReply;
import io.swagger.v3.oas.annotations.Parameter;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
@@ -132,4 +134,99 @@
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
    /**
     * 添加问题反馈回复
     * @param reply
     * @param bindingResult
     * @return
     */
    @PostMapping(path = "addReply", consumes = MediaType.APPLICATION_JSON_VALUE)
    @Transactional(rollbackFor = Exception.class)
    @SsoAop
    public BaseResponse<Boolean> addReply(@RequestBody @Valid OpeFeedbackReply reply, @Parameter(hidden = true) BindingResult bindingResult){
        if (bindingResult != null && bindingResult.hasErrors()) {
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
        Integer rec = Optional.ofNullable(feedbackSv.addReply(reply)).orElse(0);
        if (rec == 0) {
            return BaseResponseUtils.buildFail("添加回复失败");
        }
        return BaseResponseUtils.buildSuccess(true);
    }
    /**
     * 修改问题反馈回复
     * @param reply
     * @param bindingResult
     * @return
     */
    @PostMapping(path = "updateReply", consumes = MediaType.APPLICATION_JSON_VALUE)
    @Transactional(rollbackFor = Exception.class)
    @SsoAop()
    public BaseResponse<Boolean> updateReply(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid OpeFeedbackReply reply, @Parameter(hidden = true) BindingResult bindingResult) {
        if (bindingResult != null && bindingResult.hasErrors()) {
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
        int count ;
        try {
            count = feedbackSv.updateReply(reply);
        } catch (Exception e) {
            log.error("修改问题反馈回复异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("修改反馈回复失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * 删除问题反馈回复
     * @param map
     * @return
     */
    @PostMapping(path = "deleteReply")
    @Transactional(rollbackFor = Exception.class)
    @SsoAop()
    public BaseResponse<Boolean> deleteReply(@RequestBody Map map) {
        if (map == null || map.size() <= 0) {
            return BaseResponseUtils.buildFail("请传入id");
        }
        Long id = Long.parseLong(map.get("id").toString());
        try {
            Integer recordCount = Optional.ofNullable(feedbackSv.deleteReply(id)).orElse(0);
            if (recordCount == 0) {
                return BaseResponseUtils.buildFail("删除失败");
            } else {
                return BaseResponseUtils.buildSuccess(true);
            }
        } catch (Exception e) {
            log.error("删除异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
    /**
     * 分页查询问题反馈回复
     * @param qo
     * @return
     */
    @GetMapping(path = "getFeedbackReply")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VofeedbackReply>>> getFeedbackReply(ReplyQueryVo qo) {
        try {
            QueryResultVo<List<VofeedbackReply>> res = feedbackSv.getFeedbackReply(qo);
            if (res == null) {
                return BaseResponseUtils.buildFail("查询失败");
            }
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("查询异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackSv.java
@@ -2,8 +2,11 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoOp.OpeFeedbackMapper;
import com.dy.pipIrrGlobal.daoOp.OpeFeedbackReplyMapper;
import com.dy.pipIrrGlobal.pojoOp.OpeFeedback;
import com.dy.pipIrrGlobal.pojoOp.OpeFeedbackReply;
import com.dy.pipIrrGlobal.voOp.Vofeedback;
import com.dy.pipIrrGlobal.voOp.VofeedbackReply;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
@@ -27,6 +30,9 @@
public class FeedbackSv {
    @Autowired
    private OpeFeedbackMapper opeFeedbackMapper;
    @Autowired
    private OpeFeedbackReplyMapper opeFeedbackReplyMapper;
    /**
     * 添加问题反馈
@@ -76,4 +82,50 @@
        rsVo.obj = opeFeedbackMapper.getFeedbacks(params);
        return rsVo;
    }
    /**
     * 添加问题反馈回复
     * @param reply
     * @return
     */
    public Integer addReply(OpeFeedbackReply reply) {
        reply.setReplyTime(new Date());
        return opeFeedbackReplyMapper.insertSelective(reply);
    }
    /**
     * 修改问题反馈回复
     * @param reply
     * @return
     */
    public int updateReply(OpeFeedbackReply reply) {
        reply.setReplyTime(new Date());
            return opeFeedbackReplyMapper.updateByPrimaryKeySelective(reply);
    }
    /**
     * 删除问题反馈回复
     * @param id
     * @return
     */
    public Integer deleteReply(Long id) {
        return opeFeedbackReplyMapper.deleteByPrimaryKey(id);
    }
    /**
     * 获取反馈回复
     * @param qo
     * @return
     */
    public QueryResultVo<List<VofeedbackReply>> getFeedbackReply(ReplyQueryVo qo) {
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo);
        Long itemTotal = opeFeedbackReplyMapper.getRecordCount(params);
        QueryResultVo<List<VofeedbackReply>> rsVo = new QueryResultVo<>();
        rsVo.pageSize = qo.pageSize;
        rsVo.pageCurr = qo.pageCurr;
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = opeFeedbackReplyMapper.getFeedbackReply(params);
        return rsVo;
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/QueryVo.java
@@ -34,12 +34,12 @@
    /**
     * 查询开始日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date timeStart;
    /**
     * 查询结束日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date timeStop;
}
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/ReplyQueryVo.java
New file
@@ -0,0 +1,43 @@
package com.dy.pipIrrOperation.feedback;
import com.dy.common.webUtil.QueryConditionVo;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
 * @author :WuZeYu
 * @Date :2024/8/1  19:40
 * @LastEditTime :2024/8/1  19:40
 * @Description
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ReplyQueryVo extends QueryConditionVo {
    /**
     * 反馈编号
     */
    private String feedbackId;
    /**
     * 回复人
     */
    private String replierId;
    /**
     * 回复时间开始日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date replyTimeStart;
    /**
     * 回复时间结束日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date replyTimeStop;
}
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedbackReply/FeedbackReplyCtrl.java
File was deleted
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedbackReply/FeedbackReplySv.java
File was deleted
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedbackReply/QueryVo.java
File was deleted
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/qo/OnLineIntakesQO.java
@@ -27,7 +27,12 @@
    /**
     * 是否在线
     */
    @Max(value = 1,message = "是否在线仅允许为真或假")
    @Min(value = 0,message = "是否在线仅允许为真或假")
    private Boolean isOnLine;
    /**
     * 是否绑定
     */
    private Boolean isBinded;
}
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/qo/QoCommand.java
@@ -19,6 +19,11 @@
public class QoCommand extends QueryConditionVo {
    /**
     * 取水口ID
     */
    private Long intakeId;
    /**
     * 命令名称
     */
    private String commandName;
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayCtrl.java
@@ -53,7 +53,7 @@
    })
    @GetMapping(path = "/getClientAmountDayHistory")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoClientAmountDay>>> getClientAmountDayHistory(@RequestParam ClientAmountDayQueryVo vo) {
    public BaseResponse<QueryResultVo<List<VoClientAmountDay>>> getClientAmountDayHistory( ClientAmountDayQueryVo vo) {
        try {
            QueryResultVo<List<VoClientAmountDay>> res = clientAmountDaySv.getClientAmountDayHistory(vo);
            return BaseResponseUtils.buildSuccess(res);
@@ -81,7 +81,7 @@
    })
    @GetMapping(path = "/getClientAmountDayLast")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoClientAmountDay>>> getClientAmountDayLast(@RequestParam ClientAmountDayQueryVo vo) {
    public BaseResponse<QueryResultVo<List<VoClientAmountDay>>> getClientAmountDayLast( ClientAmountDayQueryVo vo) {
        try {
            QueryResultVo<List<VoClientAmountDay>> res = clientAmountDaySv.getClientAmountDayLast(vo);
            return BaseResponseUtils.buildSuccess(res);
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/clientAmountDay/ClientAmountDayQueryVo.java
@@ -1,12 +1,14 @@
package com.dy.pipIrrRemote.records.clientAmountDay;
import com.dy.common.webUtil.QueryConditionVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.sql.Date;
import java.util.Date;
/**
 * @author :WuZeYu
@@ -30,8 +32,12 @@
    private String clientName;
    @Schema(description = "统计开始日期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDt;
    @Schema(description = "统计结束日期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDt;
}
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java
@@ -53,7 +53,7 @@
    })
    @GetMapping(path = "/getControllerAlarmStateHistory")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateHistory(@RequestParam ControllerAlarmStateQueryVo vo) {
    public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateHistory( ControllerAlarmStateQueryVo vo) {
        try {
            QueryResultVo<List<VoControllerAlarmState>> res = controllerAlarmStateSv.getControllerAlarmStateHistory(vo);
            return BaseResponseUtils.buildSuccess(res);
@@ -82,7 +82,7 @@
    })
    @GetMapping(path = "/getControllerAlarmStateLast")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateLast(@RequestParam ControllerAlarmStateQueryVo vo) {
    public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateLast( ControllerAlarmStateQueryVo vo) {
        try {
            QueryResultVo<List<VoControllerAlarmState>> res = controllerAlarmStateSv.getControllerAlarmStateLast(vo);
            return BaseResponseUtils.buildSuccess(res);
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateQueryVo.java
@@ -33,13 +33,13 @@
    private Byte valveState;
    @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDt;
    @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDt;
    @Schema(description = "报警状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED)//(0正常、1报警)
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayCtrl.java
@@ -52,7 +52,7 @@
    })
    @GetMapping(path = "/getIntakeAmountDayHistory")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoIntakeAmountDay>>> getIntakeAmountDayHistory(@RequestParam IntakeAmountDayQueryVo vo) {
    public BaseResponse<QueryResultVo<List<VoIntakeAmountDay>>> getIntakeAmountDayHistory( IntakeAmountDayQueryVo vo) {
        try {
            QueryResultVo<List<VoIntakeAmountDay>> res = intakeAmountDaySv.getIntakeAmountDayHistory(vo);
            return BaseResponseUtils.buildSuccess(res);
@@ -79,7 +79,7 @@
    })
    @GetMapping(path = "/getIntakeAmountDayLast")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoIntakeAmountDay>>> getIntakeAmountDayLast(@RequestParam IntakeAmountDayQueryVo vo) {
    public BaseResponse<QueryResultVo<List<VoIntakeAmountDay>>> getIntakeAmountDayLast( IntakeAmountDayQueryVo vo) {
        try {
            QueryResultVo<List<VoIntakeAmountDay>> res = intakeAmountDaySv.getIntakeAmountDayLast(vo);
            return BaseResponseUtils.buildSuccess(res);
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/intakeAmountDay/IntakeAmountDayQueryVo.java
@@ -3,8 +3,12 @@
import com.dy.common.webUtil.QueryConditionVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.apache.logging.log4j.core.config.plugins.validation.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;
import java.sql.Date;
import java.util.Date;
//import java.sql.Date;
/**
 * @author :WuZeYu
@@ -27,9 +31,16 @@
    @Schema(description = "取水口ID")
    private String intakeId;
    @Schema(description = "统计开始日期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
//    @Schema(description = "统计开始日期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
//    private java.sql.Date startDt;
//    @NotBlank(message = "开始时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDt;
    @Schema(description = "统计结束日期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
//    @Schema(description = "统计结束日期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
//    private java.sql.Date endDt;
//    @NotBlank(message = "结束时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDt;
}
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayCtrl.java
@@ -56,7 +56,7 @@
    })
    @GetMapping(path = "/getLossDayHistory")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoLossDay>>> getLossDayHistory(@RequestParam LossDayQueryVo vo) {
    public BaseResponse<QueryResultVo<List<VoLossDay>>> getLossDayHistory( LossDayQueryVo vo) {
        try {
            QueryResultVo<List<VoLossDay>> res = lossDaySv.getLossDayHistory(vo);
            return BaseResponseUtils.buildSuccess(res);
@@ -83,7 +83,7 @@
    })
    @GetMapping(path = "/getLossDayLast")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoLossDay>>> getLossDayLast(@RequestParam LossDayQueryVo vo) {
    public BaseResponse<QueryResultVo<List<VoLossDay>>> getLossDayLast( LossDayQueryVo vo) {
        try {
            QueryResultVo<List<VoLossDay>> res = lossDaySv.getLossDayLast(vo);
            return BaseResponseUtils.buildSuccess(res);
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayQueryVo.java
@@ -1,10 +1,12 @@
package com.dy.pipIrrRemote.records.lossDay;
import com.dy.common.webUtil.QueryConditionVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.sql.Date;
import java.util.Date;
/**
 * @author :WuZeYu
@@ -29,8 +31,12 @@
    private String intakeId;
    @Schema(description = "统计开始日期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDt;
    @Schema(description = "统计结束日期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDt;
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/config/WebFilterConfiguration.java
New file
@@ -0,0 +1,51 @@
package com.dy.pipIrrStatistics.config;
import com.dy.common.webFilter.DevOfDataSourceNameSetFilter;
import com.dy.common.webFilter.UserTokenFilter;
import jakarta.servlet.Filter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * @author ZhuBaoMin
 * @date 2023/12/5 10:32
 * @LastEditTime 2023/12/5 10:32
 * @Description
 */
@Configuration
public class WebFilterConfiguration {
    @Value("${pipIrr.global.dev}")
    public String isDevStage ;//是否为开发阶段
    @Value("${pipIrr.global.dsName}")
    public String dsName ;//开发阶段的数据源名称
    /**
     * DevOfDataSourceNameSetFilter与UserTokenFilter只能一个被配置上,
     * 所以他们的order都是1
     */
    private static final int order_UserTokenFilter = 1 ;//与下面
    private static final int order_DevOfDataSourceNameSetFilter = 1 ;
    @Bean
    public FilterRegistrationBean<? extends Filter> RegFilter() {
        FilterRegistrationBean<Filter> filterRegistrationBean = new FilterRegistrationBean<>();
        if(this.isDevStage != null && !this.isDevStage.trim().equals("") && this.isDevStage.trim().equalsIgnoreCase("true")){
            filterRegistrationBean.setFilter(new DevOfDataSourceNameSetFilter());
            filterRegistrationBean.addUrlPatterns("/*");//配置过滤规则
            filterRegistrationBean.addInitParameter("dataSourceName",dsName);//设置init参数
            filterRegistrationBean.setName("DevOfDataSourceNameSetFilter");//设置过滤器名称
            filterRegistrationBean.setOrder(order_DevOfDataSourceNameSetFilter);//执行次序
        }else{
            filterRegistrationBean.setFilter(new UserTokenFilter());
            filterRegistrationBean.addUrlPatterns("/*");//配置过滤规则
            filterRegistrationBean.setName("UserTokenFilter");//设置过滤器名称
            filterRegistrationBean.setOrder(order_UserTokenFilter);//执行次序
        }
        return filterRegistrationBean;
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/config/WebListenerConfiguration.java
New file
@@ -0,0 +1,56 @@
package com.dy.pipIrrStatistics.config;
import com.dy.common.webListener.GenerateIdSetSuffixListener;
import jakarta.servlet.ServletContextListener;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * @author ZhuBaoMin
 * @date 2023/12/5 10:33
 * @LastEditTime 2023/12/5 10:33
 * @Description
 */
@Configuration
public class WebListenerConfiguration {
    /**
     * 启动顺序
     */
    //private static final int order_config = 0 ;
    private static final int order_idSetSuffix = 1 ;
    //private static final int order_init = 2 ;
    /*
    * 解析各种***.config配置的ConfigListener,暂时不采用此种配置方式
    *
    @Bean
    public ConfigListener getGlConfigListener(){
        return new ConfigListener() ;
    }
    /**
     * 外部提供Listener
     * @param listener 外部提供Listener
     * @return 注册Bean
    @Bean
    public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) {
        ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>();
        listenerRegistrationBean.setListener(listener);
        listenerRegistrationBean.setOrder(order_config);
        return listenerRegistrationBean;
    }
    */
    /**
     * 内部提供listener,该listener在系统启动时,根据配置 设置ID产生器的后缀
     * @return 注册Bean
     */
    @Bean
    public ServletListenerRegistrationBean<? extends ServletContextListener> regSsoListener() {
        ServletListenerRegistrationBean<GenerateIdSetSuffixListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>();
        listenerRegistrationBean.setListener(new GenerateIdSetSuffixListener());
        listenerRegistrationBean.setOrder(order_idSetSuffix);
        return listenerRegistrationBean;
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java
New file
@@ -0,0 +1,148 @@
package com.dy.pipIrrStatistics.intake;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoRm.RmOnHourReportHistoryMapper;
import com.dy.pipIrrGlobal.daoRm.RmOnHourReportLastMapper;
import com.dy.pipIrrGlobal.voSt.VoBatteryVolt;
import com.dy.pipIrrGlobal.voSt.VoCumulativeFlow;
import com.dy.pipIrrGlobal.voSt.VoIntake;
import com.dy.pipIrrStatistics.intake.qo.BatteryVoltQO;
import com.dy.pipIrrStatistics.intake.qo.CumulativeFlowQO;
import com.dy.pipIrrStatistics.intake.qo.IntakeQO;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.text.DecimalFormat;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
import java.util.Optional;
/**
 * @author ZhuBaoMin
 * @date 2024-08-01 13:58
 * @LastEditTime 2024-08-01 13:58
 * @Description
 */
@Slf4j
@Service
public class IntakeSv {
    @Autowired
    private RmOnHourReportHistoryMapper rmOnHourReportHistoryMapper;
    @Autowired
    private RmOnHourReportLastMapper rmOnHourReportLastMapper;
    @Value("${rtu.batteryVolt}")
    private Double batteryVolt;
    /**
     * 获取指定时间段内未上线的取水口
     * @param qo
     * @return
     */
    public QueryResultVo<List<VoIntake>> getNotOnlineIntakes(IntakeQO qo) {
        DecimalFormat df = new DecimalFormat("0.00");
        /**
         * 补齐起止时间,如果开始时间为空,则默认为当前日期
         */
        String timeStart = qo.getTimeStart();
        String timeStop = qo.getTimeStop();
        if(timeStart != null) {
            timeStart = timeStart + " 00:00:00";
        }else {
            timeStart = LocalDate.now() + " 00:00:00";
        }
        if(timeStop != null) {
            timeStop = timeStop + " 23:59:59";
        }
        qo.setTimeStart(timeStart);
        qo.setTimeStop(timeStop);
        // 生成查询参数
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ;
        // 获取符合条件的记录数
        Long itemTotal = Optional.ofNullable(rmOnHourReportHistoryMapper.getNotOnlineIntakesCount(params)).orElse(0L);
        QueryResultVo<List<VoIntake>> rsVo = new QueryResultVo<>() ;
        rsVo.pageSize = qo.pageSize ;
        rsVo.pageCurr = qo.pageCurr ;
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = rmOnHourReportHistoryMapper.getNotOnlineIntakes(params);
        return rsVo ;
    }
    /**
     * 获取累计流量超过指定值的取水口
     * @param qo
     * @return
     */
    public QueryResultVo<List<VoCumulativeFlow>> getLargeFlowIntakes(CumulativeFlowQO qo) {
        // 生成查询参数
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ;
        // 获取符合条件的记录数
        Long itemTotal = Optional.ofNullable(rmOnHourReportLastMapper.getLargeFlowIntakesCount(params)).orElse(0L);
        QueryResultVo<List<VoCumulativeFlow>> rsVo = new QueryResultVo<>() ;
        rsVo.pageSize = qo.pageSize ;
        rsVo.pageCurr = qo.pageCurr ;
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = rmOnHourReportLastMapper.getLargeFlowIntakes(params);
        return rsVo ;
    }
    /**
     * 获取累计流量低于指定值的取水口
     * @param qo
     * @return
     */
    public QueryResultVo<List<VoCumulativeFlow>> getSmallFlowIntakes(CumulativeFlowQO qo) {
        // 生成查询参数
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ;
        // 获取符合条件的记录数
        Long itemTotal = Optional.ofNullable(rmOnHourReportLastMapper.getSmallFlowIntakesCount(params)).orElse(0L);
        QueryResultVo<List<VoCumulativeFlow>> rsVo = new QueryResultVo<>() ;
        rsVo.pageSize = qo.pageSize ;
        rsVo.pageCurr = qo.pageCurr ;
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = rmOnHourReportLastMapper.getSmallFlowIntakes(params);
        return rsVo ;
    }
    /**
     * 获取欠压取水口
     * @param qo
     * @return
     */
    public QueryResultVo<List<VoBatteryVolt>> getUnderVoltIntakes(BatteryVoltQO qo) {
        qo.setBatteryVolt(batteryVolt);
        // 生成查询参数
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ;
        // 获取符合条件的记录数
        Long itemTotal = Optional.ofNullable(rmOnHourReportLastMapper.getUnderVoltIntakesCount(params)).orElse(0L);
        QueryResultVo<List<VoBatteryVolt>> rsVo = new QueryResultVo<>() ;
        rsVo.pageSize = qo.pageSize ;
        rsVo.pageCurr = qo.pageCurr ;
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = rmOnHourReportLastMapper.getUnderVoltIntakes(params);
        return rsVo ;
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntkeCtrl.java
New file
@@ -0,0 +1,115 @@
package com.dy.pipIrrStatistics.intake;
import com.dy.common.aop.SsoAop;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.voSt.VoBatteryVolt;
import com.dy.pipIrrGlobal.voSt.VoCumulativeFlow;
import com.dy.pipIrrGlobal.voSt.VoIntake;
import com.dy.pipIrrStatistics.intake.qo.BatteryVoltQO;
import com.dy.pipIrrStatistics.intake.qo.CumulativeFlowQO;
import com.dy.pipIrrStatistics.intake.qo.IntakeQO;
import com.dy.pipIrrStatistics.result.StatisticlResultCode;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * @author ZhuBaoMin
 * @date 2024-08-01 13:57
 * @LastEditTime 2024-08-01 13:57
 * @Description
 */
@Slf4j
@RestController
@RequestMapping(path="statistics")
@RequiredArgsConstructor
public class IntkeCtrl {
    private final IntakeSv intakeSv;
    /**
     * 获取指定时间段内未上线的取水口
     * @param qo
     * @return
     */
    @GetMapping(path = "/getNotOnlineIntakes")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoIntake>>> getNotOnlineIntakes(IntakeQO qo) {
        try {
            QueryResultVo<List<VoIntake>> res = intakeSv.getNotOnlineIntakes(qo);
            if(res.itemTotal == 0) {
                return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.NO_RECORDS.getMessage());
            }
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("获取开卡记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * 获取累计流量超过指定值的取水口
     * @param qo
     * @return
     */
    @GetMapping(path = "/getLargeFlowIntakes")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoCumulativeFlow>>> getLargeFlowIntakes(CumulativeFlowQO qo) {
        try {
            QueryResultVo<List<VoCumulativeFlow>> res = intakeSv.getLargeFlowIntakes(qo);
            if(res.itemTotal == 0) {
                return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.NO_RECORDS.getMessage());
            }
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("获取开卡记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * 获取累计流量低于指定值的取水口
     * @param qo
     * @return
     */
    @GetMapping(path = "/getSmallFlowIntakes")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoCumulativeFlow>>> getSmallFlowIntakes(CumulativeFlowQO qo) {
        try {
            QueryResultVo<List<VoCumulativeFlow>> res = intakeSv.getSmallFlowIntakes(qo);
            if(res.itemTotal == 0) {
                return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.NO_RECORDS.getMessage());
            }
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("获取开卡记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * 获取欠压取水口
     * @param qo
     * @return
     */
    @GetMapping(path = "/getUnderVoltIntakes")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoBatteryVolt>>> getUnderVoltIntakes(BatteryVoltQO qo) {
        try {
            QueryResultVo<List<VoBatteryVolt>> res = intakeSv.getUnderVoltIntakes(qo);
            if(res.itemTotal == 0) {
                return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.NO_RECORDS.getMessage());
            }
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("获取开卡记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/qo/BatteryVoltQO.java
New file
@@ -0,0 +1,20 @@
package com.dy.pipIrrStatistics.intake.qo;
import com.dy.common.webUtil.QueryConditionVo;
import lombok.Data;
/**
 * @author ZhuBaoMin
 * @date 2024-08-03 10:47
 * @LastEditTime 2024-08-03 10:47
 * @Description
 */
@Data
public class BatteryVoltQO extends QueryConditionVo {
    /**
     * 电池电压
     */
    private Double batteryVolt;
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/qo/CumulativeFlowQO.java
New file
@@ -0,0 +1,20 @@
package com.dy.pipIrrStatistics.intake.qo;
import com.dy.common.webUtil.QueryConditionVo;
import lombok.Data;
/**
 * @author ZhuBaoMin
 * @date 2024-08-01 16:20
 * @LastEditTime 2024-08-01 16:20
 * @Description 累计流量查询对象
 */
@Data
public class CumulativeFlowQO extends QueryConditionVo {
    /**
     * 累计流量
     */
    private Double totalAmount;
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/qo/IntakeQO.java
New file
@@ -0,0 +1,30 @@
package com.dy.pipIrrStatistics.intake.qo;
import com.dy.common.webUtil.QueryConditionVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
/**
 * @author ZhuBaoMin
 * @date 2024-08-01 14:31
 * @LastEditTime 2024-08-01 14:31
 * @Description
 */
@Data
public class IntakeQO extends QueryConditionVo {
    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private String timeStart;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotBlank(message = "结束时间不能为空")
    private String timeStop;
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/result/StatisticlResultCode.java
New file
@@ -0,0 +1,20 @@
package com.dy.pipIrrStatistics.result;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
 * @author ZhuBaoMin
 * @date 2024-08-01 15:03
 * @LastEditTime 2024-08-01 15:03
 * @Description
 */
@Getter
@AllArgsConstructor
public enum StatisticlResultCode {
    NO_RECORDS(10001, "没有符合条件的记录");
    private final Integer code;
    private final String message;
}