| | |
| | | influxDBService.asyncWritePointValues(pointValues); |
| | | |
| | | log.info("更新采集状态"); |
| | | updateCollectStatus(pointValues, collectTime); |
| | | daPointCollectStatusService.recordStatusList(pointValues, collectTime); |
| | | log.info("采集完成"); |
| | | } catch (Exception ex) { |
| | | log.info("采集异常!"); |
| | | ex.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | private void updateCollectStatus(List<InfluxPointValuePOJO> pointValues, Date collectTime) { |
| | | try { |
| | | for (InfluxPointValuePOJO pointValue : pointValues) { |
| | | if (pointValue instanceof InfluxPointValueSimPOJO) { |
| | | InfluxPointValueSimPOJO pvo = (InfluxPointValueSimPOJO) pointValue; |
| | | daPointCollectStatusService.recordStatus(pvo.getPoint(), pvo.getValue().toString(), collectTime); |
| | | } else if (pointValue instanceof InfluxPointValueDigPOJO) { |
| | | InfluxPointValueDigPOJO pvo = (InfluxPointValueDigPOJO) pointValue; |
| | | daPointCollectStatusService.recordStatus(pvo.getPoint(), pvo.getValue().toString(), collectTime); |
| | | } |
| | | } |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | } |