提交增加运维管理
This commit is contained in:
@@ -30,6 +30,7 @@ import com.xinda.mq.service.IRuleEngine;
|
||||
import com.xinda.mqtt.manager.MqttRemoteManager;
|
||||
import com.xinda.mqtt.model.PushMessageBo;
|
||||
import com.xinda.mqttclient.PubMqttClient;
|
||||
import com.xinda.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -82,6 +83,8 @@ public class DataHandlerImpl implements IDataHandler {
|
||||
@Resource
|
||||
private IFunctionLogService functionLogService;
|
||||
|
||||
@Resource
|
||||
private ISysUserService sysUserService;
|
||||
/**
|
||||
* 上报属性或功能处理
|
||||
*
|
||||
@@ -103,7 +106,17 @@ public class DataHandlerImpl implements IDataHandler {
|
||||
List<ThingsModelSimpleItem> result = deviceService.reportDeviceThingsModelValue(input, bo.getType(), bo.isShadow());
|
||||
// 只有设备上报进入规则引擎流程
|
||||
if (bo.isRuleEngine() && !bo.getSerialNumber().startsWith("server-")){
|
||||
ruleEngine.ruleMatch(bo);
|
||||
ruleEngine.ruleMatch(bo);
|
||||
// 发送至前端告警日志
|
||||
// for (AlertLog alertLog:alertLogList) {
|
||||
// PushMessageBo amessageBo = new PushMessageBo();
|
||||
// Long deptId = sysUserService.getDeptUserByUserId(alertLog.getUserId()).getDeptId();
|
||||
// amessageBo.setTopic(topicsUtils.buildTopic(deptId, "all", TopicType.WS_SERVICE_ALERT));
|
||||
// JSONObject pushObj = new JSONObject();
|
||||
// pushObj.put("message", alertLog);
|
||||
// amessageBo.setMessage(JSON.toJSONString(pushObj));
|
||||
// remoteManager.pushCommon(amessageBo);
|
||||
// }
|
||||
}
|
||||
//发送至前端
|
||||
PushMessageBo messageBo = new PushMessageBo();
|
||||
@@ -113,6 +126,7 @@ public class DataHandlerImpl implements IDataHandler {
|
||||
pushObj.put("sources",bo.getSources());
|
||||
messageBo.setMessage(JSON.toJSONString(pushObj));
|
||||
remoteManager.pushCommon(messageBo);
|
||||
|
||||
// 上报属性给小度音箱,接入小度音箱后可放开
|
||||
// try {
|
||||
// List<String> identifierList = thingsModelSimpleItems.stream().map(ThingsModelSimpleItem::getId).collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user