diff --git a/README.md b/README.md index 8982d40..8b5fd13 100644 --- a/README.md +++ b/README.md @@ -11,4 +11,12 @@ 三、沈阳赛轮 数据库 ip地址是192.168.100.60 SqlServer数据库用户名:sa 密码:abc@123 -采集服务地址:192.168.100.60:6001 \ No newline at end of file +采集服务地址:192.168.100.60:6001 + +四、泰国成山采集系统 +远程网关:49.231.22.195 +VPN账号:rktest +VPN密码:Itis0528 +运维客户端IP:10.153.6.1 +服务器地址:10.169.12.249 +SqlServer数据库用户名:sa 密码:Call3248 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/T_Alarm_DataController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/T_Alarm_DataController.java index 3668ee7..11189c2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/T_Alarm_DataController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/T_Alarm_DataController.java @@ -89,20 +89,20 @@ public class T_Alarm_DataController extends BaseController List alarmPromptDTOList = t_Alarm_DataService.selectAlarmPromptDataList(userId.toString(),simpleDateFormat.format(calendar.getTime())); - alarmPromptDTOList.forEach(x->{ - TSetmonitorthresholdvalueDTO tSetmonitorthresholdvalue = new TSetmonitorthresholdvalueDTO(); - tSetmonitorthresholdvalue.setMonitorId(x.getMonitorId()); - TSetmonitorthresholdvalueDTO tSetmonitorthresholdvalueDTO = itSetmonitorthresholdvalueService.selectTSetmonitorthresholdvalueDTOList(tSetmonitorthresholdvalue).get(0); - - switch (x.getAlarmType()){ - case "高温报警": - x.setAlarmIdea(tSetmonitorthresholdvalueDTO.gettMaxIdea()); - break; - case "低温报警": - x.setAlarmIdea(tSetmonitorthresholdvalueDTO.gettMinIdea()); - break; - } - }); +// alarmPromptDTOList.forEach(x->{ +// TSetmonitorthresholdvalueDTO tSetmonitorthresholdvalue = new TSetmonitorthresholdvalueDTO(); +// tSetmonitorthresholdvalue.setMonitorId(x.getMonitorId()); +// TSetmonitorthresholdvalueDTO tSetmonitorthresholdvalueDTO = itSetmonitorthresholdvalueService.selectTSetmonitorthresholdvalueDTOList(tSetmonitorthresholdvalue).get(0); + +// switch (x.getAlarmType()){ +// case "高温报警": +// x.setAlarmIdea(tSetmonitorthresholdvalueDTO.gettMaxIdea()); +// break; +// case "低温报警": +// x.setAlarmIdea(tSetmonitorthresholdvalueDTO.gettMinIdea()); +// break; +// } +// }); return getDataTable(alarmPromptDTOList); } diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html index 2dfc948..1048336 100644 --- a/ruoyi-admin/src/main/resources/templates/index.html +++ b/ruoyi-admin/src/main/resources/templates/index.html @@ -340,7 +340,7 @@ deleteValue(); clearInterval(interval); interval = setInterval(deleteValue, 1000*60); - +// bankinfos[i].unitName+" " + function getAlarmPormat() { $.ajax({ async: false, @@ -351,7 +351,7 @@ function getAlarmPormat() { bankinfos = eval(data); var inf = ''; for(var i=0;icom.ruoyi ruoyi-common + + com.ruoyi + ruoyi-system + diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java index 853243b..48b9c91 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java @@ -1,5 +1,7 @@ package com.ruoyi.quartz.task; +import com.ruoyi.system.mapper.TArraytemperaturedataMapper; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.ruoyi.common.utils.StringUtils; @@ -11,6 +13,10 @@ import com.ruoyi.common.utils.StringUtils; @Component("ryTask") public class RyTask { + + @Autowired + private TArraytemperaturedataMapper tArraytemperaturedataMapper; + public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) { System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i)); @@ -25,4 +31,19 @@ public class RyTask { System.out.println("执行无参方法"); } + + /** + * 删除红外温度阵列历史数据 + * @param days + */ + public void deleteArrayDataTask(Integer days){ + days = -days; + System.out.printf("deleteArrayDataTask: %s!", days); + tArraytemperaturedataMapper.deleteTArraytemperaturedataBycollectTime(days); + } + + + + + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/AlarmPromptDTO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/AlarmPromptDTO.java index aac4d1a..a1a849e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/AlarmPromptDTO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/AlarmPromptDTO.java @@ -138,15 +138,23 @@ public class AlarmPromptDTO { this.alarmIdea = alarmIdea; } + @Override public String toString() { - return "AlarmClubDTO{" + - "unitId='" + unitId + '\'' + + return "AlarmPromptDTO{" + + "objId=" + objId + + ", unitId='" + unitId + '\'' + + ", unitName='" + unitName + '\'' + ", monitorId='" + monitorId + '\'' + ", monitorName='" + monitorName + '\'' + ", monitorAddr='" + monitorAddr + '\'' + ", alarmCount=" + alarmCount + ", alarmType='" + alarmType + '\'' + + ", alarmData=" + alarmData + + ", collectTime='" + collectTime + '\'' + + ", alarmStatus=" + alarmStatus + + ", cause='" + cause + '\'' + + ", alarmIdea='" + alarmIdea + '\'' + '}'; } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TArraytemperaturedataMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TArraytemperaturedataMapper.java index ea11df9..fd98b1c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TArraytemperaturedataMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TArraytemperaturedataMapper.java @@ -73,4 +73,6 @@ public interface TArraytemperaturedataMapper * @return */ List> getHighestPointTemperature(TArraytemperaturedata tArraytemperaturedata); + + public int deleteTArraytemperaturedataBycollectTime(Integer days); } diff --git a/ruoyi-system/src/main/resources/mapper/system/TArraytemperaturedataMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TArraytemperaturedataMapper.xml index 4b60ce4..102e065 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TArraytemperaturedataMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TArraytemperaturedataMapper.xml @@ -3954,6 +3954,10 @@ + + delete from T_ArrayTemperatureData where DATEADD(DAY, #{objId}, GETDATE()) > collectTime + + - - + SELECT SUM(IIF(ta.alarmStatus = 1, 1, 0)) alarmCount + FROM T_Alarm_Data ta