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
55428ecc
Commit
55428ecc
authored
Feb 24, 2025
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改人员资质问题生成
parent
aac5a1e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
SafetyProblemTracingGenServiceImpl.java
.../biz/service/impl/SafetyProblemTracingGenServiceImpl.java
+9
-5
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/SafetyProblemTracingGenServiceImpl.java
View file @
55428ecc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -187,11 +188,13 @@ public class SafetyProblemTracingGenServiceImpl{
*/
private
void
sendSafetyProblemMessage
(
List
<
Map
<
String
,
Object
>>
mapList
,
SafetyProblemTypeEnum
safetyProblemTypeEnum
)
{
JSONArray
jsonArray
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
mapList
));
try
{
emqKeeper
.
getMqttClient
().
publish
(
safetyProblemTypeEnum
.
getTopic
(),
jsonArray
.
toString
().
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
logger
.
error
(
"发送安全追溯问题设备信息消息失败---->{}"
,
e
.
getMessage
());
throw
new
RuntimeException
(
e
);
if
(
CollectionUtil
.
isNotEmpty
(
jsonArray
)){
try
{
emqKeeper
.
getMqttClient
().
publish
(
safetyProblemTypeEnum
.
getTopic
(),
jsonArray
.
toString
().
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
logger
.
error
(
"发送安全追溯问题设备信息消息失败---->{}"
,
e
.
getMessage
());
throw
new
RuntimeException
(
e
);
}
}
}
}
\ No newline at end of file
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