1、大屏展示模块:基本信息统计、当前信息统计、监测信息统计(部分);
2、优化代码。
8个文件已添加
3个文件已修改
614 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoLargeScreen/Ls4StatisticsMapper.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voLargeScreen/VoBaseInfo.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voLargeScreen/VoCurrentInfo.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voLargeScreen/VoMonitorInfo.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ls4StatisticsMapper.xml 134 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpSessionCache.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/largeScreen/Ls4StatisticsCtrl.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/largeScreen/Ls4StatisticsSv.java 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/largeScreen/说明.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoLargeScreen/Ls4StatisticsMapper.java
New file
@@ -0,0 +1,78 @@
package com.dy.pipIrrGlobal.daoLargeScreen;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
/**
 * @Author: liurunyu
 * @Date: 2025/2/6 10:46
 * @Description
 */
@Mapper
public interface Ls4StatisticsMapper extends BaseMapper<Object> {
    /**
     * æ¶‰åŠè¡Œæ”¿åŒºåˆ’总数
     * @return
     */
    Integer totalCountOfDistrict(@Param("level")Integer level) ;
    /**
     * ç‰‡åŒºæ€»æ•°
     * @return
     */
    Integer totalCountOfBlock() ;
    /**
     * åˆ†æ°´æˆ¿æ€»æ•°
     * @return
     */
    Integer totalCountOfDivide() ;
    /**
     * å–水口总数
     * @return
     */
    Integer totalCountOfIntake() ;
    /**
     * å·²ç»‘定控制器的取水口总数
     * @return
     */
    Integer totalCountOfIntakeWithController() ;
   /**
     * æœªç»‘定控制器的取水口总数
     * @return
     */
    Integer totalCountOfIntakeWithoutController() ;
    /**
     * é˜€æŽ§å™¨æ€»æ•°
     * @return
     */
    Integer totalCountOfController() ;
    /**
     * æµæµªé˜€æŽ§å™¨æ€»æ•°
     * @return
     */
    Integer totalCountOfControllerTramp() ;
    /**
     * å¼€é˜€æ€»æ•°
     */
    Integer totalCountOfOpenValve(@Param("dt") Date dt) ;
    /**
     * å…³é˜€æ€»æ•°
     */
    Integer totalCountOfCloseValve(@Param("dt") Date dt) ;
    /**
     * æŠ¥è­¦æ€»æ•°
     */
    Integer totalCountOfAlarm(@Param("dt") Date dt) ;
    /**
     * æ— æŠ¥è­¦æ€»æ•°
     */
    Integer totalCountOfNoAlarm(@Param("dt") Date dt) ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java
@@ -3,7 +3,6 @@
import com.dy.common.multiDataSource.DataSourceContext;
import com.dy.common.mw.protocol.Command;
import com.dy.common.mw.protocol.CommandType;
import com.dy.common.softUpgrade.state.UpgradeTaskVo;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import org.springframework.core.env.Environment;
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voLargeScreen/VoBaseInfo.java
New file
@@ -0,0 +1,65 @@
package com.dy.pipIrrGlobal.voLargeScreen;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;
/**
 * @Author: liurunyu
 * @Date: 2025/2/6 10:40
 * @Description
 */
@Data
@JsonPropertyOrder({"totalCountOfTown",
        "totalCountOfVillage",
        "totalCountOfBlock",
        "totalCountOfDivide",
        "totalCountOfIntake",
        "totalCountOfIntakeWithController",
        "totalCountOfIntakeWithoutController",
        "totalCountOfController",
        "totalCountOfControllerTramp"
        })
public class VoBaseInfo {
    private static final long serialVersionUID = 202502060948001L;
    /**
     * ä¹¡é•‡æ€»æ•°
     */
    public Integer totalCountOfTown ;
    /**
     * è¡Œæ”¿æ‘总数
     */
    public Integer totalCountOfVillage ;
    /**
     * ç‰‡åŒºæ€»æ•°
     */
    public Integer totalCountOfBlock ;
    /**
     * åˆ†æ°´æˆ¿æ€»æ•°
     */
    public Integer totalCountOfDivide ;
    /**
     * å–水口总数
     */
    public Integer totalCountOfIntake ;
    /**
     * å·²ç»‘定控制器的取水口总数
     */
    public Integer totalCountOfIntakeWithController ;
    /**
     * æœªç»‘定控制器的取水口总数
     */
    public Integer totalCountOfIntakeWithoutController ;
    /**
     * é˜€æŽ§å™¨æ€»æ•°
     */
    public Integer totalCountOfController ;
    /**
     * æµæµªé˜€æŽ§å™¨æ€»æ•°
     */
    public Integer totalCountOfControllerTramp ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voLargeScreen/VoCurrentInfo.java
New file
@@ -0,0 +1,58 @@
package com.dy.pipIrrGlobal.voLargeScreen;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;
/**
 * @Author: liurunyu
 * @Date: 2025/2/6 10:40
 * @Description å½“前信息
 */
@Data
@JsonPropertyOrder({"totalCountOfOnLine",
        "totalCountOfOffLine",
        "totalCountOfOpenValve",
        "totalCountOfCloseValve",
        "totalCountOfUnknownValve"
        })
public class VoCurrentInfo {
    private static final long serialVersionUID = 202502061348001L;
    /**
     * åœ¨çº¿æ€»æ•°
     */
    public Integer totalCountOfOnLine ;
    /**
     * ç¦»çº¿æ€»æ•°
     */
    public Integer totalCountOfOffLine ;
    /**
     * é˜€å¼€æ€»æ•°
     */
    public Integer totalCountOfOpenValve ;
    /**
     * é˜€å…³æ€»æ•°
     */
    public Integer totalCountOfCloseValve ;
   /**
     * æœªçŸ¥é˜€é—¨çŠ¶æ€æ€»æ•°
     */
    public Integer totalCountOfUnknownValve ;
    /**
     * æŠ¥è­¦æ€»æ•°
     */
    public Integer totalCountOfAlarm ;
    /**
     * æ— æŠ¥è­¦æ€»æ•°
     */
    public Integer totalCountOfNoAlarm ;
   /**
     * æœªçŸ¥æŠ¥è­¦çŠ¶æ€æ€»æ•°
     */
    public Integer totalCountOfUnknownAlarm ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voLargeScreen/VoMonitorInfo.java
New file
@@ -0,0 +1,33 @@
package com.dy.pipIrrGlobal.voLargeScreen;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;
/**
 * @Author: liurunyu
 * @Date: 2025/2/6 10:40
 * @Description ç›‘测信息
 */
@Data
@JsonPropertyOrder({"totalCountOfOnLine",
        "totalCountOfOffLine"
        })
public class VoMonitorInfo {
    private static final long serialVersionUID = 202502061348001L;
    /**
     * ä»ŽæŸæ—¶ä»¥æ¥ï¼Œæ›¾ä¸ŠæŠ¥è¿‡æ•°æ®çš„æ€»æ•°
     */
    public Integer totalCountOfReport ;
    /**
     * ä»ŽæŸæ—¶ä»¥æ¥ï¼Œæœªæ›¾ä¸ŠæŠ¥è¿‡æ•°æ®çš„æ€»æ•°
     */
    public Integer totalCountOfNoReport ;
    /**
     * ä»Žæœªä¸ŠæŠ¥è¿‡æ•°æ®çš„æ€»æ•°
     */
    public Integer totalCountOfNeverReport ;
}
pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ls4StatisticsMapper.xml
New file
@@ -0,0 +1,134 @@
<?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.daoLargeScreen.Ls4StatisticsMapper">
    <select id="totalCountOfDistrict" resultType="java.lang.Integer">
        select
            count(*) as count
        from ba_district tb
        where tb.level = #{level, jdbcType=INTEGER}
            and tb.deleted != 1
    </select>
    <select id="totalCountOfBlock" resultType="java.lang.Integer">
        select
            count(*) as count
        from ba_block tb
        where tb.deleted != 1
    </select>
    <select id="totalCountOfDivide" resultType="java.lang.Integer">
        select
            count(*) as count
        from pr_divide tb
        where tb.deleted != 1
    </select>
    <select id="totalCountOfIntake" resultType="java.lang.Integer">
        select
        count(*) as count
        from pr_intake tb
        where tb.deleted != 1
    </select>
    <select id="totalCountOfIntakeWithController" resultType="java.lang.Integer">
        select count(*) as count
        from (
             select distinct tb.id
             from pr_intake tb
                inner join pr_intake_controller ctb on tb.id = ctb.intakeId
             where tb.deleted != 1
                and ctb.id is not null
        ) otb
    </select>
    <select id="totalCountOfIntakeWithoutController" resultType="java.lang.Integer">
        select
            count(*) as count
        from pr_intake tb
                 left join pr_intake_controller ctb on tb.id = ctb.intakeId
        where tb.deleted != 1
          and ctb.id is null
    </select>
    <select id="totalCountOfController" resultType="java.lang.Integer">
        select
            count(*) as count
        from pr_controller tb
        where tb.deleted != 1
    </select>
    <select id="totalCountOfControllerTramp" resultType="java.lang.Integer">
        select
            count(*) as count
        from pr_controller_tramp tb
    </select>
    <select id="totalCountOfOpenValve" resultType="java.lang.Integer">
        select
            count(*) as count
        from rm_alarm_state_last tb
        where valve_state = 0
        <if test="dt != null ">
            AND tb.dt <![CDATA[>=]]> #{dt, javaType=DATE, jdbcType=TIMESTAMP}
        </if>
    </select>
    <select id="totalCountOfCloseValve" resultType="java.lang.Integer">
        select
            count(*) as count
        from rm_alarm_state_last tb
        where valve_state = 1
        <if test="dt != null ">
            AND tb.dt <![CDATA[>=]]> #{dt, javaType=DATE, jdbcType=TIMESTAMP}
        </if>
    </select>
    <select id="totalCountOfAlarm" resultType="java.lang.Integer">
        select
            count(*) as count
        from rm_alarm_state_last tb
        where (alarm_remain_water = 1 or
            alarm_exceed_year = 1 or
            alarm_water_meter_fault = 1 or
            alarm_loss = 1 or
            alarm_water_meter_break = 1 or
            alarm_ele_meter_fault = 1 or
            alarm_inner_door = 1 or
            alarm_outer_door = 1 or
            alarm_ele_miss = 1 or
            alarm_ele_exceed = 1 or
            alarm_ele_low_volt = 1 or
            state_ic_enable = 1 or
            alarm_battery_volt = 1 or
            alarm_valve = 1)
        <if test="dt != null ">
            AND tb.dt <![CDATA[>=]]> #{dt, javaType=DATE, jdbcType=TIMESTAMP}
        </if>
    </select>
    <select id="totalCountOfNoAlarm" resultType="java.lang.Integer">
        select
        count(*) as count
        from rm_alarm_state_last tb
        where ((alarm_remain_water is null or alarm_remain_water = 0) and
        (alarm_remain_water is null or alarm_exceed_year = 0)  and
        (alarm_remain_water is null or alarm_water_meter_fault = 0)  and
        (alarm_remain_water is null or alarm_loss = 0)  and
        (alarm_remain_water is null or alarm_water_meter_break = 0)  and
        (alarm_remain_water is null or alarm_ele_meter_fault = 0)  and
        (alarm_remain_water is null or alarm_inner_door = 0)  and
        (alarm_remain_water is null or alarm_outer_door = 0)  and
        (alarm_remain_water is null or alarm_ele_miss = 0)  and
        (alarm_remain_water is null or alarm_ele_exceed = 0)  and
        (alarm_remain_water is null or alarm_ele_low_volt = 0)  and
        (alarm_remain_water is null or state_ic_enable = 0)  and
        (alarm_remain_water is null or alarm_battery_volt = 0)  and
        (alarm_remain_water is null or alarm_valve = 0) )
        <if test="dt != null ">
            AND tb.dt <![CDATA[>=]]> #{dt, javaType=DATE, jdbcType=TIMESTAMP}
        </if>
    </select>
</mapper>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
@@ -1336,8 +1336,8 @@
        count(ocvh.id) as times
        from rm_open_close_valve_history ocvh
        inner join se_client_card cc on CAST(cc.cardNum AS CHAR) = ocvh.cl_ic_card_no
        where ocvh.cl_dt <![CDATA[>=]]> #{startDt, jdbcType=BIGINT}
        and ocvh.cl_dt <![CDATA[<=]]> #{endDt, jdbcType=BIGINT}
        where ocvh.cl_dt <![CDATA[>=]]> #{startDt, jdbcType=TIMESTAMP }
        and ocvh.cl_dt <![CDATA[<=]]> #{endDt, jdbcType=TIMESTAMP}
        group by ocvh.client_id, cc.id
    </select>
    <select id="statisticsByClient" resultType="com.dy.pipIrrGlobal.voSt.VoClientConsumeStatistics">
@@ -1347,8 +1347,8 @@
        sum(cl_this_time) as duration,
        count(id) as times
        from rm_open_close_valve_history
        where cl_dt <![CDATA[>=]]> #{startDt, jdbcType=BIGINT}
        and cl_dt <![CDATA[<=]]> #{endDt, jdbcType=BIGINT}
        where cl_dt <![CDATA[>=]]> #{startDt, jdbcType=TIMESTAMP}
        and cl_dt <![CDATA[<=]]> #{endDt, jdbcType=TIMESTAMP}
        group by client_id
    </select>
</mapper>
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpSessionCache.java
@@ -128,7 +128,7 @@
    /**
     * å¾—到所有在线与离线数量统计
     * @return [0]=在线数量,[2]上线过,但当前离线的数量
     * @return [0]=在线数量,[1]上线过,但当前离线的数量
     */
    public static Integer[] allOnLineStateStatistics(){
        synchronized (map){
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/largeScreen/Ls4StatisticsCtrl.java
New file
@@ -0,0 +1,107 @@
package com.dy.pipIrrStatistics.largeScreen;
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.voLargeScreen.VoBaseInfo;
import com.dy.pipIrrGlobal.voLargeScreen.VoCurrentInfo;
import com.dy.pipIrrGlobal.voLargeScreen.VoMonitorInfo;
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.Date;
/**
 * @Author: liurunyu
 * @Date: 2025/2/6 10:32
 * @Description
 */
@Slf4j
@Tag(name = "大屏展示", description = "大屏展示---统计信息")
@RestController
@RequestMapping(path = "ls4Statistics")
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked")
public class Ls4StatisticsCtrl {
    private Ls4StatisticsSv sv;
    @Autowired
    private void setSv(Ls4StatisticsSv sv) {
        this.sv = sv;
    }
    /**
     * å¤§å±å±•示---基本信息
     * @return åŸºæœ¬ä¿¡æ¯
     */
    @Operation(summary = "大屏展示", description = "基本信息")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "基本信息(BaseResponse.content:VoBaseInfo{})",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoBaseInfo.class))}
            )
    })
    @GetMapping(path = "baseInfo")
    @SsoAop()
    public BaseResponse<VoBaseInfo> baseInfo() {
        VoBaseInfo res = this.sv.baseInfo();
        return BaseResponseUtils.buildSuccess(res);
    }
    /**
     * å¤§å±å±•示---当前信息
     * @return å½“前信息
     */
    @Operation(summary = "大屏展示", description = "当前信息")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "基本信息(BaseResponse.content:VoCurrentInfo{})",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoCurrentInfo.class))}
            )
    })
    @GetMapping(path = "currentInfo")
    @SsoAop()
    public BaseResponse<VoCurrentInfo> currentInfo() throws Exception {
        VoCurrentInfo res = this.sv.currentInfo();
        return BaseResponseUtils.buildSuccess(res);
    }
    /**
     * å¤§å±å±•示---监测信息
     * @return ç›‘测信息
     * @param startDt å¼€å§‹æ—¥æœŸï¼ˆæ ¼å¼ yyyy-mm-dd)
     */
    @Operation(summary = "大屏展示", description = "监测信息")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "基本信息(BaseResponse.content:VoMonitorInfo{})",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoMonitorInfo.class))}
            )
    })
    @GetMapping(path = "monitorInfo")
    @SsoAop()
    public BaseResponse<VoMonitorInfo> monitorInfo(Date startDt) {
        VoMonitorInfo res = this.sv.monitorInfo(startDt);
        return BaseResponseUtils.buildSuccess(res);
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/largeScreen/Ls4StatisticsSv.java
New file
@@ -0,0 +1,127 @@
package com.dy.pipIrrStatistics.largeScreen;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.dy.common.mw.protocol.Command;
import com.dy.common.mw.protocol.CommandBackParam;
import com.dy.common.util.DateTime;
import com.dy.common.webUtil.BaseResponse;
import com.dy.pipIrrGlobal.daoLargeScreen.Ls4StatisticsMapper;
import com.dy.pipIrrGlobal.rtuMw.CodeLocal;
import com.dy.pipIrrGlobal.rtuMw.Web2RtuMw;
import com.dy.pipIrrGlobal.voLargeScreen.VoBaseInfo;
import com.dy.pipIrrGlobal.voLargeScreen.VoCurrentInfo;
import com.dy.pipIrrGlobal.voLargeScreen.VoMonitorInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.util.Date;
/**
 * @Author: liurunyu
 * @Date: 2025/2/6 10:33
 * @Description
 */
@Slf4j
@Service
public class Ls4StatisticsSv extends Web2RtuMw {
    private Environment env;
    private RestTemplate restTemplate;
    private Ls4StatisticsMapper dao ;
    @Autowired
    private void setEnvironment(Environment env){
        this.env = env;
    }
    @Autowired
    private void setRestTemplate(RestTemplate restTemplate){
        this.restTemplate = restTemplate;
    }
    @Autowired
    private void setDao(Ls4StatisticsMapper dao){
        this.dao = dao;
    }
    /**
     * åŸºæœ¬ä¿¡æ¯ç»Ÿè®¡
     * @return
     */
    public VoBaseInfo baseInfo(){
        VoBaseInfo vo = new VoBaseInfo() ;
        vo.totalCountOfTown = this.dao.totalCountOfDistrict(3) ;
        vo.totalCountOfVillage = this.dao.totalCountOfDistrict(4) ;
        vo.totalCountOfBlock = this.dao.totalCountOfBlock() ;
        vo.totalCountOfDivide = this.dao.totalCountOfDivide() ;
        vo.totalCountOfIntake = this.dao.totalCountOfIntake() ;
        vo.totalCountOfIntakeWithController = this.dao.totalCountOfIntakeWithController() ;
        vo.totalCountOfIntakeWithoutController = this.dao.totalCountOfIntakeWithoutController() ;
        vo.totalCountOfController = this.dao.totalCountOfController() ;
        vo.totalCountOfControllerTramp = this.dao.totalCountOfControllerTramp() ;
        return vo ;
    }
    /**
     * å½“前信息统计
     * @return
     */
    public VoCurrentInfo currentInfo() throws Exception{
        Integer totalCountOfIntake = this.dao.totalCountOfIntake() ;
        Date dtAtXHourBefore = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(DateTime.lastXHour_yyyy_MM_dd_HH_mm_ss(24)) ;//X个小时前
        VoCurrentInfo vo = new VoCurrentInfo() ;
        Integer[] result = this.queryMwOnAndOffLine() ;
        vo.totalCountOfOnLine = result[0] ;
        vo.totalCountOfOffLine = totalCountOfIntake - vo.totalCountOfOnLine; ;
        vo.totalCountOfOpenValve = this.dao.totalCountOfOpenValve(dtAtXHourBefore) ;
        vo.totalCountOfCloseValve = this.dao.totalCountOfCloseValve(dtAtXHourBefore) ;
        vo.totalCountOfUnknownValve = totalCountOfIntake - vo.totalCountOfOpenValve - vo.totalCountOfCloseValve ;
        vo.totalCountOfAlarm = this.dao.totalCountOfAlarm(dtAtXHourBefore) ;
        vo.totalCountOfNoAlarm = this.dao.totalCountOfNoAlarm(dtAtXHourBefore) ;
        vo.totalCountOfUnknownAlarm = totalCountOfIntake - vo.totalCountOfAlarm - vo.totalCountOfNoAlarm ;
        return vo ;
    }
    /**
     * ç›‘测信息统计
     * @return
     */
    public VoMonitorInfo monitorInfo(Date startDt){
        VoMonitorInfo vo = new VoMonitorInfo() ;
        return vo ;
    }
    /**
     * æŸ¥è¯¢å–水口在线和离线统计
     * @return
     */
    private Integer[] queryMwOnAndOffLine() {
        Integer[] result = new Integer[]{0,0} ;
        //向通信中间件发关命令,查询RTU在线统计情况
        Command com = this.createInnerCommand(CodeLocal.onLineStatistics);
        String rqUrl = this.get2MwRequestUrl(this.env, ContextComSend) ;
        BaseResponse res = this.sendPostRequest2Mw(restTemplate, rqUrl, com) ;
        if(res != null){
            if(res.isSuccess()){
                Command reCom = JSON.parseObject(res.getContent() == null ? null : JSON.toJSONString(res.getContent()), Command.class) ;
                CommandBackParam bakParam = JSON.parseObject((reCom== null || reCom.param == null) ? null : JSON.toJSONString(reCom.param), CommandBackParam.class) ;
                if(bakParam != null){
                    if(bakParam.getSuccess().booleanValue() && reCom.getAttachment() != null){
                        //通信中间件成功返回命令结果
                        JSONObject comRes = (JSONObject) JSON.toJSON(reCom.getAttachment());
                        result[0] = comRes.getInteger("onLineNum") ;
                        result[1] = comRes.getInteger("offLineNum") ;
                    }
                }else{
                    log.error("通信中间件返回内部命令结果中不包含CommandBackParam类型参数");
                }
            }else{
                log.error("通信中间件返回内部命令执行失败" + (res.getMsg() == null? "" : ("," + res.getMsg()))) ;
            }
        }else{
            log.error("通信中间件返回内部命令结果为null");
        }
        return result ;
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/largeScreen/˵Ã÷.txt
New file
@@ -0,0 +1 @@
大屏系统(largeScreen,缩写Ls)