Commit 55428ecc authored by chenzhao's avatar chenzhao

修改人员资质问题生成

parent aac5a1e4
package com.yeejoin.amos.boot.module.jg.biz.service.impl; 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.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...@@ -187,6 +188,7 @@ public class SafetyProblemTracingGenServiceImpl{ ...@@ -187,6 +188,7 @@ public class SafetyProblemTracingGenServiceImpl{
*/ */
private void sendSafetyProblemMessage(List<Map<String, Object>> mapList, SafetyProblemTypeEnum safetyProblemTypeEnum) { private void sendSafetyProblemMessage(List<Map<String, Object>> mapList, SafetyProblemTypeEnum safetyProblemTypeEnum) {
JSONArray jsonArray = JSON.parseArray(JSON.toJSONString(mapList)); JSONArray jsonArray = JSON.parseArray(JSON.toJSONString(mapList));
if (CollectionUtil.isNotEmpty(jsonArray)){
try { try {
emqKeeper.getMqttClient().publish(safetyProblemTypeEnum.getTopic(), jsonArray.toString().getBytes(StandardCharsets.UTF_8), 2, false); emqKeeper.getMqttClient().publish(safetyProblemTypeEnum.getTopic(), jsonArray.toString().getBytes(StandardCharsets.UTF_8), 2, false);
} catch (MqttException e) { } catch (MqttException e) {
...@@ -194,4 +196,5 @@ public class SafetyProblemTracingGenServiceImpl{ ...@@ -194,4 +196,5 @@ public class SafetyProblemTracingGenServiceImpl{
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment