Commit 26be8ab6 authored by zhangsen's avatar zhangsen

排序问题修改

parent e503abdf
......@@ -256,7 +256,7 @@ public class BigScreenAnalyseController extends BaseController {
HashMap<String, Integer> wxMap = new HashMap<>();
HashMap<String, Integer> zyMap = new HashMap<>();
HashMap<String, Integer> jgMap = new HashMap<>();
Set<String> list = new HashSet<>();
LinkedHashSet<String> list = new LinkedHashSet<>();
allEquipAlarmInfo.forEach(item -> {
if ("危险".equals(item.get("warningName"))) {
wxMap.put(item.get("station").toString(), Integer.parseInt(item.get("num").toString()));
......@@ -549,13 +549,13 @@ public class BigScreenAnalyseController extends BaseController {
if (100.0 == equipmentHealthScore) {
item.put("warningName", "安全");
} else {
LambdaQueryWrapper<IdxBizFanHealthLevel> query = new LambdaQueryWrapper<>();
query.eq(IdxBizFanHealthLevel::getAnalysisObjType, "设备");
query.eq(IdxBizFanHealthLevel::getStatus, stationBasic.getStationName());
query.lt(IdxBizFanHealthLevel::getGroupLowerLimit, equipmentHealthScore);
query.ge(IdxBizFanHealthLevel::getGroupUpperLimit, equipmentHealthScore);
IdxBizFanHealthLevel idxBizFanHealthLevel = idxBizFanHealthLevelMapper.selectOne(query);
item.put("warningName", idxBizFanHealthLevel.getHealthLevel());
LambdaQueryWrapper<IdxBizPvHealthLevel> query = new LambdaQueryWrapper<>();
query.eq(IdxBizPvHealthLevel::getAnalysisObjType, "设备");
query.eq(IdxBizPvHealthLevel::getStatus, item.get("station").toString());
query.lt(IdxBizPvHealthLevel::getGroupLowerLimit, equipmentHealthScore);
query.ge(IdxBizPvHealthLevel::getGroupUpperLimit, equipmentHealthScore);
IdxBizPvHealthLevel idxBizPvHealthLevel = idxBizPvHealthLevelMapper.selectOne(query);
item.put("warningName", idxBizPvHealthLevel.getHealthLevel());
}
item.put("healthIndex", equipmentHealthScore);
String subarray = CharSequenceUtil.replace(item.get("subarray").toString(), "#", "");
......
......@@ -211,7 +211,7 @@
WARNING_NAME
) a
ORDER BY
a.allNum desc
a.allNum ASC
</select>
......@@ -291,10 +291,18 @@
<select id="getAllEquipAlarmInfoAnalysisByStationType" resultType="java.util.Map">
SELECT
<!-- ( SELECT POINT_NAME FROM ${tableName2} WHERE GATEWAY_ID = a.GATEWAY_ID AND INDEX_ADDRESS = a.INDEX_ADDRESS ) AS pointName,-->
concat(#{stationType}, '-', a.POINT_NAME) as pointName,
a.WARNING_NAME as warningName,
count(1) as num
count(1) as num,
(select count(1) from ${tableName} as tb
<where>
tb.DISPOSOTION_STATE = '未处置'
and tb.POINT_NAME = a.POINT_NAME
<if test="areaCode != null and areaCode != ''">
and tb.ARAE like concat('%', #{areaCode}, '%')
</if>
</where>
) AS totalNum
FROM
${tableName} a
<where>
......@@ -307,7 +315,7 @@
warningName
having pointName IS NOT NULL
AND pointName != ''
order by num asc
order by totalNum asc
</select>
<select id="getAllEquipAlarmInfoAnalysisByArea" resultType="java.util.Map">
......@@ -507,7 +515,8 @@
<select id="getPvInfoByPage" resultType="java.util.Map">
SELECT
SUBARRAY as subarray
SUBARRAY as subarray,
STATION AS station
FROM
idx_biz_pv_point_process_variable_classification
<where>
......
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