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

master
yinq 2 months ago
parent b362108099
commit f7a2e50170

@ -11,4 +11,12 @@
三、沈阳赛轮 三、沈阳赛轮
数据库 ip地址是192.168.100.60 数据库 ip地址是192.168.100.60
SqlServer数据库用户名sa 密码abc@123 SqlServer数据库用户名sa 密码abc@123
采集服务地址192.168.100.60:6001 采集服务地址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())); List<AlarmPromptDTO> alarmPromptDTOList = t_Alarm_DataService.selectAlarmPromptDataList(userId.toString(),simpleDateFormat.format(calendar.getTime()));
alarmPromptDTOList.forEach(x->{ // alarmPromptDTOList.forEach(x->{
TSetmonitorthresholdvalueDTO tSetmonitorthresholdvalue = new TSetmonitorthresholdvalueDTO(); // TSetmonitorthresholdvalueDTO tSetmonitorthresholdvalue = new TSetmonitorthresholdvalueDTO();
tSetmonitorthresholdvalue.setMonitorId(x.getMonitorId()); // tSetmonitorthresholdvalue.setMonitorId(x.getMonitorId());
TSetmonitorthresholdvalueDTO tSetmonitorthresholdvalueDTO = itSetmonitorthresholdvalueService.selectTSetmonitorthresholdvalueDTOList(tSetmonitorthresholdvalue).get(0); // TSetmonitorthresholdvalueDTO tSetmonitorthresholdvalueDTO = itSetmonitorthresholdvalueService.selectTSetmonitorthresholdvalueDTOList(tSetmonitorthresholdvalue).get(0);
switch (x.getAlarmType()){ // switch (x.getAlarmType()){
case "高温报警": // case "高温报警":
x.setAlarmIdea(tSetmonitorthresholdvalueDTO.gettMaxIdea()); // x.setAlarmIdea(tSetmonitorthresholdvalueDTO.gettMaxIdea());
break; // break;
case "低温报警": // case "低温报警":
x.setAlarmIdea(tSetmonitorthresholdvalueDTO.gettMinIdea()); // x.setAlarmIdea(tSetmonitorthresholdvalueDTO.gettMinIdea());
break; // break;
} // }
}); // });
return getDataTable(alarmPromptDTOList); return getDataTable(alarmPromptDTOList);
} }

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

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

@ -1,5 +1,7 @@
package com.ruoyi.quartz.task; package com.ruoyi.quartz.task;
import com.ruoyi.system.mapper.TArraytemperaturedataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
@ -11,6 +13,10 @@ import com.ruoyi.common.utils.StringUtils;
@Component("ryTask") @Component("ryTask")
public class RyTask public class RyTask
{ {
@Autowired
private TArraytemperaturedataMapper tArraytemperaturedataMapper;
public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i)
{ {
System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i)); System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
@ -25,4 +31,19 @@ public class RyTask
{ {
System.out.println("执行无参方法"); 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; this.alarmIdea = alarmIdea;
} }
@Override @Override
public String toString() { public String toString() {
return "AlarmClubDTO{" + return "AlarmPromptDTO{" +
"unitId='" + unitId + '\'' + "objId=" + objId +
", unitId='" + unitId + '\'' +
", unitName='" + unitName + '\'' +
", monitorId='" + monitorId + '\'' + ", monitorId='" + monitorId + '\'' +
", monitorName='" + monitorName + '\'' + ", monitorName='" + monitorName + '\'' +
", monitorAddr='" + monitorAddr + '\'' + ", monitorAddr='" + monitorAddr + '\'' +
", alarmCount=" + alarmCount + ", alarmCount=" + alarmCount +
", alarmType='" + alarmType + '\'' + ", alarmType='" + alarmType + '\'' +
", alarmData=" + alarmData +
", collectTime='" + collectTime + '\'' +
", alarmStatus=" + alarmStatus +
", cause='" + cause + '\'' +
", alarmIdea='" + alarmIdea + '\'' +
'}'; '}';
} }
} }

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

@ -3954,6 +3954,10 @@
</foreach> </foreach>
</delete> </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 id="getHighestPointTemperature" parameterType="TArraytemperaturedata" resultType="java.util.HashMap">
SELECT monitorId, collectTime, MAX(SiteValue) AS tempreture SELECT monitorId, collectTime, MAX(SiteValue) AS tempreture
FROM ( FROM (

@ -42,8 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="collectTime" column="collectTime"/> <result property="collectTime" column="collectTime"/>
<result property="objId" column="objId"/> <result property="objId" column="objId"/>
<result property="alarmStatus" column="alarmStatus"/> <result property="alarmStatus" column="alarmStatus"/>
<result property="cause " column="cause"/> <result property="cause" column="cause"/>
</resultMap> </resultMap>
<sql id="selectT_Alarm_DataVo"> <sql id="selectT_Alarm_DataVo">
@ -70,9 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
ORDER BY t1.collectTime DESC ORDER BY t1.collectTime DESC
</select> </select>
<!--
<select id="selectAlarmPromptList" parameterType="AlarmPromptDTO" resultMap="AlarmPromptDTOResult"> select a.unitName,a.unitId,COUNT(a.monitorId) as alarmCount from (
select a.unitName,a.unitId,COUNT(a.monitorId) as alarmCount from (
select t2.unitId,t6.unitName,t4.monitorId,t4.cause select t2.unitId,t6.unitName,t4.monitorId,t4.cause
from sys_user_role t1 from sys_user_role t1
left join sys_finalRole_menu t2 on t1.role_id = t2.roleId left join sys_finalRole_menu t2 on t1.role_id = t2.roleId
@ -83,7 +81,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by t2.unitId,t6.unitName,t4.monitorId,t4.cause group by t2.unitId,t6.unitName,t4.monitorId,t4.cause
) a ) a
group by a.unitName,a.unitId 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>
<select id="selectAlarmPromptDataList" parameterType="AlarmPromptDTO" resultMap="AlarmPromptDTOResult"> <select id="selectAlarmPromptDataList" parameterType="AlarmPromptDTO" resultMap="AlarmPromptDTOResult">
@ -101,7 +102,7 @@ group by a.unitName,a.unitId
t4.cause t4.cause
from T_Alarm_Data t4 from T_Alarm_Data t4
left join T_Monitor t5 on t4.monitorId = t5.monitorId 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> </select>

Loading…
Cancel
Save