change - 删除红外温度阵列历史数据、页面报警

master
yinq 2 months ago
parent b362108099
commit f7a2e50170

@ -12,3 +12,11 @@
数据库 ip地址是192.168.100.60
SqlServer数据库用户名sa 密码abc@123
采集服务地址192.168.100.60:6001
四、泰国成山采集系统
远程网关49.231.22.195
VPN账号rktest
VPN密码Itis0528
运维客户端IP10.153.6.1
服务器地址10.169.12.249
SqlServer数据库用户名sa 密码Call3248

@ -89,20 +89,20 @@ public class T_Alarm_DataController extends BaseController
List<AlarmPromptDTO> 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);
}

@ -340,7 +340,7 @@ deleteValue();
clearInterval(interval);
interval = setInterval(deleteValue, 1000*60);
// bankinfos[i].unitName+"&nbsp;" +
function getAlarmPormat() {
$.ajax({
async: false,
@ -351,7 +351,7 @@ function getAlarmPormat() {
bankinfos = eval(data);
var inf = '<table style="width: 100%">';
for(var i=0;i<bankinfos.length;i++){
inf += "<tr><td><h4>" +bankinfos[i].unitName+"&nbsp;"+bankinfos[i].alarmCount+"个点位发生异常";
inf += "<tr><td><h4>" + bankinfos[i].alarmCount+"个点位发生异常";
inf+="</h4></td></tr>";
}
inf += "</table>";

@ -34,6 +34,10 @@
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-system</artifactId>
</dependency>
</dependencies>

@ -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);
}
}

@ -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 + '\'' +
'}';
}
}

@ -73,4 +73,6 @@ public interface TArraytemperaturedataMapper
* @return
*/
List<HashMap<String, Object>> getHighestPointTemperature(TArraytemperaturedata tArraytemperaturedata);
public int deleteTArraytemperaturedataBycollectTime(Integer days);
}

@ -3954,6 +3954,10 @@
</foreach>
</delete>
<delete id="deleteTArraytemperaturedataBycollectTime">
delete from T_ArrayTemperatureData where DATEADD(DAY, #{objId}, GETDATE()) > collectTime
</delete>
<select id="getHighestPointTemperature" parameterType="TArraytemperaturedata" resultType="java.util.HashMap">
SELECT monitorId, collectTime, MAX(SiteValue) AS tempreture
FROM (

@ -43,7 +43,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="objId" column="objId"/>
<result property="alarmStatus" column="alarmStatus"/>
<result property="cause" column="cause"/>
</resultMap>
<sql id="selectT_Alarm_DataVo">
@ -70,8 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
ORDER BY t1.collectTime DESC
</select>
<select id="selectAlarmPromptList" parameterType="AlarmPromptDTO" resultMap="AlarmPromptDTOResult">
<!--
select a.unitName,a.unitId,COUNT(a.monitorId) as alarmCount from (
select t2.unitId,t6.unitName,t4.monitorId,t4.cause
from sys_user_role t1
@ -83,7 +81,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by t2.unitId,t6.unitName,t4.monitorId,t4.cause
) a
group by a.unitName,a.unitId
-->
<select id="selectAlarmPromptList" parameterType="AlarmPromptDTO" resultMap="AlarmPromptDTOResult">
SELECT SUM(IIF(ta.alarmStatus = 1, 1, 0)) alarmCount
FROM T_Alarm_Data ta
</select>
<select id="selectAlarmPromptDataList" parameterType="AlarmPromptDTO" resultMap="AlarmPromptDTOResult">
@ -101,7 +102,7 @@ group by a.unitName,a.unitId
t4.cause
from T_Alarm_Data t4
left join T_Monitor t5 on t4.monitorId = t5.monitorId
where t4.collectTime between #{beginTime} and getdate() and t4.alarmStatus = 1
where t4.alarmStatus = 1
</select>

Loading…
Cancel
Save