liurunyu
2025-02-05 1157c9c0eca6484e197aaeb941ac7ce572a5cc03
取水口综合信息:监控数据信息,统计数据信息
10个文件已添加
7个文件已修改
802 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeAmountDay.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeAmountMonth.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeLossDay.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeLossMonth.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeOpenCloseValve.java 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeRemote.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoAllRound/Ar4RemoteMapper.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoAllRound/Ar4StatisticsMapper.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoDayIntakeAmount.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoMonthAmount.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ar4RemoteMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ar4StatisticsMapper.xml 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/allRound/Ar4RemoteCtrl.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/allRound/Ar4RemoteSv.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsCtrl.java 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsSv.java 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/说明.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeAmountDay.java
New file
@@ -0,0 +1,48 @@
package com.dy.pipIrrGlobal.VoAllRound;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;
import java.util.Date;
/**
 * @Author: liurunyu
 * @Date: 2025/2/5 10:14
 * @Description
 */
@Data
@JsonPropertyOrder({ "intakeId", "amount", "amount", "money", "times" })
public class VoArIntakeAmountDay {
    public static final long serialVersionUID = 202502051005003L;
    /**
     * å–水口ID
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long intakeId;
    /**
     * æ—¥æœŸ
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date dt ;
    /**
     * ç”¨æ°´é‡
     */
    public Double amount ;
    /**
     * ç”¨æ°´æ¶ˆè´¹é‡‘额
     */
    public Double money ;
    /**
     * ç”¨æ°´æ¬¡æ•°
     */
    public Integer times ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeAmountMonth.java
New file
@@ -0,0 +1,38 @@
package com.dy.pipIrrGlobal.VoAllRound;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;
import java.util.Date;
/**
 * @Author: liurunyu
 * @Date: 2025/2/5 10:14
 * @Description
 */
@Data
@JsonPropertyOrder({ "intakeId", "amount", "amount"})
public class VoArIntakeAmountMonth {
    public static final long serialVersionUID = 202502051005004L;
    /**
     * å–水口ID
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long intakeId;
    /**
     * æ—¥æœŸ
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date dt ;
    /**
     * ç”¨æ°´é‡
     */
    public Double amount ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeLossDay.java
New file
@@ -0,0 +1,38 @@
package com.dy.pipIrrGlobal.VoAllRound;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;
import java.util.Date;
/**
 * @Author: liurunyu
 * @Date: 2025/2/5 9:59
 * @Description
 */
@Data
@JsonPropertyOrder({ "intakeId", "dt", "loss" })
public class VoArIntakeLossDay {
    public static final long serialVersionUID = 202502051001001L;
    /**
     * å–水口ID
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long intakeId;
    /**
     * æ—¥æœŸæ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date dt ;
    /**
     * æ—¥æ¼æŸé‡
     */
    public Double loss ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeLossMonth.java
New file
@@ -0,0 +1,33 @@
package com.dy.pipIrrGlobal.VoAllRound;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;
/**
 * @Author: liurunyu
 * @Date: 2025/2/5 10:04
 * @Description
 */
@Data
@JsonPropertyOrder({ "intakeId", "dt", "loss" })
public class VoArIntakeLossMonth {
    public static final long serialVersionUID = 202502051005001L;
    /**
     * å–水口ID
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long intakeId;
    /**
     * æœˆä»½ï¼ˆæ ¼å¼ï¼š yyyy-mm)
     */
    public String dt ;
    /**
     * æ—¥æ¼æŸé‡
     */
    public Double loss ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeOpenCloseValve.java
New file
@@ -0,0 +1,110 @@
package com.dy.pipIrrGlobal.VoAllRound;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;
import java.util.Date;
/**
 * @Author: liurunyu
 * @Date: 2025/2/5 9:36
 * @Description
 */
@Data
@JsonPropertyOrder({ "intakeId", "clientId",
        "clientName", "clientAddr",
        "openTime" , "openType" ,
        "openIcNum" , "openRemainMoney" ,
        "closeTime" , "closeType" ,
        "closeIcNum" , "closeRemainMoney" ,
        "thisTime" , "thisAmount" ,
        "thisMoney"  })
public class VoArIntakeOpenCloseValve {
    public static final long serialVersionUID = 202502050936001L;
    /**
     * å–水口ID
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long intakeId;
    /**
     * å¼€å…³é˜€å†œæˆ·ID
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long clientId;
    /**
     * å¼€å…³é˜€å†œæˆ·
     */
    public String clientName;
    /**
     * å†œæˆ·åœ°å€
     */
    public String clientAddr;
    /**
     * å¼€é˜€æ—¥æœŸæ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date openTime ;
    /**
     * å¼€é˜€ç±»åž‹
     */
    @JSONField(serialize=false)
    public Byte opType;
    public String openType;
    /**
     * å¼€é˜€IC卡编号
     */
    public String openIcNum;
    /**
     * å¼€é˜€æ—¶å¡å†…剩余金额
     */
    public Double openRemainMoney;
    /**
     * å…³é˜€æ—¥æœŸæ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date closeTime ;
    /**
     * å…³é˜€ç±»åž‹
     */
    @JSONField(serialize=false)
    public Byte clType;
    public String closeType;
    /**
     * å…³é˜€IC卡编号
     */
    public String closeIcNum;
    /**
     * å…³é˜€æ—¶å¡å†…剩余金额
     */
    public Double closeRemainMoney;
    /**
     * æœ¬æ¬¡ç”¨æ°´æ—¶é•¿ï¼ˆåˆ†é’Ÿï¼‰
     */
    public Integer thisTime;
    /**
     * æœ¬æ¬¡ç”¨æ°´é‡
     */
    public Double thisAmount;
    /**
     * æœ¬æ¬¡æ¶ˆè´¹é‡‘额
     */
    public Double thisMoney;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeRemote.java
@@ -2,11 +2,17 @@
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.dy.pipIrrGlobal.voRm.VoLossDay;
import com.dy.pipIrrGlobal.voRm.VoOpenCloseValve;
import com.dy.pipIrrGlobal.voSt.VoDayIntakeAmount;
import com.dy.pipIrrGlobal.voSt.VoDayLoss;
import com.dy.pipIrrGlobal.voSt.VoMonthAmount;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
 * @Author: liurunyu
@@ -14,7 +20,7 @@
 * @Description
 */
@Data
@JsonPropertyOrder({"id", "onLine", "alarm", "alarmDt", "lastOpenDt", "lastCloseDt"})
@JsonPropertyOrder({"id", "onLine", "alarm", "alarmDt", "lastOpenDt", "lastCloseDt", "lossAmount", "lossDt"})
public class VoArIntakeRemote {
    private static final long serialVersionUID = 202501141703001L;
@@ -49,5 +55,40 @@
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date lastCloseDt ;
    /**
     * æœ€åŽç»Ÿè®¡æ¼æŸé‡
     */
    public Double lossAmount ;
    /**
     * æœ€åŽç»Ÿè®¡æ¼æŸæ—¥æœŸ
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    public Date lossDt ;
    /**
     * å¼€å…³é˜€è®°å½•
     */
    public List<VoOpenCloseValve> openCloseRecords ;
    /**
     * æ—¥æ¼æŸè®°å½•
     */
    public List<VoDayLoss> lossDayRecords ;
    /**
     * æœˆæ¼æŸè®°å½•
     */
    public List<VoMonthAmount> lossMonthRecords ;
    /**
     * æ—¥ç”¨æ°´ç»Ÿè®¡è®°å½•
     */
    public List<VoDayIntakeAmount> amountDayRecords ;
    /**
     * æœˆç”¨æ°´ç»Ÿè®¡è®°å½•
     */
    public List<VoMonthAmount> amountMonthRecords ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoAllRound/Ar4RemoteMapper.java
@@ -9,7 +9,7 @@
/**
 * @Author: liurunyu
 * @Date: 2025/1/14 16:45
 * @Date: 2025/1/22 09:45
 * @Description
 */
@Mapper
@@ -20,14 +20,21 @@
     * @param intakeId
     * @return
     */
    List<VoArIntakeRemote> alarmInfo(@Param("intakeId") Long intakeId) ;
    List<VoArIntakeRemote> alarmLastInfo(@Param("intakeId") Long intakeId) ;
    /**
     * æŸ¥è¯¢å–水口最新开关阀信息
     * @param intakeId
     * @return
     */
    List<VoArIntakeRemote> openCloseValveInfo(@Param("intakeId") Long intakeId) ;
    List<VoArIntakeRemote> openCloseValveLastInfo(@Param("intakeId") Long intakeId) ;
    /**
     * æŸ¥è¯¢å–水口最新漏损信息
     * @param intakeId
     * @return
     */
    List<VoArIntakeRemote> lossLastInfo(@Param("intakeId") Long intakeId) ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoAllRound/Ar4StatisticsMapper.java
New file
@@ -0,0 +1,55 @@
package com.dy.pipIrrGlobal.daoAllRound;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.VoAllRound.*;
import io.swagger.v3.oas.models.security.SecurityScheme;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * @Author: liurunyu
 * @Date: 2025/1/22 14:45
 * @Description
 */
@Mapper
public interface Ar4StatisticsMapper extends BaseMapper<Object> {
    /**
     * å¼€å…³é˜€è®°å½•
     * @param intakeId
     * @return
     */
    List<VoArIntakeOpenCloseValve> openCloseRecords(@Param("intakeId") Long intakeId, @Param("start") Integer start, @Param("count") Integer count) ;
    /**
     * æ—¥æ¼æŸè®°å½•
     * @param intakeId
     * @return
     */
    List<VoArIntakeLossDay> lossDayRecords(@Param("intakeId") Long intakeId, @Param("start") Integer start, @Param("count") Integer count) ;
    /**
     * æœˆæ¼æŸè®°å½•
     * @param intakeId
     * @return
     */
    List<VoArIntakeLossMonth> lossMonthRecords(@Param("intakeId") Long intakeId, @Param("start") Integer start, @Param("count") Integer count) ;
    /**
     * æ—¥ç”¨æ°´ç»Ÿè®¡è®°å½•
     * @param intakeId
     * @return
     */
    List<VoArIntakeAmountDay> amountDayRecords(@Param("intakeId") Long intakeId, @Param("start") Integer start, @Param("count") Integer count) ;
    /**
     * æœˆç”¨æ°´ç»Ÿè®¡è®°å½•
     * @param intakeId
     * @return
     */
    List<VoArIntakeAmountMonth> amountMonthRecords(@Param("intakeId") Long intakeId, @Param("start") Integer start, @Param("count") Integer count) ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoDayIntakeAmount.java
@@ -42,6 +42,16 @@
     */
    public Double intakeLat;
    /**
     * å¹´åº¦
     */
    public Integer year ;
    /**
     * æœˆä»½
     */
    public Integer month ;
    @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" )
    public Double amount1;
    @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" )
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSt/VoMonthAmount.java
@@ -38,6 +38,11 @@
     */
    public Double intakeLat;
    /**
     * å¹´åº¦
     */
    public Integer year ;
    @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" )
    public Double month1;
    @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" )
pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ar4RemoteMapper.xml
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dy.pipIrrGlobal.daoAllRound.Ar4RemoteMapper">
    <select id="alarmInfo" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote">
    <select id="alarmLastInfo" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote">
        select
        CONCAT(
        IF(alarm_loss = 1, '漏损报警,', ''),
@@ -15,7 +15,7 @@
        where intake_id = #{intakeId,jdbcType=BIGINT}
    </select>
    <select id="openCloseValveInfo" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote">
    <select id="openCloseValveLastInfo" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote">
        select
        op_dt AS lastOpenDt,
        cl_dt AS lastCloseDt
@@ -23,4 +23,12 @@
        where intake_id = #{intakeId,jdbcType=BIGINT}
    </select>
    <select id="lossLastInfo" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote">
        select
        dt AS lossDt,
        loss_amount AS lossAmount
        from rm_loss_day_last rldl
        where intake_id = #{intakeId,jdbcType=BIGINT}
    </select>
</mapper>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ar4StatisticsMapper.xml
New file
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dy.pipIrrGlobal.daoAllRound.Ar4StatisticsMapper">
    <select id="openCloseRecords" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeOpenCloseValve">
        select
        tb.intake_id as intakeId,
        sec.id as clientId,
        sec.name as clientName,
        sec.address as clientAddr,
        tb.op_dt as openTime,
        tb.op_type as opType,
        tb.op_ic_card_no as openIcNum,
        tb.op_remain_money as openRemainMoney,
        tb.cl_dt as closeTime,
        tb.cl_type as clType,
        tb.cl_ic_card_no as closeIcNum,
        tb.cl_remain_money as closeRemainMoney,
        tb.cl_this_time as thisTime,
        tb.cl_this_amount as thisAmount,
        tb.cl_this_money as thisMoney
        from rm_open_close_valve_history tb
        left join se_client sec on tb.client_id = sec.id
        where tb.intake_id = #{intakeId, jdbcType=BIGINT}
        ORDER BY tb.id DESC
        <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="lossDayRecords" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeLossDay">
        select
        tb.intake_id as intakeId,
        tb.dt AS dt,
        tb.loss_amount AS loss
        from rm_loss_day tb
        where intake_id = #{intakeId, jdbcType=BIGINT}
        ORDER BY tb.id DESC
        <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="lossMonthRecords" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeLossMonth">
        select
        tb.intake_id as intakeId,
        CONCAT(tb.year, '-', tb.month) AS dt,
        tb.amount AS loss
        from st_loss_month tb
        where intake_id = #{intakeId, jdbcType=BIGINT}
        ORDER BY tb.id DESC
        <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="amountDayRecords" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeAmountDay">
        select
        tb.intake_id as intakeId,
        tb.dt AS dt,
        tb.amount AS amount,
        tb.money AS money,
        tb.times AS times
        from rm_intake_amount_day tb
        where intake_id = #{intakeId, jdbcType=BIGINT}
        ORDER BY tb.id DESC
        <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="amountMonthRecords" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeAmountMonth">
        select
        tb.intake_id as intakeId,
        CONCAT(tb.year, '-', tb.month) AS dt,
        tb.amount AS amount
        from st_intake_amount_month tb
        where intake_id = #{intakeId, jdbcType=BIGINT}
        ORDER BY tb.id DESC
        <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-remote/src/main/java/com/dy/pipIrrRemote/allRound/Ar4RemoteCtrl.java
@@ -3,7 +3,6 @@
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.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote;
import io.swagger.v3.oas.annotations.Operation;
@@ -25,7 +24,7 @@
 * @Description
 */
@Slf4j
@Tag(name = "有关远程操作信息的综合", description = "有关远程操作信息的综合")
@Tag(name = "取水口综合信息之相关监测数据", description = "取水口综合信息之相关监测数据")
@RestController
@RequestMapping(path = "ar4Remote")
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked")
@@ -40,25 +39,25 @@
    /**
     * ç»¼åˆä¿¡æ¯
     * å–水口基本信息
     * @return æ‰€æœ‰ç‰‡åŒºæ•°æ®
     * å–水口监测数据
     * @return
     */
    @Operation(summary = "综合信息", description = "取水口基本信息")
    @Operation(summary = "综合信息", description = "取水口监测数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "取水口基本信息(BaseResponse.content:QueryResultVo{})",
                    description = "取水口监测数据(BaseResponse.content:VoArIntakeRemote{})",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoArIntakeRemote.class))}
            )
    })
    @GetMapping(path = "intakeInfo")
    @SsoAop()
    public BaseResponse<QueryResultVo<VoArIntakeRemote>> intakeInfo(Long intakeId) {
    public BaseResponse<VoArIntakeRemote> intakeInfo(Long intakeId) {
        if (intakeId == null || intakeId.longValue() == 0L) {
            return BaseResponseUtils.buildException("取水口id不能为空");
        }
        QueryResultVo<VoArIntakeRemote> res = this.sv.intakeInfo(intakeId);
        VoArIntakeRemote res = this.sv.intakeInfo(intakeId);
        return BaseResponseUtils.buildSuccess(res);
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/allRound/Ar4RemoteSv.java
@@ -8,9 +8,9 @@
import com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote;
import com.dy.pipIrrGlobal.daoAllRound.Ar4BaseMapper;
import com.dy.pipIrrGlobal.daoAllRound.Ar4RemoteMapper;
import com.dy.pipIrrGlobal.daoAllRound.Ar4StatisticsMapper;
import com.dy.pipIrrGlobal.rtuMw.CodeLocal;
import com.dy.pipIrrGlobal.rtuMw.Web2RtuMw;
import com.dy.pipIrrGlobal.voPr.VoOnLineIntake;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
@@ -45,13 +45,14 @@
     * å–水口基本信息
     * @return å–水口基本信息
     */
    public QueryResultVo<VoArIntakeRemote> intakeInfo(Long intakeId){
    public VoArIntakeRemote intakeInfo(Long intakeId){
        VoArIntakeRemote rVo = new VoArIntakeRemote() ;
        String rtuAddr = this.getRtuAddr(intakeId);
        this.getRtuOnLine(intakeId, rtuAddr, rVo);
        this.getAlarmInfo(intakeId, rtuAddr, rVo);
        this.getOpenCloseValveInfo(intakeId, rtuAddr, rVo);
        return null ;
        this.getAlarmLastInfo(intakeId, rtuAddr, rVo);
        this.getOpenCloseValveLastInfo(intakeId, rtuAddr, rVo);
        this.getLossAmountLastInfo(intakeId, rtuAddr, rVo);
        return rVo ;
    }
    /**
@@ -107,8 +108,8 @@
     * å¾—到取水口最新报警信息
     * @param intakeId
     */
    private void getAlarmInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){
        List<VoArIntakeRemote> list = remoteDao.alarmInfo(intakeId);
    private void getAlarmLastInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){
        List<VoArIntakeRemote> list = remoteDao.alarmLastInfo(intakeId);
        if(list != null && list.size() > 0){
            VoArIntakeRemote vo = list.get(0) ;
            rVo.alarm = vo.alarm ;
@@ -119,12 +120,24 @@
     * å¾—到取水口最新开关阀信息
     * @param intakeId
     */
    private void getOpenCloseValveInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){
        List<VoArIntakeRemote> list = remoteDao.openCloseValveInfo(intakeId);
    private void getOpenCloseValveLastInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){
        List<VoArIntakeRemote> list = remoteDao.openCloseValveLastInfo(intakeId);
        if(list != null && list.size() > 0){
            VoArIntakeRemote vo = list.get(0) ;
            rVo.lastOpenDt = vo.lastOpenDt ;
            rVo.lastCloseDt = vo.lastCloseDt ;
        }
    }
   /**
     * å¾—到取水口最新漏损信息
     * @param intakeId
     */
    private void getLossAmountLastInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){
        List<VoArIntakeRemote> list = remoteDao.lossLastInfo(intakeId);
        if(list != null && list.size() > 0){
            VoArIntakeRemote vo = list.get(0) ;
            rVo.lossDt = vo.lossDt ;
            rVo.lossAmount = vo.lossAmount ;
        }
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsCtrl.java
New file
@@ -0,0 +1,164 @@
package com.dy.pipIrrStatistics.allRound;
import com.dy.common.aop.SsoAop;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.VoAllRound.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
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: liurunyu
 * @Date: 2025/2/5 10:46
 * @Description
 */
@Slf4j
@Tag(name = "取水口综合信息之相关统计数据", description = "取水口综合信息之相关统计数据")
@RestController
@RequestMapping(path = "ar4Statistics")
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked")
public class Ar4StatisticsCtrl {
    private Ar4StatisticsSv sv;
    @Autowired
    private void setSv(Ar4StatisticsSv sv) {
        this.sv = sv;
    }
    /**
     * ç»¼åˆä¿¡æ¯
     * å–水口开关阀数据
     * @return
     */
    @Operation(summary = "综合信息", description = "取水口开关阀数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "取水口开关阀数据(BaseResponse.content:VoArIntakeOpenCloseValve[{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoArIntakeOpenCloseValve.class))}
            )
    })
    @GetMapping(path = "openCloseValveInfo")
    @SsoAop()
    public BaseResponse<List<VoArIntakeOpenCloseValve>> openCloseValveInfo(Long intakeId) {
        if (intakeId == null || intakeId.longValue() == 0L) {
            return BaseResponseUtils.buildException("取水口id不能为空");
        }
        List<VoArIntakeOpenCloseValve> res = this.sv.openCloseValveRecords(intakeId);
        return BaseResponseUtils.buildSuccess(res);
    }
    /**
     * ç»¼åˆä¿¡æ¯
     * å–水口日漏损数据
     * @return
     */
    @Operation(summary = "综合信息", description = "取水口日漏损数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "取水口日漏损数据(BaseResponse.content:VoArIntakeLossDay[{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoArIntakeLossDay.class))}
            )
    })
    @GetMapping(path = "lossDayRecords")
    @SsoAop()
    public BaseResponse<List<VoArIntakeLossDay>> lossDayRecords(Long intakeId) {
        if (intakeId == null || intakeId.longValue() == 0L) {
            return BaseResponseUtils.buildException("取水口id不能为空");
        }
        List<VoArIntakeLossDay> res = this.sv.lossDayRecords(intakeId);
        return BaseResponseUtils.buildSuccess(res);
    }
    /**
     * ç»¼åˆä¿¡æ¯
     * å–水口月漏损数据
     * @return
     */
    @Operation(summary = "综合信息", description = "取水口月漏损数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "取水口月漏损数据(BaseResponse.content:VoArIntakeLossMonth[{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoArIntakeLossMonth.class))}
            )
    })
    @GetMapping(path = "lossMonthRecords")
    @SsoAop()
    public BaseResponse<List<VoArIntakeLossMonth>> lossMonthRecords(Long intakeId) {
        if (intakeId == null || intakeId.longValue() == 0L) {
            return BaseResponseUtils.buildException("取水口id不能为空");
        }
        List<VoArIntakeLossMonth> res = this.sv.lossMonthRecords(intakeId);
        return BaseResponseUtils.buildSuccess(res);
    }
    /**
     * ç»¼åˆä¿¡æ¯
     * å–水口日取水数据
     * @return
     */
    @Operation(summary = "综合信息", description = "取水口日取水数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "取水口日取水数据(BaseResponse.content:VoArIntakeAmountDay[{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoArIntakeAmountDay.class))}
            )
    })
    @GetMapping(path = "amountDayRecords")
    @SsoAop()
    public BaseResponse<List<VoArIntakeAmountDay>> amountDayRecords(Long intakeId) {
        if (intakeId == null || intakeId.longValue() == 0L) {
            return BaseResponseUtils.buildException("取水口id不能为空");
        }
        List<VoArIntakeAmountDay> res = this.sv.amountDayRecords(intakeId);
        return BaseResponseUtils.buildSuccess(res);
    }
    /**
     * ç»¼åˆä¿¡æ¯
     * å–水口月取水数据
     * @return
     */
    @Operation(summary = "综合信息", description = "取水口月取水数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "取水口月取水数据(BaseResponse.content:VoArIntakeAmountDay[{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoArIntakeAmountMonth.class))}
            )
    })
    @GetMapping(path = "amountMonthRecords")
    @SsoAop()
    public BaseResponse<List<VoArIntakeAmountMonth>> amountMonthRecords(Long intakeId) {
        if (intakeId == null || intakeId.longValue() == 0L) {
            return BaseResponseUtils.buildException("取水口id不能为空");
        }
        List<VoArIntakeAmountMonth> res = this.sv.amountMonthRecords(intakeId);
        return BaseResponseUtils.buildSuccess(res);
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsSv.java
New file
@@ -0,0 +1,85 @@
package com.dy.pipIrrStatistics.allRound;
import com.dy.common.mw.protocol.p206V1.CommonV1;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.VoAllRound.*;
import com.dy.pipIrrGlobal.daoAllRound.Ar4StatisticsMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * @Author: liurunyu
 * @Date: 2025/2/5 10:46
 * @Description
 */
@Slf4j
@Service
public class Ar4StatisticsSv {
    @Autowired
    private Ar4StatisticsMapper statisticsDao;
    //记录条数
    private static final int totalRecordsCount = 10 ;
    /**
     * å¾—到取水口开关阀记录(totalRecordsCount条)
     * @param intakeId
     */
    public List<VoArIntakeOpenCloseValve> openCloseValveRecords(Long intakeId){
        List<VoArIntakeOpenCloseValve> list = statisticsDao.openCloseRecords(intakeId, 0, totalRecordsCount);
        if(list != null && list.size() > 0){
            for (VoArIntakeOpenCloseValve vo : list) {
                if(vo != null){
                    if(vo.opType != null){
                        vo.openType = CommonV1.openCloseValveType(vo.opType);
                    }
                    if(vo.clType != null){
                        vo.closeType = CommonV1.openCloseValveType(vo.clType);
                    }
                }
            }
        }
        return list;
    }
    /**
     * å¾—到取水口日漏损记录(totalRecordsCount条)
     * @param intakeId
     */
    public List<VoArIntakeLossDay> lossDayRecords(Long intakeId){
        return statisticsDao.lossDayRecords(intakeId, 0, totalRecordsCount);
    }
    /**
     * å¾—到取水口月漏损记录(totalRecordsCount条)
     * @param intakeId
     */
    public List<VoArIntakeLossMonth> lossMonthRecords(Long intakeId){
        return statisticsDao.lossMonthRecords(intakeId, 0, totalRecordsCount);
    }
    /**
     * å¾—到取水口日用水记录(totalRecordsCount条)
     * @param intakeId
     */
    public List<VoArIntakeAmountDay> amountDayRecords(Long intakeId){
        return statisticsDao.amountDayRecords(intakeId, 0, totalRecordsCount);
    }
    /**
     * å¾—到取水口月用水记录(totalRecordsCount条)
     * @param intakeId
     */
    public List<VoArIntakeAmountMonth> amountMonthRecords(Long intakeId){
        return statisticsDao.amountMonthRecords(intakeId, 0, totalRecordsCount);
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/˵Ã÷.txt
New file
@@ -0,0 +1 @@
allRound代表综合