潘志宝
6 天以前 90e3420dc0dd15281dc680b11c11b35afc945cb2
daPointCollectStatusService
已修改3个文件
16 ■■■■■ 文件已修改
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/DaPointCollectStatusService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointCollectStatusServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/DaPointCollectStatusService.java
@@ -15,6 +15,8 @@
 */
public interface DaPointCollectStatusService extends BaseService<DaPointCollectStatusEntity> {
    void add(String pointNo);
    @Async
    void recordStatus(String pointNo, String collectValue, Date collectTime);
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointCollectStatusServiceImpl.java
@@ -26,6 +26,15 @@
public class DaPointCollectStatusServiceImpl extends BaseServiceImpl<DaPointCollectStatusDao, DaPointCollectStatusEntity>
        implements DaPointCollectStatusService {
    @Override
    public void add(String pointNo) {
        DaPointCollectStatusEntity entity = new DaPointCollectStatusEntity();
        entity.setId(UUID.randomUUID().toString());
        entity.setPointNo(pointNo);
        baseDao.insert(entity);
    }
    @Override
    public void recordStatus(String pointNo, String collectValue, Date collectTime) {
        QueryWrapper<DaPointCollectStatusEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("point_no", pointNo);
@@ -47,6 +56,7 @@
    }
    @Override
    public void recordStatusList(List<InfluxPointValuePOJO> pointValues, Date collectTime) {
        List<String> listGood = new ArrayList<>();
        List<String> listBad = new ArrayList<>();
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java
@@ -64,6 +64,9 @@
    @Resource
    private ChannelSourceService channelSourceService;
    @Resource
    private DaPointCollectStatusService daPointCollectStatusService;
    private static Map<String, DaPointDTO> pointIdMap = new ConcurrentHashMap<>();
    private static Map<String, DaPointDTO> pointNoMap = new ConcurrentHashMap<>();
@@ -182,6 +185,7 @@
        daPointEntity.setCreateTime(new Date());
        daPointDao.insert(daPointEntity);
        daPointCollectStatusService.add(daPointEntity.getPointNo());
        // 清空缓存
        clearCache();
    }