Commit 942dfb9a authored by chenzhao's avatar chenzhao

修改代码

parent b2eadd7c
......@@ -168,11 +168,11 @@ public class TDBigScreenAnalyseController extends BaseController {
HashMap<String, Integer> zyMap = new HashMap<>();
HashMap<String, Integer> jgMap = new HashMap<>();
allEquipAlarmInfo.forEach(item -> {
if ("危险".equals(item.get("warningName"))) {
if ("危险".equals(item.get("warningname"))) {
wxMap.put(item.get("area").toString(), Integer.parseInt(item.get("num").toString()));
} else if ("注意".equals(item.get("warningName"))) {
} else if ("注意".equals(item.get("warningname"))) {
zyMap.put(item.get("area").toString(), Integer.parseInt(item.get("num").toString()));
} else if ("警告".equals(item.get("warningName"))) {
} else if ("警告".equals(item.get("warningname"))) {
jgMap.put(item.get("area").toString(), Integer.parseInt(item.get("num").toString()));
}
});
......@@ -405,7 +405,7 @@ public class TDBigScreenAnalyseController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "片区设备预警统计分析 - 右下角柱状图 ", notes = "片区设备预警统计分析 - 右下角柱状图 ")
@GetMapping(value = "/getAllEquipAlarmInfoAnalysis")
public ResponseModel<Map<String, Object>> getAllEquipAlarmInfoAnalysis(@RequestParam(required = false) String stationType,
@RequestParam(required = false) String araeCode) {
@RequestParam(required = false) String areaCode) {
Map<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> allEquipAlarmInfo = new ArrayList<>();
if (CharSequenceUtil.isNotEmpty(stationType)) {
......@@ -415,7 +415,7 @@ public class TDBigScreenAnalyseController extends BaseController {
stationType = "光伏";
}
}
allEquipAlarmInfo = fanWaringRecordMapper.getAllEquipAlarmInfoAnalysisByArea(araeCode,stationType);
allEquipAlarmInfo = fanWaringRecordMapper.getAllEquipAlarmInfoAnalysisByArea(areaCode,stationType);
List<Integer> wxList = new ArrayList<>();
List<Integer> zyList = new ArrayList<>();
List<Integer> jgList = new ArrayList<>();
......
......@@ -253,6 +253,7 @@
from
(
select
ts,
rec_date as recDate,
station as station,
equipment_name as equipmentName,
......@@ -271,6 +272,7 @@
from
analysis_data.pv_warning_record union all
select
ts,
rec_date as recDate,
station as station,
equipment_name as equipmentName,
......@@ -290,7 +292,7 @@
analysis_data.fan_warning_record
) a
<where>
(a.disposotionstate = '未处置') or (a.disposotionstate = '已处置' and a.ts >( now()- 3d - 8h ))
( (a.disposotionstate = '未处置') or (a.disposotionstate = '已处置' and a.ts >( now()- 3d - 8h )))
<if test="arae != '' and arae != null">
and a.arae = concat(#{area}, '区域')
</if>
......@@ -326,6 +328,7 @@
(
select
rec_date as recDate,
ts,
station as station,
equipment_name as equipmentName,
content as content,
......@@ -339,6 +342,7 @@
analysis_data.pv_warning_record union all
select
rec_date as recFate,
ts,
station as station,
equipment_name as equipmentName,
content as content,
......@@ -352,28 +356,31 @@
analysis_data.fan_warning_record
) a
<where>
a.disposotionState = '未处置' or (a.disposotionState = '已处置' and a.ts > ( now() - 3D - 8h ))
<if test="arae != '' and arae != null">
and a.arae = concat(#{area}, '区域')
</if>
<if test="station != '' and station != null">
and a.station = #{station}
</if>
<if test="stationType != '' and stationType != null">
and a.stationType = #{stationType}
</if>
<if test="warningName != '' and warningName != null">
and a.warning_name = #{warningName}
</if>
<if test="stationId != '' and stationId != null">
and a.gateway_id = #{stationId}
</if>
<if test="startDate != '' and startDate != null">
and a.recDate >= concat(#{startDate}, ' 00:00:00')
</if>
<if test="endDate != '' and endDate != null">
and concat(#{endDate}, ' 23:59:59') >= a.recdate
</if>
( a.disposotionState = '未处置'
or (a.disposotionState = '已处置' and a.ts > ( now() - 3D - 8h )))
<if test="arae != '' and arae != null">
and a.arae = concat(#{area}, '区域')
</if>
<if test="station != '' and station != null">
and a.station = #{station}
</if>
<if test="stationType != '' and stationType != null">
and a.stationType = #{stationType}
</if>
<if test="warningName != '' and warningName != null">
and a.warning_name = #{warningName}
</if>
<if test="stationId != '' and stationId != null">
and a.gateway_id = #{stationId}
</if>
<if test="startDate != '' and startDate != null">
and a.recDate >= concat(#{startDate}, ' 00:00:00')
</if>
<if test="endDate != '' and endDate != null">
and concat(#{endDate}, ' 23:59:59') >= a.recdate
</if>
</where>) b
</select>
......@@ -488,6 +495,6 @@
and b.arae = #{araeCode}
</if>
</where>
order by b.`sort` desc
order by b.`sort` ASC
</select>
</mapper>
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