代码调整
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
package com.njcn.event.mapper;
|
||||
|
||||
|
||||
import com.njcn.event.pojo.vo.RStatOrgVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 暂态指标统计
|
||||
*
|
||||
* @author yzh
|
||||
* @date 2022/10/10
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
public interface RStatOrgMapper {
|
||||
|
||||
/**
|
||||
* 获取年区域暂态指标统计
|
||||
*
|
||||
* @param deptIds 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 年区域暂态指标统计
|
||||
*/
|
||||
List<RStatOrgVO> getYearRStatOrgInfo(@Param("deptIds") List<String> deptIds,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 获取季区域暂态指标统计
|
||||
*
|
||||
* @param deptIds 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 季区域暂态指标统计
|
||||
*/
|
||||
List<RStatOrgVO> getQuarterRStatOrgInfo(@Param("deptIds") List<String> deptIds,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 获取月区域暂态指标统计
|
||||
*
|
||||
* @param deptIds 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 月区域暂态指标统计
|
||||
*/
|
||||
List<RStatOrgVO> getMonthRStatOrgInfo(@Param("deptIds") List<String> deptIds,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.njcn.event.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.vo.RmpEventDetailVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 暂态事件明细
|
||||
*
|
||||
* @author yzh
|
||||
* @date 2022/10/12
|
||||
*/
|
||||
@Mapper
|
||||
public interface RmpEventDetailMapper extends BaseMapper<RmpEventDetailVO> {
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.njcn.event.mapper.distribution;
|
||||
|
||||
import com.njcn.event.pojo.po.EventDistributionStatisticsPO;
|
||||
import com.njcn.event.pojo.po.EventDurationLineChartPO;
|
||||
import com.njcn.event.pojo.po.EventFeatureAmplitudeLineChartPO;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配网-暂态事件分布统计
|
||||
*
|
||||
* @author yzh
|
||||
* @date 2022/10/28
|
||||
*/
|
||||
@Mapper
|
||||
public interface PwEventCategoryDetailsMapper {
|
||||
|
||||
/**
|
||||
* 获取配网暂态指标分布统计
|
||||
*
|
||||
* @param monitorIdList 监测点id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return com.njcn.event.pojo.po.EventDistributionStatisticsPO
|
||||
* @author yzh
|
||||
* @date 2022/10/31
|
||||
*/
|
||||
EventDistributionStatisticsPO getPwEventCategoryDetailsMapper(@Param("monitorIdList") List<String> monitorIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 获取配网持续时间折线图
|
||||
*
|
||||
* @param monitorIdList 监测点id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 持续时间折线图
|
||||
* @author yzh
|
||||
* @date 2022/10/31
|
||||
*/
|
||||
EventDurationLineChartPO getPwEventDurationLineChart(@Param("monitorIdList") List<String> monitorIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 获取配网特征幅值折线图
|
||||
*
|
||||
* @param monitorIdList 监测点id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return com.njcn.event.pojo.po.EventFeatureAmplitudeLineChartPO
|
||||
* @author yzh
|
||||
* @date 2022/10/31
|
||||
*/
|
||||
EventFeatureAmplitudeLineChartPO getPwEventFeatureAmplitudeLineChart(@Param("monitorIdList") List<String> monitorIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 获取配网监测点暂态事件明细数据
|
||||
*
|
||||
* @param monitorIdList 监测点id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return java.util.List<com.njcn.event.pojo.po.RmpEventDetailPO>
|
||||
* @author yzh
|
||||
* @date 2022/10/31
|
||||
*/
|
||||
List<RmpEventDetailPO> getPwRmpEventDetail(@Param("monitorIdList") List<String> monitorIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.njcn.event.mapper.distribution;
|
||||
|
||||
import com.njcn.event.pojo.po.RStatEventOrgPO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配网-暂态事件统计
|
||||
*
|
||||
* @author yzh
|
||||
* @date 2022/10/25
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
public interface PwRStatOrgClassifiedMapper {
|
||||
/**
|
||||
* 获取配网区域暂态事件分类统计(年)
|
||||
* <p>
|
||||
*
|
||||
* @param deptIdList 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param monitorSort 监测点类别
|
||||
* @return 配网区域暂态事件分类统计(年)
|
||||
*/
|
||||
List<RStatEventOrgPO> getYearInfo(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("monitorSort") List<String> monitorSort);
|
||||
|
||||
/**
|
||||
* 获取配网区域暂态事件分类统计(月)
|
||||
*
|
||||
* @param deptIdList 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param monitorSort 监测点类别
|
||||
* @return 配网区域暂态事件分类统计(月)
|
||||
*/
|
||||
List<RStatEventOrgPO> getQuarterInfo(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("monitorSort") List<String> monitorSort);
|
||||
|
||||
/**
|
||||
* 获取配网区域暂态事件分类统计(月)
|
||||
*
|
||||
* @param deptIdList 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param monitorSort 监测点类别
|
||||
* @return 配网区域暂态事件分类统计(月)
|
||||
*/
|
||||
List<RStatEventOrgPO> getMonthInfo(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("monitorSort") List<String> monitorSort);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.njcn.event.mapper.distribution;
|
||||
|
||||
import com.njcn.event.pojo.po.RStatOrgPO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配网-暂态事件统计
|
||||
*
|
||||
* @author yzh
|
||||
* @date 2022/10/24
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
public interface PwRStatOrgMapper {
|
||||
/**
|
||||
* 获取配网区域暂态指标统计(年)
|
||||
*
|
||||
* @param deptIdList 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param monitorSort 监测点类别
|
||||
* @return 配网区域暂态指标统计(年)
|
||||
*/
|
||||
List<RStatOrgPO> getYearInfo(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("monitorSort") List<String> monitorSort);
|
||||
|
||||
/**
|
||||
* 获取配网区域暂态指标统计(季)
|
||||
*
|
||||
* @param deptIdList 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param monitorSort 监测点类别
|
||||
* @return 配网区域暂态指标统计(季)
|
||||
*/
|
||||
List<RStatOrgPO> getQuarterInfo(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("monitorSort") List<String> monitorSort);
|
||||
|
||||
/**
|
||||
* 获取配网区域暂态指标统计(月)
|
||||
*
|
||||
* @param deptIdList 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param monitorSort 监测点类别
|
||||
* @return 配网区域暂态指标统计(月)
|
||||
*/
|
||||
List<RStatOrgPO> getMonthInfo(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("monitorSort") List<String> monitorSort);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.njcn.event.mapper.distribution;
|
||||
|
||||
import com.njcn.event.pojo.param.UniversalFrontEndParam;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配网-暂态事件明细
|
||||
*
|
||||
* @author yzh
|
||||
* @date 2022/10/31
|
||||
*/
|
||||
|
||||
public interface PwRmpEventDetailMapper {
|
||||
|
||||
/**
|
||||
* 获取配网暂态事件明细
|
||||
*
|
||||
* @param param 条件参数
|
||||
* @return java.util.List<com.njcn.event.pojo.po.RmpEventDetailPO>
|
||||
* @author yzh
|
||||
* @date 2022/10/31
|
||||
*/
|
||||
List<RmpEventDetailPO> getPwRmpEventDetail(UniversalFrontEndParam param);
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
<?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.njcn.event.mapper.distribution.PwEventCategoryDetailsMapper">
|
||||
|
||||
<!--获取暂态指标分布统计-->
|
||||
<select id="getPwEventCategoryDetailsMapper"
|
||||
resultType="com.njcn.event.pojo.po.EventDistributionStatisticsPO">
|
||||
SELECT
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 0 AND
|
||||
duration <= 20 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with20s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 20 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with100s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 100 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with500s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with1000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with3000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 3000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with20000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 20000 AND
|
||||
duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with60000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 60000 AND
|
||||
duration <= 180000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with180000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 0 AND
|
||||
duration <= 20 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with20s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 20 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with100s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 100 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with500s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with1000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with3000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 3000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with20000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 20000
|
||||
AND duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with60000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 60000
|
||||
AND duration <= 180000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with180000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 0 AND
|
||||
duration <= 20 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with20s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 20 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with100s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 100 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with500s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with1000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with3000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 3000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with20000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 20000
|
||||
AND duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with60000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 60000
|
||||
AND duration <= 180000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with180000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 0 AND
|
||||
duration <= 20 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with20s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 20 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with100s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 100 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with500s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with1000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with3000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 3000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with20000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 20000
|
||||
AND duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with60000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 60000
|
||||
AND duration <= 180000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with180000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 0 AND
|
||||
duration <= 20 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with20s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 20 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with100s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 100 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with500s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with1000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with3000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 3000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with20000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 20000
|
||||
AND duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with60000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 60000
|
||||
AND duration <= 180000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with180000s"
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
duration,
|
||||
feature_amplitude
|
||||
FROM
|
||||
r_mp_event_detail
|
||||
WHERE
|
||||
measurement_point_id IN
|
||||
<foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
)
|
||||
r
|
||||
</select>
|
||||
|
||||
<!--获取持续时间折线图-->
|
||||
<select id="getPwEventDurationLineChart" resultType="com.njcn.event.pojo.po.EventDurationLineChartPO">
|
||||
SELECT COALESCE
|
||||
(
|
||||
round(sum(CASE WHEN duration > 0 AND duration <= 100 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100,
|
||||
0
|
||||
) "duration100",
|
||||
COALESCE(
|
||||
round(sum(CASE WHEN duration > 100 AND duration <= 250 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100,
|
||||
0
|
||||
) "duration250",
|
||||
COALESCE(
|
||||
round(sum(CASE WHEN duration > 250 AND duration <= 500 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100,
|
||||
0
|
||||
) "duration500",
|
||||
COALESCE(
|
||||
round(sum(CASE WHEN duration > 500 AND duration <= 1000 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100,
|
||||
0
|
||||
) "duration1000",
|
||||
COALESCE(
|
||||
round(sum(CASE WHEN duration > 1000 AND duration <= 1100 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100,
|
||||
0
|
||||
) "duration1100"
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
measurement_point_id,
|
||||
duration
|
||||
FROM
|
||||
r_mp_event_detail
|
||||
WHERE
|
||||
measurement_point_id IN
|
||||
<foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
)
|
||||
r
|
||||
</select>
|
||||
|
||||
<!--获取特征幅值折线图-->
|
||||
<select id="getPwEventFeatureAmplitudeLineChart"
|
||||
resultType="com.njcn.event.pojo.po.EventFeatureAmplitudeLineChartPO"> SELECT
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 0 AND feature_amplitude <= 10 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude10",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 10 AND feature_amplitude <= 20 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude20",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 20 AND feature_amplitude <= 30 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude30",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 30 AND feature_amplitude <= 40 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude40",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 40 AND feature_amplitude <= 50 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude50",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 50 AND feature_amplitude <= 60 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude60",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 60 AND feature_amplitude <= 70 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude70",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 70 AND feature_amplitude <= 80 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude80",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 80 AND feature_amplitude <= 90 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude90"
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
measurement_point_id,
|
||||
feature_amplitude
|
||||
FROM
|
||||
r_mp_event_detail
|
||||
WHERE
|
||||
measurement_point_id IN
|
||||
<foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
) AS r</select>
|
||||
|
||||
<!--获取配网监测点暂态事件明细数据-->
|
||||
<select id="getPwRmpEventDetail" resultType="com.njcn.event.pojo.po.RmpEventDetailPO">
|
||||
SELECT
|
||||
measurement_point_id as measurementPointId,
|
||||
start_time AS startTime,
|
||||
duration AS duration,
|
||||
feature_amplitude AS featureAmplitude
|
||||
FROM
|
||||
`r_mp_event_detail`
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?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.njcn.event.mapper.distribution.PwRStatOrgClassifiedMapper">
|
||||
|
||||
<sql id="query_field">
|
||||
rso.org_no AS orgNo,
|
||||
rso.data_date AS dataDate,
|
||||
rso.measurement_type_class AS measurementTypeClass,
|
||||
rso.effective_measurement_average AS effectiveMeasurementAverage,
|
||||
rso.effective_measurement_accrued AS effectiveMeasurementAccrued,
|
||||
rso.event_measurement_average AS eventMeasurementAverage,
|
||||
rso.event_measurement_accrued AS eventMeasurementAccrued,
|
||||
rso.event_freq AS eventFreq,
|
||||
rso.event_count AS eventCount,
|
||||
rseo.event_type,
|
||||
rseo.event_measurement_average AS eEventMeasurementAverage,
|
||||
rseo.event_measurement_accrued AS eEventMeasurementAccrued,
|
||||
rseo.event_measurement_ratio_average AS eEventMeasurementRatioAverage,
|
||||
rseo.event_measurement_ratio_accrued AS eEventMeasurementRatioAccrued,
|
||||
rseo.event_freq AS eEventFreq,
|
||||
rseo.event_count AS eEventCount,
|
||||
rseo.data_type AS dataType
|
||||
</sql>
|
||||
<sql id="query_where">
|
||||
rso.data_type = 02
|
||||
AND rseo.data_type = 02
|
||||
AND rso.org_no IN
|
||||
<foreach collection="deptIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="monitorSort != null and monitorSort.size() >0">
|
||||
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(rso.data_date, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(rso.data_date, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<!--获取配网区域暂态事件分类统计(年)-->
|
||||
<select id="getYearInfo" resultType="com.njcn.event.pojo.po.RStatEventOrgPO">
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
r_stat_org_y AS rso
|
||||
LEFT JOIN r_stat_event_org_y AS rseo ON rso.org_no = rseo.org_no
|
||||
WHERE
|
||||
<include refid="query_where"></include>
|
||||
</select>
|
||||
|
||||
<!--获取配网区域暂态事件分类统计(月)-->
|
||||
<select id="getQuarterInfo" resultType="com.njcn.event.pojo.po.RStatEventOrgPO">
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
r_stat_org_q AS rso
|
||||
LEFT JOIN r_stat_event_org_q AS rseo ON rso.org_no = rseo.org_no
|
||||
WHERE
|
||||
<include refid="query_where"></include>
|
||||
</select>
|
||||
|
||||
<!--获取配网区域暂态事件分类统计(月)-->
|
||||
<select id="getMonthInfo" resultType="com.njcn.event.pojo.po.RStatEventOrgPO">
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
r_stat_org_m AS rso
|
||||
LEFT JOIN r_stat_event_org_m AS rseo ON rso.org_no = rseo.org_no
|
||||
WHERE
|
||||
<include refid="query_where"></include>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?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.njcn.event.mapper.distribution.PwRStatOrgMapper">
|
||||
|
||||
<sql id="query_field">
|
||||
org_no AS orgNo,
|
||||
Data_Date AS dataDate,
|
||||
measurement_type_class AS measurementTypeClass,
|
||||
effective_measurement_average AS effectiveMeasurementAverage,
|
||||
effective_measurement_accrued AS effectiveMeasurementAccrued,
|
||||
event_measurement_average AS eventMeasurementAverage,
|
||||
event_measurement_accrued AS eventMeasurementAccrued,
|
||||
event_count AS eventCount,
|
||||
event_freq AS eventFreq,
|
||||
data_Type AS dataType
|
||||
</sql>
|
||||
<sql id="query_where">
|
||||
data_type = 02
|
||||
AND org_no IN
|
||||
<foreach collection="deptIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(Data_Date, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(Data_Date, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="monitorSort != null and monitorSort.size() != 0">
|
||||
AND measurement_type_class IN
|
||||
<foreach collection="monitorSort" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<!--配网区域暂态指标统计(年)-->
|
||||
<select id="getYearInfo" resultType="com.njcn.event.pojo.po.RStatOrgPO">
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
`r_stat_org_y`
|
||||
WHERE
|
||||
<include refid="query_where"></include>
|
||||
</select>
|
||||
|
||||
<!--获取配网区域暂态指标统计(季)-->
|
||||
<select id="getQuarterInfo" resultType="com.njcn.event.pojo.po.RStatOrgPO">
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
`r_stat_org_q`
|
||||
WHERE
|
||||
<include refid="query_where"></include>
|
||||
</select>
|
||||
|
||||
<!--获取配网区域暂态指标统计(月)-->
|
||||
<select id="getMonthInfo" resultType="com.njcn.event.pojo.po.RStatOrgPO">
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
`r_stat_org_m`
|
||||
WHERE
|
||||
<include refid="query_where"></include>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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.njcn.event.mapper.distribution.PwRmpEventDetailMapper">
|
||||
|
||||
<!--获取配网暂态事件明细-->
|
||||
<select id="getPwRmpEventDetail" resultType="com.njcn.event.pojo.po.RmpEventDetailPO">
|
||||
SELECT
|
||||
event_id AS eventId,
|
||||
measurement_point_id AS measurementPointId,
|
||||
event_type AS eventType,
|
||||
start_time AS startTime,
|
||||
duration AS duration,
|
||||
feature_amplitude AS featureAmplitude,
|
||||
phase AS phase,
|
||||
event_describe AS eventDescribe,
|
||||
wave_path AS wavePath
|
||||
FROM
|
||||
r_mp_event_detail
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.njcn.event.pojo.po.EventDistributionStatisticsPO;
|
||||
import com.njcn.event.pojo.po.EventDurationLineChartPO;
|
||||
import com.njcn.event.pojo.po.EventFeatureAmplitudeLineChartPO;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import com.njcn.event.pojo.vo.EventDipShortDistributionVO;
|
||||
import com.njcn.event.pojo.vo.EventRiseDistributionVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author yzh
|
||||
* @date 2022/10/20
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
public interface EventDistributionStatisticsMapper {
|
||||
|
||||
/**
|
||||
* 获取暂态指标分布统计
|
||||
*
|
||||
* @param monitorIdList 监测点id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 暂态指标分布统计
|
||||
*/
|
||||
EventDistributionStatisticsPO getEventDistributionStatistics(@Param("monitorIdList") List<String> monitorIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 获取持续时间折线图
|
||||
*
|
||||
* @param monitorIdList 监测点id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 持续时间折线图
|
||||
*/
|
||||
EventDurationLineChartPO getEventDurationLineChart(@Param("monitorIdList") List<String> monitorIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 获取特征幅值折线图
|
||||
*
|
||||
* @param monitorIdList 监测点id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 特征幅值折线图
|
||||
*/
|
||||
EventFeatureAmplitudeLineChartPO getEventFeatureAmplitudeLineChart(@Param("monitorIdList") List<String> monitorIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 获取监测点暂态事件明细数据
|
||||
*
|
||||
* @param monitorIdList 监测点id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 监测点暂态事件明细数据
|
||||
*/
|
||||
List<RmpEventDetailPO> getRmpEventDetail(@Param("monitorIdList") List<String> monitorIdList,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
|
||||
/***
|
||||
* 获取监测点电压暂降和短时中断分布情况
|
||||
* @author jianghaifei
|
||||
* @date 2022-10-27 10:46
|
||||
* @param map
|
||||
* @return com.njcn.event.pojo.vo.EventDipShortDistributionVO
|
||||
*/
|
||||
EventDipShortDistributionVO getEventDipShortDistributionByCond(Map<String, Object> map);
|
||||
|
||||
/***
|
||||
* 获取监测点电压暂升分布情况
|
||||
* @author jianghaifei
|
||||
* @date 2022-10-27 10:46
|
||||
* @param map
|
||||
* @return com.njcn.event.pojo.vo.EventRiseDistributionVO
|
||||
*/
|
||||
EventRiseDistributionVO getEventRiseDistributionByCond(Map<String, Object> map);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.event.mapper;
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.njcn.event.pojo.po.PmsMonitorPO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.event.mapper;
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.njcn.event.pojo.po.PqDevice;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.po.RStatEventD;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-12
|
||||
*/
|
||||
public interface RStatEventDMapper extends BaseMapper<RStatEventD> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.po.RStatEventM;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-11
|
||||
*/
|
||||
public interface RStatEventMMapper extends BaseMapper<RStatEventM> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.po.RStatEventOrgM;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-11
|
||||
*/
|
||||
public interface RStatEventOrgMMapper extends BaseMapper<RStatEventOrgM> {
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.njcn.event.mapper;
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
|
||||
import com.njcn.event.pojo.vo.RStatEventOrgVO;
|
||||
import com.njcn.event.pojo.po.RStatEventOrgPO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -19,37 +18,43 @@ public interface RStatEventOrgMapper {
|
||||
/**
|
||||
* 获取年区域暂态指标分类统计表
|
||||
*
|
||||
* @param deptIds 部门id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param deptIds 部门id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param mainnetPointId 主网字典id
|
||||
* @return 年区域暂态指标分类统计表
|
||||
*/
|
||||
List<RStatEventOrgVO> getYearRStatEventOrgInfo(@Param("deptIds") List<String> deptIds,
|
||||
List<RStatEventOrgPO> getYearRStatEventOrgInfo(@Param("deptIds") List<String> deptIds,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
@Param("endTime") String endTime,
|
||||
@Param("mainnetPointId") String mainnetPointId);
|
||||
|
||||
/**
|
||||
* 获取季区域暂态指标分类统计表
|
||||
*
|
||||
* @param deptIds 部门id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param deptIds 部门id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param mainnetPointId 主网字典id
|
||||
* @return 季区域暂态指标分类统计表
|
||||
*/
|
||||
List<RStatEventOrgVO> getQuarterRStatEventOrgInfo(@Param("deptIds") List<String> deptIds,
|
||||
List<RStatEventOrgPO> getQuarterRStatEventOrgInfo(@Param("deptIds") List<String> deptIds,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
@Param("endTime") String endTime,
|
||||
@Param("mainnetPointId") String mainnetPointId);
|
||||
|
||||
/**
|
||||
* 获取月区域暂态指标分类统计表
|
||||
*
|
||||
* @param deptIds 部门id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param deptIds 部门id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param mainnetPointId 主网字典id
|
||||
* @return 月区域暂态指标分类统计表
|
||||
*/
|
||||
List<RStatEventOrgVO> getMonthRStatEventOrgInfoInfo(@Param("deptIds") List<String> deptIds,
|
||||
List<RStatEventOrgPO> getMonthRStatEventOrgInfoInfo(@Param("deptIds") List<String> deptIds,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
@Param("endTime") String endTime,
|
||||
@Param("mainnetPointId") String mainnetPointId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.njcn.event.pojo.po.RStatEventOrgQ;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
public interface RStatEventOrgQMapper extends BaseMapper<RStatEventOrgQ> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.njcn.event.pojo.po.RStatEventOrgY;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
public interface RStatEventOrgYMapper extends BaseMapper<RStatEventOrgY> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.po.RStatEventQ;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-12
|
||||
*/
|
||||
public interface RStatEventQMapper extends BaseMapper<RStatEventQ> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.po.RStatEventVoltageM;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-14
|
||||
*/
|
||||
public interface RStatEventVoltageMMapper extends BaseMapper<RStatEventVoltageM> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.po.RStatEventY;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-12
|
||||
*/
|
||||
public interface RStatEventYMapper extends BaseMapper<RStatEventY> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.njcn.event.pojo.vo.RStatOrgVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 暂态指标统计
|
||||
*
|
||||
* @author yzh
|
||||
* @date 2022/10/10
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
public interface RStatOrgMapper {
|
||||
|
||||
/**
|
||||
* 获取年区域暂态指标统计
|
||||
*
|
||||
* @param deptIds 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param mainnetPointId 主网字典id
|
||||
* @return 年区域暂态指标统计
|
||||
*/
|
||||
List<RStatOrgVO> getYearRStatOrgInfo(@Param("deptIds") List<String> deptIds,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("mainnetPointId") String mainnetPointId);
|
||||
|
||||
/**
|
||||
* 获取季区域暂态指标统计
|
||||
*
|
||||
* @param deptIds 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param mainnetPointId 主网字典id
|
||||
* @return 季区域暂态指标统计
|
||||
*/
|
||||
List<RStatOrgVO> getQuarterRStatOrgInfo(@Param("deptIds") List<String> deptIds,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("mainnetPointId") String mainnetPointId);
|
||||
|
||||
/**
|
||||
* 获取月区域暂态指标统计
|
||||
*
|
||||
* @param deptIds 单位id
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param mainnetPointId 主网字典id
|
||||
* @return 月区域暂态指标统计
|
||||
*/
|
||||
List<RStatOrgVO> getMonthRStatOrgInfo(@Param("deptIds") List<String> deptIds,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("mainnetPointId") String mainnetPointId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.event.pojo.po.RStatSubstationM;
|
||||
import com.njcn.event.pojo.vo.RSubstationIcon2VO;
|
||||
import com.njcn.event.pojo.vo.RSubstationIconVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-18
|
||||
*/
|
||||
public interface RStatSubstationMMapper extends BaseMapper<RStatSubstationM> {
|
||||
|
||||
/**
|
||||
* 变电站暂态指标超标分布(按发生频次)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
RSubstationIconVO getStatSubstationIconM(@Param("param") StatSubstationBizBaseParam param);
|
||||
|
||||
/**
|
||||
* 变电站暂态指标发生频次
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RSubstationIcon2VO> getStatSubstationIcon2M(@Param("param") StatSubstationBizBaseParam param);
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.njcn.event.mapper;
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
|
||||
import com.njcn.event.pojo.po.PmsMonitorPO;
|
||||
import com.njcn.event.pojo.vo.RStatSubstationVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.event.pojo.po.RStatSubstationQ;
|
||||
import com.njcn.event.pojo.vo.RSubstationIcon2VO;
|
||||
import com.njcn.event.pojo.vo.RSubstationIconVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-18
|
||||
*/
|
||||
public interface RStatSubstationQMapper extends BaseMapper<RStatSubstationQ> {
|
||||
|
||||
/**
|
||||
* 变电站暂态指标超标分布(按发生频次)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
RSubstationIconVO getStatSubstationIconQ(@Param("param") StatSubstationBizBaseParam param);
|
||||
|
||||
/**
|
||||
* 变电站暂态指标发生频次
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RSubstationIcon2VO> getStatSubstationIcon2Q(@Param("param") StatSubstationBizBaseParam param);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.event.pojo.po.RStatSubstationVoltageM;
|
||||
import com.njcn.event.pojo.vo.RVoltageIconVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-18
|
||||
*/
|
||||
public interface RStatSubstationVoltageMMapper extends BaseMapper<RStatSubstationVoltageM> {
|
||||
|
||||
/**
|
||||
* 变电站暂态分布(按电压等级)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RVoltageIconVO> getStatSubstationIcon(@Param("param") StatSubstationBizBaseParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.event.pojo.po.RStatSubstationY;
|
||||
import com.njcn.event.pojo.vo.RSubstationIcon2VO;
|
||||
import com.njcn.event.pojo.vo.RSubstationIconVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @since 2022-10-18
|
||||
*/
|
||||
public interface RStatSubstationYMapper extends BaseMapper<RStatSubstationY> {
|
||||
|
||||
/**
|
||||
* 变电站暂态分布(按发生频次)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
RSubstationIconVO getStatSubstationIconY(@Param("param") StatSubstationBizBaseParam param);
|
||||
|
||||
|
||||
/**
|
||||
* 变电站暂态指标发生频次
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RSubstationIcon2VO> getStatSubstationIcon2Y(@Param("param") StatSubstationBizBaseParam param);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import com.njcn.event.pojo.vo.RmpEventDetailVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 暂态事件明细
|
||||
*
|
||||
* @author yzh
|
||||
* @date 2022/10/12
|
||||
*/
|
||||
@Mapper
|
||||
public interface RmpEventDetailMapper extends BaseMapper<RmpEventDetailVO> {
|
||||
|
||||
/**
|
||||
* 获取暂态事件明细
|
||||
*
|
||||
* @param monitorIds 监测点id
|
||||
* @param eventType 暂态指标类型
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 暂态事件明细
|
||||
*/
|
||||
List<RmpEventDetailPO> getDetailsOfTransientEvents(@Param("monitorIds") List<String> monitorIds,
|
||||
@Param("eventType") List<String> eventType,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author yzh
|
||||
* @date 2022/10/19
|
||||
*/
|
||||
@Mapper
|
||||
public interface RmpEventReportDayMapper {
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.event.mapper;
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.njcn.event.pojo.vo.TransientVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -0,0 +1,438 @@
|
||||
<?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.njcn.event.mapper.majornetwork.EventDistributionStatisticsMapper">
|
||||
|
||||
<!--获取暂态指标分布统计-->
|
||||
<select id="getEventDistributionStatistics"
|
||||
resultType="com.njcn.event.pojo.po.EventDistributionStatisticsPO">
|
||||
SELECT
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 0 AND
|
||||
duration <= 20 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with20s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 20 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with100s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 100 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with500s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with1000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with3000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 3000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with20000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 20000 AND
|
||||
duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with60000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 0 AND r.feature_amplitude <= 10 AND duration > 60000 AND
|
||||
duration <= 180000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude10with180000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 0 AND
|
||||
duration <= 20 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with20s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 20 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with100s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 100 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with500s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with1000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with3000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 3000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with20000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 20000
|
||||
AND duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with60000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 10 AND r.feature_amplitude <= 40 AND duration > 60000
|
||||
AND duration <= 180000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude40with180000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 0 AND
|
||||
duration <= 20 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with20s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 20 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with100s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 100 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with500s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with1000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with3000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 3000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with20000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 20000
|
||||
AND duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with60000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 40 AND r.feature_amplitude <= 70 AND duration > 60000
|
||||
AND duration <= 180000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude70with180000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 0 AND
|
||||
duration <= 20 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with20s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 20 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with100s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 100 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with500s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with1000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with3000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 3000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with20000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 20000
|
||||
AND duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with60000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 70 AND r.feature_amplitude <= 85 AND duration > 60000
|
||||
AND duration <= 180000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude85with180000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 0 AND
|
||||
duration <= 20 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with20s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 20 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with100s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 100 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with500s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with1000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with3000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 3000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with20000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 20000
|
||||
AND duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with60000s",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude > 85 AND r.feature_amplitude <= 90 AND duration > 60000
|
||||
AND duration <= 180000 THEN 1 ELSE 0 END ), 0 ) "featureAmplitude90with180000s"
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
duration,
|
||||
feature_amplitude
|
||||
FROM
|
||||
r_mp_event_detail
|
||||
WHERE
|
||||
measurement_point_id IN
|
||||
<foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
)
|
||||
r
|
||||
</select>
|
||||
|
||||
<!--获取持续时间折线图-->
|
||||
<select id="getEventDurationLineChart" resultType="com.njcn.event.pojo.po.EventDurationLineChartPO">
|
||||
SELECT COALESCE
|
||||
(
|
||||
round(sum(CASE WHEN duration > 0 AND duration <= 100 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100,
|
||||
0
|
||||
) "duration100",
|
||||
COALESCE(
|
||||
round(sum(CASE WHEN duration > 100 AND duration <= 250 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100,
|
||||
0
|
||||
) "duration250",
|
||||
COALESCE(
|
||||
round(sum(CASE WHEN duration > 250 AND duration <= 500 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100,
|
||||
0
|
||||
) "duration500",
|
||||
COALESCE(
|
||||
round(sum(CASE WHEN duration > 500 AND duration <= 1000 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100,
|
||||
0
|
||||
) "duration1000",
|
||||
COALESCE(
|
||||
round(sum(CASE WHEN duration > 1000 AND duration <= 1100 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100,
|
||||
0
|
||||
) "duration1100"
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
measurement_point_id,
|
||||
duration
|
||||
FROM
|
||||
r_mp_event_detail
|
||||
WHERE
|
||||
measurement_point_id IN
|
||||
<foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
)
|
||||
r
|
||||
</select>
|
||||
|
||||
<!--获取特征幅值折线图-->
|
||||
<select id="getEventFeatureAmplitudeLineChart"
|
||||
resultType="com.njcn.event.pojo.po.EventFeatureAmplitudeLineChartPO">
|
||||
SELECT
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 0 AND feature_amplitude <= 10 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude10",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 10 AND feature_amplitude <= 20 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude20",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 20 AND feature_amplitude <= 30 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude30",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 30 AND feature_amplitude <= 40 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude40",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 40 AND feature_amplitude <= 50 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude50",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 50 AND feature_amplitude <= 60 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude60",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 60 AND feature_amplitude <= 70 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude70",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 70 AND feature_amplitude <= 80 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude80",
|
||||
COALESCE(round(sum(CASE WHEN feature_amplitude > 80 AND feature_amplitude <= 90 THEN 1 ELSE 0 END) /
|
||||
COUNT(r.measurement_point_id), 2) * 100, 0) "featureAmplitude90"
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
measurement_point_id,
|
||||
feature_amplitude
|
||||
FROM
|
||||
r_mp_event_detail
|
||||
WHERE
|
||||
measurement_point_id IN
|
||||
<foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
) AS r
|
||||
</select>
|
||||
|
||||
<!--获取监测点暂态事件明细数据-->
|
||||
<select id="getRmpEventDetail" resultType="com.njcn.event.pojo.po.RmpEventDetailPO">
|
||||
SELECT
|
||||
measurement_point_id as measurementPointId,
|
||||
start_time AS startTime,
|
||||
duration AS duration,
|
||||
feature_amplitude AS featureAmplitude
|
||||
FROM
|
||||
`r_mp_event_detail`
|
||||
</select>
|
||||
|
||||
<!--获取监测点电压暂降和短时中断分布情况-->
|
||||
<select id="getEventDipShortDistributionByCond"
|
||||
resultType="com.njcn.event.pojo.vo.EventDipShortDistributionVO">
|
||||
SELECT
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 80 AND r.feature_amplitude <= 90 AND duration > 10 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmp90with100ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 80 AND r.feature_amplitude <= 90 AND duration > 100 AND
|
||||
duration <= 250 THEN 1 ELSE 0 END ), 0 ) "featureAmp90with250ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 80 AND r.feature_amplitude <= 90 AND duration > 250 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmp90with500ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 80 AND r.feature_amplitude <= 90 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmp90with1000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 80 AND r.feature_amplitude <= 90 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmp90with3000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 80 AND r.feature_amplitude <= 90 AND duration > 3000 AND
|
||||
duration <= 10000 THEN 1 ELSE 0 END ), 0 ) "featureAmp90with10000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 80 AND r.feature_amplitude <= 90 AND duration > 10000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmp90with20000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 80 AND r.feature_amplitude <= 90 AND duration > 20000 AND
|
||||
duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmp90with60000ms",
|
||||
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 70 AND r.feature_amplitude < 80 AND duration > 10 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmp80with100ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 70 AND r.feature_amplitude < 80 AND duration > 100 AND
|
||||
duration <= 250 THEN 1 ELSE 0 END ), 0 ) "featureAmp80with250ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 70 AND r.feature_amplitude < 80 AND duration > 250 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmp80with500ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 70 AND r.feature_amplitude < 80 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmp80with1000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 70 AND r.feature_amplitude < 80 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmp80with3000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 70 AND r.feature_amplitude < 80 AND duration > 3000 AND
|
||||
duration <= 10000 THEN 1 ELSE 0 END ), 0 ) "featureAmp80with10000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 70 AND r.feature_amplitude < 80 AND duration > 10000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmp80with20000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 70 AND r.feature_amplitude < 80 AND duration > 20000 AND
|
||||
duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmp80with60000ms",
|
||||
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 60 AND r.feature_amplitude < 70 AND duration > 10 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmp70with100ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 60 AND r.feature_amplitude < 70 AND duration > 100 AND
|
||||
duration <= 250 THEN 1 ELSE 0 END ), 0 ) "featureAmp70with250ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 60 AND r.feature_amplitude < 70 AND duration > 250 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmp70with500ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 60 AND r.feature_amplitude < 70 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmp70with1000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 60 AND r.feature_amplitude < 70 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmp70with3000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 60 AND r.feature_amplitude < 70 AND duration > 3000 AND
|
||||
duration <= 10000 THEN 1 ELSE 0 END ), 0 ) "featureAmp70with10000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 60 AND r.feature_amplitude < 70 AND duration > 10000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmp70with20000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 60 AND r.feature_amplitude < 70 AND duration > 20000 AND
|
||||
duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmp70with60000ms",
|
||||
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 50 AND r.feature_amplitude < 60 AND duration > 10 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmp60with100ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 50 AND r.feature_amplitude < 60 AND duration > 100 AND
|
||||
duration <= 250 THEN 1 ELSE 0 END ), 0 ) "featureAmp60with250ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 50 AND r.feature_amplitude < 60 AND duration > 250 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmp60with500ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 50 AND r.feature_amplitude < 60 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmp60with1000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 50 AND r.feature_amplitude < 60 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmp60with3000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 50 AND r.feature_amplitude < 60 AND duration > 3000 AND
|
||||
duration <= 10000 THEN 1 ELSE 0 END ), 0 ) "featureAmp60with10000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 50 AND r.feature_amplitude < 60 AND duration > 10000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmp60with20000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 50 AND r.feature_amplitude < 60 AND duration > 20000 AND
|
||||
duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmp60with60000ms",
|
||||
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 40 AND r.feature_amplitude < 50 AND duration > 10 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmp50with100ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 40 AND r.feature_amplitude < 50 AND duration > 100 AND
|
||||
duration <= 250 THEN 1 ELSE 0 END ), 0 ) "featureAmp50with250ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 40 AND r.feature_amplitude < 50 AND duration > 250 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmp50with500ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 40 AND r.feature_amplitude < 50 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmp50with1000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 40 AND r.feature_amplitude < 50 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmp50with3000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 40 AND r.feature_amplitude < 50 AND duration > 3000 AND
|
||||
duration <= 10000 THEN 1 ELSE 0 END ), 0 ) "featureAmp50with10000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 40 AND r.feature_amplitude < 50 AND duration > 10000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmp50with20000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 40 AND r.feature_amplitude < 50 AND duration > 20000 AND
|
||||
duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmp50with60000ms",
|
||||
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 30 AND r.feature_amplitude < 40 AND duration > 10 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmp40with100ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 30 AND r.feature_amplitude < 40 AND duration > 100 AND
|
||||
duration <= 250 THEN 1 ELSE 0 END ), 0 ) "featureAmp40with250ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 30 AND r.feature_amplitude < 40 AND duration > 250 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmp40with500ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 30 AND r.feature_amplitude < 40 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmp40with1000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 30 AND r.feature_amplitude < 40 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmp40with3000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 30 AND r.feature_amplitude < 40 AND duration > 3000 AND
|
||||
duration <= 10000 THEN 1 ELSE 0 END ), 0 ) "featureAmp40with10000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 30 AND r.feature_amplitude < 40 AND duration > 10000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmp40with20000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 30 AND r.feature_amplitude < 40 AND duration > 20000 AND
|
||||
duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmp40with60000ms",
|
||||
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 20 AND r.feature_amplitude < 30 AND duration > 10 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmp30with100ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 20 AND r.feature_amplitude < 30 AND duration > 100 AND
|
||||
duration <= 250 THEN 1 ELSE 0 END ), 0 ) "featureAmp30with250ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 20 AND r.feature_amplitude < 30 AND duration > 250 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmp30with500ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 20 AND r.feature_amplitude < 30 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmp30with1000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 20 AND r.feature_amplitude < 30 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmp30with3000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 20 AND r.feature_amplitude < 30 AND duration > 3000 AND
|
||||
duration <= 10000 THEN 1 ELSE 0 END ), 0 ) "featureAmp30with10000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 20 AND r.feature_amplitude < 30 AND duration > 10000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmp30with20000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 20 AND r.feature_amplitude < 30 AND duration > 20000 AND
|
||||
duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmp30with60000ms",
|
||||
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 10 AND r.feature_amplitude < 20 AND duration > 10 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmp20with100ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 10 AND r.feature_amplitude < 20 AND duration > 100 AND
|
||||
duration <= 250 THEN 1 ELSE 0 END ), 0 ) "featureAmp20with250ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 10 AND r.feature_amplitude < 20 AND duration > 250 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmp20with500ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 10 AND r.feature_amplitude < 20 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmp20with1000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 10 AND r.feature_amplitude < 20 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmp20with3000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 10 AND r.feature_amplitude < 20 AND duration > 3000 AND
|
||||
duration <= 10000 THEN 1 ELSE 0 END ), 0 ) "featureAmp20with10000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 10 AND r.feature_amplitude < 20 AND duration > 10000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmp20with20000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 10 AND r.feature_amplitude < 20 AND duration > 20000 AND
|
||||
duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmp20with60000ms",
|
||||
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 0 AND r.feature_amplitude < 10 AND duration > 10 AND
|
||||
duration <= 100 THEN 1 ELSE 0 END ), 0 ) "featureAmp10with100ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 0 AND r.feature_amplitude < 10 AND duration > 100 AND
|
||||
duration <= 250 THEN 1 ELSE 0 END ), 0 ) "featureAmp10with250ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 0 AND r.feature_amplitude < 10 AND duration > 250 AND
|
||||
duration <= 500 THEN 1 ELSE 0 END ), 0 ) "featureAmp10with500ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 0 AND r.feature_amplitude < 10 AND duration > 500 AND
|
||||
duration <= 1000 THEN 1 ELSE 0 END ), 0 ) "featureAmp10with1000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 0 AND r.feature_amplitude < 10 AND duration > 1000 AND
|
||||
duration <= 3000 THEN 1 ELSE 0 END ), 0 ) "featureAmp10with3000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 0 AND r.feature_amplitude < 10 AND duration > 3000 AND
|
||||
duration <= 10000 THEN 1 ELSE 0 END ), 0 ) "featureAmp10with10000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 0 AND r.feature_amplitude < 10 AND duration > 10000 AND
|
||||
duration <= 20000 THEN 1 ELSE 0 END ), 0 ) "featureAmp10with20000ms",
|
||||
COALESCE( sum( CASE WHEN r.feature_amplitude >= 0 AND r.feature_amplitude < 10 AND duration > 20000 AND
|
||||
duration <= 60000 THEN 1 ELSE 0 END ), 0 ) "featureAmp10with60000ms"
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
duration,
|
||||
feature_amplitude
|
||||
FROM
|
||||
r_mp_event_detail
|
||||
WHERE 1 = 1
|
||||
AND measurement_point_id IN
|
||||
<foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
AND event_type IN
|
||||
<foreach collection="eventTypeList" item="type" open="(" close=")" separator=",">
|
||||
#{type}
|
||||
</foreach>
|
||||
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
)
|
||||
r
|
||||
</select>
|
||||
|
||||
<!--获取监测点电压暂升分布情况-->
|
||||
<select id="getEventRiseDistributionByCond" resultType="com.njcn.event.pojo.vo.EventRiseDistributionVO">
|
||||
SELECT
|
||||
COALESCE(sum(CASE WHEN r.feature_amplitude >= 120 AND duration > 10 AND duration <= 500 THEN 1 ELSE 0 END), 0) "featureAmp120with500ms",
|
||||
COALESCE(sum(CASE WHEN r.feature_amplitude >= 120 AND duration > 500 AND duration <= 5000 THEN 1 ELSE 0 END), 0) "featureAmp120with5000ms",
|
||||
COALESCE(sum(CASE WHEN r.feature_amplitude >= 120 AND duration > 5000 AND duration <= 60000 THEN 1 ELSE 0 END), 0) "featureAmp120with60000ms",
|
||||
|
||||
COALESCE(sum(CASE WHEN r.feature_amplitude >= -120 AND r.feature_amplitude <= 110 AND duration > 10 AND duration <= 500 THEN 1 ELSE 0 END), 0) "featureAmp110with500ms",
|
||||
COALESCE(sum(CASE WHEN r.feature_amplitude >= -120 AND r.feature_amplitude <= 110 AND duration > 500 AND duration <= 5000 THEN 1 ELSE 0 END), 0) "featureAmp110with5000ms",
|
||||
COALESCE(sum(CASE WHEN r.feature_amplitude >= -120 AND r.feature_amplitude <= 110 AND duration > 5000 AND duration <= 60000 THEN 1 ELSE 0 END), 0) "featureAmp110with60000ms"
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
duration,
|
||||
feature_amplitude
|
||||
FROM
|
||||
r_mp_event_detail
|
||||
WHERE 1 = 1
|
||||
AND measurement_point_id IN
|
||||
<foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
AND event_type IN
|
||||
<foreach collection="eventTypeList" item="type" open="(" close=")" separator=",">
|
||||
#{type}
|
||||
</foreach>
|
||||
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
)
|
||||
r
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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.njcn.event.mapper.PmsMonitorMapper">
|
||||
<mapper namespace="com.njcn.event.mapper.majornetwork.PmsMonitorMapper">
|
||||
|
||||
<!--根据部门id查询监测点id-->
|
||||
<select id="getMonitorInfo" resultType="com.njcn.event.pojo.po.PmsMonitorPO">
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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.njcn.event.mapper.PqDeviceMapper">
|
||||
<mapper namespace="com.njcn.event.mapper.majornetwork.PqDeviceMapper">
|
||||
|
||||
<resultMap type="com.njcn.event.pojo.po.PqDevice" id="PqDeviceMap">
|
||||
<result property="id" column="Id" jdbcType="VARCHAR"/>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatEventDMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatEventD">
|
||||
<id column="org_no" property="orgNo" />
|
||||
<result column="data_date" property="dataDate" />
|
||||
<result column="measurement_type_class" property="measurementTypeClass" />
|
||||
<result column="event_type" property="eventType" />
|
||||
<result column="event_measurement" property="eventMeasurement" />
|
||||
<result column="event_measurement_ratio" property="eventMeasurementRatio" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
<result column="data_type" property="dataType" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatEventMMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatEventM">
|
||||
<id column="org_no" property="orgNo" />
|
||||
<result column="data_date" property="dataDate" />
|
||||
<result column="measurement_type_class" property="measurementTypeClass" />
|
||||
<result column="event_type" property="eventType" />
|
||||
<result column="event_measurement_average" property="eventMeasurementAverage" />
|
||||
<result column="event_measurement_accrued" property="eventMeasurementAccrued" />
|
||||
<result column="event_freq" property="eventFreq" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
<result column="event_measurement_ratio_average" property="eventMeasurementRatioAverage" />
|
||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||
<result column="data_type" property="dataType" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatEventOrgMMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatEventOrgM">
|
||||
<id column="org_no" property="orgNo" />
|
||||
<result column="data_date" property="dataDate" />
|
||||
<result column="event_type" property="eventType" />
|
||||
<result column="event_measurement_average" property="eventMeasurementAverage" />
|
||||
<result column="event_measurement_accrued" property="eventMeasurementAccrued" />
|
||||
<result column="event_freq" property="eventFreq" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
<result column="event_measurement_ratio_average" property="eventMeasurementRatioAverage" />
|
||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||
<result column="data_type" property="dataType" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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.njcn.event.mapper.RStatEventOrgMapper">
|
||||
<mapper namespace="com.njcn.event.mapper.majornetwork.RStatEventOrgMapper">
|
||||
|
||||
|
||||
<sql id="query_rStatEventOrg_field">
|
||||
@@ -16,10 +16,13 @@
|
||||
rseo.event_measurement_ratio_average AS eEventMeasurementRatioAverage,
|
||||
rseo.event_measurement_ratio_accrued AS eEventMeasurementRatioAccrued,
|
||||
rseo.event_freq AS eventFreq,
|
||||
rseo.event_count as eventCount
|
||||
rseo.event_count AS eventCount,
|
||||
rseo.data_type AS dataType
|
||||
</sql>
|
||||
<sql id="query_rStatEventOrg_where">
|
||||
rso.org_no IN
|
||||
rso.data_type = "01"
|
||||
AND rseo.data_type = "01"
|
||||
AND rso.org_no IN
|
||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
@@ -32,7 +35,7 @@
|
||||
</sql>
|
||||
|
||||
<!--指标分类统计表-->
|
||||
<select id="getYearRStatEventOrgInfo" resultType="com.njcn.event.pojo.vo.RStatEventOrgVO">
|
||||
<select id="getYearRStatEventOrgInfo" resultType="com.njcn.event.pojo.po.RStatEventOrgPO">
|
||||
SELECT
|
||||
<include refid="query_rStatEventOrg_field"></include>
|
||||
FROM
|
||||
@@ -44,7 +47,7 @@
|
||||
|
||||
|
||||
<!--获取季区域暂态指标分类统计表-->
|
||||
<select id="getQuarterRStatEventOrgInfo" resultType="com.njcn.event.pojo.vo.RStatEventOrgVO">
|
||||
<select id="getQuarterRStatEventOrgInfo" resultType="com.njcn.event.pojo.po.RStatEventOrgPO">
|
||||
SELECT
|
||||
<include refid="query_rStatEventOrg_field"></include>
|
||||
FROM
|
||||
@@ -56,7 +59,7 @@
|
||||
|
||||
|
||||
<!--获取月区域暂态指标分类统计表-->
|
||||
<select id="getMonthRStatEventOrgInfoInfo" resultType="com.njcn.event.pojo.vo.RStatEventOrgVO">
|
||||
<select id="getMonthRStatEventOrgInfoInfo" resultType="com.njcn.event.pojo.po.RStatEventOrgPO">
|
||||
SELECT
|
||||
<include refid="query_rStatEventOrg_field"></include>
|
||||
FROM
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatEventOrgQMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatEventOrgQ">
|
||||
<id column="org_no" property="orgNo" />
|
||||
<result column="data_date" property="dataDate" />
|
||||
<result column="event_type" property="eventType" />
|
||||
<result column="event_measurement_average" property="eventMeasurementAverage" />
|
||||
<result column="event_measurement_accrued" property="eventMeasurementAccrued" />
|
||||
<result column="event_freq" property="eventFreq" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
<result column="event_measurement_ratio_average" property="eventMeasurementRatioAverage" />
|
||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||
<result column="data_type" property="dataType" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatEventOrgYMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatEventOrgY">
|
||||
<id column="org_no" property="orgNo" />
|
||||
<result column="data_date" property="dataDate" />
|
||||
<result column="event_type" property="eventType" />
|
||||
<result column="event_measurement_average" property="eventMeasurementAverage" />
|
||||
<result column="event_measurement_accrued" property="eventMeasurementAccrued" />
|
||||
<result column="event_freq" property="eventFreq" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
<result column="event_measurement_ratio_average" property="eventMeasurementRatioAverage" />
|
||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||
<result column="data_type" property="dataType" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatEventQMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatEventQ">
|
||||
<id column="org_no" property="orgNo" />
|
||||
<result column="data_date" property="dataDate" />
|
||||
<result column="measurement_type_class" property="measurementTypeClass" />
|
||||
<result column="event_type" property="eventType" />
|
||||
<result column="event_measurement_average" property="eventMeasurementAverage" />
|
||||
<result column="event_measurement_accrued" property="eventMeasurementAccrued" />
|
||||
<result column="event_freq" property="eventFreq" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
<result column="event_measurement_ratio_average" property="eventMeasurementRatioAverage" />
|
||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||
<result column="data_type" property="dataType" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatEventVoltageMMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatEventVoltageM">
|
||||
<id column="org_no" property="orgNo" />
|
||||
<result column="data_date" property="dataDate" />
|
||||
<result column="measurement_type_class" property="measurementTypeClass" />
|
||||
<result column="event_type" property="eventType" />
|
||||
<result column="voltage_type" property="voltageType" />
|
||||
<result column="event_measurement_average" property="eventMeasurementAverage" />
|
||||
<result column="event_measurement_accrued" property="eventMeasurementAccrued" />
|
||||
<result column="event_freq" property="eventFreq" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
<result column="event_measurement_ratio_average" property="eventMeasurementRatioAverage" />
|
||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||
<result column="data_type" property="dataType" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatEventYMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatEventY">
|
||||
<id column="org_no" property="orgNo" />
|
||||
<result column="data_date" property="dataDate" />
|
||||
<result column="measurement_type_class" property="measurementTypeClass" />
|
||||
<result column="event_type" property="eventType" />
|
||||
<result column="event_measurement_average" property="eventMeasurementAverage" />
|
||||
<result column="event_measurement_accrued" property="eventMeasurementAccrued" />
|
||||
<result column="event_freq" property="eventFreq" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
<result column="event_measurement_ratio_average" property="eventMeasurementRatioAverage" />
|
||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||
<result column="data_type" property="dataType" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -1,19 +1,6 @@
|
||||
<?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.njcn.event.mapper.RStatOrgMapper">
|
||||
|
||||
<sql id="query_where">
|
||||
org_no IN
|
||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(data_date, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(data_date, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
</sql>
|
||||
<mapper namespace="com.njcn.event.mapper.majornetwork.RStatOrgMapper">
|
||||
|
||||
<sql id="query_field">
|
||||
org_no AS orgNo,
|
||||
@@ -23,7 +10,21 @@
|
||||
event_measurement_average AS eventMeasurementAverage,
|
||||
event_measurement_accrued AS eventMeasurementAccrued,
|
||||
event_count AS eventCount,
|
||||
event_freq AS eventFreq
|
||||
event_freq AS eventFreq,
|
||||
data_type AS dataType
|
||||
</sql>
|
||||
<sql id="query_where">
|
||||
data_type = #{mainnetPointId}
|
||||
AND org_no IN
|
||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(data_date, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(data_date, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatSubstationMMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatSubstationM">
|
||||
<id column="data_date" property="dataDate" />
|
||||
<result column="substation_id" property="substationId" />
|
||||
<result column="effective_measurement_average" property="effectiveMeasurementAverage" />
|
||||
<result column="effective_measurement_accrued" property="effectiveMeasurementAccrued" />
|
||||
<result column="event_freq" property="harmonicOverDay" />
|
||||
<result column="harmonic_count" property="harmonicCount" />
|
||||
<result column="freq_over_day" property="freqOverDay" />
|
||||
<result column="freq_count" property="freqCount" />
|
||||
<result column="v_dev_over_day" property="vDevOverDay" />
|
||||
<result column="v_dev_count" property="vDevCount" />
|
||||
<result column="v_over_day" property="vOverDay" />
|
||||
<result column="v_count" property="vCount" />
|
||||
<result column="i_over_day" property="iOverDay" />
|
||||
<result column="i_count" property="iCount" />
|
||||
<result column="unbalance_over_day" property="unbalanceOverDay" />
|
||||
<result column="unbalance_count" property="unbalanceCount" />
|
||||
<result column="i_neg_over_day" property="iNegOverDay" />
|
||||
<result column="i_neg_count" property="iNegCount" />
|
||||
<result column="flicker_over_day" property="flickerOverDay" />
|
||||
<result column="flicker_count" property="flickerCount" />
|
||||
<result column="inuharm_over_day" property="inuharmOverDay" />
|
||||
<result column="inuharm_count" property="inuharmCount" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
<result column="event_freq" property="eventFreq" />
|
||||
<result column="sag_count" property="sagCount" />
|
||||
<result column="sag_freq" property="sagFreq" />
|
||||
<result column="swell_count" property="swellCount" />
|
||||
<result column="swell_freq" property="swellFreq" />
|
||||
<result column="interrupt_count" property="interruptCount" />
|
||||
<result column="interrupt_freq" property="interruptFreq" />
|
||||
</resultMap>
|
||||
<select id="getStatSubstationIconM" resultType="com.njcn.event.pojo.vo.RSubstationIconVO">
|
||||
SELECT
|
||||
COALESCE( sum( CASE WHEN X.event_freq BETWEEN 0 AND 10 THEN 1 ELSE 0 END ), 0 ) "num_1",
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 11 AND 20 THEN 1 ELSE 0 END ), 0 ) "num_2" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 21 AND 30 THEN 1 ELSE 0 END ), 0 ) "num_3" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 31 AND 40 THEN 1 ELSE 0 END ), 0 ) "num_4" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 41 AND 50 THEN 1 ELSE 0 END ), 0 ) "num_5" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 51 AND 60 THEN 1 ELSE 0 END ), 0 ) "num_6" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 61 AND 70 THEN 1 ELSE 0 END ), 0 ) "num_7" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 71 AND 80 THEN 1 ELSE 0 END ), 0 ) "num_8" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 81 AND 90 THEN 1 ELSE 0 END ), 0 ) "num_9" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 91 AND 100 THEN 1 ELSE 0 END ), 0 ) "num_10" ,
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 0 AND 10 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_1",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 11 AND 20 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_2",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 21 AND 30 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_3",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 31 AND 40 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_4",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 41 AND 50 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_5",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 51 AND 60 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_6",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 61 AND 70 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_7",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 71 AND 80 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_8",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 81 AND 90 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_9",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 91 AND 100 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_10"
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
substation_id,
|
||||
event_freq
|
||||
FROM
|
||||
r_stat_substation_m
|
||||
<where>
|
||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||
AND substation_id IN
|
||||
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND data_date >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||
AND #{param.endTime}>= data_date
|
||||
</if>
|
||||
</where>
|
||||
) X
|
||||
</select>
|
||||
<select id="getStatSubstationIcon2M" resultType="com.njcn.event.pojo.vo.RSubstationIcon2VO">
|
||||
SELECT
|
||||
substation_id,
|
||||
interrupt_freq,
|
||||
swell_freq,
|
||||
sag_freq
|
||||
FROM
|
||||
r_stat_substation_m
|
||||
<where>
|
||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||
AND substation_id IN
|
||||
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND data_date >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||
AND #{param.endTime}>= data_date
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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.njcn.event.mapper.RStatSubstationMapper">
|
||||
<mapper namespace="com.njcn.event.mapper.majornetwork.RStatSubstationMapper">
|
||||
|
||||
<sql id="query_field">
|
||||
substation_id AS substationId,
|
||||
@@ -0,0 +1,100 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatSubstationQMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatSubstationQ">
|
||||
<id column="data_date" property="dataDate" />
|
||||
<result column="substation_id" property="substationId" />
|
||||
<result column="effective_measurement_average" property="effectiveMeasurementAverage" />
|
||||
<result column="effective_measurement_accrued" property="effectiveMeasurementAccrued" />
|
||||
<result column="event_freq" property="harmonicAverageOverDay" />
|
||||
<result column="freq_average_over_day" property="freqAverageOverDay" />
|
||||
<result column="v_dev_average_over_day" property="vDevAverageOverDay" />
|
||||
<result column="v_average_over_day" property="vAverageOverDay" />
|
||||
<result column="i_average_over_day" property="iAverageOverDay" />
|
||||
<result column="unbalance_average_over_day" property="unbalanceAverageOverDay" />
|
||||
<result column="i_neg_average_over_day" property="iNegAverageOverDay" />
|
||||
<result column="flicker_average_over_day" property="flickerAverageOverDay" />
|
||||
<result column="inuharm_average_over_day" property="inuharmAverageOverDay" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
<result column="event_freq" property="eventFreq" />
|
||||
<result column="sag_count" property="sagCount" />
|
||||
<result column="sag_freq" property="sagFreq" />
|
||||
<result column="swell_count" property="swellCount" />
|
||||
<result column="swell_freq" property="swellFreq" />
|
||||
<result column="interrupt_count" property="interruptCount" />
|
||||
<result column="interrupt_freq" property="interruptFreq" />
|
||||
</resultMap>
|
||||
<select id="getStatSubstationIconQ" resultType="com.njcn.event.pojo.vo.RSubstationIconVO">
|
||||
SELECT
|
||||
COALESCE( sum( CASE WHEN X.event_freq BETWEEN 0 AND 10 THEN 1 ELSE 0 END ), 0 ) "num_1",
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 11 AND 20 THEN 1 ELSE 0 END ), 0 ) "num_2" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 21 AND 30 THEN 1 ELSE 0 END ), 0 ) "num_3" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 31 AND 40 THEN 1 ELSE 0 END ), 0 ) "num_4" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 41 AND 50 THEN 1 ELSE 0 END ), 0 ) "num_5" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 51 AND 60 THEN 1 ELSE 0 END ), 0 ) "num_6" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 61 AND 70 THEN 1 ELSE 0 END ), 0 ) "num_7" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 71 AND 80 THEN 1 ELSE 0 END ), 0 ) "num_8" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 81 AND 90 THEN 1 ELSE 0 END ), 0 ) "num_9" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 91 AND 100 THEN 1 ELSE 0 END ), 0 ) "num_10" ,
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 0 AND 10 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_1",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 11 AND 20 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_2",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 21 AND 30 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_3",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 31 AND 40 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_4",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 41 AND 50 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_5",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 51 AND 60 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_6",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 61 AND 70 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_7",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 71 AND 80 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_8",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 81 AND 90 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_9",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 91 AND 100 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_10"
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
substation_id,
|
||||
event_freq
|
||||
FROM
|
||||
r_stat_substation_q
|
||||
<where>
|
||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||
AND substation_id IN
|
||||
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND data_date >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||
AND #{param.endTime}>= data_date
|
||||
</if>
|
||||
</where>
|
||||
|
||||
) X
|
||||
|
||||
</select>
|
||||
<select id="getStatSubstationIcon2Q" resultType="com.njcn.event.pojo.vo.RSubstationIcon2VO">
|
||||
SELECT
|
||||
substation_id,
|
||||
interrupt_freq,
|
||||
swell_freq,
|
||||
sag_freq
|
||||
FROM
|
||||
r_stat_substation_q
|
||||
<where>
|
||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||
AND substation_id IN
|
||||
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND data_date >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||
AND #{param.endTime}>= data_date
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatSubstationVoltageMMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatSubstationVoltageM">
|
||||
<id column="org_no" property="orgNo" />
|
||||
<result column="data_date" property="dataDate" />
|
||||
<result column="substation_voltage" property="substationVoltage" />
|
||||
<result column="substation_count" property="substationCount" />
|
||||
<result column="harmonic_count" property="harmonicCount" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
</resultMap>
|
||||
<select id="getStatSubstationIcon" resultType="com.njcn.event.pojo.vo.RVoltageIconVO">
|
||||
SELECT
|
||||
substation_voltage as 'substationVoltage',
|
||||
sum( substation_count ) as 'substationCount',
|
||||
sum( event_count ) as 'harmonicCount'
|
||||
FROM
|
||||
r_stat_substation_voltage_m
|
||||
<where>
|
||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||
AND org_no IN
|
||||
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND data_date >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
||||
AND #{param.endTime} >= data_date
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY substation_voltage
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,100 @@
|
||||
<?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.njcn.event.mapper.majornetwork.RStatSubstationYMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.event.pojo.po.RStatSubstationY">
|
||||
<id column="data_date" property="dataDate" />
|
||||
<result column="substation_id" property="substationId" />
|
||||
<result column="effective_measurement_average" property="effectiveMeasurementAverage" />
|
||||
<result column="effective_measurement_accrued" property="effectiveMeasurementAccrued" />
|
||||
<result column="event_freq" property="harmonicOverDay" />
|
||||
<result column="freq_average_over_day" property="freqAverageOverDay" />
|
||||
<result column="v_dev_average_over_day" property="vDevAverageOverDay" />
|
||||
<result column="v_average_over_day" property="vAverageOverDay" />
|
||||
<result column="i_average_over_day" property="iAverageOverDay" />
|
||||
<result column="unbalance_average_over_day" property="unbalanceAverageOverDay" />
|
||||
<result column="i_neg_average_over_day" property="iNegAverageOverDay" />
|
||||
<result column="flicker_average_over_day" property="flickerAverageOverDay" />
|
||||
<result column="inuharm_average_over_day" property="inuharmAverageOverDay" />
|
||||
<result column="event_count" property="eventCount" />
|
||||
<result column="event_freq" property="eventFreq" />
|
||||
<result column="sag_count" property="sagCount" />
|
||||
<result column="sag_freq" property="sagFreq" />
|
||||
<result column="swell_count" property="swellCount" />
|
||||
<result column="swell_freq" property="swellFreq" />
|
||||
<result column="interrupt_count" property="interruptCount" />
|
||||
<result column="interrupt_freq" property="interruptFreq" />
|
||||
</resultMap>
|
||||
<select id="getStatSubstationIconY" resultType="com.njcn.event.pojo.vo.RSubstationIconVO">
|
||||
SELECT
|
||||
COALESCE( sum( CASE WHEN X.event_freq BETWEEN 0 AND 10 THEN 1 ELSE 0 END ), 0 ) "num_1",
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 11 AND 20 THEN 1 ELSE 0 END ), 0 ) "num_2" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 21 AND 30 THEN 1 ELSE 0 END ), 0 ) "num_3" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 31 AND 40 THEN 1 ELSE 0 END ), 0 ) "num_4" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 41 AND 50 THEN 1 ELSE 0 END ), 0 ) "num_5" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 51 AND 60 THEN 1 ELSE 0 END ), 0 ) "num_6" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 61 AND 70 THEN 1 ELSE 0 END ), 0 ) "num_7" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 71 AND 80 THEN 1 ELSE 0 END ), 0 ) "num_8" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 81 AND 90 THEN 1 ELSE 0 END ), 0 ) "num_9" ,
|
||||
COALESCE ( sum( CASE WHEN X.event_freq BETWEEN 91 AND 100 THEN 1 ELSE 0 END ), 0 ) "num_10" ,
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 0 AND 10 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_1",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 11 AND 20 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_2",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 21 AND 30 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_3",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 31 AND 40 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_4",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 41 AND 50 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_5",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 51 AND 60 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_6",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 61 AND 70 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_7",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 71 AND 80 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_8",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 81 AND 90 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_9",
|
||||
COALESCE ( round(sum(CASE WHEN X.event_freq BETWEEN 91 AND 100 THEN 1 ELSE 0 END) / COUNT(X.substation_id),4)*100 , 0 ) "upRatio_10"
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
substation_id,
|
||||
event_freq
|
||||
FROM
|
||||
r_stat_substation_y
|
||||
<where>
|
||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||
AND substation_id IN
|
||||
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND data_date >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||
AND #{param.endTime}>= data_date
|
||||
</if>
|
||||
</where>
|
||||
|
||||
) X
|
||||
|
||||
</select>
|
||||
<select id="getStatSubstationIcon2Y" resultType="com.njcn.event.pojo.vo.RSubstationIcon2VO">
|
||||
SELECT
|
||||
substation_id,
|
||||
interrupt_freq,
|
||||
swell_freq,
|
||||
sag_freq
|
||||
FROM
|
||||
r_stat_substation_y
|
||||
<where>
|
||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||
AND substation_id IN
|
||||
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND data_date >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||
AND #{param.endTime}>= data_date
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.event.mapper.majornetwork.RmpEventDetailMapper">
|
||||
|
||||
<select id="getDetailsOfTransientEvents" resultType="com.njcn.event.pojo.po.RmpEventDetailPO">
|
||||
SELECT
|
||||
event_id as eventId,
|
||||
measurement_point_id as measurementPointId,
|
||||
Event_Type as eventType,
|
||||
start_time as startTime,
|
||||
Duration as duration,
|
||||
feature_amplitude as featureAmplitude,
|
||||
phase as phase,
|
||||
event_describe as eventDescribe,
|
||||
wave_path as wavePath
|
||||
FROM
|
||||
r_mp_event_detail
|
||||
WHERE
|
||||
measurement_point_id IN
|
||||
<foreach collection="monitorIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="eventType != null and eventType.size() >0">
|
||||
AND Event_Type IN
|
||||
<foreach collection="eventType" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(start_time, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.event.mapper.RmpEventDetailMapper">
|
||||
<mapper namespace="com.njcn.event.mapper.majornetwork.RmpEventReportDayMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?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.njcn.event.mapper.TransientMapper">
|
||||
<mapper namespace="com.njcn.event.mapper.majornetwork.TransientMapper">
|
||||
|
||||
<select id="getTransientData" resultType="TransientVO">
|
||||
SELECT
|
||||
Reference in New Issue
Block a user