冀北电网一张图相关接口

This commit is contained in:
xy
2024-04-25 16:12:39 +08:00
parent 04306b9607
commit b6b32e0548
20 changed files with 1337 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
package com.njcn.harmonic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.harmonic.pojo.po.day.RStatAssesDPO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface RStatAssesDMapper extends BaseMapper<RStatAssesDPO> {
List<RStatAssesDPO> getData(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("list") List<String> lineIds);
}

View File

@@ -0,0 +1,25 @@
package com.njcn.harmonic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.harmonic.pojo.po.RStatDataVD;
import com.njcn.harmonic.pojo.po.day.RStatDataPltDPO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* Mapper 接口
* </p>
*
* @author wr
* @since 2023-04-17
*/
public interface RStatDataPltDMapper extends BaseMapper<RStatDataPltDPO> {
/**
* 获取闪变
*/
List<RStatDataPltDPO> getPlt(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
}

View File

@@ -2,6 +2,9 @@ package com.njcn.harmonic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.harmonic.pojo.po.RStatDataVD;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
@@ -13,4 +16,19 @@ import com.njcn.harmonic.pojo.po.RStatDataVD;
*/
public interface RStatDataVDMapper extends BaseMapper<RStatDataVD> {
/**
* 获取频率偏差、三相电压不平衡度
*/
List<RStatDataVD> getFreqDev(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
/**
* 获取电压偏差
*/
List<RStatDataVD> getVuDev(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
/**
* 获取电压总谐波畸变率
*/
List<RStatDataVD> getVthd(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
}

View File

@@ -2,14 +2,12 @@ package com.njcn.harmonic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.harmonic.pojo.po.LimitRate;
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
import com.njcn.harmonic.pojo.vo.MonitorOverLimitVO;
import com.njcn.harmonic.pojo.vo.RStatLimitRateDVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* <p>
@@ -53,4 +51,15 @@ public interface RStatLimitRateDMapper extends BaseMapper<RStatLimitRateDPO> {
List<RStatLimitRateDPO> getSumPassRateList( @Param("ids") List<String> list,
@Param("statTime") String startTime,
@Param("endTime") String endTime);
/**
* 获取综合评估下的指标完整率
* @param list
* @param startTime
* @param endTime
* @return
*/
List<RStatLimitRateDPO> getAssessTargetRate( @Param("ids") List<String> list,
@Param("statTime") String startTime,
@Param("endTime") String endTime);
}

View File

@@ -56,4 +56,7 @@ public interface RStatLimitTargetDMapper extends BaseMapper<RStatLimitTargetDPO>
@Param("startTime") String startTime,
@Param("endTime") String endTime);
List<RStatLimitTargetDPO> getSumTarget(@Param("ids") List<String> ids,
@Param("startTime") String startTime,
@Param("endTime") String endTime);
}

View File

@@ -0,0 +1,25 @@
<?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.harmonic.mapper.RStatAssesDMapper">
<select id="getData" resultType="com.njcn.harmonic.pojo.po.day.RStatAssesDPO">
SELECT
line_id lineId,
AVG(vu_dev) vuDev ,
AVG(freq_dev) freqDev ,
AVG(data_plt) dataPlt ,
AVG(v_unbalance_cp95) vUnbalanceCp95 ,
AVG(v_thd_cp95) vThdCp95
FROM
r_stat_asses_d
WHERE
time_id BETWEEN #{startTime} AND #{endTime}
AND line_id IN
<foreach collection="list" item="item" separator="," open="(" close=")">
#{item}
</foreach>
group by
line_id
</select>
</mapper>

View File

@@ -0,0 +1,24 @@
<?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.harmonic.mapper.RStatDataPltDMapper">
<select id="getPlt" resultType="com.njcn.harmonic.pojo.po.day.RStatDataPltDPO">
select
`time` time,
line_id lineId,
avg(plt) plt
from
r_stat_data_plt_d
where
`time` between #{startTime} and #{endTime}
and phasic_type in ('A','B','C')
and value_type = 'MAX'
and line_id IN
<foreach collection="list" item="item" separator="," open="(" close=")">
#{item}
</foreach>
group by
`time`,line_id
</select>
</mapper>

View File

@@ -2,4 +2,62 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.harmonic.mapper.RStatDataVDMapper">
<select id="getFreqDev" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
select
`time` time,
line_id lineId,
avg(abs(freq_dev)) freqDev,
avg(v_unbalance) vUnbalance
from
r_stat_data_v_d
where
`time` between #{startTime} and #{endTime}
and phasic_type = 'T'
and value_type = 'MAX'
AND line_id IN
<foreach collection="list" item="item" separator="," open="(" close=")">
#{item}
</foreach>
group by
`time`,line_id
</select>
<select id="getVuDev" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
select
`time` time,
line_id lineId,
avg(vl_dev) vlDev
from
r_stat_data_v_d
where
`time` between #{startTime} and #{endTime}
and phasic_type in ('A','B','C')
and value_type = 'MAX'
and line_id IN
<foreach collection="list" item="item" separator="," open="(" close=")">
#{item}
</foreach>
group by
`time`,line_id
</select>
<select id="getVthd" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
select
`time` time,
line_id lineId,
avg(v_thd) vThd
from
r_stat_data_v_d
where
`time` between #{startTime} and #{endTime}
and phasic_type in ('A','B','C')
and value_type = 'CP95'
and line_id IN
<foreach collection="list" item="item" separator="," open="(" close=")">
#{item}
</foreach>
group by
`time`,line_id
</select>
</mapper>

View File

@@ -305,4 +305,27 @@
GROUP BY
`my_index`
</select>
<select id="getAssessTargetRate" resultType="com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO">
select
my_index as lineId,
SUM(all_time) as allTime,
SUM(freq_dev_overtime) as freqDevOvertime,
SUM(voltage_dev_overtime) as voltageDevOvertime,
SUM(flicker_overtime) as flickerOvertime,
SUM(ubalance_overtime) as ubalanceOvertime,
SUM(uaberrance_overtime) as uaberranceOvertime
from
r_stat_limit_rate_d
where
time_id between #{statTime} and #{endTime}
<if test=" ids != null and ids.size > 0">
AND my_index IN
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
#{item}
</foreach>
</if>
group by
my_index
</select>
</mapper>

View File

@@ -259,4 +259,27 @@
HAVING
allCount >0) a
</select>
<select id="getSumTarget" resultType="com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO">
select
my_index as lineId,
SUM(all_time) as allTime,
SUM(freq_dev_overtime) as freqDevOvertime,
SUM(voltage_dev_overtime) as voltageDevOvertime,
SUM(flicker_overtime) as flickerOvertime,
SUM(ubalance_overtime) as ubalanceOvertime,
SUM(uaberrance_overtime) as uaberranceOvertime
from
r_stat_limit_target_d
where
time_id between #{startTime} and #{endTime}
<if test=" ids != null and ids.size > 0">
AND my_index IN
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
#{item}
</foreach>
</if>
group by
my_index
</select>
</mapper>