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
d537853f
Commit
d537853f
authored
Sep 17, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
81f2192f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
WaterResourceDto.java
...oin/amos/boot/module/common/api/dto/WaterResourceDto.java
+4
-2
StartLoader.java
.../yeejoin/amos/boot/module/jcs/biz/config/StartLoader.java
+3
-3
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/WaterResourceDto.java
View file @
d537853f
...
...
@@ -33,11 +33,13 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"地址"
)
private
String
address
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"经度"
)
@ExcelProperty
(
value
=
"经度"
,
index
=
48
)
private
Double
longitude
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"纬度"
)
@ExcelProperty
(
value
=
"纬度"
,
index
=
49
)
private
Double
latitude
;
@ExcelIgnore
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/config/StartLoader.java
View file @
d537853f
...
...
@@ -46,11 +46,11 @@ public class StartLoader implements ApplicationRunner {
emqKeeper
.
getMqttClient
().
subscribe
(
topic
,
(
s
,
mqttMessage
)
->
{
byte
[]
payload
=
mqttMessage
.
getPayload
();
try
{
String
obj
=
new
String
(
payload
);
String
obj
=
new
String
(
payload
,
"GB2312"
);
if
(!
ValidationUtil
.
isEmpty
(
obj
))
{
JSONObject
json
=
JSON
.
parseObject
(
obj
);
AlertNewsDto
alertNewsDto
=
new
AlertNewsDto
(
"物联警情"
,
json
.
get
(
"unitInvolvedName"
)+
","
+
json
.
get
(
"address"
)+
",发生警情,请处理。"
,
json
.
get
(
"id"
).
toString
(),
obj
);
emqKeeper
.
getMqttClient
().
publish
(
topicweb
,
JSONObject
.
toJSON
(
alertNewsDto
).
toString
().
getBytes
(
),
RuleConfig
.
DEFAULT_QOS
,
tru
e
);
AlertNewsDto
alertNewsDto
=
new
AlertNewsDto
(
"物联警情"
,
json
.
get
(
"unitInvolvedName"
)+
","
+
json
.
get
(
"address"
)+
",发生警情,请处理。"
,
json
.
get
(
"id"
).
toString
(),
json
);
emqKeeper
.
getMqttClient
().
publish
(
topicweb
,
JSONObject
.
toJSON
(
alertNewsDto
).
toString
().
getBytes
(
"UTF-8"
),
1
,
fals
e
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"系统异常"
,
e
);
...
...
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