潘志宝
4 天以前 c7ec0ceff9cf30cabbd8d071c1ef75d20d04548f
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/ConstantHandle.java
@@ -1,5 +1,6 @@
package com.iailab.module.data.point.collection.handler;
import com.iailab.module.data.enums.DataPointFreqEnum;
import com.iailab.module.data.point.collection.utils.GenInfluxPointValueUtils;
import com.iailab.module.data.point.dto.DaPointDTO;
import com.iailab.module.data.point.service.DaPointService;
@@ -25,7 +26,7 @@
    @Resource
    private DaPointService daPointService;
    public List<InfluxPointValuePOJO> handle(Date collectTime, List<DaPointDTO> dtos, Map<String, Object> dataMap) {
    public List<InfluxPointValuePOJO> handle(Date collectTime, List<DaPointDTO> dtos, Map<String, Object> dataMap,List<String> listGood,List<String> listBad) {
        log.info("常量点处理开始");
        List<InfluxPointValuePOJO> result = new ArrayList<>();
        if (CollectionUtils.isEmpty(dtos)) {
@@ -33,9 +34,10 @@
        }
        dtos.forEach(dto -> {
            InfluxPointValuePOJO pojo = GenInfluxPointValueUtils.getByPoint(dto);
            pojo.setTimestamp(collectTime.toInstant());
            pojo.setTimestamp(GenInfluxPointValueUtils.getByMin(collectTime, DataPointFreqEnum.getEumByCode(dto.getMinfreqid())));
            dataMap.put(dto.getPointNo(), dto.getDefaultValue());
            result.add(pojo);
            listGood.add(dto.getPointNo());
        });
        log.info("常量点处理结束");
        return result;