Commit 676ccf02 authored by lilongyang's avatar lilongyang

1、风电/光伏监测左侧列表查询按照时间周期查询

parent 9c565fbf
...@@ -12,8 +12,8 @@ import java.util.Map; ...@@ -12,8 +12,8 @@ import java.util.Map;
public interface FanHealthIndexHourMapper extends BaseMapper<FanHealthIndexHour> { public interface FanHealthIndexHourMapper extends BaseMapper<FanHealthIndexHour> {
@Select("<script>" + @Select("<script>" +
"SELECT `health_index` AS healthIndex, anomaly, `health_index` AS `value`, rec_date AS recDate, analysis_time AS analysisTime, station,equipment_name AS equipmentName,point_name as pointName, ( 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}" + "SELECT `health_index` AS healthIndex, anomaly, `health_index` AS `value`, rec_date AS recDate, analysis_time AS analysisTime, station,equipment_name AS equipmentName,point_name as pointName, ( 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}" +
"<if test='endTimeTop!= null'> and analysis_time &lt;= #{endTimeTop} </if> " + "<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and analysis_time &gt;= #{startTimeTop} </if> " + "<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
"<if test='area!= null'> AND area = #{area} </if> " + "<if test='area!= null'> AND area = #{area} </if> " +
"<if test='indexAddress!= null'> AND index_address = #{indexAddress} </if> " + "<if test='indexAddress!= null'> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null'>AND point_name = #{pointName} </if> " + "<if test='pointName!= null'>AND point_name = #{pointName} </if> " +
......
...@@ -12,8 +12,8 @@ import java.util.Map; ...@@ -12,8 +12,8 @@ import java.util.Map;
public interface FanHealthIndexMomentMapper extends BaseMapper<FanHealthIndexMoment> { public interface FanHealthIndexMomentMapper extends BaseMapper<FanHealthIndexMoment> {
@Select("<script>" + @Select("<script>" +
"SELECT `health_index` AS healthIndex,`health_index` AS `value`, rec_date AS recDate,anomaly, analysis_time AS analysisTime,point_name as pointName, 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}" + "SELECT `health_index` AS healthIndex,`health_index` AS `value`, rec_date AS recDate,anomaly, analysis_time AS analysisTime,point_name as pointName, 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}" +
"<if test='endTimeTop!= null'> and analysis_time &lt;= #{endTimeTop} </if> " + "<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and analysis_time &gt;= #{startTimeTop} </if> " + "<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
"<if test='area!= null'> AND area = #{area} </if> " + "<if test='area!= null'> AND area = #{area} </if> " +
"<if test='indexAddress!= null'> AND index_address = #{indexAddress} </if> " + "<if test='indexAddress!= null'> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null'>AND point_name = #{pointName} </if> " + "<if test='pointName!= null'>AND point_name = #{pointName} </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