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
5edaf980
Commit
5edaf980
authored
Mar 31, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(jg): 优化超设计使用年限消息发送功能
- 添加日志记录,增加对发送消息内容的记录 - 修复日志打印错误信息时的格式问题
parent
e88a06fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
JgOverDesignServiceLifeServiceImpl.java
.../biz/service/impl/JgOverDesignServiceLifeServiceImpl.java
+3
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgOverDesignServiceLifeServiceImpl.java
View file @
5edaf980
...
@@ -730,12 +730,14 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
...
@@ -730,12 +730,14 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
* @param equipmentLists 设备信息
* @param equipmentLists 设备信息
*/
*/
private
void
sendOverDesignMessage
(
List
<
Map
<
String
,
Object
>>
equipmentLists
)
{
private
void
sendOverDesignMessage
(
List
<
Map
<
String
,
Object
>>
equipmentLists
)
{
log
.
info
(
"发送超设计使用年限原始消息equipmentLists---->{}"
,
equipmentLists
);
JSONArray
jsonArray
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
equipmentLists
));
JSONArray
jsonArray
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
equipmentLists
));
log
.
info
(
"发送超设计使用年限原始消息jsonArray---->{}"
,
jsonArray
);
if
(
CollectionUtil
.
isNotEmpty
(
jsonArray
))
{
if
(
CollectionUtil
.
isNotEmpty
(
jsonArray
))
{
try
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
SafetyProblemTypeEnum
.
SJNXDJ
.
getTopic
(),
jsonArray
.
toString
().
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
SafetyProblemTypeEnum
.
SJNXDJ
.
getTopic
(),
jsonArray
.
toString
().
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
}
catch
(
MqttException
e
)
{
log
.
error
(
"发送超设计使用年限消息失败---->{}"
+
e
.
getMessage
());
log
.
error
(
"发送超设计使用年限消息失败---->{}"
,
e
.
getMessage
());
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
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