合并代码
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
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.RStatEventOrgM;
|
||||
import com.njcn.event.pojo.vo.RStatEventVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +18,14 @@ import com.njcn.event.pojo.po.RStatEventOrgM;
|
||||
*/
|
||||
public interface RStatEventOrgMMapper extends BaseMapper<RStatEventOrgM> {
|
||||
|
||||
/**
|
||||
* 各单位监测点查询
|
||||
* @param param
|
||||
* @param ids
|
||||
* @param dataType
|
||||
* @return
|
||||
*/
|
||||
List<RStatEventVO> selectInfoList(@Param("param") StatSubstationBizBaseParam param,
|
||||
@Param("ids") List<String> ids,
|
||||
@Param("dataType") String dataType);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.event.pojo.po.RStatEventOrgQ;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.vo.RStatEventVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +18,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface RStatEventOrgQMapper extends BaseMapper<RStatEventOrgQ> {
|
||||
|
||||
/**
|
||||
* 各单位监测点查询
|
||||
* @param param
|
||||
* @param ids
|
||||
* @param dataType
|
||||
* @return
|
||||
*/
|
||||
List<RStatEventVO> selectInfoList(@Param("param") StatSubstationBizBaseParam param,
|
||||
@Param("ids") List<String> ids,
|
||||
@Param("dataType") String dataType);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.event.pojo.po.RStatEventOrgY;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.event.pojo.vo.RStatEventVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -12,5 +17,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
public interface RStatEventOrgYMapper extends BaseMapper<RStatEventOrgY> {
|
||||
|
||||
/**
|
||||
* 各单位监测点查询
|
||||
* @param param
|
||||
* @param dataType
|
||||
* @return
|
||||
*/
|
||||
List<RStatEventVO> selectInfoList(@Param("param") StatSubstationBizBaseParam param,
|
||||
@Param("ids") List<String> ids,
|
||||
@Param("dataType") String dataType);
|
||||
}
|
||||
|
||||
@@ -15,5 +15,40 @@
|
||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||
<result column="data_type" property="dataType" />
|
||||
</resultMap>
|
||||
<select id="selectInfoList" resultType="com.njcn.event.pojo.vo.RStatEventVO">
|
||||
SELECT
|
||||
event_type,
|
||||
sum( event_measurement_average )/ count(*) AS eventMeasurementAverage,
|
||||
sum( event_measurement_accrued ) AS eventMeasurementAccrued,
|
||||
sum( event_freq )/ count(*) AS eventFreq,
|
||||
sum( event_count ) AS eventCount,
|
||||
sum( event_measurement_ratio_average )/ count(*) AS eventMeasurementRatioAverage,
|
||||
sum( event_measurement_ratio_accrued ) AS eventMeasurementRatioAccrued
|
||||
FROM
|
||||
r_stat_event_org_m
|
||||
<where>
|
||||
and data_Type=#{dataType}
|
||||
<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="ids != null and ids.size > 0">
|
||||
AND event_type IN
|
||||
<foreach collection='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 data_date <= #{param.endTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
event_type
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -15,5 +15,40 @@
|
||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||
<result column="data_type" property="dataType" />
|
||||
</resultMap>
|
||||
<select id="selectInfoList" resultType="com.njcn.event.pojo.vo.RStatEventVO">
|
||||
SELECT
|
||||
event_type,
|
||||
sum( event_measurement_average )/ count(*) AS eventMeasurementAverage,
|
||||
sum( event_measurement_accrued ) AS eventMeasurementAccrued,
|
||||
sum( event_freq )/ count(*) AS eventFreq,
|
||||
sum( event_count ) AS eventCount,
|
||||
sum( event_measurement_ratio_average )/ count(*) AS eventMeasurementRatioAverage,
|
||||
sum( event_measurement_ratio_accrued ) AS eventMeasurementRatioAccrued
|
||||
FROM
|
||||
r_stat_event_org_q
|
||||
<where>
|
||||
and data_Type=#{dataType}
|
||||
<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="ids != null and ids.size > 0">
|
||||
AND event_type IN
|
||||
<foreach collection='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 data_date <= #{param.endTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
event_type
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -15,5 +15,40 @@
|
||||
<result column="event_measurement_ratio_accrued" property="eventMeasurementRatioAccrued" />
|
||||
<result column="data_type" property="dataType" />
|
||||
</resultMap>
|
||||
<select id="selectInfoList" resultType="com.njcn.event.pojo.vo.RStatEventVO">
|
||||
SELECT
|
||||
event_type,
|
||||
sum( event_measurement_average )/ count(*) AS eventMeasurementAverage,
|
||||
sum( event_measurement_accrued ) AS eventMeasurementAccrued,
|
||||
sum( event_freq )/ count(*) AS eventFreq,
|
||||
sum( event_count ) AS eventCount,
|
||||
sum( event_measurement_ratio_average )/ count(*) AS eventMeasurementRatioAverage,
|
||||
sum( event_measurement_ratio_accrued ) AS eventMeasurementRatioAccrued
|
||||
FROM
|
||||
r_stat_event_org_y
|
||||
<where>
|
||||
and data_Type=#{dataType}
|
||||
<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="ids != null and ids.size > 0">
|
||||
AND event_type IN
|
||||
<foreach collection='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 data_date <= #{param.endTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
event_type
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user