| | |
| | | private IotDBSessionConfig iotdbConfig; |
| | | @Autowired |
| | | private IotDBCommonService iotDBCommonService; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | private static String TEMPLATE_NAME = "process_param"; |
| | | |
| | |
| | | PROCESS_PARAM_MAP.put(7, "ALARM"); |
| | | } |
| | | |
| | | // TelemetryDataMessage telemetryDataMessage |
| | | |
| | | public void handleCollectData(List<TelemetryData> telemetryDataList) { |
| | | |
| | | for (TelemetryData dt : telemetryDataList) { |
| | |
| | | |
| | | deviceId = generateDeviceId(dt.getWorkstationId(),name); |
| | | //System.out.println("deivcdid="+deviceId); |
| | | iotDBCommonService.setTemmplateIsNotSet(TEMPLATE_NAME, deviceId); |
| | | iotDBCommonService.setTemmplateIfNotSet(TEMPLATE_NAME, deviceId); |
| | | Tablet tablet = new Tablet(deviceId, schemas); |
| | | for(TypedTelemetryData tdata : typeList) { |
| | | rowIndex = tablet.rowSize++; |
| | |
| | | log.error("IOTDB入库失败",e); |
| | | e.printStackTrace(); |
| | | } |
| | | //System.out.println(typeList); |
| | | } |
| | | |
| | | |