Commit e62ba5b5 authored by chenzhao's avatar chenzhao

增加预警监测接口

parent 464dc66b
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IndicatorData;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
@Select("<script>"+
"SELECT `health_index` AS healthIndex, created_time AS createdTime, analysis_time AS analysisTime, station,equipment_name AS equipmentName, ( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status FROM analysis_data.fan_health_index_day WHERE analysis_obj_type = #{analysisObjType} and analysis_type = #{analysisType}" +
"<if test='endTimeTop!= null and endTimeTop != '''> and ts <= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null and startTimeTop != '''> and ts >= #{startTimeTop} </if> " +
"<if test='area!= null and area != '''> AND area = #{area} </if> " +
"<if test='indexAddress!= null and indexAddress != '''> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null and pointName != '''>AND point_name = #{pointName} </if> " +
"<if test='station!= null and station != '''>AND station = #{station} </if>" +
"<if test='healthLevel!= null and station != '''>AND health_level = #{healthLevel} </if>" +
"<if test='subSystem!= null and subSystem != '''>AND sub_system = #{subSystem} </if> " +
"<if test='equipmentName!= null and equipmentName != '''>AND equipment_name = #{equipmentName} </if>" +
"</script>")
List<FanHealthIndexDay> selectData(@Param("healthLevel")String healthLevel,@Param("area")String area,@Param("equipmentName")String equipmentName,@Param("subSystem")String subSystem,@Param("analysisType")String analysisType,@Param("analysisObjType")String analysisObjType,@Param("station")String station,@Param("pointName")String pointName, @Param("indexAddress")String indexAddress,@Param("startTimeTop") String startTimeTop, @Param("endTimeTop")String endTimeTop);
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexHour;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface FanHealthIndexHourMapper extends BaseMapper<FanHealthIndexHour> {
@Select("<script>"+
"SELECT `health_index` AS healthIndex, created_time AS createdTime, analysis_time AS analysisTime, station,equipment_name AS equipmentName, ( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status FROM analysis_data.fan_health_index_hour WHERE analysis_obj_type = #{analysisObjType} and analysis_type = #{analysisType}" +
"<if test='endTimeTop!= null and endTimeTop != '''> and ts <= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null and startTimeTop != '''> and ts >= #{startTimeTop} </if> " +
"<if test='area!= null and area != '''> AND area = #{area} </if> " +
"<if test='indexAddress!= null and indexAddress != '''> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null and pointName != '''>AND point_name = #{pointName} </if> " +
"<if test='station!= null and station != '''>AND station = #{station} </if>" +
"<if test='healthLevel!= null and station != '''>AND health_level = #{healthLevel} </if>" +
"<if test='subSystem!= null and subSystem != '''>AND sub_system = #{subSystem} </if> " +
"<if test='equipmentName!= null and equipmentName != '''>AND equipment_name = #{equipmentName} </if>" +
"</script>")
List<FanHealthIndexDay> selectData(@Param("healthLevel")String healthLevel, @Param("area")String area, @Param("equipmentName")String equipmentName, @Param("subSystem")String subSystem, @Param("analysisType")String analysisType, @Param("analysisObjType")String analysisObjType, @Param("station")String station, @Param("pointName")String pointName, @Param("indexAddress")String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop")String endTimeTop);
}
......@@ -3,11 +3,26 @@ package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface FanHealthIndexMapper extends BaseMapper<FanHealthIndex> {
@Select("<script>"+
"SELECT `health_index` AS healthIndex, created_time AS createdTime, analysis_time AS analysisTime, station,equipment_name AS equipmentName, ( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status FROM analysis_data.fan_health_index_data WHERE analysis_obj_type = #{analysisObjType} and analysis_type = #{analysisType}" +
"<if test='endTimeTop!= null and endTimeTop != '''> and ts <= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null and startTimeTop != '''> and ts >= #{startTimeTop} </if> " +
"<if test='area!= null and area != '''> AND area = #{area} </if> " +
"<if test='indexAddress!= null and indexAddress != '''> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null and pointName != '''>AND point_name = #{pointName} </if> " +
"<if test='station!= null and station != '''>AND station = #{station} </if>" +
"<if test='healthLevel!= null and station != '''>AND health_level = #{healthLevel} </if>" +
"<if test='subSystem!= null and subSystem != '''>AND sub_system = #{subSystem} </if> " +
"<if test='equipmentName!= null and equipmentName != '''>AND equipment_name = #{equipmentName} </if>" +
"</script>")
List<FanHealthIndexDay> selectData(@Param("healthLevel")String healthLevel, @Param("area")String area, @Param("equipmentName")String equipmentName, @Param("subSystem")String subSystem, @Param("analysisType")String analysisType, @Param("analysisObjType")String analysisObjType, @Param("station")String station, @Param("pointName")String pointName, @Param("indexAddress")String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop")String endTimeTop);
int saveBatchHealthIndexList(@Param("list") List<FanHealthIndex> list, @Param("tableName") String tableName);
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexMoment;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface FanHealthIndexMomentMapper extends BaseMapper<FanHealthIndexMoment> {
@Select("<script>"+
"SELECT `health_index` AS healthIndex, created_time AS createdTime, analysis_time AS analysisTime, station,equipment_name AS equipmentName, ( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status FROM analysis_data.fan_health_index_moment WHERE analysis_obj_type = #{analysisObjType} and analysis_type = #{analysisType}" +
"<if test='endTimeTop!= null and endTimeTop != '''> and ts <= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null and startTimeTop != '''> and ts >= #{startTimeTop} </if> " +
"<if test='area!= null and area != '''> AND area = #{area} </if> " +
"<if test='indexAddress!= null and indexAddress != '''> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null and pointName != '''>AND point_name = #{pointName} </if> " +
"<if test='station!= null and station != '''>AND station = #{station} </if>" +
"<if test='healthLevel!= null and station != '''>AND health_level = #{healthLevel} </if>" +
"<if test='subSystem!= null and subSystem != '''>AND sub_system = #{subSystem} </if> " +
"<if test='equipmentName!= null and equipmentName != '''>AND equipment_name = #{equipmentName} </if>" +
"</script>")
List<FanHealthIndexDay> selectData (@Param("healthLevel")String healthLevel, @Param("area")String area, @Param("equipmentName")String equipmentName, @Param("subSystem")String subSystem, @Param("analysisType")String analysisType, @Param("analysisObjType")String analysisObjType, @Param("station")String station, @Param("pointName")String pointName, @Param("indexAddress")String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop")String endTimeTop);
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord;
public interface FanWaringRecordMapper extends BaseMapper<FanWarningRecord> {
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndexDay;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface PvHealthIndexDayMapper extends BaseMapper<PvHealthIndexDay> {
@Select("<script>"+
"SELECT `health_index` AS healthIndex, created_time AS createdTime, analysis_time,station,equipment_name AS equipmentName, ( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status" +
"FROM analysis_data.pv_health_index_day WHERE and analysis_obj_type = #{analysisObjType} and analysis_type = #{analysisType}" +
"<if test='endTimeTop!= null and endTimeTop != '''> and ts <= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null and startTimeTop != '''> and ts >= #{startTimeTop} </if> " +
"<if test='area!= null and area != '''> AND area = #{area} </if> " +
"<if test='indexAddress!= null and indexAddress != '''> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null and pointName != '''>AND point_name = #{pointName} </if> " +
"<if test='station!= null and station != '''>AND station = #{station} </if>" +
"<if test='healthLevel!= null and station != '''>AND health_level = #{healthLevel} </if>" +
"<if test='subarray!= null and subarray != '''>AND subarray = #{subarray} </if> " +
"<if test='equipmentName!= null and equipmentName != '''>AND equipment_name = #{equipmentName} </if>" +
"</script>")
List<PvHealthIndexDay> selectData(@Param("station")String station,@Param("analysisType")String analysisType,@Param("indexAddress")String indexAddress,@Param("healthLevel")String healthLevel,@Param("area")String area,@Param("analysisObjType")String analysisObjType, @Param("subarray")String subarray, @Param("pointName")String pointName,@Param("startTimeTop") String startTimeTop, @Param("endTimeTop")String endTimeTop, @Param("equipmentName")String equipmentName);
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndexHour;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface PvHealthIndexHourMapper extends BaseMapper<PvHealthIndexHour> {
@Select("<script>"+
"SELECT `health_index` AS healthIndex, created_time AS createdTime, analysis_time,station,equipment_name AS equipmentName, ( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status" +
"FROM analysis_data.pv_health_index_hour WHERE and analysis_obj_type = #{analysisObjType} and analysis_type = #{analysisType}" +
"<if test='endTimeTop!= null and endTimeTop != '''> and ts <= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null and startTimeTop != '''> and ts >= #{startTimeTop} </if> " +
"<if test='area!= null and area != '''> AND area = #{area} </if> " +
"<if test='indexAddress!= null and indexAddress != '''> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null and pointName != '''>AND point_name = #{pointName} </if> " +
"<if test='station!= null and station != '''>AND station = #{station} </if>" +
"<if test='healthLevel!= null and station != '''>AND health_level = #{healthLevel} </if>" +
"<if test='subarray!= null and subarray != '''>AND subarray = #{subarray} </if> " +
"<if test='equipmentName!= null and equipmentName != '''>AND equipment_name = #{equipmentName} </if>" +
"</script>")
List<FanHealthIndexDay> selectData (@Param("healthLevel")String healthLevel, @Param("area")String area, @Param("equipmentName")String equipmentName, @Param("subSystem")String subSystem, @Param("analysisType")String analysisType, @Param("analysisObjType")String analysisObjType, @Param("station")String station, @Param("pointName")String pointName, @Param("indexAddress")String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop")String endTimeTop);
}
......@@ -3,12 +3,28 @@ package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface PvHealthIndexMapper extends BaseMapper<PvHealthIndex> {
@Select("<script>"+
"SELECT `health_index` AS healthIndex, created_time AS createdTime, analysis_time,station,equipment_name AS equipmentName, ( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status" +
"FROM analysis_data.pv_health_index_data WHERE and analysis_obj_type = #{analysisObjType} and analysis_type = #{analysisType}" +
"<if test='endTimeTop!= null and endTimeTop != '''> and ts <= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null and startTimeTop != '''> and ts >= #{startTimeTop} </if> " +
"<if test='area!= null and area != '''> AND area = #{area} </if> " +
"<if test='indexAddress!= null and indexAddress != '''> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null and pointName != '''>AND point_name = #{pointName} </if> " +
"<if test='station!= null and station != '''>AND station = #{station} </if>" +
"<if test='healthLevel!= null and station != '''>AND health_level = #{healthLevel} </if>" +
"<if test='subarray!= null and subarray != '''>AND subarray = #{subarray} </if> " +
"<if test='equipmentName!= null and equipmentName != '''>AND equipment_name = #{equipmentName} </if>" +
"</script>")
List<FanHealthIndexDay> selectData (@Param("healthLevel")String healthLevel, @Param("area")String area, @Param("equipmentName")String equipmentName, @Param("subSystem")String subSystem, @Param("analysisType")String analysisType, @Param("analysisObjType")String analysisObjType, @Param("station")String station, @Param("pointName")String pointName, @Param("indexAddress")String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop")String endTimeTop);
int saveBatchHealthIndexList(@Param("list") List<PvHealthIndex> list, @Param("tableName") String tableName);
......
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndexMoment;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface PvHealthIndexMomentMapper extends BaseMapper<PvHealthIndexMoment> {
@Select("<script>"+
"SELECT `health_index` AS healthIndex, created_time AS createdTime, analysis_time,station,equipment_name AS equipmentName, ( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status" +
"FROM analysis_data.pv_health_index_moment WHERE and analysis_obj_type = #{analysisObjType} and analysis_type = #{analysisType}" +
"<if test='endTimeTop!= null and endTimeTop != '''> and ts <= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null and startTimeTop != '''> and ts >= #{startTimeTop} </if> " +
"<if test='area!= null and area != '''> AND area = #{area} </if> " +
"<if test='indexAddress!= null and indexAddress != '''> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null and pointName != '''>AND point_name = #{pointName} </if> " +
"<if test='station!= null and station != '''>AND station = #{station} </if>" +
"<if test='healthLevel!= null and station != '''>AND health_level = #{healthLevel} </if>" +
"<if test='subarray!= null and subarray != '''>AND subarray = #{subarray} </if> " +
"<if test='equipmentName!= null and equipmentName != '''>AND equipment_name = #{equipmentName} </if>" +
"</script>")
List<FanHealthIndexDay> selectData(@Param("healthLevel")String healthLevel, @Param("area")String area, @Param("equipmentName")String equipmentName, @Param("subSystem")String subSystem, @Param("analysisType")String analysisType, @Param("analysisObjType")String analysisObjType, @Param("station")String station, @Param("pointName")String pointName, @Param("indexAddress")String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop")String endTimeTop);
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdengine;
public class FanWarningRecord {
private Long ts;
private String record;
private String recDate;
private String recUserId;
private String instanceId;
private String status;
private String disposotionState;
private String healthIndex;
private String analysisPointId;
private String warningName;
private String arae;
private String station;
private String subSystem;
private String number;
private String gatewayId;
private String indexAddress;
private String equipmentName;
private String CONTENT;
private String pointName;
private String healthLevel;
private String disposotionDate;
private String kks;
private String warningPeriod;
}
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