Commit a96d4f76 authored by zhangsen's avatar zhangsen

预警监测bug修改

parent 4a40ca65
......@@ -1304,10 +1304,10 @@ public class CommonServiceImpl {
public Map<String, String> getUnitByIndexAddress(String stationType, String pointId) {
IndicatorData indicatorData = new IndicatorData();
if ("FD".equals(stationType)) {
IdxBizFanPointProcessVariableClassification indexAddress = idxBizFanPointProcessVariableClassificationMapper.selectOne(new QueryWrapper<IdxBizFanPointProcessVariableClassification>().eq("INDEX_ADDRESS", pointId));
IdxBizFanPointProcessVariableClassification indexAddress = idxBizFanPointProcessVariableClassificationMapper.selectOne(new QueryWrapper<IdxBizFanPointProcessVariableClassification>().eq("INDEX_ADDRESS", pointId).last("limit 1"));
indicatorData = indicatorDataMapper.selectUnitByAddressAndGatewayId(indexAddress.getIndexAddress(), indexAddress.getGatewayId());
} else {
IdxBizPvPointProcessVariableClassification indexAddress = idxBizPvPointProcessVariableClassificationMapper.selectOne(new QueryWrapper<IdxBizPvPointProcessVariableClassification>().eq("INDEX_ADDRESS", pointId));
IdxBizPvPointProcessVariableClassification indexAddress = idxBizPvPointProcessVariableClassificationMapper.selectOne(new QueryWrapper<IdxBizPvPointProcessVariableClassification>().eq("INDEX_ADDRESS", pointId).last("limit 1"));
indicatorData = indicatorDataMapper.selectUnitByAddressAndGatewayId(indexAddress.getIndexAddress(), indexAddress.getGatewayId());
}
HashMap<String, String> resultMap = new HashMap<>();
......
......@@ -11,7 +11,7 @@ import java.util.Map;
public interface PvHealthIndexDayMapper extends BaseMapper<PvHealthIndexDay> {
@Select("<script>"+
"SELECT `health_index` AS healthIndex,`health_index` AS `value`, rec_date AS recDate, analysis_time,station,equipment_name AS equipmentName, point_name as pointName, index_address as indexAddress, ( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status" +
"SELECT `health_index` AS healthIndex,`health_index` AS `value`, rec_date AS recDate, anomaly, analysis_time,station,equipment_name AS equipmentName, point_name as pointName, index_address as indexAddress, ( 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 analysis_obj_type = #{analysisObjType}" +
"<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
......
......@@ -10,7 +10,7 @@ import java.util.List;
public interface PvHealthIndexHourMapper extends BaseMapper<PvHealthIndexHour> {
@Select("<script>"+
"SELECT `health_index` AS healthIndex, `health_index` AS `value`, rec_date AS recDate, analysis_time,station,equipment_name AS equipmentName, ( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status" +
"SELECT `health_index` AS healthIndex, `health_index` AS `value`, rec_date AS recDate, anomaly, 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 analysis_obj_type = #{analysisObjType}" +
"<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </if> " +
......
......@@ -10,7 +10,7 @@ import java.util.List;
public interface PvHealthIndexMomentMapper extends BaseMapper<PvHealthIndexMoment> {
@Select("<script>"+
"SELECT `health_index` AS healthIndex,`health_index` AS `value`, rec_date AS recDate, analysis_time,station,equipment_name AS equipmentName, ( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status" +
"SELECT `health_index` AS healthIndex,`health_index` AS `value`, rec_date AS recDate, anomaly, 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 analysis_obj_type = #{analysisObjType}" +
"<if test='endTimeTop!= null'> and ts &lt;= #{endTimeTop} </if> " +
"<if test='startTimeTop!= null'> and ts &gt;= #{startTimeTop} </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