Commit 9cfb0cfb authored by hezhuozhi's avatar hezhuozhi

修改大屏监控右下角柱状图问题

parent 33509d2a
...@@ -762,9 +762,33 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl ...@@ -762,9 +762,33 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
jgMapResult.put("data", jgList); jgMapResult.put("data", jgList);
jgMapResult.put("name", "警告"); jgMapResult.put("name", "警告");
//为了页面显示 此处只取前30条
if(list.size() > 30){
List<String> newAxisData = list.subList(0, 29);
Collections.reverse(newAxisData);
List<Integer> newWxList = wxList.subList(0, 29);
Collections.reverse(newWxList);
List<Integer> newZyList = zyList.subList(0, 29);
Collections.reverse(newZyList);
List<Integer> newJgList = jgList.subList(0, 29);
Collections.reverse(newJgList);
HashMap<String, Object> newWxMapResult = new HashMap<>();
newWxMapResult.put("data", newWxList);
newWxMapResult.put("name", "危险");
HashMap<String, Object> newZyMapResult = new HashMap<>();
newZyMapResult.put("data", newZyList);
newZyMapResult.put("name", "注意");
HashMap<String, Object> newJgMapResult = new HashMap<>();
newJgMapResult.put("data", newJgList);
newJgMapResult.put("name", "警告");
List<Map<String, Object>> hashMaps = Arrays.asList(newWxMapResult, newZyMapResult, newJgMapResult);
resultMap.put("axisData", newAxisData);
resultMap.put("seriesData", hashMaps);
}else {
List<Map<String, Object>> hashMaps = Arrays.asList(wxMapResult, zyMapResult, jgMapResult); List<Map<String, Object>> hashMaps = Arrays.asList(wxMapResult, zyMapResult, jgMapResult);
resultMap.put("axisData", list); resultMap.put("axisData", list);
resultMap.put("seriesData", hashMaps); resultMap.put("seriesData", hashMaps);
}
return ResponseHelper.buildResponse(resultMap); return ResponseHelper.buildResponse(resultMap);
} }
......
...@@ -567,7 +567,7 @@ ...@@ -567,7 +567,7 @@
and b.arae like #{araeCode} and b.arae like #{araeCode}
</if> </if>
</where> </where>
order by b.`sort` ASC order by b.`sort` DESC
</select> </select>
<select id="getAllEquipAlarmInfoByStation" resultType="map"> <select id="getAllEquipAlarmInfoByStation" resultType="map">
......
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