Commit a281b5ad authored by lilongyang's avatar lilongyang

1、风电/光伏检测页面新增按10分钟查询,分钟间隔改为12

2、风电/光伏检测各分析变量预警统计图统计规则修改
parent 88b7c73d
......@@ -428,7 +428,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
page.setRecords(fanHealthIndexHour);
} else {
Date date = DateUtils.dateAddMinutes(null, -9);
Date date = DateUtils.dateAddMinutes(null, -12);
date = DateUtils.dateAddHours(date, -8);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
startTimeTop = formatter.format(date);
......@@ -504,7 +504,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
map.put("value", value);
return ResponseHelper.buildResponse(map);
} else {
Date date = DateUtils.dateAddMinutes(null, -9);
Date date = DateUtils.dateAddMinutes(null, -12);
date = DateUtils.dateAddHours(date, -8);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
startTimeTop = formatter.format(date);
......
......@@ -330,7 +330,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
page.setTotal(total);
return ResponseHelper.buildResponse(page);
} else {
Date date = DateUtils.dateAddMinutes(null, -9);
Date date = DateUtils.dateAddMinutes(null, -12);
date = DateUtils.dateAddHours(date, -8);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
startTimeTop = formatter.format(date);
......@@ -410,7 +410,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
map.put("value", value);
return ResponseHelper.buildResponse(map);
} else {
Date date = DateUtils.dateAddMinutes(null, -9);
Date date = DateUtils.dateAddMinutes(null, -12);
date = DateUtils.dateAddHours(date, -8);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
startTimeTop = formatter.format(date);
......@@ -546,7 +546,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
startTimeTop = DateUtil.format(date, DatePattern.NORM_DATETIME_PATTERN);
maps = pvHealthIndexHourMapper.selectEquipStatusByEquipment("测点", STATION, EQUIPMENTNAME, SUBARRAY, gatewayIds,startTimeTop);
} else {
Date date = DateUtils.dateAddMinutes(null, -9);
Date date = DateUtils.dateAddMinutes(null, -12);
date = DateUtils.dateAddHours(date, -8);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
startTimeTop = formatter.format(date);
......@@ -633,7 +633,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
startTimeTop = DateUtil.format(date, DatePattern.NORM_DATETIME_PATTERN);
maps = pvHealthIndexHourMapper.selectEquipStatusByStationPv(area, analysisObjType, station, gatewayIds,startTimeTop);
}else{
Date date = DateUtils.dateAddMinutes(null, -9);
Date date = DateUtils.dateAddMinutes(null, -12);
date = DateUtils.dateAddHours(date, -8);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
startTimeTop = formatter.format(date);
......
......@@ -61,7 +61,7 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
List<Map<String, Object>> getHealthInfoByArea();
@Select("<script>" +
"SELECT station, health_level as healthlevel,( CASE HEALTH_LEVEL WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name from analysis_data.fan_health_index_day WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"SELECT station, health_level as healthlevel,( CASE HEALTH_LEVEL WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name,point_name from analysis_data.fan_health_index_day WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
" )GROUP BY station,health_level,equipment_name order by sort" +
......
......@@ -59,7 +59,7 @@ public interface FanHealthIndexHourMapper extends BaseMapper<FanHealthIndexHour>
List<Map<String, Object>> selectEquipStatusByStation(@Param("area") String area, @Param("analysisObjType") String analysisObjType, @Param("station") String station, @Param("gatewayIds") List<String> gatewayIds, @Param("startTimeTop") String startTimeTop);
@Select("<script>" +
"SELECT station, health_level as healthlevel,( CASE HEALTH_LEVEL WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name from analysis_data.fan_health_index_hour WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"SELECT station, health_level as healthlevel,( CASE HEALTH_LEVEL WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name,point_name from analysis_data.fan_health_index_hour WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
" )GROUP BY station,health_level,equipment_name order by sort" +
......
......@@ -58,7 +58,7 @@ public interface FanHealthIndexMomentMapper extends BaseMapper<FanHealthIndexMom
List<Map<String, Object>> selectEquipStatusByStation(@Param("area") String area, @Param("analysisObjType") String analysisObjType, @Param("station") String station, @Param("gatewayIds") List<String> gatewayIds, @Param("startTimeTop") String startTimeTop);
@Select("<script>" +
"SELECT station, health_level as healthlevel,( CASE HEALTH_LEVEL WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name from analysis_data.fan_health_index_moment WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"SELECT station, health_level as healthlevel,( CASE HEALTH_LEVEL WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name,point_name from analysis_data.fan_health_index_moment WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
" )GROUP BY station,health_level,equipment_name order by sort" +
......
......@@ -68,7 +68,7 @@ public interface PvHealthIndexDayMapper extends BaseMapper<PvHealthIndexDay> {
@Select("<script>"+
"SELECT station, health_level as healthlevel,( CASE health_level WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name from analysis_data.pv_health_index_day WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"SELECT station, health_level as healthlevel,( CASE health_level WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name,point_name from analysis_data.pv_health_index_day WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
"<if test='subarray!= null'>AND subarray = #{subarray} </if>" +
......
......@@ -152,7 +152,7 @@ public interface PvHealthIndexHourMapper extends BaseMapper<PvHealthIndexHour> {
List<Map<String,Object>> selectEquipStatusByStationPv(@Param("area") String area, @Param("analysisObjType") String analysisObjType, @Param("station") String station, @Param("gatewayIds") List<String> gatewayIds, @Param("startTimeTop") String startTimeTop);
@Select("<script>"+
"SELECT station, health_level as healthlevel,( CASE health_level WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name from analysis_data.pv_health_index_hour WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"SELECT station, health_level as healthlevel,( CASE health_level WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name,point_name from analysis_data.pv_health_index_hour WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
"<if test='subarray!= null'>AND subarray = #{subarray} </if>" +
......
......@@ -152,7 +152,7 @@ public interface PvHealthIndexMomentMapper extends BaseMapper<PvHealthIndexMomen
List<Map<String,Object>> selectEquipStatusByStationPv(@Param("area") String area, @Param("analysisObjType") String analysisObjType, @Param("station") String station, @Param("gatewayIds") List<String> gatewayIds, @Param("startTimeTop") String startTimeTop);
@Select("<script>"+
"SELECT station, health_level as healthlevel,( CASE health_level WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name from analysis_data.pv_health_index_moment WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"SELECT station, health_level as healthlevel,( CASE health_level WHEN '危险' THEN 4 WHEN '警告' THEN 3 WHEN '注意' THEN 2 ELSE 1 END ) AS sort, count( 1 ) AS `value` FROM (select distinct station,health_level,equipment_name,point_name from analysis_data.pv_health_index_moment WHERE analysis_obj_type = #{analysisObjType} and org_code is not null AND ts >= #{startTimeTop}" +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
"<if test='subarray!= null'>AND subarray = #{subarray} </if>" +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment