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(); }