| | |
| | | import org.jeecg.modules.dry.service.*; |
| | | import org.jeecg.modules.dry.vo.DryEquipmentVo; |
| | | import org.jeecg.modules.dry.vo.DryFaultRecordVo; |
| | | import org.jeecg.modules.dry.vo.RealTimeDataParentVo; |
| | | import org.jeecg.modules.dry.vo.RealTimeDataVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | }); |
| | | |
| | | break; |
| | | // 接收设备实时数据-机台 |
| | | case MqttConstant.TENANT_UP_PREFIX_REALTIME_DATA_EQP: |
| | | ThreadUtil.execute(() -> { |
| | | try { |
| | | RealTimeDataParentVo vo = JSON.parseObject(message, RealTimeDataParentVo.class); |
| | | realTimeDataService.realTimeDataHandle(vo); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }); |
| | | break; |
| | | //各租户上传的实时报警数据 |
| | | case MqttConstant.TENANT_UP_PREFIX_REAL_FAULT_DATA: { |
| | | |
| | |
| | | //发送广播 |
| | | System.err.println("广播给:" + recTopic); |
| | | sendMqttMessage(MqttConstant.SERVICE_BROADCAST_TENANT_REAL_FAULT, mqMessage, 1); |
| | | |
| | | |
| | | } |
| | | break; |
| | | //移动端主动请求设备实时故障数据(用于页面刚打开时拉取一次数据) |
| | |
| | | entry -> entry.getKey().toString(), |
| | | entry -> (DryFaultRecordVo) entry.getValue() |
| | | )); |
| | | |
| | | |
| | | if (dryFaultMap.isEmpty()) { |
| | | return; |
| | | } |