Commit 78411a31 authored by chenzhao's avatar chenzhao

修改语句写法

parent 24872016
......@@ -11,15 +11,15 @@ 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>" +
"<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
"<if test='area!= null'> AND area = #{area} </if> " +
"<if test='indexAddress!= null'> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null'>AND point_name = #{pointName} </if> " +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='healthLevel!= null'>AND health_level = #{healthLevel} </if>" +
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> " +
"<if test='equipmentName!= null'>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);
......
......@@ -11,15 +11,15 @@ 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>" +
"<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
"<if test='area!= null'> AND area = #{area} </if> " +
"<if test='indexAddress!= null'> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null'>AND point_name = #{pointName} </if> " +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='healthLevel!= null'>AND health_level = #{healthLevel} </if>" +
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> " +
"<if test='equipmentName!= null'>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);
......
......@@ -12,15 +12,15 @@ 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>" +
"<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
"<if test='area!= null'> AND area = #{area} </if> " +
"<if test='indexAddress!= null'> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null'>AND point_name = #{pointName} </if> " +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='healthLevel!= null'>AND health_level = #{healthLevel} </if>" +
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> " +
"<if test='equipmentName!= null'>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);
......
......@@ -11,15 +11,15 @@ 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>" +
"<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
"<if test='area!= null'> AND area = #{area} </if> " +
"<if test='indexAddress!= null'> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null'>AND point_name = #{pointName} </if> " +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='healthLevel!= null'>AND health_level = #{healthLevel} </if>" +
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> " +
"<if test='equipmentName!= null'>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);
......
......@@ -12,15 +12,15 @@ 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>" +
"<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
"<if test='area!= null '> AND area = #{area} </if> " +
"<if test='indexAddress!= null '> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null '>AND point_name = #{pointName} </if> " +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='healthLevel!= null '>AND health_level = #{healthLevel} </if>" +
"<if test='subarray!= null'>AND subarray = #{subarray} </if> " +
"<if test='equipmentName!= null'>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);
......
......@@ -12,15 +12,15 @@ 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>" +
"<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
"<if test='area!= null '> AND area = #{area} </if> " +
"<if test='indexAddress!= null '> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null '>AND point_name = #{pointName} </if> " +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='healthLevel!= null '>AND health_level = #{healthLevel} </if>" +
"<if test='subarray!= null'>AND subarray = #{subarray} </if> " +
"<if test='equipmentName!= null'>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);
......
......@@ -15,15 +15,15 @@ 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>" +
"<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
"<if test='area!= null '> AND area = #{area} </if> " +
"<if test='indexAddress!= null '> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null '>AND point_name = #{pointName} </if> " +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='healthLevel!= null '>AND health_level = #{healthLevel} </if>" +
"<if test='subarray!= null'>AND subarray = #{subarray} </if> " +
"<if test='equipmentName!= null'>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);
......
......@@ -12,15 +12,15 @@ public interface PvHealthIndexMomentMapper extends BaseMapper<PvHealthIndexMomen
@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>" +
"<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
"<if test='area!= null '> AND area = #{area} </if> " +
"<if test='indexAddress!= null '> AND index_address = #{indexAddress} </if> " +
"<if test='pointName!= null '>AND point_name = #{pointName} </if> " +
"<if test='station!= null'>AND station = #{station} </if>" +
"<if test='healthLevel!= null '>AND health_level = #{healthLevel} </if>" +
"<if test='subarray!= null'>AND subarray = #{subarray} </if> " +
"<if test='equipmentName!= null'>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);
}
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