Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
a38b1886
由
张雷
编写于
2025-02-13 14:20:01 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
实时数据报警功能
1 个父辈
f4d39161
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
22 行增加
和
23 行删除
sk-module-alarm/src/main/java/com/skua/modules/controller/AlarmJobTestController.java
sk-module-alarm/src/main/java/com/skua/modules/quartz/RealTimeAlarmJob.java
sk-module-biz/src/main/java/com/skua/modules/emergency/mapper/EmergencyRiskEventMapper.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/PowerAnalysisNewMapper.xml
sk-module-alarm/src/main/java/com/skua/modules/controller/AlarmJobTestController.java
查看文件 @
a38b188
...
...
@@ -46,20 +46,16 @@ public class AlarmJobTestController {
private
EquipmentMaintainReminderJob
equipmentMaintainReminderJob
;
@Autowired
private
SuddenIncreaseAlarmJob
suddenIncreaseAlarmJob
;
@Autowired
private
XtDataSameJob
dataSameJob
;
@ApiOperation
(
value
=
"测试实时数据报警定时服务"
,
notes
=
"测试实时数据报警定时服务"
)
@GetMapping
(
value
=
"/testRealTimeAlarmJob"
)
public
Result
<
String
>
testRealTimeAlarmJob
()
{
Result
<
String
>
result
=
new
Result
<>();
try
{
realTimeAlarmJob
.
execute
(
null
);
}
catch
(
JobExecutionException
e
)
{
e
.
printStackTrace
();
}
realTimeAlarmJob
.
execute
(
null
);
result
.
setResult
(
"成功"
);
result
.
setSuccess
(
true
);
return
result
;
...
...
@@ -77,7 +73,7 @@ public class AlarmJobTestController {
result
.
setSuccess
(
true
);
return
result
;
}
@ApiOperation
(
value
=
"测试设备频繁维修定时服务"
,
notes
=
"测试设备频繁维修报警定时服务"
)
@GetMapping
(
value
=
"/testEquipmentRepairAlarmJob"
)
public
Result
<
String
>
testEquipmentRepairAlarmJob
()
{
...
...
@@ -91,7 +87,7 @@ public class AlarmJobTestController {
result
.
setSuccess
(
true
);
return
result
;
}
@ApiOperation
(
value
=
"测试设备到期提醒定时服务"
,
notes
=
"测试设备到期提醒定时服务"
)
@GetMapping
(
value
=
"/testEquipmentMaintainReminderJob"
)
public
Result
<
String
>
testEquipmentMaintainReminderJob
()
{
...
...
@@ -105,7 +101,7 @@ public class AlarmJobTestController {
result
.
setSuccess
(
true
);
return
result
;
}
@ApiOperation
(
value
=
"测试指标突增报警定时服务"
,
notes
=
"测试指标突增报警定时服务"
)
@GetMapping
(
value
=
"/testSuddenIncreaseAlarmJob"
)
public
Result
<
String
>
testSuddenIncreaseAlarmJob
()
{
...
...
@@ -119,7 +115,7 @@ public class AlarmJobTestController {
result
.
setSuccess
(
true
);
return
result
;
}
@ApiOperation
(
value
=
"测试设备故障报警定时服务"
,
notes
=
"测试设备故障报警定时服务"
)
@GetMapping
(
value
=
"/testEquipAlarmJob"
)
public
Result
<
String
>
testEquipAlarmJob
()
{
...
...
@@ -134,7 +130,7 @@ public class AlarmJobTestController {
result
.
setSuccess
(
true
);
return
result
;
}
@ApiOperation
(
value
=
"数据长期不变报警定时服务"
,
notes
=
"数据长期不变报警定时服务"
)
@GetMapping
(
value
=
"/testDataSameJob"
)
public
Result
<
String
>
testDataSameJob
()
{
...
...
@@ -150,7 +146,7 @@ public class AlarmJobTestController {
return
result
;
}
@ApiOperation
(
value
=
"测试设备在、离线报警定时服务"
,
notes
=
"测试设备在、离线报警定时服务"
)
@GetMapping
(
value
=
"/testDeviceStatusJob"
)
public
Result
<
String
>
testDeviceStatusJob
()
{
...
...
@@ -167,4 +163,4 @@ public class AlarmJobTestController {
}
}
\ No newline at end of file
}
...
...
sk-module-alarm/src/main/java/com/skua/modules/quartz/RealTimeAlarmJob.java
查看文件 @
a38b188
...
...
@@ -111,8 +111,9 @@ public class RealTimeAlarmJob implements Job {
private
static
String
departNameTemplete
=
"${departName}"
;
private
static
String
contentTemplete
=
"${alarmParamName}:${actualAvgValue}(${limit})${alarmParamUnit}"
;
private
static
String
suffix
=
",请注意!"
;
@Override
public
void
execute
(
JobExecutionContext
context
)
throws
JobExecutionException
{
public
void
execute
(
JobExecutionContext
context
)
{
try
{
log
.
info
(
"水质实时数据报警任务开始"
);
//获取水质、水量、工艺报警规则信息
...
...
@@ -321,7 +322,8 @@ public class RealTimeAlarmJob implements Job {
private
void
dealSZLtatus
(
List
<
AlarmRuleConfigAndLevelVO
>
errorList
)
{
//查询报警记录置为正常状态
QueryWrapper
<
AlarmRecordHistory
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
in
(
"alarm_rule_type"
,
Lists
.
newArrayList
(
"6"
));
// queryWrapper.in("alarm_rule_type", Lists.newArrayList("6"));
queryWrapper
.
in
(
"alarm_rule_type"
,
Lists
.
newArrayList
(
"A001A001"
));
queryWrapper
.
eq
(
"alarm_param_type"
,
"数据超过有效上下限报警配置"
);
queryWrapper
.
in
(
"handle_status"
,
0
);
List
<
AlarmRecordHistory
>
list
=
alarmRecordHistoryService
.
list
(
queryWrapper
);
...
...
@@ -353,7 +355,8 @@ public class RealTimeAlarmJob implements Job {
private
void
dealStatus
(
List
<
AlarmRuleConfigAndLevelVO
>
excessList
)
{
//查询报警记录置为正常状态
QueryWrapper
<
AlarmRecordHistory
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
in
(
"alarm_rule_type"
,
Lists
.
newArrayList
(
"1"
,
"2"
,
"3"
,
"5"
,
"8"
));
// queryWrapper.in("alarm_rule_type", Lists.newArrayList("1", "2", "3", "5", "8"));
queryWrapper
.
in
(
"alarm_rule_type"
,
Lists
.
newArrayList
(
"A001A001"
,
"A001A002"
,
"A001A003"
,
"5"
,
"8"
));
queryWrapper
.
in
(
"handle_status"
,
0
);
List
<
AlarmRecordHistory
>
list
=
alarmRecordHistoryService
.
list
(
queryWrapper
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
...
...
sk-module-biz/src/main/java/com/skua/modules/emergency/mapper/EmergencyRiskEventMapper.java
查看文件 @
a38b188
...
...
@@ -5,6 +5,7 @@ import java.util.List;
import
com.skua.modules.emergency.vo.DangerDatabaseResult
;
import
com.skua.modules.emergency.vo.MapDatabaseResult
;
import
com.skua.modules.emergency.vo.RiskDatabaseResult
;
import
com.skua.tool.annotation.Anonymous
;
import
org.apache.ibatis.annotations.Param
;
import
com.skua.modules.emergency.entity.EmergencyRiskEvent
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -14,9 +15,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
EmergencyRiskEventMapper
extends
BaseMapper
<
EmergencyRiskEvent
>
{
@Anonymous
List
<
RiskDatabaseResult
>
getRiskList
(
@Param
(
"year"
)
String
year
);
@Anonymous
List
<
DangerDatabaseResult
>
getDangerList
(
@Param
(
"year"
)
String
year
);
@Anonymous
List
<
MapDatabaseResult
>
getMapData
(
@Param
(
"year"
)
String
year
);
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/PowerAnalysisNewMapper.xml
查看文件 @
a38b188
...
...
@@ -685,13 +685,9 @@
and depart_id=#{factoryId}
</if>
GROUP BY
depart_id,
LEFT ( ts, 7 ),
index_tag
depart_id,LEFT ( ts, 7 ),index_tag
ORDER BY
depart_id,
LEFT ( ts, 7 ),
index_tag
depart_id,LEFT ( ts, 7 ),index_tag
</select>
<select
id=
"queryHDLAndSL"
resultType=
"java.util.Map"
>
SELECT
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论