├── .gitignore ├── README.md ├── pom.xml └── src └── main ├── java └── com │ └── rookie │ └── opcua │ ├── OpcUaApplication.java │ ├── client │ ├── ClientGen.java │ └── KeyStoreLoader.java │ ├── config │ ├── OpcUaConfig.java │ ├── RedisCacheConfig.java │ ├── ScheduleConfig.java │ ├── Swagger2Config.java │ └── WebSocketConfig.java │ ├── constant │ ├── BrowseNameAndDisplayNameEnum.java │ └── RedisKeyConstants.java │ ├── controller │ ├── OpcUaController.java │ ├── ReadNodeController.java │ └── WebSocketController.java │ ├── dto │ ├── NodeTreeDTO.java │ ├── ResponseDTO.java │ ├── ServerStatusDTO.java │ └── SimulationDTO.java │ ├── entity │ └── NodeStructure.java │ ├── mapper │ └── NodeStructureMapper.java │ ├── service │ ├── NodeStructureService.java │ ├── ReadDeviceService.java │ └── impl │ │ ├── NodeStructureServiceImpl.java │ │ └── ReadDeviceServiceImpl.java │ ├── support │ └── OpcUaOperationSupport.java │ ├── task │ ├── OpcUaReadNodeTask.java │ └── OpcUaSubscriptionTask.java │ ├── utils │ ├── BeanConvertUtils.java │ ├── IdGenerator.java │ ├── JsonUtils.java │ └── RedisUtils.java │ └── websocket │ ├── ApplicationContextRegister.java │ ├── WebSocketServer.java │ └── encoder │ └── EncoderClassDTO.java └── resources ├── application.yml ├── db └── node_structure.sql ├── mapper └── NodeStructureMapper.xml └── templates └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files and Maven 2 | target/ 3 | pom.xml.tag 4 | pom.xml.releaseBackup 5 | pom.xml.versionsBackup 6 | pom.xml.next 7 | release.properties 8 | dependency-reduced-pom.xml 9 | buildNumber.properties 10 | .mvn/timing.properties 11 | 12 | # Compiled class files 13 | *.class 14 | 15 | # Log Files 16 | *.log 17 | 18 | # About IntelliJ 19 | *.iml 20 | /.idea/ 21 | /out/ 22 | 23 | # BlueJ files 24 | *.ctxt 25 | 26 | # Mobile Tools for Java (J2ME) 27 | .mtj.tmp/ 28 | 29 | # macOS 30 | .DS_Store 31 | 32 | # Package Files 33 | *.jar 34 | *.war 35 | *.ear 36 | *.zip 37 | *.tar.gz 38 | *.rar 39 | 40 | # CMake 41 | cmake-build-debug/ 42 | 43 | # File-based project format 44 | *.iws 45 | 46 | # mpeltonen/sbt-idea plugin 47 | .idea_modules/ 48 | 49 | # JIRA plugin 50 | atlassian-ide-plugin.xml 51 | 52 | # Crashlytics plugin (for Android Studio and IntelliJ) 53 | com_crashlytics_export_strings.xml 54 | crashlytics.properties 55 | crashlytics-build.properties 56 | fabric.properties 57 | 58 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 59 | hs_err_pid* 60 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # opcua-demo 2 | OPC-UA统一架构通信协议 3 | 基于opc-ua通讯协议与硬件网关通讯demo,java程序为客户端 4 | 使用opc-ua的调试服务器工具模拟进行调试 5 | 客户端每1秒读取服务端的模拟数据写入redis使用websocket实时显示数据 6 | 7 | 8 | 9 | [Eclipse Milo™官方库](https://github.com/eclipse/milo) 10 | [OPC官网](https://opcfoundation.org/) 如果比较慢可以看 [OPC中国官网](http://opcfoundation.cn/) 11 | 注册账号才可以下载相关的资源 12 | 13 | [模拟器及相关资料某云盘地址](https://pan.baidu.com/s/1OhxMC3CSXQYAx9ydg7PRyA) 提取码: mj4f 14 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.rookie.opcua 8 | rookie-opcua 9 | 1.0-SNAPSHOT 10 | 11 | 12 | 1.8 13 | 1.2.33 14 | 1.0.4 15 | 1.18.4 16 | 1.0.29 17 | 18 | 19 | 20 | org.springframework.boot 21 | spring-boot-starter-parent 22 | 2.1.3.RELEASE 23 | 24 | 25 | 26 | 27 | 28 | com.alibaba 29 | fastjson 30 | ${fastjson-version} 31 | 32 | 33 | 34 | commons-configuration 35 | commons-configuration 36 | 1.8 37 | 38 | 39 | 40 | 41 | org.projectlombok 42 | lombok 43 | ${lombok.version} 44 | provided 45 | 46 | 47 | 48 | com.baomidou 49 | mybatis-plus-extension 50 | 3.1.2 51 | 52 | 53 | com.baomidou 54 | mybatis-plus-boot-starter 55 | 3.1.2 56 | 57 | 58 | 59 | com.alibaba 60 | druid-spring-boot-starter 61 | 1.1.14 62 | 63 | 64 | 65 | org.springframework.boot 66 | spring-boot-starter-data-redis 67 | 68 | 69 | 70 | org.eclipse.milo 71 | sdk-client 72 | 0.3.5 73 | 74 | 75 | org.eclipse.milo 76 | sdk-server 77 | 0.3.2 78 | 79 | 80 | org.bouncycastle 81 | bcpkix-jdk15on 82 | 1.57 83 | 84 | 85 | 86 | org.slf4j 87 | slf4j-simple 88 | 1.7.25 89 | 90 | 91 | 92 | org.springframework.boot 93 | spring-boot-starter-web 94 | 95 | 96 | 97 | org.springframework.boot 98 | spring-boot-starter-jdbc 99 | 100 | 101 | mysql 102 | mysql-connector-java 103 | 104 | 105 | io.springfox 106 | springfox-swagger2 107 | 2.9.2 108 | 109 | 110 | io.springfox 111 | springfox-swagger-ui 112 | 2.9.2 113 | 114 | 115 | 116 | com.google.guava 117 | guava 118 | 29.0-jre 119 | 120 | 121 | org.springframework.boot 122 | spring-boot-starter-thymeleaf 123 | 124 | 125 | org.springframework.boot 126 | spring-boot-starter-websocket 127 | 128 | 129 | 130 | org.springframework.boot 131 | spring-boot-devtools 132 | 133 | false 134 | 135 | 136 | cn.hutool 137 | hutool-all 138 | 4.5.16 139 | 140 | 141 | 142 | commons-beanutils 143 | commons-beanutils 144 | 1.9.4 145 | 146 | 147 | 148 | 149 | 150 | 151 | maven-compiler-plugin 152 | 153 | 1.8 154 | 1.8 155 | 156 | 157 | 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/OpcUaApplication.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.scheduling.annotation.EnableScheduling; 7 | 8 | /** 9 | * @author yugo 10 | */ 11 | @SpringBootApplication 12 | @EnableScheduling 13 | @MapperScan("com.rookie.opcua.mapper") 14 | public class OpcUaApplication { 15 | public static void main(String[] args) { 16 | SpringApplication.run(OpcUaApplication.class, args); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/client/ClientGen.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.client; 2 | 3 | import com.rookie.opcua.config.OpcUaConfig; 4 | import lombok.extern.slf4j.Slf4j; 5 | import org.bouncycastle.jce.provider.BouncyCastleProvider; 6 | import org.eclipse.milo.opcua.sdk.client.OpcUaClient; 7 | import org.eclipse.milo.opcua.sdk.client.api.config.OpcUaClientConfig; 8 | import org.eclipse.milo.opcua.sdk.client.api.identity.AnonymousProvider; 9 | import org.eclipse.milo.opcua.stack.client.DiscoveryClient; 10 | import org.eclipse.milo.opcua.stack.core.security.SecurityPolicy; 11 | import org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText; 12 | import org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Component; 15 | 16 | import javax.annotation.PostConstruct; 17 | import java.nio.file.Files; 18 | import java.nio.file.Path; 19 | import java.nio.file.Paths; 20 | import java.security.Security; 21 | import java.util.List; 22 | import java.util.concurrent.CompletableFuture; 23 | 24 | import static org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned.uint; 25 | 26 | /** 27 | * @author yugo 28 | * 29 | */ 30 | @Slf4j 31 | @Component 32 | public class ClientGen { 33 | 34 | static { 35 | Security.addProvider(new BouncyCastleProvider()); 36 | } 37 | 38 | private final CompletableFuture future = new CompletableFuture<>(); 39 | 40 | public static OpcUaClient opcUaClient; 41 | 42 | @Autowired 43 | private OpcUaConfig opcUaConfig; 44 | 45 | 46 | @PostConstruct 47 | public void createClient() { 48 | try { 49 | Path securityTempDir = Paths.get(System.getProperty("java.io.tmpdir"), "security"); 50 | Files.createDirectories(securityTempDir); 51 | if (!Files.exists(securityTempDir)) { 52 | throw new Exception("没有创建安全目录: " + securityTempDir); 53 | } 54 | log.info("安全目录: {}", securityTempDir.toAbsolutePath()); 55 | 56 | //加载秘钥 57 | KeyStoreLoader loader = new KeyStoreLoader().load(securityTempDir); 58 | 59 | //安全策略 None、Basic256、Basic128Rsa15、Basic256Sha256 60 | SecurityPolicy securityPolicy = SecurityPolicy.None; 61 | 62 | List endpoints; 63 | 64 | try { 65 | endpoints = DiscoveryClient.getEndpoints(opcUaConfig.getEndpointUrl()).get(); 66 | } catch (Throwable ex) { 67 | // 发现服务 68 | String discoveryUrl = opcUaConfig.getEndpointUrl(); 69 | 70 | if (!discoveryUrl.endsWith("/")) { 71 | discoveryUrl += "/"; 72 | } 73 | discoveryUrl += "discovery"; 74 | 75 | log.info("开始连接 URL: {}", discoveryUrl); 76 | endpoints = DiscoveryClient.getEndpoints(discoveryUrl).get(); 77 | } 78 | EndpointDescription endpoint = endpoints.stream() 79 | .filter(e -> e.getSecurityPolicyUri().equals(securityPolicy.getUri())) 80 | .filter(opcUaConfig.endpointFilter()) 81 | .findFirst() 82 | .orElseThrow(() -> new Exception("没有连接上端点")); 83 | 84 | log.info("使用端点: {} [{}/{}]", endpoint.getEndpointUrl(), securityPolicy, endpoint.getSecurityMode()); 85 | 86 | OpcUaClientConfig config = OpcUaClientConfig.builder() 87 | .setApplicationName(LocalizedText.english("eclipse milo opc-ua client")) 88 | .setApplicationUri("urn:eclipse:milo:examples:client") 89 | .setCertificate(loader.getClientCertificate()) 90 | .setKeyPair(loader.getClientKeyPair()) 91 | .setEndpoint(endpoint) 92 | //根据匿名验证和第三个用户名验证方式设置传入对象 AnonymousProvider(匿名方式)UsernameProvider(账户密码) 93 | //new UsernameProvider("admin","123456") 94 | .setIdentityProvider(new AnonymousProvider()) 95 | .setRequestTimeout(uint(5000)) 96 | .build(); 97 | opcUaClient = OpcUaClient.create(config); 98 | } catch (Exception e) { 99 | log.error("创建客户端失败" + e.getMessage()); 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/client/KeyStoreLoader.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.client; 2 | 3 | import org.eclipse.milo.opcua.sdk.server.util.HostnameUtil; 4 | import org.eclipse.milo.opcua.stack.core.util.SelfSignedCertificateBuilder; 5 | import org.eclipse.milo.opcua.stack.core.util.SelfSignedCertificateGenerator; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | 9 | import java.io.InputStream; 10 | import java.io.OutputStream; 11 | import java.nio.file.Files; 12 | import java.nio.file.Path; 13 | import java.security.*; 14 | import java.security.cert.X509Certificate; 15 | import java.util.regex.Pattern; 16 | 17 | /** 18 | * @author yugo 19 | */ 20 | public class KeyStoreLoader { 21 | 22 | private static final Pattern IP_ADDR_PATTERN = Pattern.compile( 23 | "^(([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d\\d?|2[0-4]\\d|25[0-5])$"); 24 | 25 | private static final String CLIENT_ALIAS = "client-ai"; 26 | private static final char[] PASSWORD = "password".toCharArray(); 27 | 28 | private final Logger logger = LoggerFactory.getLogger(getClass()); 29 | 30 | private X509Certificate clientCertificate; 31 | private KeyPair clientKeyPair; 32 | 33 | KeyStoreLoader load(Path baseDir) throws Exception { 34 | KeyStore keyStore = KeyStore.getInstance("PKCS12"); 35 | 36 | Path serverKeyStore = baseDir.resolve("example-client.pfx"); 37 | 38 | logger.info("加载密钥 {}", serverKeyStore); 39 | 40 | if (!Files.exists(serverKeyStore)) { 41 | keyStore.load(null, PASSWORD); 42 | 43 | KeyPair keyPair = SelfSignedCertificateGenerator.generateRsaKeyPair(2048); 44 | 45 | SelfSignedCertificateBuilder builder = new SelfSignedCertificateBuilder(keyPair) 46 | .setCommonName("Eclipse Milo Example Client") 47 | .setOrganization("digitalpetri") 48 | .setOrganizationalUnit("dev") 49 | .setLocalityName("Folsom") 50 | .setStateName("CA") 51 | .setCountryCode("US") 52 | .setApplicationUri("urn:eclipse:milo:examples:client") 53 | .addDnsName("localhost") 54 | .addIpAddress("127.0.0.1"); 55 | 56 | // 获取证书中列出的尽可能多的主机名和IP地址 57 | for (String hostname : HostnameUtil.getHostnames("0.0.0.0")) { 58 | if (IP_ADDR_PATTERN.matcher(hostname).matches()) { 59 | builder.addIpAddress(hostname); 60 | } else { 61 | builder.addDnsName(hostname); 62 | } 63 | } 64 | 65 | X509Certificate certificate = builder.build(); 66 | 67 | keyStore.setKeyEntry(CLIENT_ALIAS, keyPair.getPrivate(), PASSWORD, new X509Certificate[]{certificate}); 68 | try (OutputStream out = Files.newOutputStream(serverKeyStore)) { 69 | keyStore.store(out, PASSWORD); 70 | } 71 | } else { 72 | try (InputStream in = Files.newInputStream(serverKeyStore)) { 73 | keyStore.load(in, PASSWORD); 74 | } 75 | } 76 | 77 | Key serverPrivateKey = keyStore.getKey(CLIENT_ALIAS, PASSWORD); 78 | if (serverPrivateKey instanceof PrivateKey) { 79 | clientCertificate = (X509Certificate) keyStore.getCertificate(CLIENT_ALIAS); 80 | PublicKey serverPublicKey = clientCertificate.getPublicKey(); 81 | clientKeyPair = new KeyPair(serverPublicKey, (PrivateKey) serverPrivateKey); 82 | } 83 | 84 | return this; 85 | } 86 | 87 | X509Certificate getClientCertificate() { 88 | return clientCertificate; 89 | } 90 | 91 | KeyPair getClientKeyPair() { 92 | return clientKeyPair; 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/config/OpcUaConfig.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.config; 2 | 3 | import lombok.Data; 4 | import org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | import org.springframework.stereotype.Component; 7 | 8 | import java.util.function.Predicate; 9 | 10 | /** 11 | * @author yugo 12 | */ 13 | @Component 14 | @ConfigurationProperties(prefix = "opcua") 15 | @Data 16 | public class OpcUaConfig { 17 | 18 | private String endpointUrl; 19 | 20 | public Predicate endpointFilter() { 21 | return e -> true; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/config/RedisCacheConfig.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.config; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAutoDetect; 4 | import com.fasterxml.jackson.annotation.PropertyAccessor; 5 | import com.fasterxml.jackson.databind.ObjectMapper; 6 | import org.springframework.cache.CacheManager; 7 | import org.springframework.cache.annotation.CachingConfigurerSupport; 8 | import org.springframework.cache.annotation.EnableCaching; 9 | import org.springframework.context.annotation.Bean; 10 | import org.springframework.context.annotation.Configuration; 11 | import org.springframework.data.redis.cache.RedisCacheConfiguration; 12 | import org.springframework.data.redis.cache.RedisCacheManager; 13 | import org.springframework.data.redis.cache.RedisCacheWriter; 14 | import org.springframework.data.redis.connection.RedisConnectionFactory; 15 | import org.springframework.data.redis.core.RedisTemplate; 16 | import org.springframework.data.redis.serializer.*; 17 | 18 | import org.springframework.cache.interceptor.KeyGenerator; 19 | 20 | import java.time.Duration; 21 | 22 | /** 23 | * @author yugo 24 | */ 25 | @EnableCaching 26 | @Configuration 27 | public class RedisCacheConfig extends CachingConfigurerSupport { 28 | 29 | @Bean("objectRedisTemplate") 30 | public RedisTemplate objectRedisTemplate(RedisConnectionFactory factory) { 31 | RedisTemplate template = new RedisTemplate<>(); 32 | 33 | // 使用Jackson2JsonRedisSerialize 替换默认序列化 34 | Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); 35 | 36 | ObjectMapper om = new ObjectMapper(); 37 | om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); 38 | //全局开关,支持jackson在反序列是使用多态 39 | om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); 40 | 41 | template.setConnectionFactory(factory); 42 | template.setKeySerializer(new StringRedisSerializer()); 43 | //使用jdk自带的序列化 44 | template.setValueSerializer(jackson2JsonRedisSerializer); 45 | template.afterPropertiesSet(); 46 | return template; 47 | } 48 | 49 | /** 50 | * 缓存管理器 51 | */ 52 | @Bean 53 | public CacheManager cacheManager(RedisConnectionFactory redisConnectionFactory) { 54 | //初始化一个RedisCacheWriter 55 | RedisCacheWriter redisCacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(redisConnectionFactory); 56 | //设置CacheManager的值序列化方式为json序列化 57 | RedisSerializer jsonSerializer = new GenericJackson2JsonRedisSerializer(); 58 | RedisSerializationContext.SerializationPair pair = RedisSerializationContext.SerializationPair 59 | .fromSerializer(jsonSerializer); 60 | RedisCacheConfiguration defaultCacheConfig = RedisCacheConfiguration.defaultCacheConfig() 61 | .serializeValuesWith(pair); 62 | //设置默认超过期时间是7200秒 63 | defaultCacheConfig.entryTtl(Duration.ofSeconds(7200)); 64 | //初始化RedisCacheManager 65 | return new RedisCacheManager(redisCacheWriter, defaultCacheConfig); 66 | } 67 | 68 | /** 69 | * 缓存的key是 包名+方法名+参数列表 70 | */ 71 | @Bean 72 | @Override 73 | public KeyGenerator keyGenerator() { 74 | return (target, method, params) -> { 75 | StringBuilder sb = new StringBuilder(); 76 | sb.append(target.getClass().getName()); 77 | sb.append(method.getName()); 78 | for (Object obj : params) { 79 | sb.append(obj.toString()); 80 | } 81 | return sb.toString(); 82 | }; 83 | } 84 | } -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/config/ScheduleConfig.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.scheduling.annotation.SchedulingConfigurer; 6 | import org.springframework.scheduling.config.ScheduledTaskRegistrar; 7 | 8 | import java.util.concurrent.Executor; 9 | import java.util.concurrent.Executors; 10 | 11 | 12 | /** 13 | * @author yugo 14 | */ 15 | @Configuration 16 | public class ScheduleConfig implements SchedulingConfigurer { 17 | @Override 18 | public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) { 19 | scheduledTaskRegistrar.setScheduler(setTaskExecutors()); 20 | } 21 | 22 | @Bean(destroyMethod = "shutdown") 23 | public Executor setTaskExecutors() { 24 | return Executors.newScheduledThreadPool(10); 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/config/Swagger2Config.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import springfox.documentation.builders.ApiInfoBuilder; 6 | import springfox.documentation.builders.PathSelectors; 7 | import springfox.documentation.builders.RequestHandlerSelectors; 8 | import springfox.documentation.service.ApiInfo; 9 | import springfox.documentation.service.Contact; 10 | import springfox.documentation.spi.DocumentationType; 11 | import springfox.documentation.spring.web.plugins.Docket; 12 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 13 | 14 | /** 15 | * @author yugo 16 | */ 17 | @Configuration 18 | @EnableSwagger2 19 | public class Swagger2Config { 20 | 21 | @Bean 22 | public Docket api() { 23 | return new Docket(DocumentationType.SWAGGER_2) 24 | .apiInfo(apiInfo()) 25 | .select() 26 | .apis(RequestHandlerSelectors.basePackage("com.rookie.opcua")) 27 | .paths(PathSelectors.any()) 28 | .build(); 29 | } 30 | 31 | private ApiInfo apiInfo() { 32 | return new ApiInfoBuilder() 33 | .title("OpcUa-api") 34 | .description("OpcUa-API 接口文档") 35 | .termsOfServiceUrl("") 36 | .version("1.0") 37 | .contact(new Contact("", "", "")) 38 | .build(); 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/config/WebSocketConfig.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.socket.server.standard.ServerEndpointExporter; 6 | 7 | /** 8 | * WebSocket 9 | * @author yugo 10 | */ 11 | @Configuration 12 | public class WebSocketConfig { 13 | 14 | @Bean 15 | public ServerEndpointExporter serverEndpointExporter() { 16 | return new ServerEndpointExporter(); 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/constant/BrowseNameAndDisplayNameEnum.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.constant; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * @author yugo 8 | */ 9 | public enum BrowseNameAndDisplayNameEnum { 10 | 11 | VARIABLE_NAME("variableName", "变量名"), 12 | 13 | VARIABLE_PROJECT("variableProject", "变量项目"), 14 | 15 | VARIABLE_UNITS("variableUnits", "单位"), 16 | 17 | VARIABLE_VALUE("variableValue", "变量值"), 18 | 19 | VARIABLE_RANGE("variableRange", "值范围"), 20 | 21 | VARIABLE_ALARM_VALUE("variableAlarmValue", "报警值"); 22 | 23 | private String browseName; 24 | private String displayName; 25 | 26 | public String getBrowseName() { 27 | return browseName; 28 | } 29 | 30 | public void setBrowseName(String browseName) { 31 | this.browseName = browseName; 32 | } 33 | 34 | public String getDisplayName() { 35 | return displayName; 36 | } 37 | 38 | public void setDisplayName(String displayName) { 39 | this.displayName = displayName; 40 | } 41 | 42 | static Map enumMap = new HashMap<>(); 43 | 44 | static { 45 | for (BrowseNameAndDisplayNameEnum type : BrowseNameAndDisplayNameEnum.values()) { 46 | enumMap.put(type.getBrowseName(), type); 47 | } 48 | } 49 | 50 | 51 | BrowseNameAndDisplayNameEnum(String browseName, String displayName) { 52 | this.browseName = browseName; 53 | this.displayName = displayName; 54 | } 55 | 56 | public static BrowseNameAndDisplayNameEnum getEnum(String browseName) { 57 | return enumMap.get(browseName); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/constant/RedisKeyConstants.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.constant; 2 | 3 | /** 4 | * @author yugo 5 | */ 6 | public class RedisKeyConstants { 7 | 8 | /** 9 | * 节点结构 10 | */ 11 | public static final String NODE_STRUCTURE = "NODE_STRUCTURE"; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/controller/OpcUaController.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.controller; 2 | 3 | import com.rookie.opcua.dto.NodeTreeDTO; 4 | import com.rookie.opcua.dto.ResponseDTO; 5 | import com.rookie.opcua.dto.ServerStatusDTO; 6 | import com.rookie.opcua.dto.SimulationDTO; 7 | import com.rookie.opcua.service.ReadDeviceService; 8 | import com.rookie.opcua.support.OpcUaOperationSupport; 9 | import com.rookie.opcua.utils.JsonUtils; 10 | import io.swagger.annotations.Api; 11 | import io.swagger.annotations.ApiOperation; 12 | import lombok.AllArgsConstructor; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.data.redis.core.RedisTemplate; 15 | import org.springframework.web.bind.annotation.GetMapping; 16 | import org.springframework.web.bind.annotation.RequestMapping; 17 | import org.springframework.web.bind.annotation.RestController; 18 | 19 | import java.util.List; 20 | 21 | /** 22 | * @author yugo 23 | */ 24 | @RestController 25 | @RequestMapping("/opc-ua") 26 | @Api(value = "opcua 协议接口", tags = "opcua 信息模型查看接口") 27 | @AllArgsConstructor 28 | public class OpcUaController { 29 | 30 | @Autowired 31 | private RedisTemplate redisTemplate; 32 | 33 | @Autowired 34 | private OpcUaOperationSupport opcUaOperationSupport; 35 | 36 | private final ReadDeviceService readDeviceService; 37 | 38 | @GetMapping("/get/server/status") 39 | @ApiOperation(value = "获取服务节点状态", notes = "获取服务节点状态") 40 | public ServerStatusDTO getServerStatus() { 41 | return JsonUtils.jsonToBean(redisTemplate.opsForValue().get("SERVER_NODE").toString(), ServerStatusDTO.class); 42 | } 43 | 44 | @GetMapping("/get/simulation/list") 45 | @ApiOperation(value = "获取服务节点状态", notes = "获取服务节点状态") 46 | public List getSimulationList() { 47 | return JsonUtils.jsonToList(redisTemplate.opsForValue().get("SIMULATION").toString(), SimulationDTO.class); 48 | } 49 | 50 | @GetMapping("/write/node/value") 51 | @ApiOperation(value = "写入数据", notes = "写入数据") 52 | public String writeValue() { 53 | try { 54 | opcUaOperationSupport.writeNodeValue(); 55 | return "success"; 56 | } catch (Exception e) { 57 | return "fail"; 58 | } 59 | } 60 | 61 | @GetMapping("/browse/node") 62 | public String browseNode() { 63 | try { 64 | opcUaOperationSupport.browseNode(); 65 | return "success"; 66 | } catch (Exception e) { 67 | return null; 68 | } 69 | } 70 | 71 | @GetMapping("/subscription") 72 | public String createSubscription() { 73 | try { 74 | opcUaOperationSupport.createSubscription(); 75 | return "success"; 76 | } catch (Exception e) { 77 | return null; 78 | } 79 | } 80 | 81 | @GetMapping("/history") 82 | public List historyRead() { 83 | try { 84 | return opcUaOperationSupport.historyRead(); 85 | } catch (Exception e) { 86 | return null; 87 | } 88 | } 89 | 90 | @GetMapping("/device") 91 | public ResponseDTO getDevice(String name) { 92 | try { 93 | return ResponseDTO.ok(readDeviceService.getNodeStructure(name)); 94 | } catch (Exception e) { 95 | return ResponseDTO.failed(); 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/controller/ReadNodeController.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.controller; 2 | 3 | import com.rookie.opcua.dto.ResponseDTO; 4 | import com.rookie.opcua.service.ReadDeviceService; 5 | import lombok.AllArgsConstructor; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | /** 11 | * @author yugo 12 | */ 13 | @RestController 14 | @RequestMapping("/read") 15 | @AllArgsConstructor 16 | public class ReadNodeController { 17 | 18 | private final ReadDeviceService readDeviceService; 19 | 20 | @GetMapping("/init") 21 | public void init() { 22 | readDeviceService.initNode(); 23 | } 24 | 25 | @GetMapping("/node") 26 | public ResponseDTO getNode(String groupName) { 27 | return readDeviceService.getNodeStructure(groupName); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/controller/WebSocketController.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.controller; 2 | 3 | import com.rookie.opcua.dto.ResponseDTO; 4 | import com.rookie.opcua.websocket.WebSocketServer; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | import org.springframework.web.servlet.ModelAndView; 10 | 11 | import java.io.IOException; 12 | 13 | /** 14 | * @author yugo 15 | */ 16 | @Controller 17 | @RequestMapping("/websocket") 18 | public class WebSocketController { 19 | 20 | 21 | @GetMapping("/index") 22 | public ModelAndView socket() { 23 | return new ModelAndView("/index"); 24 | } 25 | @ResponseBody 26 | @RequestMapping("/push") 27 | public ResponseDTO pushToWeb(String message) { 28 | try { 29 | WebSocketServer.sendInfo(message); 30 | return ResponseDTO.ok("推送成功"); 31 | } catch (IOException e) { 32 | e.printStackTrace(); 33 | return ResponseDTO.failed(e.getMessage()); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/dto/NodeTreeDTO.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.dto; 2 | 3 | import lombok.Data; 4 | import org.eclipse.milo.opcua.stack.core.types.enumerated.NodeClass; 5 | 6 | import java.io.Serializable; 7 | import java.util.List; 8 | 9 | /** 10 | * @author yugo 11 | */ 12 | @Data 13 | public class NodeTreeDTO implements Serializable { 14 | /** 15 | * 命名空间 16 | */ 17 | private Integer namespaceIndex; 18 | /** 19 | * 标识符 20 | */ 21 | private String identifier; 22 | /** 23 | * 节点类型 24 | */ 25 | private NodeClass nodeClass; 26 | /** 27 | * 浏览名称 28 | */ 29 | private String browseName; 30 | /** 31 | * 显示名称 32 | */ 33 | private String displayName; 34 | /** 35 | * 父级标识符 36 | */ 37 | private String parentIdentifier; 38 | /** 39 | * 节点值 40 | */ 41 | private String value; 42 | /** 43 | * 层级 44 | */ 45 | private Integer level; 46 | /** 47 | * 子节点 48 | */ 49 | List subNodeList; 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/dto/ResponseDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2018-2025, lengleng All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * Neither the name of the pig4cloud.com developer nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * Author: lengleng (wangiegie@gmail.com) 17 | * 18 | */ 19 | 20 | package com.rookie.opcua.dto; 21 | 22 | import lombok.*; 23 | import lombok.experimental.Accessors; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * 响应信息主体 29 | * 30 | * @param 31 | * @author yugo 32 | */ 33 | @ToString 34 | @NoArgsConstructor 35 | @AllArgsConstructor 36 | @Accessors(chain = true) 37 | public class ResponseDTO implements Serializable { 38 | private static final long serialVersionUID = 1L; 39 | 40 | private static final int SUCCESS = 0; 41 | 42 | private static final int FAIL = 1; 43 | 44 | @Getter 45 | @Setter 46 | private int code; 47 | 48 | @Getter 49 | @Setter 50 | private String msg; 51 | 52 | @Getter 53 | @Setter 54 | private T data; 55 | 56 | public static ResponseDTO ok() { 57 | return restResult(null, SUCCESS, null); 58 | } 59 | 60 | public static ResponseDTO ok(T data) { 61 | return restResult(data, SUCCESS, null); 62 | } 63 | 64 | public static ResponseDTO ok(T data, String msg) { 65 | return restResult(data, SUCCESS, msg); 66 | } 67 | 68 | public static ResponseDTO failed() { 69 | return restResult(null, FAIL, null); 70 | } 71 | 72 | public static ResponseDTO failed(String msg) { 73 | return restResult(null, FAIL, msg); 74 | } 75 | 76 | public static ResponseDTO failed(T data) { 77 | return restResult(data, FAIL, null); 78 | } 79 | 80 | public static ResponseDTO failed(T data, String msg) { 81 | return restResult(data, FAIL, msg); 82 | } 83 | 84 | private static ResponseDTO restResult(T data, int code, String msg) { 85 | ResponseDTO apiResult = new ResponseDTO<>(); 86 | apiResult.setCode(code); 87 | apiResult.setData(data); 88 | apiResult.setMsg(msg); 89 | return apiResult; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/dto/ServerStatusDTO.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.dto; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | import java.util.Date; 7 | 8 | /** 9 | * @author yugo 10 | */ 11 | @Data 12 | public class ServerStatusDTO implements Serializable { 13 | 14 | private String serverArray; 15 | 16 | private Date startTime; 17 | 18 | private Date currentTime; 19 | 20 | private String state; 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/dto/SimulationDTO.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.dto; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * @author yugo 9 | */ 10 | @Data 11 | public class SimulationDTO implements Serializable { 12 | 13 | private String counter; 14 | 15 | private String expression; 16 | 17 | private String random; 18 | 19 | private String sawtooth; 20 | 21 | private String sinusoid; 22 | 23 | private String square; 24 | 25 | private String triangle; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/entity/NodeStructure.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | import lombok.Data; 6 | import lombok.ToString; 7 | import org.eclipse.milo.opcua.stack.core.types.enumerated.NodeClass; 8 | 9 | /** 10 | * entity 11 | * 12 | * @author yugo 13 | * 2019-07-03 14 | */ 15 | @Data 16 | @ToString(callSuper = true) 17 | @TableName("node_structure") 18 | public class NodeStructure { 19 | 20 | /** 21 | * id 22 | */ 23 | @TableField("id") 24 | private Long id; 25 | 26 | /** 27 | * 命名空间下标 28 | */ 29 | @TableField("namespace_index") 30 | private Integer namespaceIndex; 31 | 32 | /** 33 | * 标识符 34 | */ 35 | @TableField("identifier") 36 | private String identifier; 37 | /** 38 | * 节点类型 39 | */ 40 | @TableField("node_class") 41 | private NodeClass nodeClass; 42 | 43 | /** 44 | * 浏览名称 45 | */ 46 | @TableField("browse_name") 47 | private String browseName; 48 | 49 | /** 50 | * 显示名称 51 | */ 52 | @TableField("display_name") 53 | private String displayName; 54 | 55 | /** 56 | * 父级标识符 57 | */ 58 | @TableField("parent_identifier") 59 | private String parentIdentifier; 60 | 61 | /** 62 | * 父级标识符 63 | */ 64 | @TableField("level") 65 | private Integer level; 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/mapper/NodeStructureMapper.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.rookie.opcua.entity.NodeStructure; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Mapper 11 | * 12 | * @author yugo 13 | * 2019-07-03 14 | */ 15 | public interface NodeStructureMapper extends BaseMapper { 16 | 17 | /** 18 | * 保存或更新 19 | * 20 | * @param nodeStructure 节点结构 21 | * @author yugo 22 | * 2019-07-03 23 | */ 24 | void saveOrUpdate(@Param("nodeStructure") NodeStructure nodeStructure); 25 | 26 | /** 27 | * 批量保存 28 | * 29 | * @param nodeStructureList 节点结构集合 30 | * @author yugo 31 | * 2019-07-03 32 | */ 33 | void batchSave(@Param("nodeStructureList") List nodeStructureList); 34 | 35 | /** 36 | * 批量保存或更新 37 | * 38 | * @param nodeStructureList 节点结构集合 39 | * @author yugo 40 | * 2019-07-03 41 | */ 42 | void batchSaveOrUpdate(@Param("nodeStructureList") List nodeStructureList); 43 | 44 | /** 45 | * 查询所有节点 46 | * 47 | * @return List 48 | * @author yugo 49 | * 2019-07-03 50 | */ 51 | List selectAll(); 52 | } -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/service/NodeStructureService.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.service; 2 | 3 | 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | import com.rookie.opcua.entity.NodeStructure; 6 | 7 | /** 8 | * @author yugo 9 | * 2019-07-03 10 | */ 11 | public interface NodeStructureService extends IService { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/service/ReadDeviceService.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.service; 2 | 3 | import com.rookie.opcua.dto.ResponseDTO; 4 | 5 | /** 6 | * @author yugo 7 | */ 8 | public interface ReadDeviceService { 9 | /** 10 | * 初始化节点 11 | */ 12 | void initNode(); 13 | 14 | /** 15 | * 获取节点结构 16 | * 17 | * @param groupName 分组名称 18 | * @return ResponseDTO 19 | */ 20 | ResponseDTO getNodeStructure(String groupName); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/service/impl/NodeStructureServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.service.impl; 2 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 4 | import com.rookie.opcua.entity.NodeStructure; 5 | import com.rookie.opcua.mapper.NodeStructureMapper; 6 | import com.rookie.opcua.service.NodeStructureService; 7 | import lombok.AllArgsConstructor; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | * @author yugo 12 | * 2019-07-03 13 | */ 14 | @Service 15 | @AllArgsConstructor 16 | public class NodeStructureServiceImpl extends ServiceImpl implements NodeStructureService { 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/service/impl/ReadDeviceServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.service.impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 4 | import com.rookie.opcua.client.ClientGen; 5 | import com.rookie.opcua.dto.NodeTreeDTO; 6 | import com.rookie.opcua.dto.ResponseDTO; 7 | import com.rookie.opcua.entity.NodeStructure; 8 | import com.rookie.opcua.mapper.NodeStructureMapper; 9 | import com.rookie.opcua.service.ReadDeviceService; 10 | import com.rookie.opcua.utils.BeanConvertUtils; 11 | import com.rookie.opcua.utils.IdGenerator; 12 | import lombok.AllArgsConstructor; 13 | import lombok.extern.slf4j.Slf4j; 14 | import org.apache.commons.lang.StringUtils; 15 | import org.eclipse.milo.opcua.sdk.client.OpcUaClient; 16 | import org.eclipse.milo.opcua.sdk.client.api.nodes.Node; 17 | import org.eclipse.milo.opcua.stack.core.Identifiers; 18 | import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; 19 | import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId; 20 | import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned; 21 | import org.eclipse.milo.opcua.stack.core.types.enumerated.NodeClass; 22 | import org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn; 23 | import org.springframework.stereotype.Service; 24 | 25 | import java.util.ArrayList; 26 | import java.util.List; 27 | import java.util.Map; 28 | import java.util.concurrent.ExecutionException; 29 | import java.util.stream.Collectors; 30 | 31 | /** 32 | * @author yugo 33 | */ 34 | @Service 35 | @AllArgsConstructor 36 | @Slf4j 37 | public class ReadDeviceServiceImpl implements ReadDeviceService { 38 | 39 | private final NodeStructureMapper nodeStructureMapper; 40 | 41 | /** 42 | * 初始化节点结构 43 | */ 44 | @Override 45 | public void initNode() { 46 | try { 47 | log.info("初始化节点结构"); 48 | OpcUaClient opcUaClient = ClientGen.opcUaClient; 49 | opcUaClient.connect().get(); 50 | List objectNodeList = opcUaClient.getAddressSpace().browse(Identifiers.ObjectsFolder).get(); 51 | List nodeStructureList = new ArrayList<>(16); 52 | for (Node objectNode : objectNodeList) { 53 | if (!"Server".equals(objectNode.getBrowseName().get().getName())) { 54 | build(nodeStructureList, objectNode, String.valueOf(Identifiers.ObjectsFolder.getIdentifier()), 0); 55 | browseNode(nodeStructureList, objectNode.getNodeId().get().getIdentifier().toString(), opcUaClient, objectNode.getNodeId().get(), 0); 56 | } 57 | } 58 | nodeStructureMapper.batchSave(nodeStructureList); 59 | } catch (Exception e) { 60 | log.error("初始化节点结构失败 {}", e.getMessage()); 61 | } 62 | } 63 | 64 | /** 65 | * 构建节点结构实体 66 | * 67 | * @param nodeStructureList 节点结合 68 | * @param node 节点 69 | * @param parentIdentifier 父节点 70 | * @param level 层级 71 | */ 72 | private void build(List nodeStructureList, Node node, String parentIdentifier, Integer level) { 73 | try { 74 | NodeStructure nodeStructure = new NodeStructure(); 75 | nodeStructure.setId(IdGenerator.getInstance().nextId()); 76 | nodeStructure.setParentIdentifier(parentIdentifier); 77 | nodeStructure.setBrowseName(node.getBrowseName().get().getName()); 78 | nodeStructure.setDisplayName(node.getDisplayName().get().getText()); 79 | nodeStructure.setNamespaceIndex(node.getNodeId().get().getNamespaceIndex().intValue()); 80 | nodeStructure.setIdentifier(node.getNodeId().get().getIdentifier().toString()); 81 | nodeStructure.setNodeClass(node.getNodeClass().get()); 82 | nodeStructure.setLevel(level); 83 | nodeStructureList.add(nodeStructure); 84 | } catch (Exception e) { 85 | log.error("构建节点结构异常{}", e.getMessage()); 86 | } 87 | } 88 | 89 | /** 90 | * 递归浏览节点 91 | * 92 | * @param nodeStructureList 节点结构 93 | * @param identifier 标识符 94 | * @param client 客户端 95 | * @param browseRoot 浏览根节点 96 | * @return List 节点结构树 97 | */ 98 | private void browseNode(List nodeStructureList, String identifier, OpcUaClient client, NodeId browseRoot, Integer level) { 99 | try { 100 | List nodes = client.getAddressSpace().browse(browseRoot).get(); 101 | ++level; 102 | for (Node node : nodes) { 103 | build(nodeStructureList, node, identifier, level); 104 | log.info("parentIdentifier={} Node={} level={}", identifier, node.getBrowseName().get().getName(), level); 105 | browseNode(nodeStructureList, node.getNodeId().get().getIdentifier().toString(), client, node.getNodeId().get(), level); 106 | } 107 | } catch (InterruptedException | ExecutionException e) { 108 | log.error("Browsing nodeId={} failed: {}", browseRoot, e.getMessage(), e); 109 | } 110 | } 111 | 112 | /** 113 | * 获取节点树结构 114 | * 115 | * @param groupName 设备组名称 116 | * @return ResponseDTO> 117 | */ 118 | @Override 119 | public ResponseDTO getNodeStructure(String groupName) { 120 | List nodeStructureDTOList = BeanConvertUtils.tToV(nodeStructureMapper.selectAll(), NodeTreeDTO.class); 121 | QueryWrapper queryWrapper = new QueryWrapper<>(); 122 | queryWrapper.eq("level", "0"); 123 | if (StringUtils.isNotBlank(groupName)) { 124 | queryWrapper.eq("browse_name", groupName); 125 | } 126 | Map nodeMap = nodeStructureDTOList.stream().collect(Collectors.toMap(NodeTreeDTO::getIdentifier, nodeTree -> nodeTree)); 127 | getVariableNodeValue(nodeMap); 128 | List rootNodeList = BeanConvertUtils.tToV(nodeStructureMapper.selectList(queryWrapper), NodeTreeDTO.class); 129 | if (rootNodeList == null) { 130 | return ResponseDTO.failed(); 131 | } 132 | List rootNodeTreeDTOList = new ArrayList<>(); 133 | for (NodeTreeDTO currentNode : rootNodeList) { 134 | rootNodeTreeDTOList.add(getTree(nodeMap, currentNode)); 135 | } 136 | return ResponseDTO.ok(rootNodeTreeDTOList); 137 | } 138 | 139 | /** 140 | * 递归获取树结构 141 | * 142 | * @param nodeMap 节点map 143 | * @param currentNode 当前节点 144 | */ 145 | private NodeTreeDTO getTree(Map nodeMap, NodeTreeDTO currentNode) { 146 | try { 147 | List nodeTreeDTOList = new ArrayList<>(); 148 | NodeTreeDTO nodeTreeDTO = new NodeTreeDTO(); 149 | List childNodeList = getChildNodeList(currentNode.getIdentifier(), nodeMap); 150 | nodeTreeDTO.setIdentifier(currentNode.getIdentifier()); 151 | nodeTreeDTO.setNamespaceIndex(currentNode.getNamespaceIndex()); 152 | nodeTreeDTO.setBrowseName(currentNode.getBrowseName()); 153 | nodeTreeDTO.setLevel(currentNode.getLevel()); 154 | nodeTreeDTO.setNodeClass(currentNode.getNodeClass()); 155 | nodeTreeDTO.setParentIdentifier(currentNode.getParentIdentifier()); 156 | nodeTreeDTO.setDisplayName(currentNode.getDisplayName()); 157 | nodeTreeDTO.setValue(currentNode.getValue()); 158 | for (NodeTreeDTO childNodeTree : childNodeList) { 159 | nodeTreeDTOList.add(getTree(nodeMap, childNodeTree)); 160 | } 161 | nodeTreeDTO.setSubNodeList(nodeTreeDTOList); 162 | return nodeTreeDTO; 163 | } catch (Exception e) { 164 | log.error("递归节点{} 失败 异常信息:{}", currentNode.getIdentifier(), e.getMessage()); 165 | return null; 166 | } 167 | } 168 | 169 | /** 170 | * 获取当前节点下的子节点 171 | * 172 | * @param currentIdentifier 标识符 173 | * @param nodeStructureMap 节点结构集合 174 | * @return List 175 | */ 176 | private List getChildNodeList(String currentIdentifier, Map nodeStructureMap) { 177 | List list = new ArrayList<>(16); 178 | for (String key : nodeStructureMap.keySet()) { 179 | if (nodeStructureMap.get(key).getParentIdentifier().equals(currentIdentifier)) { 180 | list.add(nodeStructureMap.get(key)); 181 | } 182 | } 183 | return list; 184 | } 185 | 186 | /** 187 | * 获取属性节点的属性值 188 | * 189 | * @param nodeTreeMap 节点map 190 | */ 191 | private void getVariableNodeValue(Map nodeTreeMap) { 192 | try { 193 | log.info("======================================="); 194 | long startTime = System.currentTimeMillis(); 195 | QueryWrapper queryWrapper = new QueryWrapper<>(); 196 | queryWrapper.eq("node_class", NodeClass.Variable); 197 | //查询属性节点集合 198 | List variableNodeList = nodeStructureMapper.selectList(queryWrapper); 199 | List variableNodeTreeDTOList = BeanConvertUtils.tToV(variableNodeList, NodeTreeDTO.class); 200 | if (variableNodeTreeDTOList == null) { 201 | return; 202 | } 203 | OpcUaClient client = ClientGen.opcUaClient; 204 | client.connect().get(); 205 | //确保顺序同属性节点集合相同 206 | List nodeIdList = variableNodeTreeDTOList.stream().map(node -> new NodeId(node.getNamespaceIndex(), Unsigned.uint(node.getIdentifier()))).collect(Collectors.toList()); 207 | //方式1 通过nodeIdList 批量获取属性值 208 | List dataValueList = client.readValues(0, TimestampsToReturn.Both, nodeIdList).get(); 209 | for (int i = 0; i < variableNodeTreeDTOList.size(); i++) { 210 | try { 211 | variableNodeTreeDTOList.get(i).setValue(dataValueList.get(i).getValue().getValue() == null ? null : dataValueList.get(i).getValue().getValue().toString()); 212 | } catch (Exception e) { 213 | log.error(e.getMessage()); 214 | } 215 | } 216 | //给树节点赋值 217 | for (NodeTreeDTO nodeTreeDTO : variableNodeTreeDTOList) { 218 | NodeTreeDTO nodeTree = nodeTreeMap.get(nodeTreeDTO.getIdentifier()); 219 | nodeTree.setValue(nodeTreeDTO.getValue()); 220 | } 221 | 222 | long endTime = System.currentTimeMillis(); 223 | float excTime = (float) (endTime - startTime) / 1000; 224 | log.info("===============耗时:" + excTime + "秒=============="); 225 | } catch (Exception e) { 226 | log.error("或许节点属性值异常:{}", e.getMessage()); 227 | } 228 | 229 | } 230 | } 231 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/support/OpcUaOperationSupport.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.support; 2 | 3 | 4 | import com.rookie.opcua.client.ClientGen; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.eclipse.milo.opcua.sdk.client.OpcUaClient; 7 | import org.eclipse.milo.opcua.sdk.client.api.nodes.Node; 8 | import org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaMonitoredItem; 9 | import org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaSubscription; 10 | import org.eclipse.milo.opcua.stack.core.AttributeId; 11 | import org.eclipse.milo.opcua.stack.core.Identifiers; 12 | import org.eclipse.milo.opcua.stack.core.types.builtin.*; 13 | import org.eclipse.milo.opcua.stack.core.types.enumerated.MonitoringMode; 14 | import org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn; 15 | import org.eclipse.milo.opcua.stack.core.types.structured.*; 16 | import org.springframework.stereotype.Component; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | import java.util.function.BiConsumer; 21 | 22 | import static com.google.common.collect.Lists.newArrayList; 23 | import static org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned.uint; 24 | import static org.eclipse.milo.opcua.stack.core.util.ConversionUtil.l; 25 | 26 | /** 27 | * @author yugo 28 | */ 29 | @Component 30 | @Slf4j 31 | public class OpcUaOperationSupport { 32 | 33 | 34 | /** 35 | * 写入节点数据 36 | */ 37 | public void writeNodeValue() throws Exception { 38 | try { 39 | log.info("准备写入"); 40 | OpcUaClient client = ClientGen.opcUaClient; 41 | //创建连接 42 | client.connect().get(); 43 | 44 | //创建变量节点 45 | NodeId nodeId = new NodeId(5, "Counter1"); 46 | 47 | //创建Variant对象和DataValue对象 48 | Variant v = new Variant(90); 49 | DataValue dataValue = new DataValue(v, null, null); 50 | 51 | StatusCode statusCode = client.writeValue(nodeId, dataValue).get(); 52 | 53 | System.out.println(statusCode.isGood()); 54 | 55 | } catch (Exception e) { 56 | log.error(e.getMessage()); 57 | throw e; 58 | } 59 | } 60 | 61 | /** 62 | * 浏览节点 63 | */ 64 | public void browseNode() { 65 | try { 66 | OpcUaClient client = ClientGen.opcUaClient; 67 | 68 | client.connect().get(); 69 | 70 | List nodes = client.getAddressSpace().browse(Identifiers.ObjectsFolder).get(); 71 | 72 | for (Node node : nodes) { 73 | System.out.println("Node= " + node.getBrowseName().get().getName()); 74 | } 75 | } catch (Exception e) { 76 | log.error("Node browseNode error:" + e.getMessage()); 77 | } 78 | 79 | } 80 | 81 | /** 82 | * 订阅变量 83 | */ 84 | public void createSubscription() { 85 | try { 86 | OpcUaClient client = ClientGen.opcUaClient; 87 | client.connect().get(); 88 | 89 | //创建发布间隔1000ms的订阅对象 90 | UaSubscription subscription = client.getSubscriptionManager().createSubscription(1000.0).get(); 91 | 92 | //创建监控的参数 93 | MonitoringParameters parameters = new MonitoringParameters( 94 | uint(1), 95 | // 发布间隔 96 | 1000.0, 97 | // filter, 空表示用默认值 98 | null, 99 | // 队列大小 100 | uint(10), 101 | //放弃旧配置 102 | true 103 | ); 104 | 105 | 106 | //创建订阅的变量 107 | // NodeId nodeId = new NodeId(5, "Counter1"); 108 | NodeId nodeId = new NodeId(0, 1555944286); 109 | ReadValueId readValueId = new ReadValueId(nodeId, AttributeId.Value.uid(), null, null); 110 | 111 | //创建监控项请求 112 | //该请求最后用于创建订阅。 113 | MonitoredItemCreateRequest request = new MonitoredItemCreateRequest(readValueId, MonitoringMode.Reporting, parameters); 114 | 115 | List requests = new ArrayList<>(); 116 | requests.add(request); 117 | 118 | //创建监控项,并且注册变量值改变时候的回调函数。 119 | BiConsumer onItemCreated = 120 | (item, id) -> { 121 | item.setValueConsumer((item1, value) -> { 122 | log.info("收到的订阅值: item={}, value={}", item1.getReadValueId().getNodeId(), value.getValue()); 123 | }); 124 | }; 125 | 126 | List items = subscription.createMonitoredItems( 127 | TimestampsToReturn.Both, 128 | newArrayList(request), 129 | onItemCreated 130 | ).get(); 131 | 132 | for (UaMonitoredItem item : items) { 133 | if (item.getStatusCode().isGood()) { 134 | log.info("创建项目 nodeId={}", item.getReadValueId().getNodeId()); 135 | } else { 136 | log.warn("创建失败 nodeId={} (status={})", item.getReadValueId().getNodeId(), item.getStatusCode()); 137 | } 138 | } 139 | } catch (Exception e) { 140 | log.error("订阅变量失败"); 141 | } 142 | } 143 | 144 | /** 145 | * 查看变量历史记录 146 | * 147 | * @return List 148 | */ 149 | public List historyRead() { 150 | try { 151 | OpcUaClient client = ClientGen.opcUaClient; 152 | client.connect().get(); 153 | 154 | HistoryReadDetails historyReadDetails = new ReadRawModifiedDetails( 155 | false, 156 | DateTime.MIN_VALUE, 157 | DateTime.now(), 158 | uint(0), 159 | true 160 | ); 161 | 162 | HistoryReadValueId historyReadValueId = new HistoryReadValueId( 163 | new NodeId(5, "Counter1"), 164 | null, 165 | QualifiedName.NULL_VALUE, 166 | ByteString.NULL_VALUE 167 | ); 168 | 169 | List nodesToRead = new ArrayList<>(); 170 | nodesToRead.add(historyReadValueId); 171 | 172 | HistoryReadResponse historyReadResponse = client.historyRead( 173 | historyReadDetails, 174 | TimestampsToReturn.Both, 175 | false, 176 | nodesToRead 177 | ).get(); 178 | 179 | 180 | HistoryReadResult[] historyReadResults = historyReadResponse.getResults(); 181 | 182 | List dataValues = null; 183 | 184 | if (historyReadResults != null) { 185 | HistoryReadResult historyReadResult = historyReadResults[0]; 186 | HistoryData historyData = (HistoryData) historyReadResult.getHistoryData().decode( 187 | client.getSerializationContext() 188 | ); 189 | dataValues = l(historyData.getDataValues()); 190 | } 191 | return dataValues; 192 | } catch (Exception e) { 193 | log.error("查看变量历史记录失败" + e.getMessage()); 194 | return null; 195 | } 196 | 197 | } 198 | } 199 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/task/OpcUaReadNodeTask.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.task; 2 | 3 | 4 | import com.rookie.opcua.client.ClientGen; 5 | import com.rookie.opcua.dto.ServerStatusDTO; 6 | import com.rookie.opcua.dto.SimulationDTO; 7 | import com.rookie.opcua.utils.JsonUtils; 8 | import com.rookie.opcua.websocket.WebSocketServer; 9 | import lombok.extern.slf4j.Slf4j; 10 | import org.eclipse.milo.opcua.sdk.client.OpcUaClient; 11 | import org.eclipse.milo.opcua.sdk.client.model.nodes.objects.ServerNode; 12 | import org.eclipse.milo.opcua.sdk.client.model.nodes.variables.ServerStatusNode; 13 | import org.eclipse.milo.opcua.stack.core.Identifiers; 14 | import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; 15 | import org.eclipse.milo.opcua.stack.core.types.builtin.DateTime; 16 | import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId; 17 | import org.eclipse.milo.opcua.stack.core.types.enumerated.ServerState; 18 | import org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn; 19 | import org.springframework.beans.factory.annotation.Autowired; 20 | import org.springframework.data.redis.core.RedisTemplate; 21 | import org.springframework.scheduling.annotation.Async; 22 | import org.springframework.scheduling.annotation.Scheduled; 23 | import org.springframework.stereotype.Component; 24 | 25 | import java.util.ArrayList; 26 | import java.util.List; 27 | 28 | 29 | /** 30 | * @author yugo 31 | */ 32 | @Component 33 | @Slf4j 34 | public class OpcUaReadNodeTask { 35 | 36 | @Autowired 37 | private RedisTemplate redisTemplate; 38 | 39 | @Async 40 | @Scheduled(cron = "0/30 * * * * ?") 41 | public void setReadNodeSupport() { 42 | try { 43 | log.info("获取节点状态信息"); 44 | OpcUaClient client = ClientGen.opcUaClient; 45 | client.connect().get(); 46 | 47 | // 获取对服务器对象的类型化引用 :服务节点 48 | ServerNode serverNode = client.getAddressSpace().getObjectNode( 49 | Identifiers.Server, 50 | ServerNode.class 51 | ).get(); 52 | 53 | // 读取服务器对象的属性 54 | String[] serverArray = serverNode.getServerArray().get(); 55 | 56 | ServerStatusNode serverStatusNode = serverNode.getServerStatusNode().get(); 57 | DateTime startTime = serverStatusNode.getStartTime().get(); 58 | DateTime currentTime = serverStatusNode.getCurrentTime().get(); 59 | ServerState state = serverStatusNode.getState().get(); 60 | 61 | ServerStatusDTO serverStatusDTO = new ServerStatusDTO(); 62 | serverStatusDTO.setState(state.name()); 63 | serverStatusDTO.setStartTime(startTime.getJavaDate()); 64 | serverStatusDTO.setCurrentTime(currentTime.getJavaDate()); 65 | serverStatusDTO.setServerArray(serverArray[0]); 66 | 67 | redisTemplate.opsForValue().set("SERVER_NODE", JsonUtils.beanToJson(serverStatusDTO)); 68 | } catch (Exception e) { 69 | log.error("获取服务节点失败,错误信息:{}",e.getMessage()); 70 | e.printStackTrace(); 71 | } 72 | } 73 | 74 | @Scheduled(cron = "0/30 * * * * ?") 75 | public void setSimulation() { 76 | try { 77 | log.info("获取 Simulation 模拟信息模型数据"); 78 | List simulationList=null; 79 | 80 | OpcUaClient client = ClientGen.opcUaClient; 81 | client.connect().get(); 82 | 83 | NodeId counter1 = new NodeId(5, "Counter1"); 84 | NodeId expression1 = new NodeId(5, "Expression1"); 85 | NodeId random1 = new NodeId(5, "Random1"); 86 | NodeId sawtooth1 = new NodeId(5, "Sawtooth1"); 87 | NodeId sinusoid1 = new NodeId(5, "Sinusoid1"); 88 | NodeId square1 = new NodeId(5, "Square1"); 89 | NodeId triangle1 = new NodeId(5, "Triangle1"); 90 | 91 | DataValue counter1value = client.readValue(0.0, TimestampsToReturn.Both, counter1).get(); 92 | DataValue expression1value = client.readValue(0.0, TimestampsToReturn.Both, expression1).get(); 93 | DataValue random1value = client.readValue(0.0, TimestampsToReturn.Both, random1).get(); 94 | DataValue sawtooth1value = client.readValue(0.0, TimestampsToReturn.Both, sawtooth1).get(); 95 | DataValue sinusoid1value = client.readValue(0.0, TimestampsToReturn.Both, sinusoid1).get(); 96 | DataValue square1value = client.readValue(0.0, TimestampsToReturn.Both, square1).get(); 97 | DataValue triangle1value = client.readValue(0.0, TimestampsToReturn.Both, triangle1).get(); 98 | 99 | SimulationDTO simulationDTO = new SimulationDTO(); 100 | simulationDTO.setCounter(counter1value.getValue().getValue().toString()); 101 | simulationDTO.setExpression(expression1value.getValue().getValue().toString()); 102 | simulationDTO.setRandom(random1value.getValue().getValue().toString()); 103 | simulationDTO.setSawtooth(sawtooth1value.getValue().getValue().toString()); 104 | simulationDTO.setSinusoid(sinusoid1value.getValue().getValue().toString()); 105 | simulationDTO.setSquare(square1value.getValue().getValue().toString()); 106 | simulationDTO.setTriangle(triangle1value.getValue().getValue().toString()); 107 | 108 | 109 | Object simulationRecord = redisTemplate.opsForValue().get("SIMULATION"); 110 | if (simulationRecord!=null){ 111 | simulationList = JsonUtils.jsonToList(simulationRecord.toString(), SimulationDTO.class); 112 | }else { 113 | simulationList = new ArrayList<>(); 114 | } 115 | simulationList.add(simulationDTO); 116 | 117 | redisTemplate.opsForValue().set("SIMULATION", JsonUtils.listToJson(simulationList)); 118 | 119 | WebSocketServer.sendInfo(JsonUtils.listToJson(simulationList)); 120 | } catch (Exception e) { 121 | log.error("获取模拟服务节点失败,错误信息{}",e.getMessage()); 122 | e.printStackTrace(); 123 | } 124 | } 125 | 126 | 127 | } 128 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/task/OpcUaSubscriptionTask.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.task; 2 | 3 | import com.rookie.opcua.client.ClientGen; 4 | import lombok.extern.slf4j.Slf4j; 5 | import org.eclipse.milo.opcua.sdk.client.OpcUaClient; 6 | import org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaMonitoredItem; 7 | import org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaSubscription; 8 | import org.eclipse.milo.opcua.stack.core.AttributeId; 9 | import org.eclipse.milo.opcua.stack.core.Identifiers; 10 | import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; 11 | import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName; 12 | import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger; 13 | import org.eclipse.milo.opcua.stack.core.types.enumerated.MonitoringMode; 14 | import org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn; 15 | import org.eclipse.milo.opcua.stack.core.types.structured.MonitoredItemCreateRequest; 16 | import org.eclipse.milo.opcua.stack.core.types.structured.MonitoringParameters; 17 | import org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId; 18 | import org.springframework.scheduling.annotation.Scheduled; 19 | import org.springframework.stereotype.Component; 20 | 21 | import java.util.List; 22 | import java.util.concurrent.atomic.AtomicLong; 23 | import java.util.function.BiConsumer; 24 | 25 | import static com.google.common.collect.Lists.newArrayList; 26 | import static org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned.uint; 27 | 28 | /** 29 | * @author yugo 30 | */ 31 | @Component 32 | @Slf4j 33 | public class OpcUaSubscriptionTask { 34 | 35 | private final AtomicLong clientHandles = new AtomicLong(1L); 36 | 37 | @Scheduled(cron = "0/30 * * * * ?") 38 | public void subscription() { 39 | try { 40 | log.info("开始监听"); 41 | OpcUaClient client = ClientGen.opcUaClient; 42 | //创建发布间隔1000ms的订阅对象 43 | UaSubscription subscription = client.getSubscriptionManager().createSubscription(1000.0).get(); 44 | 45 | // 监听服务当前时间节点 46 | ReadValueId readValueId = new ReadValueId( 47 | Identifiers.Server_ServerStatus_CurrentTime, 48 | AttributeId.Value.uid(), null, QualifiedName.NULL_VALUE); 49 | 50 | // 每个项目的客户端句柄必须是唯一的 51 | UInteger clientHandle = uint(clientHandles.getAndIncrement()); 52 | 53 | MonitoringParameters parameters = new MonitoringParameters( 54 | clientHandle, 55 | // 间隔 56 | 1000.0, 57 | // 过滤器空表示使用默认值 58 | null, 59 | // 队列大小 60 | uint(10), 61 | // 是否丢弃旧配置 62 | true 63 | ); 64 | 65 | MonitoredItemCreateRequest request = new MonitoredItemCreateRequest( 66 | readValueId, MonitoringMode.Reporting, parameters); 67 | 68 | // 创建监控项,并且注册变量值改变时候的回调函数。 69 | BiConsumer onItemCreated = 70 | (item, id) -> item.setValueConsumer(this::onSubscriptionValue); 71 | 72 | List items = subscription.createMonitoredItems( 73 | TimestampsToReturn.Both, 74 | newArrayList(request), 75 | onItemCreated 76 | ).get(); 77 | 78 | for (UaMonitoredItem item : items) { 79 | if (item.getStatusCode().isGood()) { 80 | log.info("item created for nodeId={}", item.getReadValueId().getNodeId()); 81 | } else { 82 | log.warn( 83 | "failed to create item for nodeId={} (status={})", 84 | item.getReadValueId().getNodeId(), item.getStatusCode()); 85 | } 86 | } 87 | 88 | // 运行五秒然后停止 89 | Thread.sleep(5000); 90 | } catch (Exception e) { 91 | log.error("订阅失败" + e.getMessage()); 92 | } 93 | } 94 | 95 | private void onSubscriptionValue(UaMonitoredItem item, DataValue value) { 96 | log.info( 97 | "subscription value received: item={}, value={}", 98 | item.getReadValueId().getNodeId(), value.getValue()); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/utils/BeanConvertUtils.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.utils; 2 | 3 | import org.apache.commons.configuration.ConversionException; 4 | import org.springframework.beans.BeanUtils; 5 | 6 | import java.beans.BeanInfo; 7 | import java.beans.Introspector; 8 | import java.beans.PropertyDescriptor; 9 | import java.lang.reflect.Method; 10 | import java.util.ArrayList; 11 | import java.util.HashMap; 12 | import java.util.List; 13 | import java.util.Map; 14 | 15 | /** 16 | * @author yugo 17 | */ 18 | public class BeanConvertUtils { 19 | 20 | /** 21 | * 将t中的对象复制到v 22 | * 23 | * @param t 24 | * @param v 25 | * @param 26 | * @param 27 | */ 28 | public static V tToV(T t, V v) { 29 | if (t == null || v == null) { 30 | return v; 31 | } 32 | BeanUtils.copyProperties(t, v); 33 | return v; 34 | } 35 | 36 | /** 37 | * 批量复制对象 38 | * 39 | * @param ts 40 | * @param targetCls 41 | * @param 42 | * @param 43 | * @return 44 | */ 45 | public static List tToV(List ts, Class targetCls) { 46 | if (ts == null) { 47 | return null; 48 | } 49 | List vs = new ArrayList(); 50 | for (T t : ts) { 51 | vs.add(tToV(t, targetCls)); 52 | } 53 | return vs; 54 | } 55 | 56 | /** 57 | * @param targetCls 58 | * @param v 59 | * @param 60 | * @param 61 | * @return 62 | */ 63 | public static T tToV(V v, Class targetCls) { 64 | T t = null; 65 | if (v == null) { 66 | return t; 67 | } 68 | try { 69 | t = targetCls.newInstance(); 70 | } catch (Exception e) { 71 | throw new ConversionException("Bean 转化异常,请生成 " + targetCls.getName() + "的构造方法!"); 72 | } 73 | BeanUtils.copyProperties(v, t); 74 | return t; 75 | } 76 | 77 | /** 78 | * listMap转listObject 79 | * 80 | * @param list 81 | * @param beanClass 82 | * @param 83 | * @return 84 | * @throws Exception 85 | */ 86 | public static List listBymapToObject(List> list, Class beanClass) { 87 | List vs = null; 88 | try { 89 | vs = new ArrayList(); 90 | if (list == null || list.size() == 0) { 91 | return vs; 92 | } 93 | for (Map map : list) { 94 | if (map == null) { 95 | return null; 96 | } 97 | T obj = beanClass.newInstance(); 98 | org.apache.commons.beanutils.BeanUtils.populate(obj, map); 99 | vs.add(obj); 100 | } 101 | } catch (Exception e) { 102 | e.printStackTrace(); 103 | } 104 | return vs; 105 | } 106 | 107 | public static Map tToV(Object obj) throws Exception { 108 | if (obj == null) { 109 | return null; 110 | } 111 | Map map = new HashMap(); 112 | BeanInfo beanInfo = Introspector.getBeanInfo(obj.getClass()); 113 | PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); 114 | for (PropertyDescriptor property : propertyDescriptors) { 115 | String key = property.getName(); 116 | // 过滤class属性 117 | if (!key.equals("class")) { 118 | // 得到property对应的getter方法 119 | Method getter = property.getReadMethod(); 120 | Object value = getter.invoke(obj); 121 | map.put(key, value); 122 | } 123 | } 124 | 125 | return map; 126 | 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/utils/IdGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C), 2018-2018, 深圳点积科技有限公司 3 | * FileName: IdGenerator 4 | * Author: yugo 5 | * Date: 2018/4/27 20:04 6 | * Since: 1.0.0 7 | */ 8 | package com.rookie.opcua.utils; 9 | 10 | import lombok.extern.slf4j.Slf4j; 11 | 12 | import java.net.InetAddress; 13 | import java.net.NetworkInterface; 14 | import java.nio.BufferUnderflowException; 15 | import java.nio.ByteBuffer; 16 | import java.security.SecureRandom; 17 | import java.util.Enumeration; 18 | 19 | 20 | /** 21 | * id生成器 22 | * 23 | * @author yugo 24 | * @since 1.0.0 25 | * 2018/4/27 26 | */ 27 | @Slf4j 28 | @SuppressWarnings("all") 29 | public enum IdGenerator { 30 | INSTANCE; 31 | /** 32 | * 开始时间截 (2017-01-01) 33 | */ 34 | private final long twepoch = 1483200000000L; 35 | 36 | private static final int LOW_ORDER_THREE_BYTES = 0x00ffffff; 37 | 38 | /** 39 | * 机器ID所占的位数 40 | */ 41 | private final long workerIdBits = 3L; 42 | 43 | /** 44 | * 进程标识ID所占的位数 45 | */ 46 | private final long processIdBits = 5L; 47 | 48 | /** 49 | * 序列在ID中占的位数 50 | */ 51 | private final long sequenceBits = 5L; 52 | 53 | /** 54 | * 机器ID向左移11位 (5+5) 55 | */ 56 | private final long workerIdShift = sequenceBits + processIdBits; 57 | 58 | /** 59 | * 进程标识ID向左移5位 60 | */ 61 | private final long processIdShift = sequenceBits; 62 | 63 | /** 64 | * 时间截向左移14位(3+5+5) 65 | */ 66 | private final long timestampLeftShift = sequenceBits + workerIdBits + processIdBits; 67 | 68 | /** 69 | * 生成序列的掩码,这里为32 (0b111111111111=0xfff=32) 70 | */ 71 | private final long sequenceMask = -1L ^ (-1L << sequenceBits); 72 | 73 | /** 74 | * 工作机器ID(0~7) 75 | */ 76 | private static final long WORKER_ID; 77 | 78 | /** 79 | * 线程ID(0~31) 80 | */ 81 | private static final long PROCESS_ID; 82 | 83 | /** 84 | * 毫秒内序列(0~255) 85 | */ 86 | private long sequence = 0L; 87 | 88 | /** 89 | * 上次生成ID的时间截 90 | */ 91 | private long lastTimestamp = -1L; 92 | 93 | static { 94 | try { 95 | /* 96 | * 这种计算方式是粗糙的,最好是能根据idc编号和机器编号 代替目前的IP和进程号方案取模运算,但是设定idc编号和机器号需要运维支持 97 | * 目前为了完全不依赖运维,所以采用网卡和进程的方案,还有一点,此方案强依赖系统时间,所以系统时间需一致 98 | */ 99 | WORKER_ID = createIpIdentifier() % 8; 100 | PROCESS_ID = createProcessIdentifier() % 32; 101 | } catch (Exception e) { 102 | throw new RuntimeException(e); 103 | } 104 | } 105 | 106 | public static IdGenerator getInstance() { 107 | return INSTANCE; 108 | } 109 | 110 | /** 111 | * 计算线程号 112 | * 113 | * @return long 114 | * @author yugo 115 | * 2018/4/28 09:55 116 | * @since 1.0.0 117 | */ 118 | private static long createProcessIdentifier() { 119 | long processId; 120 | try { 121 | String processName = java.lang.management.ManagementFactory.getRuntimeMXBean() 122 | .getName(); 123 | if (processName.contains("@")) { 124 | processId = Long.parseLong(processName.substring(0, processName.indexOf('@'))); 125 | } else { 126 | processId = java.lang.management.ManagementFactory.getRuntimeMXBean().getName() 127 | .hashCode(); 128 | } 129 | 130 | } catch (Throwable t) { 131 | processId = new SecureRandom().nextLong(); 132 | log.warn("Failed to get process identifier from JMX, using random number instead", t); 133 | } 134 | 135 | return processId; 136 | } 137 | 138 | /** 139 | * 计算机网卡 140 | * 141 | * @return long 142 | * @author yugo 143 | * 2018/4/28 09:56 144 | * @since 1.0.0 145 | */ 146 | @Deprecated 147 | private static long createMachineIdentifier() { 148 | long machinePiece; 149 | try { 150 | StringBuilder sb = new StringBuilder(); 151 | Enumeration e = NetworkInterface.getNetworkInterfaces(); 152 | while (e.hasMoreElements()) { 153 | NetworkInterface ni = e.nextElement(); 154 | sb.append(ni.toString()); 155 | byte[] mac = ni.getHardwareAddress(); 156 | if (mac != null) { 157 | ByteBuffer bb = ByteBuffer.wrap(mac); 158 | try { 159 | sb.append(bb.getChar()); 160 | sb.append(bb.getChar()); 161 | sb.append(bb.getChar()); 162 | } catch (BufferUnderflowException shortHardwareAddressException) { // NOPMD 163 | // mac with less than 6 bytes. continue 164 | } 165 | } 166 | } 167 | 168 | machinePiece = sb.toString().hashCode(); 169 | } catch (Throwable t) { 170 | // exception sometimes happens with IBM JVM, use random 171 | machinePiece = (new SecureRandom().nextLong()); 172 | log.warn( 173 | "Failed to get machine identifier from network interface,using random number instead ", 174 | t); 175 | } 176 | machinePiece = machinePiece & LOW_ORDER_THREE_BYTES; 177 | return machinePiece; 178 | } 179 | 180 | /** 181 | * 计算机器ip 182 | * 183 | * @return long 184 | * @author yugo 185 | * 2018/4/28 09:56 186 | * @since 1.0.0 187 | */ 188 | private static long createIpIdentifier() { 189 | long result = 0; 190 | try { 191 | InetAddress address = InetAddress.getLocalHost(); 192 | String hostAddress = address.getHostAddress(); 193 | 194 | String[] ipAddressInArray = hostAddress.split("\\."); 195 | 196 | for (int i = 3; i >= 0; i--) { 197 | long ip = Long.parseLong(ipAddressInArray[3 - i]); 198 | result |= ip << (i * 8); 199 | } 200 | } catch (Throwable t) { 201 | result = (new SecureRandom().nextLong()); 202 | log.warn( 203 | "Failed to get machine identifier from network interface, using random number instead", 204 | t); 205 | 206 | } 207 | 208 | return result; 209 | } 210 | 211 | /** 212 | * 获得下一个ID 213 | * 214 | * @return long 215 | * @author yugo 216 | * 2018/4/28 09:56 217 | * @since 1.0.0 218 | */ 219 | public synchronized Long nextId() { 220 | long timestamp = timeGen(); 221 | 222 | // 如果当前时间小于上一次ID生成的时间戳,说明系统时钟回退过这个时候应当抛出异常 223 | if (timestamp < lastTimestamp) { 224 | throw new RuntimeException(String.format( 225 | "Clock moved backwards. Refusing to generate id for %d milliseconds", 226 | lastTimestamp - timestamp)); 227 | } 228 | 229 | // 如果是同一时间生成的,则进行毫秒内序列 230 | if (lastTimestamp == timestamp) { 231 | sequence = (sequence + 1) & sequenceMask; 232 | // 毫秒内序列溢出 233 | if (sequence == 0) { 234 | // 阻塞到下一个毫秒,获得新的时间戳 235 | timestamp = tilNextMillis(lastTimestamp); 236 | } 237 | } 238 | // 时间戳改变,毫秒内序列重置 239 | else { 240 | sequence = 0L; 241 | } 242 | 243 | // 上次生成ID的时间截 244 | lastTimestamp = timestamp; 245 | 246 | // 移位并通过或运算拼到一起组成64位的ID 247 | Long id = ((timestamp - twepoch) << timestampLeftShift) 248 | | (WORKER_ID << workerIdShift) 249 | | (PROCESS_ID << processIdShift) 250 | | sequence; 251 | if (id < 0) { 252 | throw new RuntimeException( 253 | String.format("Id generate error for %d milliseconds", lastTimestamp - timestamp)); 254 | } 255 | return id; 256 | 257 | } 258 | 259 | /** 260 | * 阻塞到下一个毫秒,直到获得新的时间戳 261 | * 262 | * @param lastTimestamp 上次的时间戳 263 | * @return long 264 | * @author yugo 265 | * 2018/4/28 09:57 266 | * @since 1.0.0 267 | */ 268 | protected long tilNextMillis(long lastTimestamp) { 269 | long timestamp = timeGen(); 270 | while (timestamp <= lastTimestamp) { 271 | timestamp = timeGen(); 272 | } 273 | return timestamp; 274 | } 275 | 276 | /** 277 | * 返回以毫秒为单位的当前时间 278 | * 279 | * @return long 280 | * @author yugo 281 | * 2018/4/28 09:57 282 | * @since 1.0.0 283 | */ 284 | protected long timeGen() { 285 | return System.currentTimeMillis(); 286 | } 287 | } 288 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/utils/JsonUtils.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.utils; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.alibaba.fastjson.JSONArray; 5 | import com.alibaba.fastjson.JSONObject; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * JSON工具类 11 | * 12 | * @author yugo 13 | * 2018/12/5 14 | */ 15 | public class JsonUtils { 16 | 17 | /** 18 | * json字符串转换为bean对象 19 | * 20 | * @param json json串 21 | * @param clazz class 22 | * @param 泛型 23 | * @author yugo 24 | * 2018/12/5 25 | */ 26 | public static T jsonToBean(String json, Class clazz) { 27 | try { 28 | return JSONObject.parseObject(json, clazz); 29 | } catch (Exception e) { 30 | e.printStackTrace(); 31 | } 32 | return null; 33 | } 34 | 35 | /** 36 | * bean 对象序列化json字符串 37 | * 38 | * @param clazz 对象 39 | * @return java.lang.String 40 | * @author yugo 41 | * 2018/12/5 42 | */ 43 | public static String beanToJson(T clazz) { 44 | return JSONObject.toJSONString(clazz); 45 | } 46 | 47 | /** 48 | * arrayList 对象序列化json字符串 49 | * 50 | * @param list 对象 51 | * @return java.lang.String 52 | * @author yugo 53 | * 2018/12/5 54 | */ 55 | public static String listToJson(List list) { 56 | return JSON.toJSONString(list); 57 | } 58 | 59 | /** 60 | * json字符串反序列化list 61 | * 62 | * @param json 字符串 63 | * @param clazz 对象 64 | * @return java.lang.String 65 | * @author yugo 66 | * 2018/12/5 67 | */ 68 | public static List jsonToList(String json, Class clazz) { 69 | @SuppressWarnings("unchecked") 70 | List list = (List) JSONArray.parseArray(json, clazz); 71 | return list; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/utils/RedisUtils.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.utils; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.data.redis.core.*; 5 | import org.springframework.stereotype.Service; 6 | 7 | import java.util.List; 8 | import java.util.Set; 9 | import java.util.concurrent.TimeUnit; 10 | 11 | /** 12 | * redis 13 | */ 14 | @Service 15 | public class RedisUtils { 16 | 17 | @Autowired 18 | private RedisTemplate redisTemplate; 19 | 20 | /** 21 | * 写入缓存 22 | * 23 | * @param key 24 | * @param value 25 | * @return 26 | */ 27 | public boolean set(final String key, Object value) { 28 | boolean result = false; 29 | try { 30 | ValueOperations operations = redisTemplate.opsForValue(); 31 | operations.set(key, value); 32 | result = true; 33 | } catch (Exception e) { 34 | e.printStackTrace(); 35 | } 36 | return result; 37 | } 38 | 39 | /** 40 | * 写入缓存设置时效时间 41 | * 42 | * @param key 43 | * @param value 44 | * @return 45 | */ 46 | public boolean set(final String key, Object value, Integer expireTime) { 47 | boolean result = false; 48 | try { 49 | ValueOperations operations = redisTemplate.opsForValue(); 50 | operations.set(key, value); 51 | redisTemplate.expire(key, expireTime, TimeUnit.SECONDS); 52 | result = true; 53 | } catch (Exception e) { 54 | e.printStackTrace(); 55 | } 56 | return result; 57 | } 58 | 59 | /** 60 | * 写设置时效时间 61 | * 62 | * @param key 63 | * @return 64 | */ 65 | public boolean expire(final String key, int expireTime) { 66 | boolean result = false; 67 | try { 68 | ValueOperations operations = redisTemplate.opsForValue(); 69 | redisTemplate.expire(key, expireTime, TimeUnit.SECONDS); 70 | result = true; 71 | } catch (Exception e) { 72 | e.printStackTrace(); 73 | } 74 | return result; 75 | } 76 | 77 | 78 | /** 79 | * 批量删除对应的value 80 | * 81 | * @param keys 82 | */ 83 | public void remove(final String... keys) { 84 | for (String key : keys) { 85 | remove(key); 86 | } 87 | } 88 | 89 | /** 90 | * 批量删除key 91 | * 92 | * @param pattern 93 | */ 94 | public void removePattern(final String pattern) { 95 | Set keys = redisTemplate.keys(pattern); 96 | if (keys.size() > 0){ 97 | redisTemplate.delete(keys); 98 | } 99 | } 100 | 101 | /** 102 | * 删除对应的value 103 | * 104 | * @param key 105 | */ 106 | public void remove(final String key) { 107 | if (exists(key)) { 108 | redisTemplate.delete(key); 109 | } 110 | } 111 | 112 | /** 113 | * 判断缓存中是否有对应的value 114 | * 115 | * @param key 116 | * @return 117 | */ 118 | public boolean exists(final String key) { 119 | return redisTemplate.hasKey(key); 120 | } 121 | 122 | /** 123 | * 读取缓存 124 | * 125 | * @param key 126 | * @return 127 | */ 128 | public Object get(final String key) { 129 | Object result = null; 130 | ValueOperations operations = redisTemplate.opsForValue(); 131 | result = operations.get(key); 132 | return result; 133 | } 134 | 135 | /** 136 | * 哈希 添加 137 | * 138 | * @param key 139 | * @param hashKey 140 | * @param value 141 | */ 142 | public void hmSet(String key, Object hashKey, Object value) { 143 | HashOperations hash = redisTemplate.opsForHash(); 144 | hash.put(key, hashKey, value); 145 | } 146 | 147 | /** 148 | * 哈希获取数据 149 | * 150 | * @param key 151 | * @param hashKey 152 | * @return 153 | */ 154 | public Object hmGet(String key, Object hashKey) { 155 | HashOperations hash = redisTemplate.opsForHash(); 156 | return hash.get(key, hashKey); 157 | } 158 | 159 | /** 160 | * 列表添加 161 | * 162 | * @param k 163 | * @param v 164 | */ 165 | public void lPush(String k, Object v) { 166 | ListOperations list = redisTemplate.opsForList(); 167 | list.rightPush(k, v); 168 | } 169 | 170 | /** 171 | * 列表获取 172 | * 173 | * @param k 174 | * @param l 175 | * @param l1 176 | * @return 177 | */ 178 | public List lRange(String k, long l, long l1) { 179 | ListOperations list = redisTemplate.opsForList(); 180 | return list.range(k, l, l1); 181 | } 182 | 183 | /** 184 | * 集合添加 185 | * 186 | * @param key 187 | * @param value 188 | */ 189 | public void add(String key, Object value) { 190 | SetOperations set = redisTemplate.opsForSet(); 191 | set.add(key, value); 192 | } 193 | 194 | /** 195 | * 集合获取 196 | * 197 | * @param key 198 | * @return 199 | */ 200 | public Set setMembers(String key) { 201 | SetOperations set = redisTemplate.opsForSet(); 202 | return set.members(key); 203 | } 204 | 205 | /** 206 | * 有序集合添加 207 | * 208 | * @param key 209 | * @param value 210 | * @param scoure 211 | */ 212 | public void zAdd(String key, Object value, double scoure) { 213 | ZSetOperations zset = redisTemplate.opsForZSet(); 214 | zset.add(key, value, scoure); 215 | } 216 | 217 | /** 218 | * 有序集合获取 219 | * 220 | * @param key 221 | * @param scoure 222 | * @param scoure1 223 | * @return 224 | */ 225 | public Set rangeByScore(String key, double scoure, double scoure1) { 226 | ZSetOperations zset = redisTemplate.opsForZSet(); 227 | return zset.rangeByScore(key, scoure, scoure1); 228 | } 229 | } -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/websocket/ApplicationContextRegister.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.websocket; 2 | 3 | import org.springframework.beans.BeansException; 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.ApplicationContextAware; 6 | import org.springframework.context.annotation.Lazy; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * 注入Service工具类 11 | * @author yugo 12 | */ 13 | 14 | @Component 15 | @Lazy(false) 16 | public class ApplicationContextRegister implements ApplicationContextAware { 17 | 18 | private static ApplicationContext APPLICATION_CONTEXT; 19 | 20 | @Override 21 | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { 22 | APPLICATION_CONTEXT = applicationContext; 23 | } 24 | 25 | public static ApplicationContext getApplicationContext(){ 26 | return APPLICATION_CONTEXT; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/websocket/WebSocketServer.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.websocket; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.springframework.stereotype.Component; 5 | 6 | import javax.websocket.*; 7 | import javax.websocket.server.ServerEndpoint; 8 | import java.io.IOException; 9 | import java.util.concurrent.CopyOnWriteArraySet; 10 | 11 | /** 12 | * @author yugo 13 | */ 14 | @ServerEndpoint(value = "/websocket") 15 | @Component 16 | @Slf4j 17 | public class WebSocketServer { 18 | 19 | /** 20 | * concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。 21 | */ 22 | private static CopyOnWriteArraySet webSocketSet = new CopyOnWriteArraySet<>(); 23 | /** 24 | * 与某个客户端的连接会话,需要通过它来给客户端发送数据 25 | */ 26 | private Session session; 27 | 28 | 29 | /** 30 | * 连接建立成功调用的方法 31 | */ 32 | @OnOpen 33 | public void onOpen(Session session) { 34 | try { 35 | this.session = session; 36 | //加入set中 37 | webSocketSet.add(this); 38 | log.info("打开会话监听数据"); 39 | } catch (Exception e) { 40 | log.error("websocket IO异常"); 41 | } 42 | } 43 | 44 | /** 45 | * 连接关闭调用的方法 46 | */ 47 | @OnClose 48 | public void onClose() { 49 | //从set中删除 50 | webSocketSet.remove(this); 51 | log.info("websocket 会话关闭!"); 52 | } 53 | 54 | /** 55 | * 收到客户端消息后调用的方法 56 | * 57 | * @param message 客户端发送过来的消息 58 | */ 59 | @OnMessage 60 | public void onMessage(String message, Session session) { 61 | log.info("收到来自窗口的信息:" + message); 62 | //群发消息 63 | for (WebSocketServer item : webSocketSet) { 64 | try { 65 | item.sendMessage(message); 66 | } catch (IOException e) { 67 | e.printStackTrace(); 68 | } 69 | } 70 | } 71 | 72 | /** 73 | * @param session 会话 74 | * @param error 错误 75 | */ 76 | @OnError 77 | public void onError(Session session, Throwable error) { 78 | log.error("发生错误"); 79 | error.printStackTrace(); 80 | } 81 | 82 | /** 83 | * 实现服务器主动推送 84 | */ 85 | public void sendMessage(String message) throws IOException { 86 | this.session.getBasicRemote().sendText(message); 87 | } 88 | 89 | /** 90 | * 实现服务器主动推送对象数据 91 | */ 92 | public void sendObject(Object message) throws IOException { 93 | try { 94 | this.session.getBasicRemote().sendObject(message); 95 | } catch (EncodeException e) { 96 | e.printStackTrace(); 97 | } 98 | } 99 | 100 | /** 101 | * 批量通讯数据 102 | */ 103 | public static void sendData(Object message) throws IOException { 104 | log.info("推送消息到窗口推送内容:" + message); 105 | for (WebSocketServer item : webSocketSet) { 106 | try { 107 | item.sendObject(message); 108 | } catch (IOException e) { 109 | continue; 110 | } 111 | } 112 | } 113 | 114 | /** 115 | * 群发自定义消息 116 | */ 117 | public static void sendInfo(String message) throws IOException { 118 | log.info("推送消息到窗口推送内容:" + message); 119 | for (WebSocketServer item : webSocketSet) { 120 | try { 121 | item.sendMessage(message); 122 | } catch (IOException e) { 123 | continue; 124 | } 125 | } 126 | } 127 | 128 | } -------------------------------------------------------------------------------- /src/main/java/com/rookie/opcua/websocket/encoder/EncoderClassDTO.java: -------------------------------------------------------------------------------- 1 | package com.rookie.opcua.websocket.encoder; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | 5 | import javax.websocket.EncodeException; 6 | import javax.websocket.Encoder; 7 | import javax.websocket.EndpointConfig; 8 | import java.io.IOException; 9 | import java.util.List; 10 | 11 | /** 12 | * @author yugo 13 | */ 14 | public class EncoderClassDTO implements Encoder.Text> { 15 | 16 | @Override 17 | public void init(EndpointConfig config) { 18 | // TODO Auto-generated method stub 19 | 20 | } 21 | 22 | @Override 23 | public void destroy() { 24 | // TODO Auto-generated method stub 25 | 26 | } 27 | 28 | @Override 29 | public String encode(List list) throws EncodeException { 30 | ObjectMapper mapMapper = new ObjectMapper(); 31 | try { 32 | String json = ""; 33 | json = mapMapper.writeValueAsString(list); 34 | return json; 35 | } catch (IOException e) { 36 | // TODO Auto-generated catch block 37 | e.printStackTrace(); 38 | return "false"; 39 | } 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 20000 3 | 4 | spring: 5 | application: 6 | name: opcua 7 | datasource: 8 | name: test 9 | url: jdbc:mysql://localhost:3306/opc_ua_config?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=utf-8&autoReconnect=true 10 | username: root 11 | password: 123456 12 | type: com.alibaba.druid.pool.DruidDataSource 13 | driver-class-name: com.mysql.cj.jdbc.Driver 14 | 15 | redis: 16 | host: 127.0.0.1 17 | port: 6379 18 | timeout: 20000 19 | password: 20 | jedis: 21 | pool: 22 | max-active: 20 23 | max-idle: 20 24 | min-idle: 10 25 | max-wait: -1ms 26 | cache: 27 | redis: 28 | use-key-prefix: true 29 | key-prefix: dev 30 | cache-null-values: false 31 | time-to-live: 20s 32 | 33 | thymeleaf: 34 | prefix: classpath:/templates/ 35 | suffix: .html 36 | 37 | opcua: 38 | # endpoint-url: opc.tcp://localhost:4840 39 | endpoint-url: opc.tcp://localhost:53530/OPCUA/SimulationServer 40 | 41 | mybatis-plus: 42 | mapper-locations: classpath:/mapper/*Mapper.xml 43 | global-config: 44 | banner: false 45 | db-config: 46 | id-type: auto 47 | configuration: 48 | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl -------------------------------------------------------------------------------- /src/main/resources/db/node_structure.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat Premium Data Transfer 3 | 4 | Source Server : 本机 5 | Source Server Type : MySQL 6 | Source Server Version : 50725 7 | Source Host : localhost:3306 8 | Source Schema : opc_ua_config 9 | 10 | Target Server Type : MySQL 11 | Target Server Version : 50725 12 | File Encoding : 65001 13 | 14 | Date: 04/07/2019 21:09:24 15 | */ 16 | 17 | SET NAMES utf8mb4; 18 | SET FOREIGN_KEY_CHECKS = 0; 19 | 20 | -- ---------------------------- 21 | -- Table structure for node_structure 22 | -- ---------------------------- 23 | DROP TABLE IF EXISTS `node_structure`; 24 | CREATE TABLE `node_structure` ( 25 | `id` bigint(32) NULL DEFAULT NULL COMMENT 'id', 26 | `namespace_index` int(11) NULL DEFAULT NULL COMMENT '命名空间下标', 27 | `identifier` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标识符', 28 | `node_class` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '节点类型', 29 | `browse_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '浏览名称', 30 | `display_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '显示名称', 31 | `parent_identifier` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '父级标识符', 32 | `level` int(4) NULL DEFAULT NULL COMMENT '层级' 33 | ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; 34 | 35 | -- ---------------------------- 36 | -- Records of node_structure 37 | -- ---------------------------- 38 | INSERT INTO `node_structure` VALUES (647525707241984, 0, '2253', 'Object', 'Server', 'Server', '85', 0); 39 | INSERT INTO `node_structure` VALUES (647525708741120, 0, '2994', 'Variable', 'Auditing', 'Auditing', '2253', 1); 40 | INSERT INTO `node_structure` VALUES (647525710248448, 0, '2255', 'Variable', 'NamespaceArray', 'NamespaceArray', '2253', 1); 41 | INSERT INTO `node_structure` VALUES (647525711747584, 0, '2254', 'Variable', 'ServerArray', 'ServerArray', '2253', 1); 42 | INSERT INTO `node_structure` VALUES (647525713254912, 0, '2267', 'Variable', 'ServiceLevel', 'ServiceLevel', '2253', 1); 43 | INSERT INTO `node_structure` VALUES (647525714770432, 0, '11492', 'Method', 'GetMonitoredItems', 'GetMonitoredItems', '2253', 1); 44 | INSERT INTO `node_structure` VALUES (647525716261376, 0, '11494', 'Variable', 'OutputArguments', 'OutputArguments', '11492', 2); 45 | INSERT INTO `node_structure` VALUES (647525717768704, 0, '11493', 'Variable', 'InputArguments', 'InputArguments', '11492', 2); 46 | INSERT INTO `node_structure` VALUES (647525719276032, 0, '2256', 'Variable', 'ServerStatus', 'ServerStatus', '2253', 1); 47 | INSERT INTO `node_structure` VALUES (647525720783360, 0, '2260', 'Variable', 'BuildInfo', 'BuildInfo', '2256', 2); 48 | INSERT INTO `node_structure` VALUES (647525722298880, 0, '2266', 'Variable', 'BuildDate', 'BuildDate', '2260', 3); 49 | INSERT INTO `node_structure` VALUES (647525723814400, 0, '2265', 'Variable', 'BuildNumber', 'BuildNumber', '2260', 3); 50 | INSERT INTO `node_structure` VALUES (647525725305344, 0, '2264', 'Variable', 'SoftwareVersion', 'SoftwareVersion', '2260', 3); 51 | INSERT INTO `node_structure` VALUES (647525726796288, 0, '2263', 'Variable', 'ManufacturerName', 'ManufacturerName', '2260', 3); 52 | INSERT INTO `node_structure` VALUES (647525728287232, 0, '2262', 'Variable', 'ProductUri', 'ProductUri', '2260', 3); 53 | INSERT INTO `node_structure` VALUES (647525729802752, 0, '2261', 'Variable', 'ProductName', 'ProductName', '2260', 3); 54 | INSERT INTO `node_structure` VALUES (647525731301888, 0, '2993', 'Variable', 'ShutdownReason', 'ShutdownReason', '2256', 2); 55 | INSERT INTO `node_structure` VALUES (647525732817408, 0, '2259', 'Variable', 'State', 'State', '2256', 2); 56 | INSERT INTO `node_structure` VALUES (647525734341120, 0, '2258', 'Variable', 'CurrentTime', 'CurrentTime', '2256', 2); 57 | INSERT INTO `node_structure` VALUES (647525735856640, 0, '2257', 'Variable', 'StartTime', 'StartTime', '2256', 2); 58 | INSERT INTO `node_structure` VALUES (647525737372160, 0, '2992', 'Variable', 'SecondsTillShutdown', 'SecondsTillShutdown', '2256', 2); 59 | INSERT INTO `node_structure` VALUES (647525738887680, 0, '2274', 'Object', 'ServerDiagnostics', 'ServerDiagnostics', '2253', 1); 60 | INSERT INTO `node_structure` VALUES (647525740395008, 0, '2275', 'Variable', 'ServerDiagnosticsSummary', 'ServerDiagnosticsSummary', '2274', 2); 61 | INSERT INTO `node_structure` VALUES (647525741926912, 0, '2287', 'Variable', 'SecurityRejectedRequestsCount', 'SecurityRejectedRequestsCount', '2275', 3); 62 | INSERT INTO `node_structure` VALUES (647525743434240, 0, '2286', 'Variable', 'CumulatedSubscriptionCount', 'CumulatedSubscriptionCount', '2275', 3); 63 | INSERT INTO `node_structure` VALUES (647525744941568, 0, '2285', 'Variable', 'CurrentSubscriptionCount', 'CurrentSubscriptionCount', '2275', 3); 64 | INSERT INTO `node_structure` VALUES (647525746457088, 0, '2284', 'Variable', 'PublishingIntervalCount', 'PublishingIntervalCount', '2275', 3); 65 | INSERT INTO `node_structure` VALUES (647525747964416, 0, '2282', 'Variable', 'SessionAbortCount', 'SessionAbortCount', '2275', 3); 66 | INSERT INTO `node_structure` VALUES (647525749471744, 0, '2281', 'Variable', 'SessionTimeoutCount', 'SessionTimeoutCount', '2275', 3); 67 | INSERT INTO `node_structure` VALUES (647525751011840, 0, '3705', 'Variable', 'RejectedSessionCount', 'RejectedSessionCount', '2275', 3); 68 | INSERT INTO `node_structure` VALUES (647525752527360, 0, '2288', 'Variable', 'RejectedRequestsCount', 'RejectedRequestsCount', '2275', 3); 69 | INSERT INTO `node_structure` VALUES (647525754051072, 0, '2276', 'Variable', 'ServerViewCount', 'ServerViewCount', '2275', 3); 70 | INSERT INTO `node_structure` VALUES (647525755566592, 0, '2277', 'Variable', 'CurrentSessionCount', 'CurrentSessionCount', '2275', 3); 71 | INSERT INTO `node_structure` VALUES (647525757073920, 0, '2278', 'Variable', 'CumulatedSessionCount', 'CumulatedSessionCount', '2275', 3); 72 | INSERT INTO `node_structure` VALUES (647525758614016, 0, '2279', 'Variable', 'SecurityRejectedSessionCount', 'SecurityRejectedSessionCount', '2275', 3); 73 | INSERT INTO `node_structure` VALUES (647525760145920, 0, '2294', 'Variable', 'EnabledFlag', 'EnabledFlag', '2274', 2); 74 | INSERT INTO `node_structure` VALUES (647525761661440, 0, '2295', 'Object', 'VendorServerInfo', 'VendorServerInfo', '2253', 1); 75 | INSERT INTO `node_structure` VALUES (647525763193344, 0, '2296', 'Object', 'ServerRedundancy', 'ServerRedundancy', '2253', 1); 76 | INSERT INTO `node_structure` VALUES (647525764700672, 0, '3709', 'Variable', 'RedundancySupport', 'RedundancySupport', '2296', 2); 77 | INSERT INTO `node_structure` VALUES (647525766224384, 0, '2268', 'Object', 'ServerCapabilities', 'ServerCapabilities', '2253', 1); 78 | INSERT INTO `node_structure` VALUES (647525767739904, 0, '2269', 'Variable', 'ServerProfileArray', 'ServerProfileArray', '2268', 2); 79 | INSERT INTO `node_structure` VALUES (647525769247232, 0, '3704', 'Variable', 'SoftwareCertificates', 'SoftwareCertificates', '2268', 2); 80 | INSERT INTO `node_structure` VALUES (647525770770944, 0, '2272', 'Variable', 'MinSupportedSampleRate', 'MinSupportedSampleRate', '2268', 2); 81 | INSERT INTO `node_structure` VALUES (647525772286464, 0, '2271', 'Variable', 'LocaleIdArray', 'LocaleIdArray', '2268', 2); 82 | INSERT INTO `node_structure` VALUES (647525773859328, 0, '2736', 'Variable', 'MaxQueryContinuationPoints', 'MaxQueryContinuationPoints', '2268', 2); 83 | INSERT INTO `node_structure` VALUES (647525775391232, 0, '2737', 'Variable', 'MaxHistoryContinuationPoints', 'MaxHistoryContinuationPoints', '2268', 2); 84 | INSERT INTO `node_structure` VALUES (647525776923136, 0, '2735', 'Variable', 'MaxBrowseContinuationPoints', 'MaxBrowseContinuationPoints', '2268', 2); 85 | INSERT INTO `node_structure` VALUES (647525778422272, 0, '11192', 'Object', 'HistoryServerCapabilities', 'HistoryServerCapabilities', '2268', 2); 86 | INSERT INTO `node_structure` VALUES (647525779913216, 0, '11201', 'Object', 'AggregateFunctions', 'AggregateFunctions', '11192', 3); 87 | INSERT INTO `node_structure` VALUES (647525781387776, 0, '11199', 'Variable', 'DeleteRawCapability', 'DeleteRawCapability', '11192', 3); 88 | INSERT INTO `node_structure` VALUES (647525782911488, 0, '11273', 'Variable', 'MaxReturnDataValues', 'MaxReturnDataValues', '11192', 3); 89 | INSERT INTO `node_structure` VALUES (647525784459776, 0, '11275', 'Variable', 'InsertAnnotationCapability', 'InsertAnnotationCapability', '11192', 3); 90 | INSERT INTO `node_structure` VALUES (647525785975296, 0, '11274', 'Variable', 'MaxReturnEventValues', 'MaxReturnEventValues', '11192', 3); 91 | INSERT INTO `node_structure` VALUES (647525787466240, 0, '11242', 'Variable', 'AccessHistoryEventsCapability', 'AccessHistoryEventsCapability', '11192', 3); 92 | INSERT INTO `node_structure` VALUES (647525788948992, 0, '11200', 'Variable', 'DeleteAtTimeCapability', 'DeleteAtTimeCapability', '11192', 3); 93 | INSERT INTO `node_structure` VALUES (647525790456320, 0, '11193', 'Variable', 'AccessHistoryDataCapability', 'AccessHistoryDataCapability', '11192', 3); 94 | INSERT INTO `node_structure` VALUES (647525791971840, 0, '11196', 'Variable', 'InsertDataCapability', 'InsertDataCapability', '11192', 3); 95 | INSERT INTO `node_structure` VALUES (647525793479168, 0, '11197', 'Variable', 'ReplaceDataCapability', 'ReplaceDataCapability', '11192', 3); 96 | INSERT INTO `node_structure` VALUES (647525794970112, 0, '11198', 'Variable', 'UpdateDataCapability', 'UpdateDataCapability', '11192', 3); 97 | INSERT INTO `node_structure` VALUES (647525796510208, 0, '11281', 'Variable', 'InsertEventCapability', 'InsertEventCapability', '11192', 3); 98 | INSERT INTO `node_structure` VALUES (647525798033920, 0, '11282', 'Variable', 'ReplaceEventCapability', 'ReplaceEventCapability', '11192', 3); 99 | INSERT INTO `node_structure` VALUES (647525799557632, 0, '11283', 'Variable', 'UpdateEventCapability', 'UpdateEventCapability', '11192', 3); 100 | INSERT INTO `node_structure` VALUES (647525801097728, 0, '11502', 'Variable', 'DeleteEventCapability', 'DeleteEventCapability', '11192', 3); 101 | INSERT INTO `node_structure` VALUES (647525802613248, 0, '2997', 'Object', 'AggregateFunctions', 'AggregateFunctions', '2268', 2); 102 | INSERT INTO `node_structure` VALUES (647525804136960, 0, '2996', 'Object', 'ModellingRules', 'ModellingRules', '2268', 2); 103 | INSERT INTO `node_structure` VALUES (647525805644288, 0, '11704', 'Object', 'OperationLimits', 'OperationLimits', '2268', 2); 104 | INSERT INTO `node_structure` VALUES (647525807127040, 0, '11707', 'Variable', 'MaxNodesPerWrite', 'MaxNodesPerWrite', '11704', 3); 105 | INSERT INTO `node_structure` VALUES (647525808650752, 0, '11705', 'Variable', 'MaxNodesPerRead', 'MaxNodesPerRead', '11704', 3); 106 | INSERT INTO `node_structure` VALUES (647525810174464, 0, '11714', 'Variable', 'MaxMonitoredItemsPerCall', 'MaxMonitoredItemsPerCall', '11704', 3); 107 | INSERT INTO `node_structure` VALUES (647525811673600, 0, '11711', 'Variable', 'MaxNodesPerRegisterNodes', 'MaxNodesPerRegisterNodes', '11704', 3); 108 | INSERT INTO `node_structure` VALUES (647525813164544, 0, '11710', 'Variable', 'MaxNodesPerBrowse', 'MaxNodesPerBrowse', '11704', 3); 109 | INSERT INTO `node_structure` VALUES (647525814688256, 0, '11713', 'Variable', 'MaxNodesPerNodeManagement', 'MaxNodesPerNodeManagement', '11704', 3); 110 | INSERT INTO `node_structure` VALUES (647525816179200, 0, '11712', 'Variable', 'MaxNodesPerTranslateBrowsePathsToNodeIds', 'MaxNodesPerTranslateBrowsePathsToNodeIds', '11704', 3); 111 | INSERT INTO `node_structure` VALUES (647525817711104, 0, '11709', 'Variable', 'MaxNodesPerMethodCall', 'MaxNodesPerMethodCall', '11704', 3); 112 | INSERT INTO `node_structure` VALUES (647525819218432, 0, '897114342', 'Object', '环境系统', '环境系统', '85', 0); 113 | INSERT INTO `node_structure` VALUES (647525820758528, 0, '484144888', 'Object', '温湿度表', '温湿度表', '897114342', 1); 114 | INSERT INTO `node_structure` VALUES (647525822265856, 0, '2883452795', 'Object', '温度', '温度', '484144888', 2); 115 | INSERT INTO `node_structure` VALUES (647525823789568, 0, '591488125', 'Variable', 'variableName', '变量名', '2883452795', 3); 116 | INSERT INTO `node_structure` VALUES (647525825329664, 0, '213416730', 'Variable', 'variableProject', '变量项目', '2883452795', 3); 117 | INSERT INTO `node_structure` VALUES (647525826845184, 0, '1462232146', 'Variable', 'variableUnits', '单位', '2883452795', 3); 118 | INSERT INTO `node_structure` VALUES (647525828360704, 0, '979404516', 'Variable', 'variableValue', '变量值', '2883452795', 3); 119 | INSERT INTO `node_structure` VALUES (647525829884416, 0, '272246334', 'Variable', 'variableRange', '值范围', '2883452795', 3); 120 | INSERT INTO `node_structure` VALUES (647525831375360, 0, '3081006881', 'Variable', 'variableAlarmValue', '报警值', '2883452795', 3); 121 | INSERT INTO `node_structure` VALUES (647525832907264, 0, '1555944286', 'Object', 'humidity', '湿度', '484144888', 2); 122 | INSERT INTO `node_structure` VALUES (647525834414592, 0, '925700205', 'Variable', 'variableName', '变量名', '1555944286', 3); 123 | INSERT INTO `node_structure` VALUES (647525835930112, 0, '1627296802', 'Variable', 'variableProject', '变量项目', '1555944286', 3); 124 | INSERT INTO `node_structure` VALUES (647525837437440, 0, '18620392', 'Variable', 'variableUnits', '单位', '1555944286', 3); 125 | INSERT INTO `node_structure` VALUES (647525838944768, 0, '2878924764', 'Variable', 'variableValue', '变量值', '1555944286', 3); 126 | INSERT INTO `node_structure` VALUES (647525840435712, 0, '1348817979', 'Variable', 'variableRange', '值范围', '1555944286', 3); 127 | INSERT INTO `node_structure` VALUES (647525841967616, 0, '130402861', 'Variable', 'variableAlarmValue', '报警值', '1555944286', 3); 128 | INSERT INTO `node_structure` VALUES (647525843466752, 0, '3834935439', 'Object', '照度表', '照度表', '897114342', 1); 129 | INSERT INTO `node_structure` VALUES (647525844949504, 0, '3585921658', 'Object', 'lumeter', '照度', '3834935439', 2); 130 | INSERT INTO `node_structure` VALUES (647525846448640, 0, '314238834', 'Variable', 'variableName', '变量名', '3585921658', 3); 131 | INSERT INTO `node_structure` VALUES (647525847964160, 0, '677490017', 'Variable', 'variableProject', '变量项目', '3585921658', 3); 132 | INSERT INTO `node_structure` VALUES (647525849487872, 0, '1206657287', 'Variable', 'variableUnits', '单位', '3585921658', 3); 133 | INSERT INTO `node_structure` VALUES (647525851011584, 0, '1623972815', 'Variable', 'variableValue', '变量值', '3585921658', 3); 134 | INSERT INTO `node_structure` VALUES (647525852518912, 0, '325914357', 'Variable', 'variableRange', '值范围', '3585921658', 3); 135 | INSERT INTO `node_structure` VALUES (647525854009856, 0, '2263903264', 'Variable', 'variableAlarmValue', '报警值', '3585921658', 3); 136 | INSERT INTO `node_structure` VALUES (647525855508992, 0, '3175896600', 'Object', '配电系统', '配电系统', '85', 0); 137 | INSERT INTO `node_structure` VALUES (647525857016320, 0, '3463446314', 'Object', '变压器', '变压器', '3175896600', 1); 138 | INSERT INTO `node_structure` VALUES (647525858540032, 0, '346900727', 'Object', 'powerSystemTemperatureA', '温度A', '3463446314', 2); 139 | INSERT INTO `node_structure` VALUES (647525860071936, 0, '2640144146', 'Variable', 'variableName', '变量名', '346900727', 3); 140 | INSERT INTO `node_structure` VALUES (647525861595648, 0, '2996203386', 'Variable', 'variableProject', '变量项目', '346900727', 3); 141 | INSERT INTO `node_structure` VALUES (647525863111168, 0, '3452054061', 'Variable', 'variableUnits', '单位', '346900727', 3); 142 | INSERT INTO `node_structure` VALUES (647525864618496, 0, '4281334874', 'Variable', 'variableValue', '变量值', '346900727', 3); 143 | INSERT INTO `node_structure` VALUES (647525866125824, 0, '3980604951', 'Variable', 'variableRange', '值范围', '346900727', 3); 144 | INSERT INTO `node_structure` VALUES (647525867633152, 0, '1849785785', 'Variable', 'variableAlarmValue', '报警值', '346900727', 3); 145 | INSERT INTO `node_structure` VALUES (647525869140480, 0, '4208633117', 'Object', 'powerSystemTemperatureB', '温度B', '3463446314', 2); 146 | INSERT INTO `node_structure` VALUES (647525870664192, 0, '1100005504', 'Variable', 'variableName', '变量名', '4208633117', 3); 147 | INSERT INTO `node_structure` VALUES (647525872196096, 0, '2705238041', 'Variable', 'variableProject', '变量项目', '4208633117', 3); 148 | INSERT INTO `node_structure` VALUES (647525873711616, 0, '3032931406', 'Variable', 'variableUnits', '单位', '4208633117', 3); 149 | INSERT INTO `node_structure` VALUES (647525875227136, 0, '29256886', 'Variable', 'variableValue', '变量值', '4208633117', 3); 150 | INSERT INTO `node_structure` VALUES (647525876783616, 0, '2247211527', 'Variable', 'variableRange', '值范围', '4208633117', 3); 151 | INSERT INTO `node_structure` VALUES (647525878282752, 0, '823733588', 'Variable', 'variableAlarmValue', '报警值', '4208633117', 3); 152 | INSERT INTO `node_structure` VALUES (647525879790080, 0, '2182742113', 'Object', 'powerSystemTemperatureC', '温度C', '3463446314', 2); 153 | INSERT INTO `node_structure` VALUES (647525881297408, 0, '2286200349', 'Variable', 'variableName', '变量名', '2182742113', 3); 154 | INSERT INTO `node_structure` VALUES (647525882829312, 0, '672544366', 'Variable', 'variableProject', '变量项目', '2182742113', 3); 155 | INSERT INTO `node_structure` VALUES (647525884361216, 0, '840321020', 'Variable', 'variableUnits', '单位', '2182742113', 3); 156 | INSERT INTO `node_structure` VALUES (647525885893120, 0, '806345944', 'Variable', 'variableValue', '变量值', '2182742113', 3); 157 | INSERT INTO `node_structure` VALUES (647525887425024, 0, '2774158286', 'Variable', 'variableRange', '值范围', '2182742113', 3); 158 | INSERT INTO `node_structure` VALUES (647525888948736, 0, '3957934995', 'Variable', 'variableAlarmValue', '报警值', '2182742113', 3); 159 | INSERT INTO `node_structure` VALUES (647525890447872, 0, '3059388732', 'Object', 'powerSystemElectricCurrentA', '电流A', '3463446314', 2); 160 | INSERT INTO `node_structure` VALUES (647525891955200, 0, '2952998369', 'Variable', 'variableName', '变量名', '3059388732', 3); 161 | INSERT INTO `node_structure` VALUES (647525893487104, 0, '647935251', 'Variable', 'variableProject', '变量项目', '3059388732', 3); 162 | INSERT INTO `node_structure` VALUES (647525895019008, 0, '1242234640', 'Variable', 'variableUnits', '单位', '3059388732', 3); 163 | INSERT INTO `node_structure` VALUES (647525896559104, 0, '1870415413', 'Variable', 'variableValue', '变量值', '3059388732', 3); 164 | INSERT INTO `node_structure` VALUES (647525898066432, 0, '3399456075', 'Variable', 'variableRange', '值范围', '3059388732', 3); 165 | INSERT INTO `node_structure` VALUES (647525899573760, 0, '2873771409', 'Variable', 'variableAlarmValue', '报警值', '3059388732', 3); 166 | INSERT INTO `node_structure` VALUES (647525901097472, 0, '2127053735', 'Object', 'powerSystemElectricCurrentB', '电流B', '3463446314', 2); 167 | INSERT INTO `node_structure` VALUES (647525902596608, 0, '1289439427', 'Variable', 'variableName', '变量名', '2127053735', 3); 168 | INSERT INTO `node_structure` VALUES (647525904095744, 0, '2052549994', 'Variable', 'variableProject', '变量项目', '2127053735', 3); 169 | INSERT INTO `node_structure` VALUES (647525905635840, 0, '1467186263', 'Variable', 'variableUnits', '单位', '2127053735', 3); 170 | INSERT INTO `node_structure` VALUES (647525907151360, 0, '451856594', 'Variable', 'variableValue', '变量值', '2127053735', 3); 171 | INSERT INTO `node_structure` VALUES (647525908683264, 0, '1471319463', 'Variable', 'variableRange', '值范围', '2127053735', 3); 172 | INSERT INTO `node_structure` VALUES (647525910198784, 0, '3987549228', 'Variable', 'variableAlarmValue', '报警值', '2127053735', 3); 173 | INSERT INTO `node_structure` VALUES (647525911747072, 0, '2928258482', 'Object', 'powerSystemElectricCurrentC', '电流C', '3463446314', 2); 174 | INSERT INTO `node_structure` VALUES (647525913262592, 0, '149276439', 'Variable', 'variableName', '变量名', '2928258482', 3); 175 | INSERT INTO `node_structure` VALUES (647525914761728, 0, '874273241', 'Variable', 'variableProject', '变量项目', '2928258482', 3); 176 | INSERT INTO `node_structure` VALUES (647525916269056, 0, '2774802257', 'Variable', 'variableUnits', '单位', '2928258482', 3); 177 | INSERT INTO `node_structure` VALUES (647525917776384, 0, '2813172989', 'Variable', 'variableValue', '变量值', '2928258482', 3); 178 | INSERT INTO `node_structure` VALUES (647525919283712, 0, '422766518', 'Variable', 'variableRange', '值范围', '2928258482', 3); 179 | INSERT INTO `node_structure` VALUES (647525920807424, 0, '4176251042', 'Variable', 'variableAlarmValue', '报警值', '2928258482', 3); 180 | INSERT INTO `node_structure` VALUES (647525922306560, 0, '1499255279', 'Object', 'powerSystemVoltageA', '电压A', '3463446314', 2); 181 | INSERT INTO `node_structure` VALUES (647525923813888, 0, '3849567129', 'Variable', 'variableName', '变量名', '1499255279', 3); 182 | INSERT INTO `node_structure` VALUES (647525925337600, 0, '247457921', 'Variable', 'variableProject', '变量项目', '1499255279', 3); 183 | INSERT INTO `node_structure` VALUES (647525926844928, 0, '3885734288', 'Variable', 'variableUnits', '单位', '1499255279', 3); 184 | INSERT INTO `node_structure` VALUES (647525928376832, 0, '3470892019', 'Variable', 'variableValue', '变量值', '1499255279', 3); 185 | INSERT INTO `node_structure` VALUES (647525929900544, 0, '2689581765', 'Variable', 'variableRange', '值范围', '1499255279', 3); 186 | INSERT INTO `node_structure` VALUES (647525931407872, 0, '3850255829', 'Variable', 'variableAlarmValue', '报警值', '1499255279', 3); 187 | INSERT INTO `node_structure` VALUES (647525932956160, 0, '3013042607', 'Object', 'powerSystemVoltageB', '电压B', '3463446314', 2); 188 | INSERT INTO `node_structure` VALUES (647525934471680, 0, '3500129642', 'Variable', 'variableName', '变量名', '3013042607', 3); 189 | INSERT INTO `node_structure` VALUES (647525935979008, 0, '2797027043', 'Variable', 'variableProject', '变量项目', '3013042607', 3); 190 | INSERT INTO `node_structure` VALUES (647525937510912, 0, '2450589575', 'Variable', 'variableUnits', '单位', '3013042607', 3); 191 | INSERT INTO `node_structure` VALUES (647525939018240, 0, '1305519914', 'Variable', 'variableValue', '变量值', '3013042607', 3); 192 | INSERT INTO `node_structure` VALUES (647525940509184, 0, '2620200384', 'Variable', 'variableRange', '值范围', '3013042607', 3); 193 | INSERT INTO `node_structure` VALUES (647525942008320, 0, '3661578735', 'Variable', 'variableAlarmValue', '报警值', '3013042607', 3); 194 | INSERT INTO `node_structure` VALUES (647525943548416, 0, '3366938489', 'Object', 'powerSystemVoltageC', '电压C', '3463446314', 2); 195 | INSERT INTO `node_structure` VALUES (647525945072128, 0, '2969457116', 'Variable', 'variableName', '变量名', '3366938489', 3); 196 | INSERT INTO `node_structure` VALUES (647525946579456, 0, '2431572591', 'Variable', 'variableProject', '变量项目', '3366938489', 3); 197 | INSERT INTO `node_structure` VALUES (647525948135936, 0, '3283728128', 'Variable', 'variableUnits', '单位', '3366938489', 3); 198 | INSERT INTO `node_structure` VALUES (647525949643264, 0, '1579822415', 'Variable', 'variableValue', '变量值', '3366938489', 3); 199 | INSERT INTO `node_structure` VALUES (647525951166976, 0, '1326647467', 'Variable', 'variableRange', '值范围', '3366938489', 3); 200 | INSERT INTO `node_structure` VALUES (647525952666112, 0, '4277794274', 'Variable', 'variableAlarmValue', '报警值', '3366938489', 3); 201 | INSERT INTO `node_structure` VALUES (647525954206208, 0, '3222560662', 'Object', '功率因素', '功率因素', '3463446314', 2); 202 | INSERT INTO `node_structure` VALUES (647525955713536, 0, '1251687420', 'Variable', 'variableName', '变量名', '3222560662', 3); 203 | INSERT INTO `node_structure` VALUES (647525957212672, 0, '3366342951', 'Variable', 'variableProject', '变量项目', '3222560662', 3); 204 | INSERT INTO `node_structure` VALUES (647525958720000, 0, '525233133', 'Variable', 'variableUnits', '单位', '3222560662', 3); 205 | INSERT INTO `node_structure` VALUES (647525960268288, 0, '2198736591', 'Variable', 'variableValue', '变量值', '3222560662', 3); 206 | INSERT INTO `node_structure` VALUES (647525961767424, 0, '3654735581', 'Variable', 'variableRange', '值范围', '3222560662', 3); 207 | INSERT INTO `node_structure` VALUES (647525963307520, 0, '727193548', 'Variable', 'variableAlarmValue', '报警值', '3222560662', 3); 208 | INSERT INTO `node_structure` VALUES (647525964831232, 0, '476903686', 'Object', '负载率', '负载率', '3463446314', 2); 209 | INSERT INTO `node_structure` VALUES (647525966322176, 0, '737463958', 'Variable', 'variableName', '变量名', '476903686', 3); 210 | INSERT INTO `node_structure` VALUES (647525967829504, 0, '2828193704', 'Variable', 'variableProject', '变量项目', '476903686', 3); 211 | INSERT INTO `node_structure` VALUES (647525969369600, 0, '2519380438', 'Variable', 'variableUnits', '单位', '476903686', 3); 212 | INSERT INTO `node_structure` VALUES (647525970909696, 0, '1652153147', 'Variable', 'variableValue', '变量值', '476903686', 3); 213 | INSERT INTO `node_structure` VALUES (647525972441600, 0, '1305418402', 'Variable', 'variableRange', '值范围', '476903686', 3); 214 | INSERT INTO `node_structure` VALUES (647525973932544, 0, '1274601726', 'Variable', 'variableAlarmValue', '报警值', '476903686', 3); 215 | INSERT INTO `node_structure` VALUES (647525975456256, 0, '2579055036', 'Object', '用电量', '用电量', '3463446314', 2); 216 | INSERT INTO `node_structure` VALUES (647525976971776, 0, '215146802', 'Variable', 'variableName', '变量名', '2579055036', 3); 217 | INSERT INTO `node_structure` VALUES (647525978487296, 0, '1352092152', 'Variable', 'variableProject', '变量项目', '2579055036', 3); 218 | INSERT INTO `node_structure` VALUES (647525979986432, 0, '941274738', 'Variable', 'variableUnits', '单位', '2579055036', 3); 219 | INSERT INTO `node_structure` VALUES (647525981501952, 0, '3508162750', 'Variable', 'variableValue', '变量值', '2579055036', 3); 220 | INSERT INTO `node_structure` VALUES (647525983001088, 0, '2668404085', 'Variable', 'variableRange', '值范围', '2579055036', 3); 221 | INSERT INTO `node_structure` VALUES (647525984508416, 0, '1049756695', 'Variable', 'variableAlarmValue', '报警值', '2579055036', 3); 222 | INSERT INTO `node_structure` VALUES (647525986040320, 0, '12909345', 'Object', '开关状态', '开关状态', '3463446314', 2); 223 | INSERT INTO `node_structure` VALUES (647525987547648, 0, '888405085', 'Variable', 'variableName', '变量名', '12909345', 3); 224 | INSERT INTO `node_structure` VALUES (647525989071360, 0, '1369064944', 'Variable', 'variableProject', '变量项目', '12909345', 3); 225 | INSERT INTO `node_structure` VALUES (647525990603264, 0, '1514333929', 'Variable', 'variableUnits', '单位', '12909345', 3); 226 | INSERT INTO `node_structure` VALUES (647525992102400, 0, '2807744056', 'Variable', 'variableValue', '变量值', '12909345', 3); 227 | INSERT INTO `node_structure` VALUES (647525993626112, 0, '3328687416', 'Variable', 'variableRange', '值范围', '12909345', 3); 228 | INSERT INTO `node_structure` VALUES (647525995149824, 0, '4292863577', 'Variable', 'variableAlarmValue', '报警值', '12909345', 3); 229 | INSERT INTO `node_structure` VALUES (647525996665344, 0, '2053039395', 'Object', '发电机', '发电机', '3175896600', 1); 230 | INSERT INTO `node_structure` VALUES (647525998221824, 0, '3905051457', 'Object', '电流A', '电流A', '2053039395', 2); 231 | INSERT INTO `node_structure` VALUES (647525999745536, 0, '1524217190', 'Variable', 'variableName', '变量名', '3905051457', 3); 232 | INSERT INTO `node_structure` VALUES (647526001277440, 0, '1536201524', 'Variable', 'variableProject', '变量项目', '3905051457', 3); 233 | INSERT INTO `node_structure` VALUES (647526002784768, 0, '1304143321', 'Variable', 'variableUnits', '单位', '3905051457', 3); 234 | INSERT INTO `node_structure` VALUES (647526004316672, 0, '2473257339', 'Variable', 'variableValue', '变量值', '3905051457', 3); 235 | INSERT INTO `node_structure` VALUES (647526005824000, 0, '2003015835', 'Variable', 'variableRange', '值范围', '3905051457', 3); 236 | INSERT INTO `node_structure` VALUES (647526007331328, 0, '1030269275', 'Variable', 'variableAlarmValue', '报警值', '3905051457', 3); 237 | INSERT INTO `node_structure` VALUES (647526008822272, 0, '4029141054', 'Object', '电流B', '电流B', '2053039395', 2); 238 | INSERT INTO `node_structure` VALUES (647526010329600, 0, '3448950073', 'Variable', 'variableName', '变量名', '4029141054', 3); 239 | INSERT INTO `node_structure` VALUES (647526011853312, 0, '2805682508', 'Variable', 'variableProject', '变量项目', '4029141054', 3); 240 | INSERT INTO `node_structure` VALUES (647526013385216, 0, '2549429661', 'Variable', 'variableUnits', '单位', '4029141054', 3); 241 | INSERT INTO `node_structure` VALUES (647526014884352, 0, '1490852412', 'Variable', 'variableValue', '变量值', '4029141054', 3); 242 | INSERT INTO `node_structure` VALUES (647526016391680, 0, '601968574', 'Variable', 'variableRange', '值范围', '4029141054', 3); 243 | INSERT INTO `node_structure` VALUES (647526017899008, 0, '2364678353', 'Variable', 'variableAlarmValue', '报警值', '4029141054', 3); 244 | INSERT INTO `node_structure` VALUES (647526019381760, 0, '3180751018', 'Object', '电流C', '电流C', '2053039395', 2); 245 | INSERT INTO `node_structure` VALUES (647526020880896, 0, '2797434021', 'Variable', 'variableName', '变量名', '3180751018', 3); 246 | INSERT INTO `node_structure` VALUES (647526022412800, 0, '4180731364', 'Variable', 'variableProject', '变量项目', '3180751018', 3); 247 | INSERT INTO `node_structure` VALUES (647526023911936, 0, '2141952690', 'Variable', 'variableUnits', '单位', '3180751018', 3); 248 | INSERT INTO `node_structure` VALUES (647526025419264, 0, '775213729', 'Variable', 'variableValue', '变量值', '3180751018', 3); 249 | INSERT INTO `node_structure` VALUES (647526026975744, 0, '756215726', 'Variable', 'variableRange', '值范围', '3180751018', 3); 250 | INSERT INTO `node_structure` VALUES (647526028483072, 0, '2402813472', 'Variable', 'variableAlarmValue', '报警值', '3180751018', 3); 251 | INSERT INTO `node_structure` VALUES (647526030014976, 0, '2149497653', 'Object', '电压A', '电压A', '2053039395', 2); 252 | INSERT INTO `node_structure` VALUES (647526031514112, 0, '2488411149', 'Variable', 'variableName', '变量名', '2149497653', 3); 253 | INSERT INTO `node_structure` VALUES (647526033021440, 0, '2874070021', 'Variable', 'variableProject', '变量项目', '2149497653', 3); 254 | INSERT INTO `node_structure` VALUES (647526034553344, 0, '2252122953', 'Variable', 'variableUnits', '单位', '2149497653', 3); 255 | INSERT INTO `node_structure` VALUES (647526036068864, 0, '2345648260', 'Variable', 'variableValue', '变量值', '2149497653', 3); 256 | INSERT INTO `node_structure` VALUES (647526037584384, 0, '2035634132', 'Variable', 'variableRange', '值范围', '2149497653', 3); 257 | INSERT INTO `node_structure` VALUES (647526039108096, 0, '109650964', 'Variable', 'variableAlarmValue', '报警值', '2149497653', 3); 258 | INSERT INTO `node_structure` VALUES (647526040640000, 0, '2260290401', 'Object', '电压B', '电压B', '2053039395', 2); 259 | INSERT INTO `node_structure` VALUES (647526042155520, 0, '2951748291', 'Variable', 'variableName', '变量名', '2260290401', 3); 260 | INSERT INTO `node_structure` VALUES (647526043662848, 0, '596613569', 'Variable', 'variableProject', '变量项目', '2260290401', 3); 261 | INSERT INTO `node_structure` VALUES (647526045194752, 0, '2258285011', 'Variable', 'variableUnits', '单位', '2260290401', 3); 262 | INSERT INTO `node_structure` VALUES (647526046702080, 0, '975191588', 'Variable', 'variableValue', '变量值', '2260290401', 3); 263 | INSERT INTO `node_structure` VALUES (647526048184832, 0, '2792395104', 'Variable', 'variableRange', '值范围', '2260290401', 3); 264 | INSERT INTO `node_structure` VALUES (647526049708544, 0, '2743143086', 'Variable', 'variableAlarmValue', '报警值', '2260290401', 3); 265 | INSERT INTO `node_structure` VALUES (647526051215872, 0, '3448611803', 'Object', '电压C', '电压C', '2053039395', 2); 266 | INSERT INTO `node_structure` VALUES (647526052723200, 0, '2685966702', 'Variable', 'variableName', '变量名', '3448611803', 3); 267 | INSERT INTO `node_structure` VALUES (647526054230528, 0, '1766010212', 'Variable', 'variableProject', '变量项目', '3448611803', 3); 268 | INSERT INTO `node_structure` VALUES (647526055746048, 0, '414126238', 'Variable', 'variableUnits', '单位', '3448611803', 3); 269 | INSERT INTO `node_structure` VALUES (647526057245184, 0, '4126608279', 'Variable', 'variableValue', '变量值', '3448611803', 3); 270 | INSERT INTO `node_structure` VALUES (647526058777088, 0, '2694003524', 'Variable', 'variableRange', '值范围', '3448611803', 3); 271 | INSERT INTO `node_structure` VALUES (647526060276224, 0, '4100790135', 'Variable', 'variableAlarmValue', '报警值', '3448611803', 3); 272 | INSERT INTO `node_structure` VALUES (647526061799936, 0, '1504016742', 'Object', '功率因素', '功率因素', '2053039395', 2); 273 | INSERT INTO `node_structure` VALUES (647526063290880, 0, '2026749216', 'Variable', 'variableName', '变量名', '1504016742', 3); 274 | INSERT INTO `node_structure` VALUES (647526064806400, 0, '93617856', 'Variable', 'variableProject', '变量项目', '1504016742', 3); 275 | INSERT INTO `node_structure` VALUES (647526066305536, 0, '4178559679', 'Variable', 'variableUnits', '单位', '1504016742', 3); 276 | INSERT INTO `node_structure` VALUES (647526067853824, 0, '2928701499', 'Variable', 'variableValue', '变量值', '1504016742', 3); 277 | INSERT INTO `node_structure` VALUES (647526069402112, 0, '4090646249', 'Variable', 'variableRange', '值范围', '1504016742', 3); 278 | INSERT INTO `node_structure` VALUES (647526070925824, 0, '2187167575', 'Variable', 'variableAlarmValue', '报警值', '1504016742', 3); 279 | INSERT INTO `node_structure` VALUES (647526072449536, 0, '3308264872', 'Object', '负载率', '负载率', '2053039395', 2); 280 | INSERT INTO `node_structure` VALUES (647526073973248, 0, '247712617', 'Variable', 'variableName', '变量名', '3308264872', 3); 281 | INSERT INTO `node_structure` VALUES (647526075488768, 0, '852367318', 'Variable', 'variableProject', '变量项目', '3308264872', 3); 282 | INSERT INTO `node_structure` VALUES (647526077004288, 0, '2654279744', 'Variable', 'variableUnits', '单位', '3308264872', 3); 283 | INSERT INTO `node_structure` VALUES (647526078495232, 0, '1591285189', 'Variable', 'variableValue', '变量值', '3308264872', 3); 284 | INSERT INTO `node_structure` VALUES (647526080010752, 0, '2850101749', 'Variable', 'variableRange', '值范围', '3308264872', 3); 285 | INSERT INTO `node_structure` VALUES (647526081526272, 0, '400094482', 'Variable', 'variableAlarmValue', '报警值', '3308264872', 3); 286 | INSERT INTO `node_structure` VALUES (647526083033600, 0, '2915295265', 'Object', '电量', '电量', '2053039395', 2); 287 | INSERT INTO `node_structure` VALUES (647526084532736, 0, '428205739', 'Variable', 'variableName', '变量名', '2915295265', 3); 288 | INSERT INTO `node_structure` VALUES (647526086040064, 0, '4041138982', 'Variable', 'variableProject', '变量项目', '2915295265', 3); 289 | INSERT INTO `node_structure` VALUES (647526087531008, 0, '728533377', 'Variable', 'variableUnits', '单位', '2915295265', 3); 290 | INSERT INTO `node_structure` VALUES (647526089021952, 0, '4049558467', 'Variable', 'variableValue', '变量值', '2915295265', 3); 291 | INSERT INTO `node_structure` VALUES (647526090537472, 0, '4193705428', 'Variable', 'variableRange', '值范围', '2915295265', 3); 292 | INSERT INTO `node_structure` VALUES (647526092036608, 0, '75517345', 'Variable', 'variableAlarmValue', '报警值', '2915295265', 3); 293 | INSERT INTO `node_structure` VALUES (647526093552128, 0, '4290847295', 'Object', '油位', '油位', '2053039395', 2); 294 | INSERT INTO `node_structure` VALUES (647526095059456, 0, '3356900112', 'Variable', 'variableName', '变量名', '4290847295', 3); 295 | INSERT INTO `node_structure` VALUES (647526096599552, 0, '667738404', 'Variable', 'variableProject', '变量项目', '4290847295', 3); 296 | INSERT INTO `node_structure` VALUES (647526098090496, 0, '232231975', 'Variable', 'variableUnits', '单位', '4290847295', 3); 297 | INSERT INTO `node_structure` VALUES (647526099614208, 0, '3271852917', 'Variable', 'variableValue', '变量值', '4290847295', 3); 298 | INSERT INTO `node_structure` VALUES (647526101137920, 0, '2263642789', 'Variable', 'variableRange', '值范围', '4290847295', 3); 299 | INSERT INTO `node_structure` VALUES (647526102645248, 0, '1658512849', 'Variable', 'variableAlarmValue', '报警值', '4290847295', 3); 300 | INSERT INTO `node_structure` VALUES (647526104185344, 0, '1857619804', 'Object', '启动/停止', '启动/停止', '2053039395', 2); 301 | INSERT INTO `node_structure` VALUES (647526105700864, 0, '1772875318', 'Variable', 'variableName', '变量名', '1857619804', 3); 302 | INSERT INTO `node_structure` VALUES (647526107216384, 0, '830571005', 'Variable', 'variableProject', '变量项目', '1857619804', 3); 303 | INSERT INTO `node_structure` VALUES (647526108756480, 0, '27078466', 'Variable', 'variableUnits', '单位', '1857619804', 3); 304 | INSERT INTO `node_structure` VALUES (647526110288384, 0, '3103660416', 'Variable', 'variableValue', '变量值', '1857619804', 3); 305 | INSERT INTO `node_structure` VALUES (647526111836672, 0, '2277676394', 'Variable', 'variableRange', '值范围', '1857619804', 3); 306 | INSERT INTO `node_structure` VALUES (647526113360384, 0, '2503646536', 'Variable', 'variableAlarmValue', '报警值', '1857619804', 3); 307 | INSERT INTO `node_structure` VALUES (647526114884096, 0, '581461732', 'Object', '手自动', '手自动', '2053039395', 2); 308 | INSERT INTO `node_structure` VALUES (647526116399616, 0, '4206428515', 'Variable', 'variableName', '变量名', '581461732', 3); 309 | INSERT INTO `node_structure` VALUES (647526117939712, 0, '164603285', 'Variable', 'variableProject', '变量项目', '581461732', 3); 310 | INSERT INTO `node_structure` VALUES (647526119455232, 0, '3527640098', 'Variable', 'variableUnits', '单位', '581461732', 3); 311 | INSERT INTO `node_structure` VALUES (647526120987136, 0, '3150202595', 'Variable', 'variableValue', '变量值', '581461732', 3); 312 | INSERT INTO `node_structure` VALUES (647526122510848, 0, '27295248', 'Variable', 'variableRange', '值范围', '581461732', 3); 313 | INSERT INTO `node_structure` VALUES (647526124034560, 0, '762870913', 'Variable', 'variableAlarmValue', '报警值', '581461732', 3); 314 | INSERT INTO `node_structure` VALUES (647526125550080, 0, '1873033799', 'Object', '电池电压', '电池电压', '2053039395', 2); 315 | INSERT INTO `node_structure` VALUES (647526127073792, 0, '2133659183', 'Variable', 'variableName', '变量名', '1873033799', 3); 316 | INSERT INTO `node_structure` VALUES (647526128589312, 0, '1534847447', 'Variable', 'variableProject', '变量项目', '1873033799', 3); 317 | INSERT INTO `node_structure` VALUES (647526130104832, 0, '3109267331', 'Variable', 'variableUnits', '单位', '1873033799', 3); 318 | INSERT INTO `node_structure` VALUES (647526131628544, 0, '1333003138', 'Variable', 'variableValue', '变量值', '1873033799', 3); 319 | INSERT INTO `node_structure` VALUES (647526133168640, 0, '13158691', 'Variable', 'variableRange', '值范围', '1873033799', 3); 320 | INSERT INTO `node_structure` VALUES (647526134684160, 0, '1108544171', 'Variable', 'variableAlarmValue', '报警值', '1873033799', 3); 321 | INSERT INTO `node_structure` VALUES (647526136191488, 0, '3188648847', 'Object', '断路器', '断路器', '3175896600', 1); 322 | INSERT INTO `node_structure` VALUES (647526137731584, 0, '844268732', 'Object', '开关状态', '开关状态', '3188648847', 2); 323 | INSERT INTO `node_structure` VALUES (647526139222528, 0, '1921732910', 'Variable', 'variableName', '变量名', '844268732', 3); 324 | INSERT INTO `node_structure` VALUES (647526140746240, 0, '499667874', 'Variable', 'variableProject', '变量项目', '844268732', 3); 325 | INSERT INTO `node_structure` VALUES (647526142278144, 0, '217481789', 'Variable', 'variableUnits', '单位', '844268732', 3); 326 | INSERT INTO `node_structure` VALUES (647526143793664, 0, '2594610863', 'Variable', 'variableValue', '变量值', '844268732', 3); 327 | INSERT INTO `node_structure` VALUES (647526145309184, 0, '4024331306', 'Variable', 'variableRange', '值范围', '844268732', 3); 328 | INSERT INTO `node_structure` VALUES (647526146824704, 0, '4160377073', 'Variable', 'variableAlarmValue', '报警值', '844268732', 3); 329 | INSERT INTO `node_structure` VALUES (647526148348416, 0, '4161874652', 'Object', '电流A', '电流A', '3188648847', 2); 330 | INSERT INTO `node_structure` VALUES (647526149872128, 0, '504343426', 'Variable', 'variableName', '变量名', '4161874652', 3); 331 | INSERT INTO `node_structure` VALUES (647526151412224, 0, '3743379787', 'Variable', 'variableProject', '变量项目', '4161874652', 3); 332 | INSERT INTO `node_structure` VALUES (647526152919552, 0, '3082434870', 'Variable', 'variableUnits', '单位', '4161874652', 3); 333 | INSERT INTO `node_structure` VALUES (647526154426880, 0, '1012027796', 'Variable', 'variableValue', '变量值', '4161874652', 3); 334 | INSERT INTO `node_structure` VALUES (647526155934208, 0, '310734628', 'Variable', 'variableRange', '值范围', '4161874652', 3); 335 | INSERT INTO `node_structure` VALUES (647526157441536, 0, '3821273079', 'Variable', 'variableAlarmValue', '报警值', '4161874652', 3); 336 | INSERT INTO `node_structure` VALUES (647526158957056, 0, '2832067588', 'Object', '电流B', '电流B', '3188648847', 2); 337 | INSERT INTO `node_structure` VALUES (647526160472576, 0, '4111640916', 'Variable', 'variableName', '变量名', '2832067588', 3); 338 | INSERT INTO `node_structure` VALUES (647526161996288, 0, '166646935', 'Variable', 'variableProject', '变量项目', '2832067588', 3); 339 | INSERT INTO `node_structure` VALUES (647526163511808, 0, '864705818', 'Variable', 'variableUnits', '单位', '2832067588', 3); 340 | INSERT INTO `node_structure` VALUES (647526165051904, 0, '878437090', 'Variable', 'variableValue', '变量值', '2832067588', 3); 341 | INSERT INTO `node_structure` VALUES (647526166559232, 0, '2415255835', 'Variable', 'variableRange', '值范围', '2832067588', 3); 342 | INSERT INTO `node_structure` VALUES (647526168091136, 0, '186510024', 'Variable', 'variableAlarmValue', '报警值', '2832067588', 3); 343 | INSERT INTO `node_structure` VALUES (647526169631232, 0, '1823187679', 'Object', '电流C', '电流C', '3188648847', 2); 344 | INSERT INTO `node_structure` VALUES (647526171154944, 0, '3053225259', 'Variable', 'variableName', '变量名', '1823187679', 3); 345 | INSERT INTO `node_structure` VALUES (647526172662272, 0, '3283783384', 'Variable', 'variableProject', '变量项目', '1823187679', 3); 346 | INSERT INTO `node_structure` VALUES (647526174177792, 0, '918773098', 'Variable', 'variableUnits', '单位', '1823187679', 3); 347 | INSERT INTO `node_structure` VALUES (647526175709696, 0, '3813072662', 'Variable', 'variableValue', '变量值', '1823187679', 3); 348 | INSERT INTO `node_structure` VALUES (647526177225216, 0, '1880959005', 'Variable', 'variableRange', '值范围', '1823187679', 3); 349 | INSERT INTO `node_structure` VALUES (647526178781696, 0, '3998017406', 'Variable', 'variableAlarmValue', '报警值', '1823187679', 3); 350 | INSERT INTO `node_structure` VALUES (647526180272640, 0, '1499078655', 'Object', '电压A', '电压A', '3188648847', 2); 351 | INSERT INTO `node_structure` VALUES (647526181779968, 0, '3351823194', 'Variable', 'variableName', '变量名', '1499078655', 3); 352 | INSERT INTO `node_structure` VALUES (647526183311872, 0, '1796066909', 'Variable', 'variableProject', '变量项目', '1499078655', 3); 353 | INSERT INTO `node_structure` VALUES (647526184819200, 0, '1285167294', 'Variable', 'variableUnits', '单位', '1499078655', 3); 354 | INSERT INTO `node_structure` VALUES (647526186351104, 0, '1925109675', 'Variable', 'variableValue', '变量值', '1499078655', 3); 355 | INSERT INTO `node_structure` VALUES (647526187850240, 0, '326194784', 'Variable', 'variableRange', '值范围', '1499078655', 3); 356 | INSERT INTO `node_structure` VALUES (647526189332992, 0, '3920058670', 'Variable', 'variableAlarmValue', '报警值', '1499078655', 3); 357 | INSERT INTO `node_structure` VALUES (647526190856704, 0, '3956880221', 'Object', '电压B', '电压B', '3188648847', 2); 358 | INSERT INTO `node_structure` VALUES (647526192372224, 0, '4252623406', 'Variable', 'variableName', '变量名', '3956880221', 3); 359 | INSERT INTO `node_structure` VALUES (647526193863168, 0, '3968547709', 'Variable', 'variableProject', '变量项目', '3956880221', 3); 360 | INSERT INTO `node_structure` VALUES (647526195354112, 0, '2777531629', 'Variable', 'variableUnits', '单位', '3956880221', 3); 361 | INSERT INTO `node_structure` VALUES (647526196869632, 0, '857261469', 'Variable', 'variableValue', '变量值', '3956880221', 3); 362 | INSERT INTO `node_structure` VALUES (647526198393344, 0, '836524395', 'Variable', 'variableRange', '值范围', '3956880221', 3); 363 | INSERT INTO `node_structure` VALUES (647526199892480, 0, '2547634173', 'Variable', 'variableAlarmValue', '报警值', '3956880221', 3); 364 | INSERT INTO `node_structure` VALUES (647526201457152, 0, '2066201808', 'Object', '电压C', '电压C', '3188648847', 2); 365 | INSERT INTO `node_structure` VALUES (647526202964480, 0, '3066812704', 'Variable', 'variableName', '变量名', '2066201808', 3); 366 | INSERT INTO `node_structure` VALUES (647526204496384, 0, '1386130697', 'Variable', 'variableProject', '变量项目', '2066201808', 3); 367 | INSERT INTO `node_structure` VALUES (647526205995520, 0, '1219651722', 'Variable', 'variableUnits', '单位', '2066201808', 3); 368 | INSERT INTO `node_structure` VALUES (647526207494656, 0, '3009647640', 'Variable', 'variableValue', '变量值', '2066201808', 3); 369 | INSERT INTO `node_structure` VALUES (647526209026560, 0, '2578850578', 'Variable', 'variableRange', '值范围', '2066201808', 3); 370 | INSERT INTO `node_structure` VALUES (647526210509312, 0, '3416902649', 'Variable', 'variableAlarmValue', '报警值', '2066201808', 3); 371 | INSERT INTO `node_structure` VALUES (647526212016640, 0, '3420849981', 'Object', '开关', '开关', '3175896600', 1); 372 | INSERT INTO `node_structure` VALUES (647526213532160, 0, '3099567925', 'Object', '开关状态', '开关状态', '3420849981', 2); 373 | INSERT INTO `node_structure` VALUES (647526215064064, 0, '4097117606', 'Variable', 'variableName', '变量名', '3099567925', 3); 374 | INSERT INTO `node_structure` VALUES (647526216571392, 0, '1614455795', 'Variable', 'variableProject', '变量项目', '3099567925', 3); 375 | INSERT INTO `node_structure` VALUES (647526218119680, 0, '1484369942', 'Variable', 'variableUnits', '单位', '3099567925', 3); 376 | INSERT INTO `node_structure` VALUES (647526219643392, 0, '3385614497', 'Variable', 'variableValue', '变量值', '3099567925', 3); 377 | INSERT INTO `node_structure` VALUES (647526221142528, 0, '2835626841', 'Variable', 'variableRange', '值范围', '3099567925', 3); 378 | INSERT INTO `node_structure` VALUES (647526222690816, 0, '862270606', 'Variable', 'variableAlarmValue', '报警值', '3099567925', 3); 379 | INSERT INTO `node_structure` VALUES (647526224189952, 0, '1702084981', 'Object', '空调系统', '空调系统', '85', 0); 380 | INSERT INTO `node_structure` VALUES (647526225697280, 0, '4087481911', 'Object', '空调主机', '空调主机', '1702084981', 1); 381 | INSERT INTO `node_structure` VALUES (647526227237376, 0, '413692408', 'Object', '冷冻水进水温度', '冷冻水进水温度', '4087481911', 2); 382 | INSERT INTO `node_structure` VALUES (647526228777472, 0, '3450337906', 'Variable', 'variableName', '变量名', '413692408', 3); 383 | INSERT INTO `node_structure` VALUES (647526230284800, 0, '2428078350', 'Variable', 'variableProject', '变量项目', '413692408', 3); 384 | INSERT INTO `node_structure` VALUES (647526231792128, 0, '730776314', 'Variable', 'variableUnits', '单位', '413692408', 3); 385 | INSERT INTO `node_structure` VALUES (647526233324032, 0, '1104324490', 'Variable', 'variableValue', '变量值', '413692408', 3); 386 | INSERT INTO `node_structure` VALUES (647526234855936, 0, '583655701', 'Variable', 'variableRange', '值范围', '413692408', 3); 387 | INSERT INTO `node_structure` VALUES (647526236387840, 0, '1883113330', 'Variable', 'variableAlarmValue', '报警值', '413692408', 3); 388 | INSERT INTO `node_structure` VALUES (647526237895168, 0, '399885196', 'Object', '冷冻水出水温度', '冷冻水出水温度', '4087481911', 2); 389 | INSERT INTO `node_structure` VALUES (647526239410688, 0, '638450911', 'Variable', 'variableName', '变量名', '399885196', 3); 390 | INSERT INTO `node_structure` VALUES (647526240926208, 0, '2322261247', 'Variable', 'variableProject', '变量项目', '399885196', 3); 391 | INSERT INTO `node_structure` VALUES (647526242458112, 0, '2232695461', 'Variable', 'variableUnits', '单位', '399885196', 3); 392 | INSERT INTO `node_structure` VALUES (647526243965440, 0, '2615704825', 'Variable', 'variableValue', '变量值', '399885196', 3); 393 | INSERT INTO `node_structure` VALUES (647526245480960, 0, '1287686237', 'Variable', 'variableRange', '值范围', '399885196', 3); 394 | INSERT INTO `node_structure` VALUES (647526246996480, 0, '2358364993', 'Variable', 'variableAlarmValue', '报警值', '399885196', 3); 395 | INSERT INTO `node_structure` VALUES (647526248512000, 0, '1845098604', 'Object', '冷却水进水温度', '冷却水进水温度', '4087481911', 2); 396 | INSERT INTO `node_structure` VALUES (647526250052096, 0, '946339256', 'Variable', 'variableName', '变量名', '1845098604', 3); 397 | INSERT INTO `node_structure` VALUES (647526251543040, 0, '826946991', 'Variable', 'variableProject', '变量项目', '1845098604', 3); 398 | INSERT INTO `node_structure` VALUES (647526253025792, 0, '1998706410', 'Variable', 'variableUnits', '单位', '1845098604', 3); 399 | INSERT INTO `node_structure` VALUES (647526254533120, 0, '935321772', 'Variable', 'variableValue', '变量值', '1845098604', 3); 400 | INSERT INTO `node_structure` VALUES (647526256056832, 0, '3966383143', 'Variable', 'variableRange', '值范围', '1845098604', 3); 401 | INSERT INTO `node_structure` VALUES (647526257588736, 0, '1569904134', 'Variable', 'variableAlarmValue', '报警值', '1845098604', 3); 402 | INSERT INTO `node_structure` VALUES (647526259112448, 0, '1399866143', 'Object', '冷却水出水温度', '冷却水出水温度', '4087481911', 2); 403 | INSERT INTO `node_structure` VALUES (647526260627968, 0, '3786681592', 'Variable', 'variableName', '变量名', '1399866143', 3); 404 | INSERT INTO `node_structure` VALUES (647526262159872, 0, '968323611', 'Variable', 'variableProject', '变量项目', '1399866143', 3); 405 | INSERT INTO `node_structure` VALUES (647526263650816, 0, '3387703472', 'Variable', 'variableUnits', '单位', '1399866143', 3); 406 | INSERT INTO `node_structure` VALUES (647526265149952, 0, '194010953', 'Variable', 'variableValue', '变量值', '1399866143', 3); 407 | INSERT INTO `node_structure` VALUES (647526266665472, 0, '1172541865', 'Variable', 'variableRange', '值范围', '1399866143', 3); 408 | INSERT INTO `node_structure` VALUES (647526268148224, 0, '2685653054', 'Variable', 'variableAlarmValue', '报警值', '1399866143', 3); 409 | INSERT INTO `node_structure` VALUES (647526269655552, 0, '2072695763', 'Object', '电流A', '电流A', '4087481911', 2); 410 | INSERT INTO `node_structure` VALUES (647526271203840, 0, '1760993597', 'Variable', 'variableName', '变量名', '2072695763', 3); 411 | INSERT INTO `node_structure` VALUES (647526272735744, 0, '3995177245', 'Variable', 'variableProject', '变量项目', '2072695763', 3); 412 | INSERT INTO `node_structure` VALUES (647526274267648, 0, '3209353767', 'Variable', 'variableUnits', '单位', '2072695763', 3); 413 | INSERT INTO `node_structure` VALUES (647526275774976, 0, '197908492', 'Variable', 'variableValue', '变量值', '2072695763', 3); 414 | INSERT INTO `node_structure` VALUES (647526277274112, 0, '1767946708', 'Variable', 'variableRange', '值范围', '2072695763', 3); 415 | INSERT INTO `node_structure` VALUES (647526278781440, 0, '921834969', 'Variable', 'variableAlarmValue', '报警值', '2072695763', 3); 416 | INSERT INTO `node_structure` VALUES (647526280272384, 0, '856074617', 'Object', '电流B', '电流B', '4087481911', 2); 417 | INSERT INTO `node_structure` VALUES (647526281787904, 0, '1848578107', 'Variable', 'variableName', '变量名', '856074617', 3); 418 | INSERT INTO `node_structure` VALUES (647526283303424, 0, '1817941564', 'Variable', 'variableProject', '变量项目', '856074617', 3); 419 | INSERT INTO `node_structure` VALUES (647526284818944, 0, '468048150', 'Variable', 'variableUnits', '单位', '856074617', 3); 420 | INSERT INTO `node_structure` VALUES (647526286326272, 0, '1673763165', 'Variable', 'variableValue', '变量值', '856074617', 3); 421 | INSERT INTO `node_structure` VALUES (647526287858176, 0, '1226037867', 'Variable', 'variableRange', '值范围', '856074617', 3); 422 | INSERT INTO `node_structure` VALUES (647526289365504, 0, '2527794391', 'Variable', 'variableAlarmValue', '报警值', '856074617', 3); 423 | INSERT INTO `node_structure` VALUES (647526290864640, 0, '1150462036', 'Object', '电流C', '电流C', '4087481911', 2); 424 | INSERT INTO `node_structure` VALUES (647526292355584, 0, '1812897267', 'Variable', 'variableName', '变量名', '1150462036', 3); 425 | INSERT INTO `node_structure` VALUES (647526293838336, 0, '2295050114', 'Variable', 'variableProject', '变量项目', '1150462036', 3); 426 | INSERT INTO `node_structure` VALUES (647526295370240, 0, '515100718', 'Variable', 'variableUnits', '单位', '1150462036', 3); 427 | INSERT INTO `node_structure` VALUES (647526296869376, 0, '4160634115', 'Variable', 'variableValue', '变量值', '1150462036', 3); 428 | INSERT INTO `node_structure` VALUES (647526298393088, 0, '3058122392', 'Variable', 'variableRange', '值范围', '1150462036', 3); 429 | INSERT INTO `node_structure` VALUES (647526299900416, 0, '1535708929', 'Variable', 'variableAlarmValue', '报警值', '1150462036', 3); 430 | INSERT INTO `node_structure` VALUES (647526301407744, 0, '516164502', 'Object', '电压A', '电压A', '4087481911', 2); 431 | INSERT INTO `node_structure` VALUES (647526302956032, 0, '409939583', 'Variable', 'variableName', '变量名', '516164502', 3); 432 | INSERT INTO `node_structure` VALUES (647526304733696, 0, '363670978', 'Variable', 'variableProject', '变量项目', '516164502', 3); 433 | INSERT INTO `node_structure` VALUES (647526306216448, 0, '4086203949', 'Variable', 'variableUnits', '单位', '516164502', 3); 434 | INSERT INTO `node_structure` VALUES (647526307731968, 0, '865343031', 'Variable', 'variableValue', '变量值', '516164502', 3); 435 | INSERT INTO `node_structure` VALUES (647526309239296, 0, '761284145', 'Variable', 'variableRange', '值范围', '516164502', 3); 436 | INSERT INTO `node_structure` VALUES (647526310738432, 0, '2499832001', 'Variable', 'variableAlarmValue', '报警值', '516164502', 3); 437 | INSERT INTO `node_structure` VALUES (647526312237568, 0, '2997082476', 'Object', '电压B', '电压B', '4087481911', 2); 438 | INSERT INTO `node_structure` VALUES (647526313736704, 0, '3348188878', 'Variable', 'variableName', '变量名', '2997082476', 3); 439 | INSERT INTO `node_structure` VALUES (647526315268608, 0, '3714126225', 'Variable', 'variableProject', '变量项目', '2997082476', 3); 440 | INSERT INTO `node_structure` VALUES (647526316767744, 0, '1695954240', 'Variable', 'variableUnits', '单位', '2997082476', 3); 441 | INSERT INTO `node_structure` VALUES (647526318283264, 0, '3565289126', 'Variable', 'variableValue', '变量值', '2997082476', 3); 442 | INSERT INTO `node_structure` VALUES (647526319782400, 0, '1481705193', 'Variable', 'variableRange', '值范围', '2997082476', 3); 443 | INSERT INTO `node_structure` VALUES (647526321281536, 0, '92479065', 'Variable', 'variableAlarmValue', '报警值', '2997082476', 3); 444 | INSERT INTO `node_structure` VALUES (647526322797056, 0, '4004082512', 'Object', '电压C', '电压C', '4087481911', 2); 445 | INSERT INTO `node_structure` VALUES (647526324353536, 0, '4180251784', 'Variable', 'variableName', '变量名', '4004082512', 3); 446 | INSERT INTO `node_structure` VALUES (647526325869056, 0, '2473226883', 'Variable', 'variableProject', '变量项目', '4004082512', 3); 447 | INSERT INTO `node_structure` VALUES (647526327376384, 0, '1342399843', 'Variable', 'variableUnits', '单位', '4004082512', 3); 448 | INSERT INTO `node_structure` VALUES (647526328891904, 0, '3514534217', 'Variable', 'variableValue', '变量值', '4004082512', 3); 449 | INSERT INTO `node_structure` VALUES (647526330423808, 0, '2794269334', 'Variable', 'variableRange', '值范围', '4004082512', 3); 450 | INSERT INTO `node_structure` VALUES (647526331947520, 0, '1492348950', 'Variable', 'variableAlarmValue', '报警值', '4004082512', 3); 451 | INSERT INTO `node_structure` VALUES (647526333422080, 0, '844837101', 'Object', '电量', '电量', '4087481911', 2); 452 | INSERT INTO `node_structure` VALUES (647526334921216, 0, '2034894960', 'Variable', 'variableName', '变量名', '844837101', 3); 453 | INSERT INTO `node_structure` VALUES (647526336403968, 0, '1602569260', 'Variable', 'variableProject', '变量项目', '844837101', 3); 454 | INSERT INTO `node_structure` VALUES (647526337927680, 0, '1868972107', 'Variable', 'variableUnits', '单位', '844837101', 3); 455 | INSERT INTO `node_structure` VALUES (647526339426816, 0, '1972318562', 'Variable', 'variableValue', '变量值', '844837101', 3); 456 | INSERT INTO `node_structure` VALUES (647526340925952, 0, '4183426794', 'Variable', 'variableRange', '值范围', '844837101', 3); 457 | INSERT INTO `node_structure` VALUES (647526342416896, 0, '393575735', 'Variable', 'variableAlarmValue', '报警值', '844837101', 3); 458 | INSERT INTO `node_structure` VALUES (647526343907840, 0, '2156079487', 'Object', '启停状态', '启停状态', '4087481911', 2); 459 | INSERT INTO `node_structure` VALUES (647526345423360, 0, '192971384', 'Variable', 'variableName', '变量名', '2156079487', 3); 460 | INSERT INTO `node_structure` VALUES (647526346947072, 0, '691111645', 'Variable', 'variableProject', '变量项目', '2156079487', 3); 461 | INSERT INTO `node_structure` VALUES (647526348454400, 0, '536719289', 'Variable', 'variableUnits', '单位', '2156079487', 3); 462 | INSERT INTO `node_structure` VALUES (647526349969920, 0, '1280663839', 'Variable', 'variableValue', '变量值', '2156079487', 3); 463 | INSERT INTO `node_structure` VALUES (647526351477248, 0, '1332956690', 'Variable', 'variableRange', '值范围', '2156079487', 3); 464 | INSERT INTO `node_structure` VALUES (647526352968192, 0, '2211870449', 'Variable', 'variableAlarmValue', '报警值', '2156079487', 3); 465 | INSERT INTO `node_structure` VALUES (647526354483712, 0, '2777423079', 'Object', '故障', '故障', '4087481911', 2); 466 | INSERT INTO `node_structure` VALUES (647526355991040, 0, '1785027520', 'Variable', 'variableName', '变量名', '2777423079', 3); 467 | INSERT INTO `node_structure` VALUES (647526357522944, 0, '1757956771', 'Variable', 'variableProject', '变量项目', '2777423079', 3); 468 | INSERT INTO `node_structure` VALUES (647526359022080, 0, '3399370775', 'Variable', 'variableUnits', '单位', '2777423079', 3); 469 | INSERT INTO `node_structure` VALUES (647526360513024, 0, '3983496687', 'Variable', 'variableValue', '变量值', '2777423079', 3); 470 | INSERT INTO `node_structure` VALUES (647526362012160, 0, '4294033373', 'Variable', 'variableRange', '值范围', '2777423079', 3); 471 | INSERT INTO `node_structure` VALUES (647526363527680, 0, '2144250313', 'Variable', 'variableAlarmValue', '报警值', '2777423079', 3); 472 | INSERT INTO `node_structure` VALUES (647526365067776, 0, '2429665390', 'Object', '负载率', '负载率', '4087481911', 2); 473 | INSERT INTO `node_structure` VALUES (647526366591488, 0, '2287249597', 'Variable', 'variableName', '变量名', '2429665390', 3); 474 | INSERT INTO `node_structure` VALUES (647526368115200, 0, '1856646778', 'Variable', 'variableProject', '变量项目', '2429665390', 3); 475 | INSERT INTO `node_structure` VALUES (647526369622528, 0, '777322573', 'Variable', 'variableUnits', '单位', '2429665390', 3); 476 | INSERT INTO `node_structure` VALUES (647526371146240, 0, '4101884897', 'Variable', 'variableValue', '变量值', '2429665390', 3); 477 | INSERT INTO `node_structure` VALUES (647526372645376, 0, '428522572', 'Variable', 'variableRange', '值范围', '2429665390', 3); 478 | INSERT INTO `node_structure` VALUES (647526374160896, 0, '2972560712', 'Variable', 'variableAlarmValue', '报警值', '2429665390', 3); 479 | INSERT INTO `node_structure` VALUES (647526375692800, 0, '2867274454', 'Object', '冷冻泵', '冷冻泵', '1702084981', 1); 480 | INSERT INTO `node_structure` VALUES (647526377208320, 0, '2155344500', 'Object', '开关状态', '开关状态', '2867274454', 2); 481 | INSERT INTO `node_structure` VALUES (647526378715648, 0, '141113742', 'Variable', 'variableName', '变量名', '2155344500', 3); 482 | INSERT INTO `node_structure` VALUES (647526380198400, 0, '1627577537', 'Variable', 'variableProject', '变量项目', '2155344500', 3); 483 | INSERT INTO `node_structure` VALUES (647526381722112, 0, '168945114', 'Variable', 'variableUnits', '单位', '2155344500', 3); 484 | INSERT INTO `node_structure` VALUES (647526383245824, 0, '4161284009', 'Variable', 'variableValue', '变量值', '2155344500', 3); 485 | INSERT INTO `node_structure` VALUES (647526384769536, 0, '3630837406', 'Variable', 'variableRange', '值范围', '2155344500', 3); 486 | INSERT INTO `node_structure` VALUES (647526386285056, 0, '3430659035', 'Variable', 'variableAlarmValue', '报警值', '2155344500', 3); 487 | INSERT INTO `node_structure` VALUES (647526387800576, 0, '556596209', 'Object', '故障', '故障', '2867274454', 2); 488 | INSERT INTO `node_structure` VALUES (647526389340672, 0, '1778819752', 'Variable', 'variableName', '变量名', '556596209', 3); 489 | INSERT INTO `node_structure` VALUES (647526390823424, 0, '2357779485', 'Variable', 'variableProject', '变量项目', '556596209', 3); 490 | INSERT INTO `node_structure` VALUES (647526392338944, 0, '1480401185', 'Variable', 'variableUnits', '单位', '556596209', 3); 491 | INSERT INTO `node_structure` VALUES (647526393862656, 0, '847301414', 'Variable', 'variableValue', '变量值', '556596209', 3); 492 | INSERT INTO `node_structure` VALUES (647526395394560, 0, '3817738567', 'Variable', 'variableRange', '值范围', '556596209', 3); 493 | INSERT INTO `node_structure` VALUES (647526396901888, 0, '67770241', 'Variable', 'variableAlarmValue', '报警值', '556596209', 3); 494 | INSERT INTO `node_structure` VALUES (647526398458368, 0, '2380615628', 'Object', '手/自动', '手/自动', '2867274454', 2); 495 | INSERT INTO `node_structure` VALUES (647526399998464, 0, '2424546600', 'Variable', 'variableName', '变量名', '2380615628', 3); 496 | INSERT INTO `node_structure` VALUES (647526401489408, 0, '900582760', 'Variable', 'variableProject', '变量项目', '2380615628', 3); 497 | INSERT INTO `node_structure` VALUES (647526403029504, 0, '2830180875', 'Variable', 'variableUnits', '单位', '2380615628', 3); 498 | INSERT INTO `node_structure` VALUES (647526404536832, 0, '314112475', 'Variable', 'variableValue', '变量值', '2380615628', 3); 499 | INSERT INTO `node_structure` VALUES (647526406060544, 0, '3868126519', 'Variable', 'variableRange', '值范围', '2380615628', 3); 500 | INSERT INTO `node_structure` VALUES (647526407576064, 0, '475544441', 'Variable', 'variableAlarmValue', '报警值', '2380615628', 3); 501 | INSERT INTO `node_structure` VALUES (647526409067008, 0, '506274937', 'Object', '工频/变频', '工频/变频', '2867274454', 2); 502 | INSERT INTO `node_structure` VALUES (647526410582528, 0, '3895307746', 'Variable', 'variableName', '变量名', '506274937', 3); 503 | INSERT INTO `node_structure` VALUES (647526412098048, 0, '2683057355', 'Variable', 'variableProject', '变量项目', '506274937', 3); 504 | INSERT INTO `node_structure` VALUES (647526413621760, 0, '100203274', 'Variable', 'variableUnits', '单位', '506274937', 3); 505 | INSERT INTO `node_structure` VALUES (647526415153664, 0, '1416544754', 'Variable', 'variableValue', '变量值', '506274937', 3); 506 | INSERT INTO `node_structure` VALUES (647526416660992, 0, '3369316691', 'Variable', 'variableRange', '值范围', '506274937', 3); 507 | INSERT INTO `node_structure` VALUES (647526418192896, 0, '2070891764', 'Variable', 'variableAlarmValue', '报警值', '506274937', 3); 508 | INSERT INTO `node_structure` VALUES (647526419700224, 0, '3604936769', 'Object', '变频频率', '变频频率', '2867274454', 2); 509 | INSERT INTO `node_structure` VALUES (647526421240320, 0, '3216804155', 'Variable', 'variableName', '变量名', '3604936769', 3); 510 | INSERT INTO `node_structure` VALUES (647526422755840, 0, '1095075209', 'Variable', 'variableProject', '变量项目', '3604936769', 3); 511 | INSERT INTO `node_structure` VALUES (647526424263168, 0, '1254150251', 'Variable', 'variableUnits', '单位', '3604936769', 3); 512 | INSERT INTO `node_structure` VALUES (647526425770496, 0, '2943038472', 'Variable', 'variableValue', '变量值', '3604936769', 3); 513 | INSERT INTO `node_structure` VALUES (647526427294208, 0, '181448154', 'Variable', 'variableRange', '值范围', '3604936769', 3); 514 | INSERT INTO `node_structure` VALUES (647526428793344, 0, '2233348345', 'Variable', 'variableAlarmValue', '报警值', '3604936769', 3); 515 | INSERT INTO `node_structure` VALUES (647526430300672, 0, '1335814902', 'Object', '电流A', '电流A', '2867274454', 2); 516 | INSERT INTO `node_structure` VALUES (647526431808000, 0, '1617304836', 'Variable', 'variableName', '变量名', '1335814902', 3); 517 | INSERT INTO `node_structure` VALUES (647526433331712, 0, '332091268', 'Variable', 'variableProject', '变量项目', '1335814902', 3); 518 | INSERT INTO `node_structure` VALUES (647526434863616, 0, '3952665224', 'Variable', 'variableUnits', '单位', '1335814902', 3); 519 | INSERT INTO `node_structure` VALUES (647526436370944, 0, '2137459154', 'Variable', 'variableValue', '变量值', '1335814902', 3); 520 | INSERT INTO `node_structure` VALUES (647526437878272, 0, '2576521871', 'Variable', 'variableRange', '值范围', '1335814902', 3); 521 | INSERT INTO `node_structure` VALUES (647526439410176, 0, '1952466271', 'Variable', 'variableAlarmValue', '报警值', '1335814902', 3); 522 | INSERT INTO `node_structure` VALUES (647526440950272, 0, '2719430826', 'Object', '电流B', '电流B', '2867274454', 2); 523 | INSERT INTO `node_structure` VALUES (647526442482176, 0, '1212362834', 'Variable', 'variableName', '变量名', '2719430826', 3); 524 | INSERT INTO `node_structure` VALUES (647526444014080, 0, '858087966', 'Variable', 'variableProject', '变量项目', '2719430826', 3); 525 | INSERT INTO `node_structure` VALUES (647526445521408, 0, '3129094199', 'Variable', 'variableUnits', '单位', '2719430826', 3); 526 | INSERT INTO `node_structure` VALUES (647526447045120, 0, '3564841963', 'Variable', 'variableValue', '变量值', '2719430826', 3); 527 | INSERT INTO `node_structure` VALUES (647526448577024, 0, '1134002101', 'Variable', 'variableRange', '值范围', '2719430826', 3); 528 | INSERT INTO `node_structure` VALUES (647526450100736, 0, '4057634864', 'Variable', 'variableAlarmValue', '报警值', '2719430826', 3); 529 | INSERT INTO `node_structure` VALUES (647526451640832, 0, '3067296190', 'Object', '电流C', '电流C', '2867274454', 2); 530 | INSERT INTO `node_structure` VALUES (647526453180928, 0, '2521301420', 'Variable', 'variableName', '变量名', '3067296190', 3); 531 | INSERT INTO `node_structure` VALUES (647526454712832, 0, '164579192', 'Variable', 'variableProject', '变量项目', '3067296190', 3); 532 | INSERT INTO `node_structure` VALUES (647526456211968, 0, '4090131166', 'Variable', 'variableUnits', '单位', '3067296190', 3); 533 | INSERT INTO `node_structure` VALUES (647526457719296, 0, '951695883', 'Variable', 'variableValue', '变量值', '3067296190', 3); 534 | INSERT INTO `node_structure` VALUES (647526459234816, 0, '3847441599', 'Variable', 'variableRange', '值范围', '3067296190', 3); 535 | INSERT INTO `node_structure` VALUES (647526460758528, 0, '2043886570', 'Variable', 'variableAlarmValue', '报警值', '3067296190', 3); 536 | INSERT INTO `node_structure` VALUES (647526462306816, 0, '2868248300', 'Object', '电压A', '电压A', '2867274454', 2); 537 | INSERT INTO `node_structure` VALUES (647526463805952, 0, '3502888395', 'Variable', 'variableName', '变量名', '2868248300', 3); 538 | INSERT INTO `node_structure` VALUES (647526465313280, 0, '3957714451', 'Variable', 'variableProject', '变量项目', '2868248300', 3); 539 | INSERT INTO `node_structure` VALUES (647526466853376, 0, '2925762599', 'Variable', 'variableUnits', '单位', '2868248300', 3); 540 | INSERT INTO `node_structure` VALUES (647526468377088, 0, '1404309077', 'Variable', 'variableValue', '变量值', '2868248300', 3); 541 | INSERT INTO `node_structure` VALUES (647526469884416, 0, '1534807503', 'Variable', 'variableRange', '值范围', '2868248300', 3); 542 | INSERT INTO `node_structure` VALUES (647526471399936, 0, '2575580512', 'Variable', 'variableAlarmValue', '报警值', '2868248300', 3); 543 | INSERT INTO `node_structure` VALUES (647526472907264, 0, '417476647', 'Object', '电压B', '电压B', '2867274454', 2); 544 | INSERT INTO `node_structure` VALUES (647526474414592, 0, '3459636597', 'Variable', 'variableName', '变量名', '417476647', 3); 545 | INSERT INTO `node_structure` VALUES (647526475938304, 0, '1712879577', 'Variable', 'variableProject', '变量项目', '417476647', 3); 546 | INSERT INTO `node_structure` VALUES (647526477462016, 0, '1170982805', 'Variable', 'variableUnits', '单位', '417476647', 3); 547 | INSERT INTO `node_structure` VALUES (647526478977536, 0, '2580595741', 'Variable', 'variableValue', '变量值', '417476647', 3); 548 | INSERT INTO `node_structure` VALUES (647526480484864, 0, '1290754514', 'Variable', 'variableRange', '值范围', '417476647', 3); 549 | INSERT INTO `node_structure` VALUES (647526482008576, 0, '716581893', 'Variable', 'variableAlarmValue', '报警值', '417476647', 3); 550 | INSERT INTO `node_structure` VALUES (647526483515904, 0, '3609352676', 'Object', '电压C', '电压C', '2867274454', 2); 551 | INSERT INTO `node_structure` VALUES (647526485023232, 0, '2204040110', 'Variable', 'variableName', '变量名', '3609352676', 3); 552 | INSERT INTO `node_structure` VALUES (647526486497792, 0, '63379565', 'Variable', 'variableProject', '变量项目', '3609352676', 3); 553 | INSERT INTO `node_structure` VALUES (647526488037888, 0, '1828571657', 'Variable', 'variableUnits', '单位', '3609352676', 3); 554 | INSERT INTO `node_structure` VALUES (647526489545216, 0, '2546510196', 'Variable', 'variableValue', '变量值', '3609352676', 3); 555 | INSERT INTO `node_structure` VALUES (647526491068928, 0, '2180680575', 'Variable', 'variableRange', '值范围', '3609352676', 3); 556 | INSERT INTO `node_structure` VALUES (647526492584448, 0, '3223706921', 'Variable', 'variableAlarmValue', '报警值', '3609352676', 3); 557 | INSERT INTO `node_structure` VALUES (647526494083584, 0, '1752155881', 'Object', '电量', '电量', '2867274454', 2); 558 | INSERT INTO `node_structure` VALUES (647526495599104, 0, '1807389557', 'Variable', 'variableName', '变量名', '1752155881', 3); 559 | INSERT INTO `node_structure` VALUES (647526497131008, 0, '1029694621', 'Variable', 'variableProject', '变量项目', '1752155881', 3); 560 | INSERT INTO `node_structure` VALUES (647526498630144, 0, '1594395213', 'Variable', 'variableUnits', '单位', '1752155881', 3); 561 | INSERT INTO `node_structure` VALUES (647526500137472, 0, '3878002290', 'Variable', 'variableValue', '变量值', '1752155881', 3); 562 | INSERT INTO `node_structure` VALUES (647526501652992, 0, '662137409', 'Variable', 'variableRange', '值范围', '1752155881', 3); 563 | INSERT INTO `node_structure` VALUES (647526503193088, 0, '901635202', 'Variable', 'variableAlarmValue', '报警值', '1752155881', 3); 564 | INSERT INTO `node_structure` VALUES (647526504684032, 0, '592531114', 'Object', '冷却泵', '冷却泵', '1702084981', 1); 565 | INSERT INTO `node_structure` VALUES (647526506207744, 0, '2908131072', 'Object', '开关状态', '开关状态', '592531114', 2); 566 | INSERT INTO `node_structure` VALUES (647526507706880, 0, '602642039', 'Variable', 'variableName', '变量名', '2908131072', 3); 567 | INSERT INTO `node_structure` VALUES (647526509230592, 0, '1104167149', 'Variable', 'variableProject', '变量项目', '2908131072', 3); 568 | INSERT INTO `node_structure` VALUES (647526510737920, 0, '497081322', 'Variable', 'variableUnits', '单位', '2908131072', 3); 569 | INSERT INTO `node_structure` VALUES (647526512237056, 0, '873069323', 'Variable', 'variableValue', '变量值', '2908131072', 3); 570 | INSERT INTO `node_structure` VALUES (647526513728000, 0, '736898136', 'Variable', 'variableRange', '值范围', '2908131072', 3); 571 | INSERT INTO `node_structure` VALUES (647526515218944, 0, '2893434224', 'Variable', 'variableAlarmValue', '报警值', '2908131072', 3); 572 | INSERT INTO `node_structure` VALUES (647526516750848, 0, '329506098', 'Object', '故障', '故障', '592531114', 2); 573 | INSERT INTO `node_structure` VALUES (647526518249984, 0, '3917569913', 'Variable', 'variableName', '变量名', '329506098', 3); 574 | INSERT INTO `node_structure` VALUES (647526519757312, 0, '65340177', 'Variable', 'variableProject', '变量项目', '329506098', 3); 575 | INSERT INTO `node_structure` VALUES (647526521256448, 0, '2075400931', 'Variable', 'variableUnits', '单位', '329506098', 3); 576 | INSERT INTO `node_structure` VALUES (647526522755584, 0, '2200758547', 'Variable', 'variableValue', '变量值', '329506098', 3); 577 | INSERT INTO `node_structure` VALUES (647526524254720, 0, '2621844346', 'Variable', 'variableRange', '值范围', '329506098', 3); 578 | INSERT INTO `node_structure` VALUES (647526525794816, 0, '4189319943', 'Variable', 'variableAlarmValue', '报警值', '329506098', 3); 579 | INSERT INTO `node_structure` VALUES (647526527293952, 0, '880745147', 'Object', '手/自动', '手/自动', '592531114', 2); 580 | INSERT INTO `node_structure` VALUES (647526528801280, 0, '1436781934', 'Variable', 'variableName', '变量名', '880745147', 3); 581 | INSERT INTO `node_structure` VALUES (647526530316800, 0, '3063968141', 'Variable', 'variableProject', '变量项目', '880745147', 3); 582 | INSERT INTO `node_structure` VALUES (647526531832320, 0, '128332738', 'Variable', 'variableUnits', '单位', '880745147', 3); 583 | INSERT INTO `node_structure` VALUES (647526533323264, 0, '893824796', 'Variable', 'variableValue', '变量值', '880745147', 3); 584 | INSERT INTO `node_structure` VALUES (647526534863360, 0, '2304586882', 'Variable', 'variableRange', '值范围', '880745147', 3); 585 | INSERT INTO `node_structure` VALUES (647526536378880, 0, '631165816', 'Variable', 'variableAlarmValue', '报警值', '880745147', 3); 586 | INSERT INTO `node_structure` VALUES (647526537902592, 0, '896925122', 'Object', '工频/变频', '工频/变频', '592531114', 2); 587 | INSERT INTO `node_structure` VALUES (647526539401728, 0, '392334194', 'Variable', 'variableName', '变量名', '896925122', 3); 588 | INSERT INTO `node_structure` VALUES (647526540917248, 0, '3579486660', 'Variable', 'variableProject', '变量项目', '896925122', 3); 589 | INSERT INTO `node_structure` VALUES (647526542416384, 0, '1661640146', 'Variable', 'variableUnits', '单位', '896925122', 3); 590 | INSERT INTO `node_structure` VALUES (647526543907328, 0, '819731997', 'Variable', 'variableValue', '变量值', '896925122', 3); 591 | INSERT INTO `node_structure` VALUES (647526545447424, 0, '2912749610', 'Variable', 'variableRange', '值范围', '896925122', 3); 592 | INSERT INTO `node_structure` VALUES (647526546962944, 0, '3573429607', 'Variable', 'variableAlarmValue', '报警值', '896925122', 3); 593 | INSERT INTO `node_structure` VALUES (647526548445696, 0, '4038627776', 'Object', '变频频率', '变频频率', '592531114', 2); 594 | INSERT INTO `node_structure` VALUES (647526549961216, 0, '1785002390', 'Variable', 'variableName', '变量名', '4038627776', 3); 595 | INSERT INTO `node_structure` VALUES (647526551460352, 0, '496210157', 'Variable', 'variableProject', '变量项目', '4038627776', 3); 596 | INSERT INTO `node_structure` VALUES (647526552967680, 0, '2578488107', 'Variable', 'variableUnits', '单位', '4038627776', 3); 597 | INSERT INTO `node_structure` VALUES (647526554466816, 0, '2956852302', 'Variable', 'variableValue', '变量值', '4038627776', 3); 598 | INSERT INTO `node_structure` VALUES (647526555974144, 0, '2604375614', 'Variable', 'variableRange', '值范围', '4038627776', 3); 599 | INSERT INTO `node_structure` VALUES (647526557489664, 0, '2034715934', 'Variable', 'variableAlarmValue', '报警值', '4038627776', 3); 600 | INSERT INTO `node_structure` VALUES (647526558972416, 0, '606966015', 'Object', '电流A', '电流A', '592531114', 2); 601 | INSERT INTO `node_structure` VALUES (647526560479744, 0, '3492895267', 'Variable', 'variableName', '变量名', '606966015', 3); 602 | INSERT INTO `node_structure` VALUES (647526561987072, 0, '1497024707', 'Variable', 'variableProject', '变量项目', '606966015', 3); 603 | INSERT INTO `node_structure` VALUES (647526563527168, 0, '4160627086', 'Variable', 'variableUnits', '单位', '606966015', 3); 604 | INSERT INTO `node_structure` VALUES (647526564993536, 0, '574960578', 'Variable', 'variableValue', '变量值', '606966015', 3); 605 | INSERT INTO `node_structure` VALUES (647526566541824, 0, '3098366364', 'Variable', 'variableRange', '值范围', '606966015', 3); 606 | INSERT INTO `node_structure` VALUES (647526568057344, 0, '4147294034', 'Variable', 'variableAlarmValue', '报警值', '606966015', 3); 607 | INSERT INTO `node_structure` VALUES (647526569564672, 0, '2111639344', 'Object', '电流B', '电流B', '592531114', 2); 608 | INSERT INTO `node_structure` VALUES (647526571170304, 0, '4289804734', 'Variable', 'variableName', '变量名', '2111639344', 3); 609 | INSERT INTO `node_structure` VALUES (647526572718592, 0, '1155051273', 'Variable', 'variableProject', '变量项目', '2111639344', 3); 610 | INSERT INTO `node_structure` VALUES (647526574225920, 0, '2181668146', 'Variable', 'variableUnits', '单位', '2111639344', 3); 611 | INSERT INTO `node_structure` VALUES (647526575741440, 0, '3533923190', 'Variable', 'variableValue', '变量值', '2111639344', 3); 612 | INSERT INTO `node_structure` VALUES (647526577273344, 0, '130246682', 'Variable', 'variableRange', '值范围', '2111639344', 3); 613 | INSERT INTO `node_structure` VALUES (647526578788864, 0, '3900201094', 'Variable', 'variableAlarmValue', '报警值', '2111639344', 3); 614 | INSERT INTO `node_structure` VALUES (647526580296192, 0, '3227340753', 'Object', '电流C', '电流C', '592531114', 2); 615 | INSERT INTO `node_structure` VALUES (647526581836288, 0, '4261258050', 'Variable', 'variableName', '变量名', '3227340753', 3); 616 | INSERT INTO `node_structure` VALUES (647526583360000, 0, '4272165808', 'Variable', 'variableProject', '变量项目', '3227340753', 3); 617 | INSERT INTO `node_structure` VALUES (647526584859136, 0, '3374108142', 'Variable', 'variableUnits', '单位', '3227340753', 3); 618 | INSERT INTO `node_structure` VALUES (647526586382848, 0, '3209707698', 'Variable', 'variableValue', '变量值', '3227340753', 3); 619 | INSERT INTO `node_structure` VALUES (647526587898368, 0, '3179855814', 'Variable', 'variableRange', '值范围', '3227340753', 3); 620 | INSERT INTO `node_structure` VALUES (647526589397504, 0, '835875978', 'Variable', 'variableAlarmValue', '报警值', '3227340753', 3); 621 | INSERT INTO `node_structure` VALUES (647526590896640, 0, '85182113', 'Object', '电压A', '电压A', '592531114', 2); 622 | INSERT INTO `node_structure` VALUES (647526592412160, 0, '3562436062', 'Variable', 'variableName', '变量名', '85182113', 3); 623 | INSERT INTO `node_structure` VALUES (647526593927680, 0, '2724588815', 'Variable', 'variableProject', '变量项目', '85182113', 3); 624 | INSERT INTO `node_structure` VALUES (647526595451392, 0, '644310257', 'Variable', 'variableUnits', '单位', '85182113', 3); 625 | INSERT INTO `node_structure` VALUES (647526597024256, 0, '2228832396', 'Variable', 'variableValue', '变量值', '85182113', 3); 626 | INSERT INTO `node_structure` VALUES (647526598539776, 0, '397684372', 'Variable', 'variableRange', '值范围', '85182113', 3); 627 | INSERT INTO `node_structure` VALUES (647526600055296, 0, '1212550978', 'Variable', 'variableAlarmValue', '报警值', '85182113', 3); 628 | INSERT INTO `node_structure` VALUES (647526601579008, 0, '4227952256', 'Object', '电压B', '电压B', '592531114', 2); 629 | INSERT INTO `node_structure` VALUES (647526603119104, 0, '4270820426', 'Variable', 'variableName', '变量名', '4227952256', 3); 630 | INSERT INTO `node_structure` VALUES (647526604651008, 0, '731591473', 'Variable', 'variableProject', '变量项目', '4227952256', 3); 631 | INSERT INTO `node_structure` VALUES (647526606166528, 0, '2260387397', 'Variable', 'variableUnits', '单位', '4227952256', 3); 632 | INSERT INTO `node_structure` VALUES (647526607714816, 0, '2981265112', 'Variable', 'variableValue', '变量值', '4227952256', 3); 633 | INSERT INTO `node_structure` VALUES (647526609222144, 0, '3586331455', 'Variable', 'variableRange', '值范围', '4227952256', 3); 634 | INSERT INTO `node_structure` VALUES (647526610745856, 0, '889882763', 'Variable', 'variableAlarmValue', '报警值', '4227952256', 3); 635 | INSERT INTO `node_structure` VALUES (647526612269568, 0, '945748358', 'Object', '电压C', '电压C', '592531114', 2); 636 | INSERT INTO `node_structure` VALUES (647526613793280, 0, '3157903585', 'Variable', 'variableName', '变量名', '945748358', 3); 637 | INSERT INTO `node_structure` VALUES (647526615316992, 0, '3931625807', 'Variable', 'variableProject', '变量项目', '945748358', 3); 638 | INSERT INTO `node_structure` VALUES (647526616824320, 0, '2207270933', 'Variable', 'variableUnits', '单位', '945748358', 3); 639 | INSERT INTO `node_structure` VALUES (647526618348032, 0, '2577040370', 'Variable', 'variableValue', '变量值', '945748358', 3); 640 | INSERT INTO `node_structure` VALUES (647526619888128, 0, '1885691215', 'Variable', 'variableRange', '值范围', '945748358', 3); 641 | INSERT INTO `node_structure` VALUES (647526621395456, 0, '1574553773', 'Variable', 'variableAlarmValue', '报警值', '945748358', 3); 642 | INSERT INTO `node_structure` VALUES (647526622910976, 0, '757956842', 'Object', '电量', '电量', '592531114', 2); 643 | INSERT INTO `node_structure` VALUES (647526624467456, 0, '2708503657', 'Variable', 'variableName', '变量名', '757956842', 3); 644 | INSERT INTO `node_structure` VALUES (647526625974784, 0, '2264128165', 'Variable', 'variableProject', '变量项目', '757956842', 3); 645 | INSERT INTO `node_structure` VALUES (647526627473920, 0, '3387619327', 'Variable', 'variableUnits', '单位', '757956842', 3); 646 | INSERT INTO `node_structure` VALUES (647526628989440, 0, '2139324403', 'Variable', 'variableValue', '变量值', '757956842', 3); 647 | INSERT INTO `node_structure` VALUES (647526630521344, 0, '1140903936', 'Variable', 'variableRange', '值范围', '757956842', 3); 648 | INSERT INTO `node_structure` VALUES (647526632053248, 0, '3778060595', 'Variable', 'variableAlarmValue', '报警值', '757956842', 3); 649 | INSERT INTO `node_structure` VALUES (647526633568768, 0, '4072101922', 'Object', '冷冻阀门', '冷冻阀门', '1702084981', 1); 650 | INSERT INTO `node_structure` VALUES (647526635076096, 0, '4266243110', 'Object', '开关状态', '开关状态', '4072101922', 2); 651 | INSERT INTO `node_structure` VALUES (647526636583424, 0, '3008637718', 'Variable', 'variableName', '变量名', '4266243110', 3); 652 | INSERT INTO `node_structure` VALUES (647526638066176, 0, '4269475303', 'Variable', 'variableProject', '变量项目', '4266243110', 3); 653 | INSERT INTO `node_structure` VALUES (647526639598080, 0, '1578923536', 'Variable', 'variableUnits', '单位', '4266243110', 3); 654 | INSERT INTO `node_structure` VALUES (647526641089024, 0, '2353190006', 'Variable', 'variableValue', '变量值', '4266243110', 3); 655 | INSERT INTO `node_structure` VALUES (647526642596352, 0, '2397659955', 'Variable', 'variableRange', '值范围', '4266243110', 3); 656 | INSERT INTO `node_structure` VALUES (647526644111872, 0, '1537566033', 'Variable', 'variableAlarmValue', '报警值', '4266243110', 3); 657 | INSERT INTO `node_structure` VALUES (647526645619200, 0, '2596241622', 'Object', '开合度', '开合度', '4072101922', 2); 658 | INSERT INTO `node_structure` VALUES (647526647101952, 0, '1150312074', 'Variable', 'variableName', '变量名', '2596241622', 3); 659 | INSERT INTO `node_structure` VALUES (647526648633856, 0, '3853101530', 'Variable', 'variableProject', '变量项目', '2596241622', 3); 660 | INSERT INTO `node_structure` VALUES (647526650116608, 0, '3281594028', 'Variable', 'variableUnits', '单位', '2596241622', 3); 661 | INSERT INTO `node_structure` VALUES (647526651623936, 0, '1044982661', 'Variable', 'variableValue', '变量值', '2596241622', 3); 662 | INSERT INTO `node_structure` VALUES (647526653131264, 0, '2374694258', 'Variable', 'variableRange', '值范围', '2596241622', 3); 663 | INSERT INTO `node_structure` VALUES (647526654663168, 0, '4196431418', 'Variable', 'variableAlarmValue', '报警值', '2596241622', 3); 664 | INSERT INTO `node_structure` VALUES (647526656154112, 0, '1843808101', 'Object', '冷却阀门', '冷却阀门', '1702084981', 1); 665 | INSERT INTO `node_structure` VALUES (647526657694208, 0, '4174730298', 'Object', '开关状态', '开关状态', '1843808101', 2); 666 | INSERT INTO `node_structure` VALUES (647526659209728, 0, '3869538175', 'Variable', 'variableName', '变量名', '4174730298', 3); 667 | INSERT INTO `node_structure` VALUES (647526660733440, 0, '3752316547', 'Variable', 'variableProject', '变量项目', '4174730298', 3); 668 | INSERT INTO `node_structure` VALUES (647526662240768, 0, '1953607393', 'Variable', 'variableUnits', '单位', '4174730298', 3); 669 | INSERT INTO `node_structure` VALUES (647526663748096, 0, '1836649759', 'Variable', 'variableValue', '变量值', '4174730298', 3); 670 | INSERT INTO `node_structure` VALUES (647526665271808, 0, '4132692320', 'Variable', 'variableRange', '值范围', '4174730298', 3); 671 | INSERT INTO `node_structure` VALUES (647526666762752, 0, '2528054287', 'Variable', 'variableAlarmValue', '报警值', '4174730298', 3); 672 | INSERT INTO `node_structure` VALUES (647526668278272, 0, '3497692825', 'Object', '开合度', '开合度', '1843808101', 2); 673 | INSERT INTO `node_structure` VALUES (647526669818368, 0, '3856107401', 'Variable', 'variableName', '变量名', '3497692825', 3); 674 | INSERT INTO `node_structure` VALUES (647526671333888, 0, '3427732089', 'Variable', 'variableProject', '变量项目', '3497692825', 3); 675 | INSERT INTO `node_structure` VALUES (647526672841216, 0, '3622959615', 'Variable', 'variableUnits', '单位', '3497692825', 3); 676 | INSERT INTO `node_structure` VALUES (647526674364928, 0, '2819583575', 'Variable', 'variableValue', '变量值', '3497692825', 3); 677 | INSERT INTO `node_structure` VALUES (647526675913216, 0, '2510406230', 'Variable', 'variableRange', '值范围', '3497692825', 3); 678 | INSERT INTO `node_structure` VALUES (647526677412352, 0, '3281752566', 'Variable', 'variableAlarmValue', '报警值', '3497692825', 3); 679 | INSERT INTO `node_structure` VALUES (647526678952448, 0, '3722850860', 'Object', '压力表', '压力表', '1702084981', 1); 680 | INSERT INTO `node_structure` VALUES (647526680484352, 0, '190907197', 'Object', '压力', '压力', '3722850860', 2); 681 | INSERT INTO `node_structure` VALUES (647526681983488, 0, '2758839177', 'Variable', 'variableName', '变量名', '190907197', 3); 682 | INSERT INTO `node_structure` VALUES (647526683490816, 0, '367547493', 'Variable', 'variableProject', '变量项目', '190907197', 3); 683 | INSERT INTO `node_structure` VALUES (647526685014528, 0, '2554737201', 'Variable', 'variableUnits', '单位', '190907197', 3); 684 | INSERT INTO `node_structure` VALUES (647526686538240, 0, '3048465645', 'Variable', 'variableValue', '变量值', '190907197', 3); 685 | INSERT INTO `node_structure` VALUES (647526688045568, 0, '1479381581', 'Variable', 'variableRange', '值范围', '190907197', 3); 686 | INSERT INTO `node_structure` VALUES (647526689552896, 0, '2982936162', 'Variable', 'variableAlarmValue', '报警值', '190907197', 3); 687 | INSERT INTO `node_structure` VALUES (647526691052032, 0, '3251328350', 'Object', '给排水系统', '给排水系统', '85', 0); 688 | INSERT INTO `node_structure` VALUES (647526692534784, 0, '3116801131', 'Object', '生活水泵', '生活水泵', '3251328350', 1); 689 | INSERT INTO `node_structure` VALUES (647526694050304, 0, '1116087966', 'Object', '电量', '电量', '3116801131', 2); 690 | INSERT INTO `node_structure` VALUES (647526695574016, 0, '2502428494', 'Variable', 'variableName', '变量名', '1116087966', 3); 691 | INSERT INTO `node_structure` VALUES (647526697097728, 0, '3187575338', 'Variable', 'variableProject', '变量项目', '1116087966', 3); 692 | INSERT INTO `node_structure` VALUES (647526698621440, 0, '4254262418', 'Variable', 'variableUnits', '单位', '1116087966', 3); 693 | INSERT INTO `node_structure` VALUES (647526700136960, 0, '2546152884', 'Variable', 'variableValue', '变量值', '1116087966', 3); 694 | INSERT INTO `node_structure` VALUES (647526701636096, 0, '3426727949', 'Variable', 'variableRange', '值范围', '1116087966', 3); 695 | INSERT INTO `node_structure` VALUES (647526703176192, 0, '587686036', 'Variable', 'variableAlarmValue', '报警值', '1116087966', 3); 696 | INSERT INTO `node_structure` VALUES (647526704691712, 0, '1701552823', 'Object', '开关状态', '开关状态', '3116801131', 2); 697 | INSERT INTO `node_structure` VALUES (647526706215424, 0, '3312622776', 'Variable', 'variableName', '变量名', '1701552823', 3); 698 | INSERT INTO `node_structure` VALUES (647526707730944, 0, '2048900385', 'Variable', 'variableProject', '变量项目', '1701552823', 3); 699 | INSERT INTO `node_structure` VALUES (647526709271040, 0, '480980721', 'Variable', 'variableUnits', '单位', '1701552823', 3); 700 | INSERT INTO `node_structure` VALUES (647526710778368, 0, '3102666401', 'Variable', 'variableValue', '变量值', '1701552823', 3); 701 | INSERT INTO `node_structure` VALUES (647526712318464, 0, '3628967136', 'Variable', 'variableRange', '值范围', '1701552823', 3); 702 | INSERT INTO `node_structure` VALUES (647526713825792, 0, '2788058496', 'Variable', 'variableAlarmValue', '报警值', '1701552823', 3); 703 | INSERT INTO `node_structure` VALUES (647526715341312, 0, '2512119032', 'Object', '故障', '故障', '3116801131', 2); 704 | INSERT INTO `node_structure` VALUES (647526716881408, 0, '1029618877', 'Variable', 'variableName', '变量名', '2512119032', 3); 705 | INSERT INTO `node_structure` VALUES (647526718372352, 0, '1819372765', 'Variable', 'variableProject', '变量项目', '2512119032', 3); 706 | INSERT INTO `node_structure` VALUES (647526719855104, 0, '1944299859', 'Variable', 'variableUnits', '单位', '2512119032', 3); 707 | INSERT INTO `node_structure` VALUES (647526721370624, 0, '2098397143', 'Variable', 'variableValue', '变量值', '2512119032', 3); 708 | INSERT INTO `node_structure` VALUES (647526722877952, 0, '1928370430', 'Variable', 'variableRange', '值范围', '2512119032', 3); 709 | INSERT INTO `node_structure` VALUES (647526724418048, 0, '4008328544', 'Variable', 'variableAlarmValue', '报警值', '2512119032', 3); 710 | INSERT INTO `node_structure` VALUES (647526725908992, 0, '308786962', 'Object', '手/自动', '手/自动', '3116801131', 2); 711 | INSERT INTO `node_structure` VALUES (647526727432704, 0, '928912886', 'Variable', 'variableName', '变量名', '308786962', 3); 712 | INSERT INTO `node_structure` VALUES (647526728940032, 0, '741286893', 'Variable', 'variableProject', '变量项目', '308786962', 3); 713 | INSERT INTO `node_structure` VALUES (647526730447360, 0, '3219770138', 'Variable', 'variableUnits', '单位', '308786962', 3); 714 | INSERT INTO `node_structure` VALUES (647526731954688, 0, '2326690517', 'Variable', 'variableValue', '变量值', '308786962', 3); 715 | INSERT INTO `node_structure` VALUES (647526733486592, 0, '2412611819', 'Variable', 'variableRange', '值范围', '308786962', 3); 716 | INSERT INTO `node_structure` VALUES (647526735018496, 0, '2122363620', 'Variable', 'variableAlarmValue', '报警值', '308786962', 3); 717 | INSERT INTO `node_structure` VALUES (647526736550400, 0, '4065285666', 'Object', '工频/变频', '工频/变频', '3116801131', 2); 718 | INSERT INTO `node_structure` VALUES (647526738098688, 0, '2486263298', 'Variable', 'variableName', '变量名', '4065285666', 3); 719 | INSERT INTO `node_structure` VALUES (647526739646976, 0, '1690728801', 'Variable', 'variableProject', '变量项目', '4065285666', 3); 720 | INSERT INTO `node_structure` VALUES (647526741178880, 0, '220179341', 'Variable', 'variableUnits', '单位', '4065285666', 3); 721 | INSERT INTO `node_structure` VALUES (647526742735360, 0, '2903400395', 'Variable', 'variableValue', '变量值', '4065285666', 3); 722 | INSERT INTO `node_structure` VALUES (647526744250880, 0, '959906712', 'Variable', 'variableRange', '值范围', '4065285666', 3); 723 | INSERT INTO `node_structure` VALUES (647526745750016, 0, '2731190407', 'Variable', 'variableAlarmValue', '报警值', '4065285666', 3); 724 | INSERT INTO `node_structure` VALUES (647526747249152, 0, '372308997', 'Object', '变频频率', '变频频率', '3116801131', 2); 725 | INSERT INTO `node_structure` VALUES (647526748764672, 0, '750507879', 'Variable', 'variableName', '变量名', '372308997', 3); 726 | INSERT INTO `node_structure` VALUES (647526750296576, 0, '2134116501', 'Variable', 'variableProject', '变量项目', '372308997', 3); 727 | INSERT INTO `node_structure` VALUES (647526751803904, 0, '606625313', 'Variable', 'variableUnits', '单位', '372308997', 3); 728 | INSERT INTO `node_structure` VALUES (647526753335808, 0, '1008258724', 'Variable', 'variableValue', '变量值', '372308997', 3); 729 | INSERT INTO `node_structure` VALUES (647526754834944, 0, '1428888139', 'Variable', 'variableRange', '值范围', '372308997', 3); 730 | INSERT INTO `node_structure` VALUES (647526756342272, 0, '3997423888', 'Variable', 'variableAlarmValue', '报警值', '372308997', 3); 731 | INSERT INTO `node_structure` VALUES (647526757865984, 0, '2160128039', 'Object', '电流A', '电流A', '3116801131', 2); 732 | INSERT INTO `node_structure` VALUES (647526759356928, 0, '3424845404', 'Variable', 'variableName', '变量名', '2160128039', 3); 733 | INSERT INTO `node_structure` VALUES (647526760880640, 0, '473496666', 'Variable', 'variableProject', '变量项目', '2160128039', 3); 734 | INSERT INTO `node_structure` VALUES (647526762379776, 0, '2279567330', 'Variable', 'variableUnits', '单位', '2160128039', 3); 735 | INSERT INTO `node_structure` VALUES (647526763919872, 0, '3001559683', 'Variable', 'variableValue', '变量值', '2160128039', 3); 736 | INSERT INTO `node_structure` VALUES (647526765419008, 0, '3328495760', 'Variable', 'variableRange', '值范围', '2160128039', 3); 737 | INSERT INTO `node_structure` VALUES (647526766934528, 0, '3514765214', 'Variable', 'variableAlarmValue', '报警值', '2160128039', 3); 738 | INSERT INTO `node_structure` VALUES (647526768417280, 0, '2828085428', 'Object', '电流B', '电流B', '3116801131', 2); 739 | INSERT INTO `node_structure` VALUES (647526769957376, 0, '3069501760', 'Variable', 'variableName', '变量名', '2828085428', 3); 740 | INSERT INTO `node_structure` VALUES (647526771472896, 0, '1283898410', 'Variable', 'variableProject', '变量项目', '2828085428', 3); 741 | INSERT INTO `node_structure` VALUES (647526772972032, 0, '1072037015', 'Variable', 'variableUnits', '单位', '2828085428', 3); 742 | INSERT INTO `node_structure` VALUES (647526774495744, 0, '3515212684', 'Variable', 'variableValue', '变量值', '2828085428', 3); 743 | INSERT INTO `node_structure` VALUES (647526775994880, 0, '2375892658', 'Variable', 'variableRange', '值范围', '2828085428', 3); 744 | INSERT INTO `node_structure` VALUES (647526777494016, 0, '1447452718', 'Variable', 'variableAlarmValue', '报警值', '2828085428', 3); 745 | INSERT INTO `node_structure` VALUES (647526779001344, 0, '953742068', 'Object', '电流C', '电流C', '3116801131', 2); 746 | INSERT INTO `node_structure` VALUES (647526780492288, 0, '1225721659', 'Variable', 'variableName', '变量名', '953742068', 3); 747 | INSERT INTO `node_structure` VALUES (647526782032384, 0, '870292670', 'Variable', 'variableProject', '变量项目', '953742068', 3); 748 | INSERT INTO `node_structure` VALUES (647526783539712, 0, '244811624', 'Variable', 'variableUnits', '单位', '953742068', 3); 749 | INSERT INTO `node_structure` VALUES (647526785022464, 0, '3180148030', 'Variable', 'variableValue', '变量值', '953742068', 3); 750 | INSERT INTO `node_structure` VALUES (647526786537984, 0, '2853333143', 'Variable', 'variableRange', '值范围', '953742068', 3); 751 | INSERT INTO `node_structure` VALUES (647526788053504, 0, '1128186659', 'Variable', 'variableAlarmValue', '报警值', '953742068', 3); 752 | INSERT INTO `node_structure` VALUES (647526789544448, 0, '1402864965', 'Object', '电压A', '电压A', '3116801131', 2); 753 | INSERT INTO `node_structure` VALUES (647526791068160, 0, '2709375587', 'Variable', 'variableName', '变量名', '1402864965', 3); 754 | INSERT INTO `node_structure` VALUES (647526792616448, 0, '347725248', 'Variable', 'variableProject', '变量项目', '1402864965', 3); 755 | INSERT INTO `node_structure` VALUES (647526794131968, 0, '2773990061', 'Variable', 'variableUnits', '单位', '1402864965', 3); 756 | INSERT INTO `node_structure` VALUES (647526795639296, 0, '1216731403', 'Variable', 'variableValue', '变量值', '1402864965', 3); 757 | INSERT INTO `node_structure` VALUES (647526797138432, 0, '3125795628', 'Variable', 'variableRange', '值范围', '1402864965', 3); 758 | INSERT INTO `node_structure` VALUES (647526798637568, 0, '767286723', 'Variable', 'variableAlarmValue', '报警值', '1402864965', 3); 759 | INSERT INTO `node_structure` VALUES (647526800136704, 0, '907594087', 'Object', '电压B', '电压B', '3116801131', 2); 760 | INSERT INTO `node_structure` VALUES (647526801676800, 0, '336268577', 'Variable', 'variableName', '变量名', '907594087', 3); 761 | INSERT INTO `node_structure` VALUES (647526803208704, 0, '2167138264', 'Variable', 'variableProject', '变量项目', '907594087', 3); 762 | INSERT INTO `node_structure` VALUES (647526804740608, 0, '1978087020', 'Variable', 'variableUnits', '单位', '907594087', 3); 763 | INSERT INTO `node_structure` VALUES (647526806264320, 0, '383493812', 'Variable', 'variableValue', '变量值', '907594087', 3); 764 | INSERT INTO `node_structure` VALUES (647526807763456, 0, '1167802504', 'Variable', 'variableRange', '值范围', '907594087', 3); 765 | INSERT INTO `node_structure` VALUES (647526809287168, 0, '668735848', 'Variable', 'variableAlarmValue', '报警值', '907594087', 3); 766 | INSERT INTO `node_structure` VALUES (647526810794496, 0, '3709465490', 'Object', '电压C', '电压C', '3116801131', 2); 767 | INSERT INTO `node_structure` VALUES (647526812293632, 0, '1904354179', 'Variable', 'variableName', '变量名', '3709465490', 3); 768 | INSERT INTO `node_structure` VALUES (647526813825536, 0, '2708632301', 'Variable', 'variableProject', '变量项目', '3709465490', 3); 769 | INSERT INTO `node_structure` VALUES (647526815341056, 0, '3524217211', 'Variable', 'variableUnits', '单位', '3709465490', 3); 770 | INSERT INTO `node_structure` VALUES (647526816848384, 0, '2238810674', 'Variable', 'variableValue', '变量值', '3709465490', 3); 771 | INSERT INTO `node_structure` VALUES (647526818388480, 0, '1339709910', 'Variable', 'variableRange', '值范围', '3709465490', 3); 772 | INSERT INTO `node_structure` VALUES (647526819904000, 0, '1332752003', 'Variable', 'variableAlarmValue', '报警值', '3709465490', 3); 773 | INSERT INTO `node_structure` VALUES (647526821444096, 0, '2839026842', 'Object', '消防泵', '消防泵', '3251328350', 1); 774 | INSERT INTO `node_structure` VALUES (647526822992384, 0, '2789266214', 'Object', '电量', '电量', '2839026842', 2); 775 | INSERT INTO `node_structure` VALUES (647526824507904, 0, '1800192660', 'Variable', 'variableName', '变量名', '2789266214', 3); 776 | INSERT INTO `node_structure` VALUES (647526825990656, 0, '3996111497', 'Variable', 'variableProject', '变量项目', '2789266214', 3); 777 | INSERT INTO `node_structure` VALUES (647526827489792, 0, '3872062105', 'Variable', 'variableUnits', '单位', '2789266214', 3); 778 | INSERT INTO `node_structure` VALUES (647526829021696, 0, '3540762221', 'Variable', 'variableValue', '变量值', '2789266214', 3); 779 | INSERT INTO `node_structure` VALUES (647526830520832, 0, '435947396', 'Variable', 'variableRange', '值范围', '2789266214', 3); 780 | INSERT INTO `node_structure` VALUES (647526832036352, 0, '3352892348', 'Variable', 'variableAlarmValue', '报警值', '2789266214', 3); 781 | INSERT INTO `node_structure` VALUES (647526833568256, 0, '37130960', 'Object', '开关状态', '开关状态', '2839026842', 2); 782 | INSERT INTO `node_structure` VALUES (647526835124736, 0, '1785560804', 'Variable', 'variableName', '变量名', '37130960', 3); 783 | INSERT INTO `node_structure` VALUES (647526836615680, 0, '1090645500', 'Variable', 'variableProject', '变量项目', '37130960', 3); 784 | INSERT INTO `node_structure` VALUES (647526838123008, 0, '3927360510', 'Variable', 'variableUnits', '单位', '37130960', 3); 785 | INSERT INTO `node_structure` VALUES (647526839638528, 0, '2208050657', 'Variable', 'variableValue', '变量值', '37130960', 3); 786 | INSERT INTO `node_structure` VALUES (647526841129472, 0, '4033957648', 'Variable', 'variableRange', '值范围', '37130960', 3); 787 | INSERT INTO `node_structure` VALUES (647526842661376, 0, '675133981', 'Variable', 'variableAlarmValue', '报警值', '37130960', 3); 788 | INSERT INTO `node_structure` VALUES (647526844152320, 0, '2902098745', 'Object', '故障', '故障', '2839026842', 2); 789 | INSERT INTO `node_structure` VALUES (647526845659648, 0, '1202655311', 'Variable', 'variableName', '变量名', '2902098745', 3); 790 | INSERT INTO `node_structure` VALUES (647526847158784, 0, '4252855082', 'Variable', 'variableProject', '变量项目', '2902098745', 3); 791 | INSERT INTO `node_structure` VALUES (647526848698880, 0, '3649459753', 'Variable', 'variableUnits', '单位', '2902098745', 3); 792 | INSERT INTO `node_structure` VALUES (647526850222592, 0, '2887014337', 'Variable', 'variableValue', '变量值', '2902098745', 3); 793 | INSERT INTO `node_structure` VALUES (647526851697152, 0, '1707921386', 'Variable', 'variableRange', '值范围', '2902098745', 3); 794 | INSERT INTO `node_structure` VALUES (647526853220864, 0, '3088217043', 'Variable', 'variableAlarmValue', '报警值', '2902098745', 3); 795 | INSERT INTO `node_structure` VALUES (647526854744576, 0, '2670939399', 'Object', '手/自动', '手/自动', '2839026842', 2); 796 | INSERT INTO `node_structure` VALUES (647526856251904, 0, '2957980824', 'Variable', 'variableName', '变量名', '2670939399', 3); 797 | INSERT INTO `node_structure` VALUES (647526857783808, 0, '2424244453', 'Variable', 'variableProject', '变量项目', '2670939399', 3); 798 | INSERT INTO `node_structure` VALUES (647526859332096, 0, '2702872601', 'Variable', 'variableUnits', '单位', '2670939399', 3); 799 | INSERT INTO `node_structure` VALUES (647526860847616, 0, '3633395548', 'Variable', 'variableValue', '变量值', '2670939399', 3); 800 | INSERT INTO `node_structure` VALUES (647526862363136, 0, '3461311312', 'Variable', 'variableRange', '值范围', '2670939399', 3); 801 | INSERT INTO `node_structure` VALUES (647526863878656, 0, '2011779129', 'Variable', 'variableAlarmValue', '报警值', '2670939399', 3); 802 | INSERT INTO `node_structure` VALUES (647526865402368, 0, '4071930375', 'Object', '工频/变频', '工频/变频', '2839026842', 2); 803 | INSERT INTO `node_structure` VALUES (647526866901504, 0, '1830624038', 'Variable', 'variableName', '变量名', '4071930375', 3); 804 | INSERT INTO `node_structure` VALUES (647526868417024, 0, '2254955340', 'Variable', 'variableProject', '变量项目', '4071930375', 3); 805 | INSERT INTO `node_structure` VALUES (647526869940736, 0, '1035980492', 'Variable', 'variableUnits', '单位', '4071930375', 3); 806 | INSERT INTO `node_structure` VALUES (647526871472640, 0, '248596788', 'Variable', 'variableValue', '变量值', '4071930375', 3); 807 | INSERT INTO `node_structure` VALUES (647526872971776, 0, '3579252118', 'Variable', 'variableRange', '值范围', '4071930375', 3); 808 | INSERT INTO `node_structure` VALUES (647526874470912, 0, '2633607449', 'Variable', 'variableAlarmValue', '报警值', '4071930375', 3); 809 | INSERT INTO `node_structure` VALUES (647526875986432, 0, '3897906233', 'Object', '变频频率', '变频频率', '2839026842', 2); 810 | INSERT INTO `node_structure` VALUES (647526877477376, 0, '2736863430', 'Variable', 'variableName', '变量名', '3897906233', 3); 811 | INSERT INTO `node_structure` VALUES (647526878968320, 0, '2595230192', 'Variable', 'variableProject', '变量项目', '3897906233', 3); 812 | INSERT INTO `node_structure` VALUES (647526880459264, 0, '4275047564', 'Variable', 'variableUnits', '单位', '3897906233', 3); 813 | INSERT INTO `node_structure` VALUES (647526881966592, 0, '2938848310', 'Variable', 'variableValue', '变量值', '3897906233', 3); 814 | INSERT INTO `node_structure` VALUES (647526883457536, 0, '2301524778', 'Variable', 'variableRange', '值范围', '3897906233', 3); 815 | INSERT INTO `node_structure` VALUES (647526884989440, 0, '191248963', 'Variable', 'variableAlarmValue', '报警值', '3897906233', 3); 816 | INSERT INTO `node_structure` VALUES (647526886488576, 0, '1083807745', 'Object', '电流A', '电流A', '2839026842', 2); 817 | INSERT INTO `node_structure` VALUES (647526887995904, 0, '1149382788', 'Variable', 'variableName', '变量名', '1083807745', 3); 818 | INSERT INTO `node_structure` VALUES (647526889519616, 0, '2565925262', 'Variable', 'variableProject', '变量项目', '1083807745', 3); 819 | INSERT INTO `node_structure` VALUES (647526891018752, 0, '353950955', 'Variable', 'variableUnits', '单位', '1083807745', 3); 820 | INSERT INTO `node_structure` VALUES (647526892567040, 0, '2951382822', 'Variable', 'variableValue', '变量值', '1083807745', 3); 821 | INSERT INTO `node_structure` VALUES (647526894107136, 0, '3063888379', 'Variable', 'variableRange', '值范围', '1083807745', 3); 822 | INSERT INTO `node_structure` VALUES (647526895606272, 0, '3382165260', 'Variable', 'variableAlarmValue', '报警值', '1083807745', 3); 823 | INSERT INTO `node_structure` VALUES (647526897113600, 0, '1790461357', 'Object', '电流B', '电流B', '2839026842', 2); 824 | INSERT INTO `node_structure` VALUES (647526898620928, 0, '1342968260', 'Variable', 'variableName', '变量名', '1790461357', 3); 825 | INSERT INTO `node_structure` VALUES (647526900161024, 0, '1873098539', 'Variable', 'variableProject', '变量项目', '1790461357', 3); 826 | INSERT INTO `node_structure` VALUES (647526901676544, 0, '198845867', 'Variable', 'variableUnits', '单位', '1790461357', 3); 827 | INSERT INTO `node_structure` VALUES (647526903167488, 0, '665848546', 'Variable', 'variableValue', '变量值', '1790461357', 3); 828 | INSERT INTO `node_structure` VALUES (647526904699392, 0, '3508925977', 'Variable', 'variableRange', '值范围', '1790461357', 3); 829 | INSERT INTO `node_structure` VALUES (647526906247680, 0, '1010500495', 'Variable', 'variableAlarmValue', '报警值', '1790461357', 3); 830 | INSERT INTO `node_structure` VALUES (647526907755008, 0, '128462360', 'Object', '电流C', '电流C', '2839026842', 2); 831 | INSERT INTO `node_structure` VALUES (647526909286912, 0, '2012477557', 'Variable', 'variableName', '变量名', '128462360', 3); 832 | INSERT INTO `node_structure` VALUES (647526910802432, 0, '3365292665', 'Variable', 'variableProject', '变量项目', '128462360', 3); 833 | INSERT INTO `node_structure` VALUES (647526912309760, 0, '3406723876', 'Variable', 'variableUnits', '单位', '128462360', 3); 834 | INSERT INTO `node_structure` VALUES (647526913817088, 0, '4264466155', 'Variable', 'variableValue', '变量值', '128462360', 3); 835 | INSERT INTO `node_structure` VALUES (647526915340800, 0, '2717167754', 'Variable', 'variableRange', '值范围', '128462360', 3); 836 | INSERT INTO `node_structure` VALUES (647526916856320, 0, '4116299359', 'Variable', 'variableAlarmValue', '报警值', '128462360', 3); 837 | INSERT INTO `node_structure` VALUES (647526918363648, 0, '2759459412', 'Object', '电压A', '电压A', '2839026842', 2); 838 | INSERT INTO `node_structure` VALUES (647526919895552, 0, '918592516', 'Variable', 'variableName', '变量名', '2759459412', 3); 839 | INSERT INTO `node_structure` VALUES (647526921394688, 0, '1364498970', 'Variable', 'variableProject', '变量项目', '2759459412', 3); 840 | INSERT INTO `node_structure` VALUES (647526922910208, 0, '583119085', 'Variable', 'variableUnits', '单位', '2759459412', 3); 841 | INSERT INTO `node_structure` VALUES (647526924450304, 0, '3561754542', 'Variable', 'variableValue', '变量值', '2759459412', 3); 842 | INSERT INTO `node_structure` VALUES (647526925974016, 0, '1206287426', 'Variable', 'variableRange', '值范围', '2759459412', 3); 843 | INSERT INTO `node_structure` VALUES (647526927481344, 0, '2771157756', 'Variable', 'variableAlarmValue', '报警值', '2759459412', 3); 844 | INSERT INTO `node_structure` VALUES (647526928996864, 0, '3219499769', 'Object', '电压B', '电压B', '2839026842', 2); 845 | INSERT INTO `node_structure` VALUES (647526930512384, 0, '2930730100', 'Variable', 'variableName', '变量名', '3219499769', 3); 846 | INSERT INTO `node_structure` VALUES (647526932027904, 0, '1030244249', 'Variable', 'variableProject', '变量项目', '3219499769', 3); 847 | INSERT INTO `node_structure` VALUES (647526933551616, 0, '4258579956', 'Variable', 'variableUnits', '单位', '3219499769', 3); 848 | INSERT INTO `node_structure` VALUES (647526935067136, 0, '958665311', 'Variable', 'variableValue', '变量值', '3219499769', 3); 849 | INSERT INTO `node_structure` VALUES (647526936582656, 0, '276100379', 'Variable', 'variableRange', '值范围', '3219499769', 3); 850 | INSERT INTO `node_structure` VALUES (647526938106368, 0, '4054642892', 'Variable', 'variableAlarmValue', '报警值', '3219499769', 3); 851 | INSERT INTO `node_structure` VALUES (647526939638272, 0, '250233462', 'Object', '电压C', '电压C', '2839026842', 2); 852 | INSERT INTO `node_structure` VALUES (647526941145600, 0, '4191554460', 'Variable', 'variableName', '变量名', '250233462', 3); 853 | INSERT INTO `node_structure` VALUES (647526942661120, 0, '103754931', 'Variable', 'variableProject', '变量项目', '250233462', 3); 854 | INSERT INTO `node_structure` VALUES (647526944201216, 0, '1593078149', 'Variable', 'variableUnits', '单位', '250233462', 3); 855 | INSERT INTO `node_structure` VALUES (647526945692160, 0, '2316660535', 'Variable', 'variableValue', '变量值', '250233462', 3); 856 | INSERT INTO `node_structure` VALUES (647526947215872, 0, '4220162129', 'Variable', 'variableRange', '值范围', '250233462', 3); 857 | INSERT INTO `node_structure` VALUES (647526948731392, 0, '1926321467', 'Variable', 'variableAlarmValue', '报警值', '250233462', 3); 858 | INSERT INTO `node_structure` VALUES (647526950238720, 0, '3096417289', 'Object', '生活水池', '生活水池', '3251328350', 1); 859 | INSERT INTO `node_structure` VALUES (647526951746048, 0, '160701360', 'Object', '水位(液位)', '水位(液位)', '3096417289', 2); 860 | INSERT INTO `node_structure` VALUES (647526953286144, 0, '1114331664', 'Variable', 'variableName', '变量名', '160701360', 3); 861 | INSERT INTO `node_structure` VALUES (647526954801664, 0, '1037243601', 'Variable', 'variableProject', '变量项目', '160701360', 3); 862 | INSERT INTO `node_structure` VALUES (647526956308992, 0, '3794207675', 'Variable', 'variableUnits', '单位', '160701360', 3); 863 | INSERT INTO `node_structure` VALUES (647526957849088, 0, '3770530250', 'Variable', 'variableValue', '变量值', '160701360', 3); 864 | INSERT INTO `node_structure` VALUES (647526959372800, 0, '1626073423', 'Variable', 'variableRange', '值范围', '160701360', 3); 865 | INSERT INTO `node_structure` VALUES (647526960912896, 0, '2075255802', 'Variable', 'variableAlarmValue', '报警值', '160701360', 3); 866 | INSERT INTO `node_structure` VALUES (647526962444800, 0, '1479386833', 'Object', '消防水池', '消防水池', '3251328350', 1); 867 | INSERT INTO `node_structure` VALUES (647526963968512, 0, '643946843', 'Object', '水位(液位)', '水位(液位)', '1479386833', 2); 868 | INSERT INTO `node_structure` VALUES (647526965475840, 0, '436194645', 'Variable', 'variableName', '变量名', '643946843', 3); 869 | INSERT INTO `node_structure` VALUES (647526966999552, 0, '3037260875', 'Variable', 'variableProject', '变量项目', '643946843', 3); 870 | INSERT INTO `node_structure` VALUES (647526968515072, 0, '4268340051', 'Variable', 'variableUnits', '单位', '643946843', 3); 871 | INSERT INTO `node_structure` VALUES (647526970055168, 0, '3905184518', 'Variable', 'variableValue', '变量值', '643946843', 3); 872 | INSERT INTO `node_structure` VALUES (647526971578880, 0, '3454032659', 'Variable', 'variableRange', '值范围', '643946843', 3); 873 | INSERT INTO `node_structure` VALUES (647526973102592, 0, '3973971593', 'Variable', 'variableAlarmValue', '报警值', '643946843', 3); 874 | INSERT INTO `node_structure` VALUES (647526974601728, 0, '630646653', 'Object', '生活水管网', '生活水管网', '3251328350', 1); 875 | INSERT INTO `node_structure` VALUES (647526976141824, 0, '3720750012', 'Object', '压力', '压力', '630646653', 2); 876 | INSERT INTO `node_structure` VALUES (647526977649152, 0, '1320386388', 'Variable', 'variableName', '变量名', '3720750012', 3); 877 | INSERT INTO `node_structure` VALUES (647526979164672, 0, '3310837465', 'Variable', 'variableProject', '变量项目', '3720750012', 3); 878 | INSERT INTO `node_structure` VALUES (647526980721152, 0, '355878027', 'Variable', 'variableUnits', '单位', '3720750012', 3); 879 | INSERT INTO `node_structure` VALUES (647526982236672, 0, '1537108901', 'Variable', 'variableValue', '变量值', '3720750012', 3); 880 | INSERT INTO `node_structure` VALUES (647526983776768, 0, '2527518375', 'Variable', 'variableRange', '值范围', '3720750012', 3); 881 | INSERT INTO `node_structure` VALUES (647526985284096, 0, '1311692830', 'Variable', 'variableAlarmValue', '报警值', '3720750012', 3); 882 | INSERT INTO `node_structure` VALUES (647526986816000, 0, '625643408', 'Object', '消防水管网', '消防水管网', '3251328350', 1); 883 | INSERT INTO `node_structure` VALUES (647526988339712, 0, '3139806906', 'Object', '压力', '压力', '625643408', 2); 884 | INSERT INTO `node_structure` VALUES (647526989855232, 0, '220696821', 'Variable', 'variableName', '变量名', '3139806906', 3); 885 | INSERT INTO `node_structure` VALUES (647526991362560, 0, '1695159469', 'Variable', 'variableProject', '变量项目', '3139806906', 3); 886 | INSERT INTO `node_structure` VALUES (647526992853504, 0, '2455726214', 'Variable', 'variableUnits', '单位', '3139806906', 3); 887 | INSERT INTO `node_structure` VALUES (647526994369024, 0, '2949326099', 'Variable', 'variableValue', '变量值', '3139806906', 3); 888 | INSERT INTO `node_structure` VALUES (647526995884544, 0, '1671703270', 'Variable', 'variableRange', '值范围', '3139806906', 3); 889 | INSERT INTO `node_structure` VALUES (647526997375488, 0, '4058909930', 'Variable', 'variableAlarmValue', '报警值', '3139806906', 3); 890 | INSERT INTO `node_structure` VALUES (647526998858240, 0, '568197106', 'Object', '排污泵', '排污泵', '3251328350', 1); 891 | INSERT INTO `node_structure` VALUES (647527000357376, 0, '2254524882', 'Object', '开关状态', '开关状态', '568197106', 2); 892 | INSERT INTO `node_structure` VALUES (647527001856512, 0, '2069860518', 'Variable', 'variableName', '变量名', '2254524882', 3); 893 | INSERT INTO `node_structure` VALUES (647527003363840, 0, '3511330620', 'Variable', 'variableProject', '变量项目', '2254524882', 3); 894 | INSERT INTO `node_structure` VALUES (647527004928512, 0, '3047865925', 'Variable', 'variableUnits', '单位', '2254524882', 3); 895 | INSERT INTO `node_structure` VALUES (647527006444032, 0, '4269537015', 'Variable', 'variableValue', '变量值', '2254524882', 3); 896 | INSERT INTO `node_structure` VALUES (647527007975936, 0, '1834811079', 'Variable', 'variableRange', '值范围', '2254524882', 3); 897 | INSERT INTO `node_structure` VALUES (647527009507840, 0, '2826892846', 'Variable', 'variableAlarmValue', '报警值', '2254524882', 3); 898 | INSERT INTO `node_structure` VALUES (647527011015168, 0, '2949415162', 'Object', '故障', '故障', '568197106', 2); 899 | INSERT INTO `node_structure` VALUES (647527012514304, 0, '3357976899', 'Variable', 'variableName', '变量名', '2949415162', 3); 900 | INSERT INTO `node_structure` VALUES (647527014046208, 0, '3981778538', 'Variable', 'variableProject', '变量项目', '2949415162', 3); 901 | INSERT INTO `node_structure` VALUES (647527015545344, 0, '3319243769', 'Variable', 'variableUnits', '单位', '2949415162', 3); 902 | INSERT INTO `node_structure` VALUES (647527017060864, 0, '3283152725', 'Variable', 'variableValue', '变量值', '2949415162', 3); 903 | INSERT INTO `node_structure` VALUES (647527018560000, 0, '4051877351', 'Variable', 'variableRange', '值范围', '2949415162', 3); 904 | INSERT INTO `node_structure` VALUES (647527020059136, 0, '4017319040', 'Variable', 'variableAlarmValue', '报警值', '2949415162', 3); 905 | INSERT INTO `node_structure` VALUES (647527021574656, 0, '4272786814', 'Object', '手/自动', '手/自动', '568197106', 2); 906 | INSERT INTO `node_structure` VALUES (647527023090176, 0, '3082477651', 'Variable', 'variableName', '变量名', '4272786814', 3); 907 | INSERT INTO `node_structure` VALUES (647527024589312, 0, '3511388505', 'Variable', 'variableProject', '变量项目', '4272786814', 3); 908 | INSERT INTO `node_structure` VALUES (647527026121216, 0, '292844042', 'Variable', 'variableUnits', '单位', '4272786814', 3); 909 | INSERT INTO `node_structure` VALUES (647527027661312, 0, '877211178', 'Variable', 'variableValue', '变量值', '4272786814', 3); 910 | INSERT INTO `node_structure` VALUES (647527029201408, 0, '2416461556', 'Variable', 'variableRange', '值范围', '4272786814', 3); 911 | INSERT INTO `node_structure` VALUES (647527030716928, 0, '179557508', 'Variable', 'variableAlarmValue', '报警值', '4272786814', 3); 912 | INSERT INTO `node_structure` VALUES (647527032232448, 0, '3093329492', 'Object', '污水池', '污水池', '3251328350', 1); 913 | INSERT INTO `node_structure` VALUES (647527033788928, 0, '4290545466', 'Object', '高水位', '高水位', '3093329492', 2); 914 | INSERT INTO `node_structure` VALUES (647527035361792, 0, '1160207584', 'Variable', 'variableName', '变量名', '4290545466', 3); 915 | INSERT INTO `node_structure` VALUES (647527036885504, 0, '1255537783', 'Variable', 'variableProject', '变量项目', '4290545466', 3); 916 | INSERT INTO `node_structure` VALUES (647527038368256, 0, '481161919', 'Variable', 'variableUnits', '单位', '4290545466', 3); 917 | INSERT INTO `node_structure` VALUES (647527039859200, 0, '4111777265', 'Variable', 'variableValue', '变量值', '4290545466', 3); 918 | INSERT INTO `node_structure` VALUES (647527041374720, 0, '1710868178', 'Variable', 'variableRange', '值范围', '4290545466', 3); 919 | INSERT INTO `node_structure` VALUES (647527042898432, 0, '3146284908', 'Variable', 'variableAlarmValue', '报警值', '4290545466', 3); 920 | 921 | SET FOREIGN_KEY_CHECKS = 1; 922 | -------------------------------------------------------------------------------- /src/main/resources/mapper/NodeStructureMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | INSERT INTO node_structure( 22 | id, 23 | namespace_index, 24 | identifier, 25 | node_class, 26 | browse_name, 27 | display_name, 28 | parent_identifier, 29 | level) VALUES 30 | ( 31 | #{nodeStructure.id}, 32 | #{nodeStructure.namespaceIndex}, 33 | #{nodeStructure.identifier}, 34 | #{nodeStructure.nodeClass}, 35 | #{nodeStructure.browseName}, 36 | #{nodeStructure.displayName}, 37 | #{nodeStructure.parentIdentifier}, 38 | #{nodeStructure.level} 39 | )ON duplicate KEY UPDATE 40 | namespace_index = VALUES(namespace_index), 41 | identifier = VALUES(identifier), 42 | browse_name = VALUES(browse_name), 43 | display_name = VALUES(display_name), 44 | parent_identifier = VALUES(parent_identifier), 45 | level = VALUES(level) 46 | 47 | 48 | 49 | 50 | INSERT INTO node_structure( 51 | id, 52 | namespace_index, 53 | identifier, 54 | node_class, 55 | browse_name, 56 | display_name, 57 | parent_identifier, 58 | level) VALUES 59 | 60 | ( 61 | #{nodeStructure.id}, 62 | #{nodeStructure.namespaceIndex}, 63 | #{nodeStructure.identifier}, 64 | #{nodeStructure.nodeClass}, 65 | #{nodeStructure.browseName}, 66 | #{nodeStructure.displayName}, 67 | #{nodeStructure.parentIdentifier}, 68 | #{nodeStructure.level} 69 | ) 70 | 71 | 72 | 73 | 74 | 75 | INSERT INTO node_structure( 76 | id, 77 | namespace_index, 78 | identifier, 79 | node_class, 80 | browse_name, 81 | display_name, 82 | parent_identifier, 83 | level) VALUES 84 | 85 | ( 86 | #{nodeStructure.id}, 87 | #{nodeStructure.namespaceIndex}, 88 | #{nodeStructure.identifier}, 89 | #{nodeStructure.nodeClass}, 90 | #{nodeStructure.browseName}, 91 | #{nodeStructure.displayName}, 92 | #{nodeStructure.parentIdentifier}, 93 | #{nodeStructure.level} 94 | ) 95 | 96 | ON duplicate KEY UPDATE 97 | namespace_index = VALUES(namespace_index), 98 | identifier = VALUES(identifier), 99 | node_class = VALUES(node_class), 100 | browse_name = VALUES(browse_name), 101 | display_name = VALUES(display_name), 102 | parent_identifier = VALUES(parent_identifier), 103 | level = VALUES(level) 104 | 105 | 106 | 107 | select * from node_structure 108 | 109 | 110 | -------------------------------------------------------------------------------- /src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{title}} 13 | 16 | 19 | 20 | 23 | 24 | 27 | 28 | 31 | 32 | 35 | 36 | 39 | 40 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 117 | --------------------------------------------------------------------------------