报警处理功能更新
This commit is contained in:
parent
f21653865c
commit
0441ee3ea7
@ -16,6 +16,7 @@ import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -46,8 +47,13 @@ public class TrendAlarmDataTimeoutJob implements JobHandler {
|
||||
String beginTime = DateUtils.localDateTimeToUTC(onedayBefore);
|
||||
String endTime = DateUtils.localDateTimeToUTC(now);
|
||||
//TODO 最好是从数据库中读取(需要趋势报警的参数名,参数值等)
|
||||
Map<String, Object> diffDataMap = selectDiffDataByColumnNameandDate(null, "gateway_channel_temp_data", "x_bear_temp", beginTime, endTime);
|
||||
logger.info("查询设备数据差值:" + diffDataMap.get("x_bear_temp_diff"));
|
||||
Map<String, Object> diffDataMap = new HashMap<>();
|
||||
Map<String, Object> diffDataMap1= selectDiffDataByColumnNameandDate(null, "gateway_channel_temp_data", "x_bear_temp", beginTime, endTime);
|
||||
Map<String, Object> diffDataMap2 = selectDiffDataByColumnNameandDate(null, "gateway_channel_vibr_data", "x_entropy", beginTime, endTime);
|
||||
diffDataMap.putAll(diffDataMap1);
|
||||
diffDataMap.putAll(diffDataMap2);
|
||||
// logger.info("查询设备数据差值:" + diffDataMap.get("x_bear_temp_diff"));
|
||||
// logger.info("查询设备数据差值:" + diffDataMap.get("x_entropy_diff"));
|
||||
List<AlarmRulesRespDTO> rules = alarmRulesApi.selectAlarmRulesListByCatch(equid);
|
||||
if(rules != null && rules.size() > 0){//预警规则过滤
|
||||
int alarmNum = alarmRulesApi.trendAlarmRulesFilter(diffDataMap, rules);
|
||||
|
@ -146,7 +146,6 @@ public class AlarmRulesApiImpl implements AlarmRulesApi{
|
||||
* (参数报警数据针对每条规则只有一条,没有则新增,有则更新时间)
|
||||
*/
|
||||
private void refreshAlarmData(AlarmRulesRespDTO rule,BigDecimal value,String equipAlarmId ){
|
||||
|
||||
AlarmDataDTO alarmData = alarmDataService.getAlarmDataByRulesId(rule.getAlarmId());
|
||||
if(alarmData == null){
|
||||
alarmDataService.createAlarmData(new AlarmDataSaveReqVO(null,rule.getAlarmId(),rule.getEquipId(),
|
||||
|
@ -679,11 +679,6 @@ export default {
|
||||
* 全部关闭报警
|
||||
*/
|
||||
handelClose() {
|
||||
// var data = {
|
||||
// equipAlarmId : this.$route.query.equipAlarmId;
|
||||
// }
|
||||
// AlarmDataApi.closeAllAlarmData(data);
|
||||
|
||||
this.$modal
|
||||
.confirm("是否确定关闭所有报警?")
|
||||
.then(() => {
|
||||
@ -691,12 +686,8 @@ export default {
|
||||
AlarmDataApi.closeAllAlarmData(equipAlarmId);
|
||||
})
|
||||
.then(() => {
|
||||
//关闭设备报警
|
||||
// var updateData = {
|
||||
// equipAlarmId: this.$route.query.equipAlarmId,
|
||||
// status: 1,
|
||||
// };
|
||||
// EquipAlarmDataApi.updateEquipAlarmData(updateData);
|
||||
const obj = { path: "/alarm/equipalarm" };
|
||||
this.$store.dispatch("tagsView/delView", this.$router.currentRoute);
|
||||
//跳转到前一个页面
|
||||
this.$router.push("/alarm/equipalarm");
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user