代码合并谐波

This commit is contained in:
2023-01-17 13:37:40 +08:00
parent 9e42ad84fa
commit 9b9ab96582
102 changed files with 936 additions and 371 deletions

View File

@@ -45,5 +45,6 @@ public interface StatHarmonicOrgMMapper extends BaseMapper<RStatHarmonicOrgM> {
*/
List<OverviewVO> selectYoY(@Param("param") OverviewParam param,
@Param("ids") List<String> ids,
@Param("types") List<String> types,
@Param("dataType") String dataType);
}

View File

@@ -81,6 +81,12 @@ FROM (
#{item}
</foreach>
</if>
<if test="types != null and types.size > 0">
AND measurement_type_class IN
<foreach collection='types' item='item' index="index" open='(' separator=',' close=')'>
#{item}
</foreach>
</if>
</where>
GROUP BY t.measurement_type_class,t.harmonic_type,yy,mm
) ta
@@ -103,6 +109,12 @@ LEFT JOIN (
#{item}
</foreach>
</if>
<if test="types != null and types.size > 0">
AND measurement_type_class IN
<foreach collection='types' item='item' index="index" open='(' separator=',' close=')'>
#{item}
</foreach>
</if>
</where>
GROUP BY t.measurement_type_class,t.harmonic_type,yy,mm
) tb
@@ -127,6 +139,12 @@ LEFT JOIN (
#{item}
</foreach>
</if>
<if test="types != null and types.size > 0">
AND measurement_type_class IN
<foreach collection='types' item='item' index="index" open='(' separator=',' close=')'>
#{item}
</foreach>
</if>
</where>
GROUP BY t.measurement_type_class,t.harmonic_type,yy,mm
) tc
@@ -147,8 +165,6 @@ ON ( (tc.yy = ta.yy and tc.mm = ta.mm - 1 and tc.measurement_type_class = ta.me
</if>
</where>
</select>
</mapper>

View File

@@ -3,6 +3,7 @@ package com.njcn.harmonic.mapper.specialanalysis;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.harmonic.pojo.param.OverviewParam;
import com.njcn.harmonic.pojo.po.RStatOrgPvPowerQualityMPO;
import com.njcn.harmonic.pojo.vo.OverviewVO;
import com.njcn.harmonic.pojo.vo.StreamReverseOrgVO;
@@ -28,7 +29,8 @@ public interface RStatOrgPvPowerQualityMMapper extends BaseMapper<RStatOrgPvPowe
* @return
*/
List<OverviewVO.VoltageVO> selectVoltage(@Param("deptCodes") List<String> deptCodes,
@Param("ids") List<String> ids);
@Param("ids") List<String> ids,
@Param("param") OverviewParam param);
}

View File

@@ -63,13 +63,15 @@
#{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 data_date &lt;= #{param.endTime}-->
<!-- </if>-->
<if test="param!=null and param.year != null and param.year != ''">
and YEAR(data_date)=#{param.year}
</if>
<if test="param != null and param.month!=null and param.month.size > 0">
AND MONTH(data_date) IN
<foreach collection='param.month' item='item' index="index" open='(' separator=',' close=')'>
#{item}
</foreach>
</if>
</where>
GROUP BY
monitoring_object,