| | |
| | | @Slf4j |
| | | @Component |
| | | public class HttpCollectorForAsdb { |
| | | private static Map<String, HttpApiEntity> apiMap = new HashMap<>(); |
| | | |
| | | @Autowired |
| | | private HttpApiService httpApiService; |
| | |
| | | public static final long offset = 10; |
| | | |
| | | private HttpApiEntity getHttpApi(String id) { |
| | | if (apiMap.containsKey(id)) { |
| | | return apiMap.get(id); |
| | | } |
| | | HttpApiEntity httpApi = httpApiService.info(id); |
| | | apiMap.put(id, httpApi); |
| | | return httpApi; |
| | | return httpApiService.getFromCatch(id); |
| | | } |
| | | |
| | | public BigDecimal getTagValue(String sourceId, String tagNo) { |
| | |
| | | @Slf4j |
| | | @Component |
| | | public class HttpCollectorForAsdc { |
| | | private static Map<String, HttpApiEntity> apiMap = new HashMap<>(); |
| | | |
| | | @Autowired |
| | | private HttpApiService httpApiService; |
| | |
| | | public static final long offset = 10; |
| | | |
| | | private HttpApiEntity getHttpApi(String id) { |
| | | if (apiMap.containsKey(id)) { |
| | | return apiMap.get(id); |
| | | } |
| | | HttpApiEntity httpApi = httpApiService.info(id); |
| | | apiMap.put(id, httpApi); |
| | | return httpApi; |
| | | return httpApiService.getFromCatch(id); |
| | | } |
| | | |
| | | public BigDecimal getTagValue(String sourceId, String tagNo) { |
| | |
| | | @Slf4j |
| | | @Component |
| | | public class HttpCollectorForAsde { |
| | | private static Map<String, HttpApiEntity> apiMap = new HashMap<>(); |
| | | |
| | | @Autowired |
| | | private HttpApiService httpApiService; |
| | |
| | | public static final long offset = 10; |
| | | |
| | | private HttpApiEntity getHttpApi(String id) { |
| | | if (apiMap.containsKey(id)) { |
| | | return apiMap.get(id); |
| | | } |
| | | HttpApiEntity httpApi = httpApiService.info(id); |
| | | apiMap.put(id, httpApi); |
| | | return httpApi; |
| | | return httpApiService.getFromCatch(id); |
| | | } |
| | | |
| | | public BigDecimal getTagValue(String sourceId, String tagNo) { |
| | |
| | | @Slf4j |
| | | @Component |
| | | public class HttpCollectorForAsdy { |
| | | private static Map<String, HttpApiEntity> apiMap = new HashMap<>(); |
| | | |
| | | @Autowired |
| | | private HttpApiService httpApiService; |
| | |
| | | public static final long offset = 10; |
| | | |
| | | private HttpApiEntity getHttpApi(String id) { |
| | | if (apiMap.containsKey(id)) { |
| | | return apiMap.get(id); |
| | | } |
| | | HttpApiEntity httpApi = httpApiService.info(id); |
| | | apiMap.put(id, httpApi); |
| | | return httpApi; |
| | | return httpApiService.getFromCatch(id); |
| | | } |
| | | |
| | | public BigDecimal getTagValue(String sourceId, String tagNo) { |
| | |
| | | @Slf4j |
| | | @Component |
| | | public class HttpCollectorForIhd { |
| | | private static Map<String, HttpApiEntity> apiMap = new HashMap<>(); |
| | | |
| | | @Autowired |
| | | private HttpApiService httpApiService; |
| | |
| | | private static final String Q = "q"; |
| | | |
| | | private HttpApiEntity getHttpApi(String id) { |
| | | if (apiMap.containsKey(id)) { |
| | | return apiMap.get(id); |
| | | } |
| | | HttpApiEntity httpApi = httpApiService.info(id); |
| | | apiMap.put(id, httpApi); |
| | | return httpApi; |
| | | return httpApiService.getFromCatch(id); |
| | | } |
| | | |
| | | public BigDecimal getTagValue(String sourceId, String tagNo, Integer dimension, String valueType) { |
| | |
| | | |
| | | @Override |
| | | public void update(HttpApiEntity httpApiEntity) { |
| | | idMap.remove(httpApiEntity.getId()); |
| | | httpApiDao.updateById(httpApiEntity); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(String id) { |
| | | idMap.remove(id); |
| | | httpApiDao.deleteById(id); |
| | | } |
| | | |