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
2d1523fb
Commit
2d1523fb
authored
Jun 29, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加网管地址
parent
06bc2867
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
PointSystem.java
...n/java/com/yeejoin/amos/api/alarm/entity/PointSystem.java
+3
-0
IPointSystemService.java
...m/yeejoin/amos/api/alarm/service/IPointSystemService.java
+1
-1
PointSystemServiceImpl.java
...n/amos/api/alarm/service/impl/PointSystemServiceImpl.java
+4
-2
No files found.
amos-boot-data/amos-boot-data-alarm/src/main/java/com/yeejoin/amos/api/alarm/entity/PointSystem.java
View file @
2d1523fb
...
...
@@ -44,5 +44,8 @@ public class PointSystem extends BaseEntity {
@ApiModelProperty
(
value
=
"kks码"
)
@TableField
(
"kks"
)
private
String
kks
;
@ApiModelProperty
(
value
=
"網管地址"
)
@TableField
(
"gateway_id"
)
private
String
gatewayId
;
}
amos-boot-data/amos-boot-data-alarm/src/main/java/com/yeejoin/amos/api/alarm/service/IPointSystemService.java
View file @
2d1523fb
...
...
@@ -9,6 +9,6 @@ package com.yeejoin.amos.api.alarm.service;
public
interface
IPointSystemService
{
//触发风险预警
public
void
sendWarning
(
String
address
,
String
value
,
String
valueLabe
);
public
void
sendWarning
(
String
address
,
String
value
,
String
valueLabe
,
String
gatewayId
);
}
amos-boot-data/amos-boot-data-alarm/src/main/java/com/yeejoin/amos/api/alarm/service/impl/PointSystemServiceImpl.java
View file @
2d1523fb
...
...
@@ -57,7 +57,8 @@ public class PointSystemServiceImpl extends ServiceImpl<PointSystemMapper, Point
String
address
=
messageObj
.
get
(
"address"
).
toString
();
String
value
=
messageObj
.
get
(
"value"
).
toString
();
String
valueLabe
=
messageObj
.
get
(
"valueLabel"
).
toString
();
this
.
sendWarning
(
address
,
value
,
valueLabe
);
String
gatewayId
=
messageObj
.
get
(
"gatewayId"
).
toString
();
this
.
sendWarning
(
address
,
value
,
valueLabe
,
gatewayId
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -66,12 +67,13 @@ public class PointSystemServiceImpl extends ServiceImpl<PointSystemMapper, Point
@Override
public
void
sendWarning
(
String
address
,
String
value
,
String
valueLabe
)
{
public
void
sendWarning
(
String
address
,
String
value
,
String
valueLabe
,
String
gatewayId
)
{
try
{
//通过测点地址获取,和对应值 获取kks
QueryWrapper
<
PointSystem
>
pointSystemWrapper
=
new
QueryWrapper
<>();
pointSystemWrapper
.
lambda
().
eq
(
PointSystem:
:
getAddress
,
address
);
pointSystemWrapper
.
lambda
().
eq
(
PointSystem:
:
getValue
,
value
);
pointSystemWrapper
.
lambda
().
eq
(
PointSystem:
:
getGatewayId
,
gatewayId
);
PointSystem
pointSystem
=
pointSystemMapper
.
selectOne
(
pointSystemWrapper
);
if
(
pointSystem
==
null
)
{
throw
new
RuntimeException
(
"获取kks码失败!"
);
...
...
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