Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
aad83460
Commit
aad83460
authored
Oct 24, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改离散率告警
parent
07e79ebb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
7 deletions
+63
-7
EquipDic.java
...m/yeejoin/amos/boot/module/jxiop/biz/entity/EquipDic.java
+6
-4
EquipWarnSchedule.java
...os/boot/module/jxiop/biz/scheduled/EquipWarnSchedule.java
+56
-2
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+0
-0
application.properties
...iop-monitor-biz/src/main/resources/application.properties
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/EquipDic.java
View file @
aad83460
...
...
@@ -18,10 +18,12 @@ public class EquipDic {
@TableId
(
value
=
"sequence_nbr"
,
type
=
IdType
.
ID_WORKER
)
private
Long
sequenceNumber
;
@TableField
(
"value"
)
Double
v
alue
;
@TableField
(
"
dic_
value"
)
Double
dicV
alue
;
@TableField
(
"desc"
)
String
desc
;
@TableField
(
"desc
ription
"
)
String
desc
ription
;
@TableField
(
"dic_key"
)
String
dicKey
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/scheduled/EquipWarnSchedule.java
View file @
aad83460
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
scheduled
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.PostConstruct
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.EquipDicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipDic
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipDivergenceAlarmEvent
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitorFanIndicatorImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.EquipDivergenceAlarmEventMapper
;
@Service
@EnableScheduling
public
class
EquipWarnSchedule
{
@Autowired
private
MonitorFanIndicatorImpl
monitorFanIndicatorImpl
;
@Autowired
private
StationBasicMapper
stationBasicMapper
;
@Autowired
private
EquipDivergenceAlarmEventMapper
equipDivergenceAlarmEventMapper
;
@Autowired
private
EquipDicMapper
equipDicMapper
;
@Scheduled
(
cron
=
"${equip.warn.cron}"
)
//@PostConstruct
private
void
doEquipDivergencWarn
()
{
List
<
EquipDivergenceAlarmEvent
>
eventList
=
new
ArrayList
<
EquipDivergenceAlarmEvent
>();
EquipDic
equipDic
=
equipDicMapper
.
selectOne
(
new
LambdaQueryWrapper
<
EquipDic
>().
eq
(
EquipDic:
:
getDicKey
,
"LSVGJYZ"
));
LambdaQueryWrapper
<
StationBasic
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
like
(
StationBasic:
:
getStationType
,
"GFDZ"
);
List
<
StationBasic
>
stationList
=
stationBasicMapper
.
selectList
(
wrapper
);
for
(
StationBasic
stationBasic
:
stationList
)
{
ArrayList
<
Map
<
String
,
Object
>>
resultList
=
monitorFanIndicatorImpl
.
getLSV
(
stationBasic
.
getFanGatewayId
());
if
(!
resultList
.
isEmpty
())
{
for
(
Map
<
String
,
Object
>
map
:
resultList
)
{
Double
lsv
=
Double
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"lsv"
)));
if
(
lsv
>
equipDic
.
getDicValue
())
{
String
zz
=
(
String
)
map
.
get
(
"zz"
);
String
nbq
=
(
String
)
map
.
get
(
"nbq"
);
String
hlx
=
(
String
)
map
.
get
(
"hlx"
);
EquipDivergenceAlarmEvent
equipDivergenceAlarmEvent
=
new
EquipDivergenceAlarmEvent
();
equipDivergenceAlarmEvent
.
setEquipName
(
zz
+
"/"
+
nbq
+
"/"
+
hlx
);
equipDivergenceAlarmEvent
.
setGatewayId
(
stationBasic
.
getFanGatewayId
());
equipDivergenceAlarmEvent
.
setValue
(
lsv
.
toString
());
equipDivergenceAlarmEvent
.
setAlarmGroupName
(
"离散率告警"
);
equipDivergenceAlarmEvent
.
setEventDesc
(
"离散率超过告警阈值"
);
eventList
.
add
(
equipDivergenceAlarmEvent
);
}
}
}
}
equipDivergenceAlarmEventMapper
.
save
(
eventList
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
aad83460
This source diff could not be displayed because it is too large. You can
view the blob
instead.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/application.properties
View file @
aad83460
...
...
@@ -76,7 +76,7 @@ gl.sum.column=日发电量,月发电量,年发电量
gl.avg.column
=
有功功率,日利用小时,瞬时风速
equip.warn.cron
=
0 0/10 * * * ?
#ES 曲线图定时 0 57 23 * * ?
windSpeed.cron
=
0 25 9 * * ?
#本地使用 0 0 5 29 2 ? ? 线上使用 0 */5 * * * ?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment