1.谐波趋势图调整

This commit is contained in:
wr
2024-01-12 17:38:19 +08:00
parent 3496f93c86
commit 3bf4273736
6 changed files with 1822 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
package com.njcn.harmonic.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.njcn.harmonic.pojo.param.HarmonicHistoryParam;
import com.njcn.influx.pojo.bo.HarmonicHistoryData;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@DS("oracle")
public interface HistoryDataMapper{
//相电压有效值
List<HarmonicHistoryData> getDataV(@Param("param") HarmonicHistoryParam param);
//线电压有效值
List<HarmonicHistoryData> getDataV_lvr(@Param("param") HarmonicHistoryParam param);
//电压偏差
List<HarmonicHistoryData> getDataV_vu_dev(@Param("param") HarmonicHistoryParam param);
//三相电压不平衡度
List<HarmonicHistoryData> getDataV_v_unbalance(@Param("param") HarmonicHistoryParam param);
//电压不平衡
List<HarmonicHistoryData> getDataV_v_zero(@Param("param") HarmonicHistoryParam param);
//电压总谐波畸变率
List<HarmonicHistoryData> getDataV_v_thd(@Param("param") HarmonicHistoryParam param);
//电流有效值
List<HarmonicHistoryData> getDataI_rms(@Param("param") HarmonicHistoryParam param);
//电流总畸变率
List<HarmonicHistoryData> getDataI_i_thd(@Param("param") HarmonicHistoryParam param);
//负序电流
List<HarmonicHistoryData> getDataI_i_neg(@Param("param") HarmonicHistoryParam param);
//频率 V9暂时代表Freq
List<HarmonicHistoryData> getDataV_i_neg(@Param("param") HarmonicHistoryParam param);
//谐波电压含有率
List<HarmonicHistoryData> getDataHarmratV_v(@Param("param") HarmonicHistoryParam param,@Param("number") Integer number);
//谐波电流含有率
List<HarmonicHistoryData> getDataHarmratI_i(@Param("param") HarmonicHistoryParam param,@Param("number") Integer number);
//谐波电压幅值
List<HarmonicHistoryData> getDataV_v(@Param("param") HarmonicHistoryParam param,@Param("number") Integer number);
//谐波电流幅值
List<HarmonicHistoryData> getDataI_i(@Param("param") HarmonicHistoryParam param,@Param("number") Integer number);
//谐波电压相角
List<HarmonicHistoryData> getDataHarmphasic_v(@Param("param") HarmonicHistoryParam param,@Param("number") Integer number);
//谐波电流相角
List<HarmonicHistoryData> getDataHarmphasic_i(@Param("param") HarmonicHistoryParam param,@Param("number") Integer number);
//todo 缺少间谐波电压含有率
//todo 缺少间谐波电流含有率
//间谐波电压幅值
List<HarmonicHistoryData> getDataInharmrateV_v(@Param("param") HarmonicHistoryParam param,@Param("number") Integer number);
//间谐波电流幅值
List<HarmonicHistoryData> getDataInharmrateI_i(@Param("param") HarmonicHistoryParam param,@Param("number") Integer number);
//谐波有功功率
List<HarmonicHistoryData> getDataHarmpowerP_p(@Param("param") HarmonicHistoryParam param,@Param("number") Integer number);
//谐波无功功率
List<HarmonicHistoryData> getDataHarmpowerQ_q(@Param("param") HarmonicHistoryParam param,@Param("number") Integer number);
//谐波视在功率
List<HarmonicHistoryData> getDataHarmpowerS_s(@Param("param") HarmonicHistoryParam param,@Param("number") Integer number);
//三相有功功率
List<HarmonicHistoryData> getDataHarmpowerP(@Param("param") HarmonicHistoryParam param);
//三相无功功率
List<HarmonicHistoryData> getDataHarmpowerQ(@Param("param") HarmonicHistoryParam param);
//三相视在功率
List<HarmonicHistoryData> getDataHarmpowerS(@Param("param") HarmonicHistoryParam param);
//三相总有功功率
List<HarmonicHistoryData> getDataHarmpowerP_t(@Param("param") HarmonicHistoryParam param);
//三相总无功功率
List<HarmonicHistoryData> getDataHarmpowerQ_t(@Param("param") HarmonicHistoryParam param);
//三相总视在功率
List<HarmonicHistoryData> getDataHarmpowerS_t(@Param("param") HarmonicHistoryParam param);
//视在功率因数
List<HarmonicHistoryData> getDataHarmpowerP_pf(@Param("param") HarmonicHistoryParam param);
//位移功率因数
List<HarmonicHistoryData> getDataHarmpowerP_df(@Param("param") HarmonicHistoryParam param);
//总视在功率因数
List<HarmonicHistoryData> getDataHarmpowerP_pf_T(@Param("param") HarmonicHistoryParam param);
//总位移功率因数
List<HarmonicHistoryData> getDataHarmpowerP_df_T(@Param("param") HarmonicHistoryParam param);
//长时闪变
List<HarmonicHistoryData> getDataPlt(@Param("param") HarmonicHistoryParam param);
//短时闪变
List<HarmonicHistoryData> getDataFlicker(@Param("param") HarmonicHistoryParam param);
//电压波动
List<HarmonicHistoryData> getDataFluc(@Param("param") HarmonicHistoryParam param);
}

View File

@@ -0,0 +1,876 @@
<?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.HistoryDataMapper'>
<select id="getDataV" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(RMS) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(RMS_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(RMS_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(RMS_CP95) as aValue
</if>
from
data_v
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type!='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataV_lvr" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(RMSAB) as aValue,
sum(RMSBC) as bValue,
sum(RMSCA) as cValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(RMSAB_MAX) as aValue,
sum(RMSBC_MAX) as bValue,
sum(RMSCA_MAX) as cValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(RMSAB_MIN) as aValue,
sum(RMSBC_MIN) as bValue,
sum(RMSCA_MIN) as cValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(RMSAB_CP95) as aValue,
sum(RMSBC_CP95) as bValue,
sum(RMSCA_CP95) as cValue
</if>
from
data_v
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type!='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataV_vu_dev" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(VU_Dev) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(VU_Dev_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(VU_Dev_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(VU_Dev_CP95) as aValue
</if>
from
data_v
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type!='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataV_v_unbalance" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(V_Unbalance) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(V_Unbalance_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(V_Unbalance_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(V_Unbalance_CP95) as aValue
</if>
from
data_v
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type ='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataV_v_zero" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(v_zero) as aValue,
sum(v_pos) as bValue,
sum(v_neg) as cValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(v_zero_MAX) as aValue,
sum(v_pos_MAX) as bValue,
sum(v_neg_MAX) as cValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(v_zero_MIN) as aValue,
sum(v_pos_MIN) as bValue,
sum(v_neg_MIN) as cValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(v_zero_CP95) as aValue,
sum(v_pos_CP95) as bValue,
sum(v_neg_CP95) as cValue
</if>
from
data_v
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type ='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataV_v_thd" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(v_thd) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(v_thd_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(v_thd_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(v_thd_CP95) as aValue
</if>
from
data_v
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataI_rms" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(RMS) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(RMS_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(RMS_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(RMS_CP95) as aValue
</if>
from
data_i
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type!='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataI_i_thd" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(I_THD) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(I_THD_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(I_THD_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(I_THD_CP95) as aValue
</if>
from
data_i
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type!='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataI_i_neg" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(I_NEG) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(I_NEG_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(I_NEG_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(I_NEG_CP95) as aValue
</if>
from
data_i
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type!='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataV_i_neg" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(FREQ) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(FREQ_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(FREQ_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(FREQ_CP95) as aValue
</if>
from
data_v
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type ='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmratV_v" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(v_${number}) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(v_${number}_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(v_${number}_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(v_${number}_CP95) as aValue
</if>
from
data_harmrate_v
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmratI_i" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(i_${number}) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(i_${number}_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(i_${number}_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(i_${number}_CP95) as aValue
</if>
from
data_harmrate_i
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataV_v" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(v_${number}) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(v_${number}_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(v_${number}_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(v_${number}_CP95) as aValue
</if>
from
data_v
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataI_i" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(i_${number}) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(i_${number}_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(i_${number}_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(i_${number}_CP95) as aValue
</if>
from
data_i
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmphasic_v" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(v_${number}) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(v_${number}_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(v_${number}_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(v_${number}_CP95) as aValue
</if>
from
data_harmphasic_v
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmphasic_i" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(i_${number}) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(i_${number}_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(i_${number}_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(i_${number}_CP95) as aValue
</if>
from
data_harmphasic_i
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataInharmrateV_v" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(v_${number}) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(v_${number}_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(v_${number}_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(v_${number}_CP95) as aValue
</if>
from
data_inharm_v
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataInharmrateI_i" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(i_${number}) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(i_${number}_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(i_${number}_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(i_${number}_CP95) as aValue
</if>
from
data_inharm_i
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerP_p" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(p_${number}) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(p_${number}_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(p_${number}_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(p_${number}_CP95) as aValue
</if>
from
data_harmpower_p
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerQ_q" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(q_${number}) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(q_${number}_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(q_${number}_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(q_${number}_CP95) as aValue
</if>
from
data_harmpower_q
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerS_s" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(s_${number}) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(s_${number}_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(s_${number}_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(s_${number}_CP95) as aValue
</if>
from
data_harmpower_s
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerP" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(p) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(p_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(p_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(p_CP95) as aValue
</if>
from
data_harmpower_p
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerQ" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(q) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(q_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(q_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(q_CP95) as aValue
</if>
from
data_harmpower_q
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerS" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(s) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(s_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(s_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(s_CP95) as aValue
</if>
from
data_harmpower_s
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerP_t" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(p) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(p_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(p_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(p_CP95) as aValue
</if>
from
data_harmpower_p
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type ='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerQ_t" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(q) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(q_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(q_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(q_CP95) as aValue
</if>
from
data_harmpower_q
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type ='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerS_t" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(s) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(s_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(s_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(s_CP95) as aValue
</if>
from
data_harmpower_s
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type ='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerP_pf" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(pf) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(pf_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(pf_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(pf_CP95) as aValue
</if>
from
data_harmpower_p
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerP_df" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(df) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(df_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(df_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(df_CP95) as aValue
</if>
from
data_harmpower_p
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type !='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerP_pf_T" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(pf) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(pf_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(pf_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(pf_CP95) as aValue
</if>
from
data_harmpower_p
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type ='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataHarmpowerP_df_T" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
<if test="param.valueTypeName == ''">
sum(df) as aValue
</if>
<if test="param.valueTypeName == 'MAX'">
sum(df_MAX) as aValue
</if>
<if test="param.valueTypeName == 'MIN'">
sum(df_MIN) as aValue
</if>
<if test="param.valueTypeName == 'CP95'">
sum(df_CP95) as aValue
</if>
from
data_harmpower_p
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type ='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataPlt" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
sum(plt) as aValue
from
data_plt
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type!='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataFlicker" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
sum(pst) as aValue
from
data_flicker
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type!='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
<select id="getDataFluc" resultType="com.njcn.influx.pojo.bo.HarmonicHistoryData">
select
TIMEID as timeId,
PHASIC_TYPE as phasicType,
sum(fluc) as aValue
from
data_fluc
<where>
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
and phasic_type!='T'
and lineid = #{param.lineId}
group by timeid,PHASIC_TYPE
order by timeId asc
</where>
</select>
</mapper>