潘志宝
2024-11-29 56dba6294342aa571197298669d04618b4f7258f
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/PointCollector.java
@@ -4,6 +4,7 @@
import com.iailab.module.data.common.utils.R;
import com.iailab.module.data.channel.kio.collector.KingIOCollector;
import com.iailab.module.data.point.collection.handler.CalculateHandle;
import com.iailab.module.data.point.collection.handler.CumulateHandle;
import com.iailab.module.data.point.common.PointTypeEnum;
import com.iailab.module.data.point.dto.DaPointDTO;
import com.iailab.module.data.point.service.DaPointService;
@@ -55,6 +56,9 @@
    @Resource
    private OpcUaCollector opcUaCollector;
    @Resource
    private CumulateHandle cumulateHandle;
    /**
     * 采集
     *
@@ -78,6 +82,10 @@
            List<DaPointDTO> pointCalculateList = daPointService.getMathPoint(minfreq);
            pointValues.addAll(calculateHandle.handle(collectTime, pointCalculateList, dataMap));
            log.info("读取累计点");
            List<DaPointDTO> pointCumulateList = daPointService.getCumulatePoint(minfreq);
            pointValues.addAll(cumulateHandle.handle(collectTime, pointCumulateList));
            log.info("存入数据库");
            influxDBService.asyncWritePointValues(pointValues);