Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/controller/EdgStorageCageController.java
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/service/EdgStorageCageDetailsService.java
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/service/impl/EdgStorageCageDetailsServiceImpl.java
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/service/impl/EdgStorageCageServiceImpl.java
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/service/GlassInfoService.java
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/service/LogicService.java
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/service/impl/TaskCacheServiceImpl.java
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
| | | <component name="FacetManager">
|
| | | <facet type="web" name="Web">
|
| | | <configuration>
|
| | | <webroots />
|
| | | <sourceRoots>
|
| | | <root url="file://$MODULE_DIR$/src/main/java" />
|
| | | <root url="file://$MODULE_DIR$/src/main/resources" />
|
| | | </sourceRoots>
|
| | | </configuration>
|
| | | </facet>
|
| | | <facet type="Spring" name="Spring">
|
| | | <configuration />
|
| | | </facet>
|
| | | </component>
|
| | | <module type="JAVA_MODULE" version="4">
|
| | | <component name="MavenCustomPomFilePath">
|
| | | <option name="mavenPomFileUrl" value="file://$MODULE_DIR$/effective-pom.xml" />
|
| | | </component>
|
| | | <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
| | | <output url="file://$MODULE_DIR$/target/classes" />
|
| | | <output-test url="file://$MODULE_DIR$/target/test-classes" />
|
| | | <content url="file://$MODULE_DIR$/src/main/java">
|
| | | <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
| | | </content>
|
| | | <content url="file://$MODULE_DIR$/src/main/resources">
|
| | | <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
| | | </content>
|
| | | <content url="file://$MODULE_DIR$/src/test/java">
|
| | | <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
| | | </content>
|
| | | <output url="file://$MODULE_DIR$/../../../Documents/HangZhouMes/TemperingGlassModule/target/classes" />
|
| | | <output-test url="file://$MODULE_DIR$/../../../Documents/HangZhouMes/TemperingGlassModule/target/test-classes" />
|
| | | <exclude-output />
|
| | | <orderEntry type="inheritedJdk" />
|
| | | <orderEntry type="sourceFolder" forTests="false" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.10" level="project" />
|
| | | <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.10" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.33" level="project" />
|
| | | <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.28" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.6" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.6" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.12.6" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.56" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.56" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.56" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.3.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.13" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.1.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.70" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.1.RELEASE" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.33" level="project" />
|
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.20" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.22" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.5.9" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.5.9" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.5.9" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.5.0" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.4.7" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:2.4.7" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:9.1" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.9.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.22" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.22" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:3.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.9.0" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.3.15" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.8.4" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter-test:2.3.1" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-test-autoconfigure:2.3.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.auth0:java-jwt:3.10.3" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.12.6" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.12.6" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.12.6" level="project" />
|
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: commons-codec:commons-codec:1.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.assertj:assertj-core:3.19.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.4.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.3" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:dynamic-datasource-spring-boot-starter:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.7" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.github.xingshuangs:iot-communication:1.4.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.netty:netty-all:4.1.36.Final" level="project" />
|
| | | </component>
|
| | | </module> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
| | | <component name="FacetManager">
|
| | | <facet type="web" name="Web">
|
| | | <configuration>
|
| | | <webroots />
|
| | | </configuration>
|
| | | </facet>
|
| | | <facet type="Spring" name="Spring">
|
| | | <configuration />
|
| | | </facet>
|
| | | </component>
|
| | | <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
| | | <output url="file://$MODULE_DIR$/target/classes" />
|
| | | <output-test url="file://$MODULE_DIR$/target/test-classes" />
|
| | | <content url="file://$MODULE_DIR$">
|
| | | <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
| | | <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
| | | <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
| | | <excludeFolder url="file://$MODULE_DIR$/target" />
|
| | | </content>
|
| | | <output url="file://$MODULE_DIR$/../../../Documents/HangZhouMes/TemperingGlassModule/target/classes" />
|
| | | <output-test url="file://$MODULE_DIR$/../../../Documents/HangZhouMes/TemperingGlassModule/target/test-classes" />
|
| | | <content url="file://$MODULE_DIR$" />
|
| | | <orderEntry type="inheritedJdk" />
|
| | | <orderEntry type="sourceFolder" forTests="false" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.10" level="project" />
|
| | | <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.10" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.33" level="project" />
|
| | | <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.28" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.6" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.6" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.12.6" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.56" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.56" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.56" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.3.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.13" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.1.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.70" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.1.RELEASE" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.33" level="project" />
|
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.20" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.22" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.5.9" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.5.9" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.5.9" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.5.0" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.4.7" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:2.4.7" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:9.1" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.7.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.9.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.22" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.22" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:3.2" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.9.0" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.3.15" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.8.4" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter-test:2.3.1" level="project" />
|
| | | <orderEntry type="library" scope="TEST" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-test-autoconfigure:2.3.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.auth0:java-jwt:3.10.3" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.12.6" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.12.6" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.12.6" level="project" />
|
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: commons-codec:commons-codec:1.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.assertj:assertj-core:3.19.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.4.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.3" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.baomidou:dynamic-datasource-spring-boot-starter:3.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.7" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.github.xingshuangs:iot-communication:1.4.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.netty:netty-all:4.1.36.Final" level="project" />
|
| | | </component>
|
| | | </module> |
| | |
| | | export default { |
| | | serverUrl: "localhost:8085", |
| | | serverUrl: "localhost:88/api/loadGlass", |
| | | //serverUrl: "localhost:88/api/", |
| | | serverUrl2: "localhost:8085" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | import {useRouter} from 'vue-router' |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import userInfo from '@/stores/userInfo' |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {ref, watch} from "vue" |
| | | import deepClone from "@/utils/deepClone" |
| | | |
| | | import request from '@/utils/request' |
| | | import {ElMessage} from 'element-plus' |
| | | import {ref, watch} from 'vue' |
| | | import deepClone from '@/utils/deepClone' |
| | | |
| | | const store = userInfo() |
| | | |
| | | |
| | | const router = useRouter() |
| | | const userStore = useUserInfoStore() |
| | | const user = userStore.user.userName |
| | | |
| | | |
| | | // store.createWebSocket(); |
| | | function quit() { |
| | | userStore.$patch({ |
| | | user: null |
| | | user: null, |
| | | }) |
| | | router.push("/login") |
| | | router.push('/login') |
| | | } |
| | | |
| | | |
| | | //提取模块列表 |
| | | |
| | | //提取菜单模块列表 |
| | | let menuList = $ref([]) |
| | | request.get('/menu/sysMenu/list').then((res) => { |
| | | request.get('/loadGlass/menu/sysMenu/list').then((res) => { |
| | | if (res.code == 200) { |
| | | menuList = deepClone(res.data) |
| | | } else { |
| | |
| | | router.push('/login') |
| | | } |
| | | }) |
| | | |
| | | //获取菜单列表 |
| | | // let menuItemList = $ref([]) |
| | | // request.get('/menuItem').then((res) => { |
| | | // if (res.code == 200) { |
| | | // menuItemList = deepClone(res.data) |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // router.push('/login') |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | const menu = ref(null) |
| | | let indexKey = ref(null) |
| | | |
| | | |
| | | function handleOpen(key) { |
| | | indexKey.value = key |
| | | } |
| | | |
| | | watch(indexKey, (newVal, oldVal) => { |
| | | |
| | | watch( |
| | | indexKey, |
| | | (newVal, oldVal) => { |
| | | if (oldVal !== newVal && oldVal !== null) { |
| | | menu.value.close(oldVal) |
| | | } |
| | | }, |
| | | {deep:true} |
| | | }, |
| | | {deep: true} |
| | | ) |
| | | |
| | | |
| | | router.beforeEach((to, from) => { |
| | | //return false |
| | | }) |
| | | |
| | | |
| | | |
| | | let openFlag = $ref(null) |
| | | //原始菜单打开 |
| | | const openMenu = (menuID) => { |
| | | if(menuID===openFlag){ |
| | | openFlag = null |
| | | }else { |
| | | openFlag = menuID |
| | | } |
| | | if (menuID === openFlag) { |
| | | openFlag = null |
| | | } else { |
| | | openFlag = menuID |
| | | } |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div id="all"> |
| | | <el-container> |
| | | <el-header > |
| | | <el-header> |
| | | <div style="height: 100%;width: 100%;display: flex;background-color: #fff;"> |
| | | <img src="../assets/northGlass.ico" alt="" style="max-width: 100%;max-height: 100%"> |
| | | <img src="../assets/northGlass.ico" |
| | | alt="" |
| | | style="max-width: 100%;max-height: 100%"> |
| | | <h3 style="margin: 1rem ;font-weight: bold;width: 20vw;"> 欢迎{{ user }}使用北玻MES系统!</h3> |
| | | <span style="height: 70%;width: 78vw;margin-top: 1rem;"> |
| | | <el-button class="sys-quit" @click="quit" round> |
| | | <el-icon size="large"><SwitchButton size=""/></el-icon> |
| | | <el-button class="sys-quit" |
| | | @click="quit" |
| | | round> |
| | | <el-icon size="large"> |
| | | <SwitchButton size=""/>退出 |
| | | </el-icon> |
| | | </el-button> |
| | | </span> |
| | | </div> |
| | |
| | | </div> |
| | | <ul class='enter-x-left' |
| | | v-show="openFlag==items.id"> |
| | | |
| | | |
| | | <li v-for="menuItem in items.children" |
| | | style="margin-bottom:2px"> |
| | | <router-link :to="{path:menuItem.url}"> |
| | | {{ menuItem.menuName }} |
| | | </router-link> |
| | | |
| | | |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </el-aside> |
| | | |
| | | |
| | | <el-main> |
| | | <div id="main"> |
| | | <router-view></router-view> |
| | | </div> |
| | | </el-main> |
| | | |
| | | |
| | | </el-container> |
| | | </el-container> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #all{ |
| | | #all { |
| | | background-color: #eee; |
| | | height: 100%; |
| | | } |
| | | .el-container{ |
| | | |
| | | .el-container { |
| | | height: 100vh; |
| | | width: 99vw |
| | | width: 99vw; |
| | | } |
| | | |
| | | *{ |
| | | |
| | | * { |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | :deep(.sys-quit){ |
| | | |
| | | :deep(.sys-quit) { |
| | | float: right; |
| | | margin-right: 1rem; |
| | | width: 5rem; |
| | | } |
| | | |
| | | /* 横线 */ |
| | | #line{ |
| | | float:right; |
| | | width: 100%; |
| | | height: 1px; |
| | | /* margin-top: 0.5em; */ |
| | | margin-bottom: 0.5em; |
| | | background:#d4c4c4; |
| | | position: relative; |
| | | text-align: center; |
| | | #line { |
| | | float: right; |
| | | width: 100%; |
| | | height: 1px; |
| | | /* margin-top: 0.5em; */ |
| | | margin-bottom: 0.5em; |
| | | background: #d4c4c4; |
| | | position: relative; |
| | | text-align: center; |
| | | } |
| | | :deep(span){ |
| | | |
| | | :deep(span) { |
| | | margin-right: 0; |
| | | |
| | | } |
| | | .el-collapse{ |
| | | |
| | | .el-collapse { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | #main{ |
| | | |
| | | #main { |
| | | width: 99%; |
| | | float: right; |
| | | height: 99%; |
| | | background-color: #fff; |
| | | } |
| | | /*------------*/ |
| | | |
| | | |
| | | /* .menu div div{ |
| | | |
| | | width: 138px; |
| | |
| | | margin-bottom:4px; |
| | | text-align: left; |
| | | cursor: pointer; */ |
| | | /* border-radius:8px; */ |
| | | /* outline: none; */ |
| | | /* background-color:#5CADFE; */ |
| | | /* box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); */ |
| | | /* border-radius:8px; */ |
| | | /* outline: none; */ |
| | | /* background-color:#5CADFE; */ |
| | | /* box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); */ |
| | | /* } */ |
| | | |
| | | |
| | | .menu { |
| | | width: 138px; |
| | | height: 33px; |
| | | line-height: 25px; |
| | | |
| | | |
| | | color: #000000; |
| | | font-size: 16px; |
| | | padding-left: 15px; |
| | | padding-right: 2px; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | ul { |
| | | height: auto; |
| | | margin: 1px auto; |
| | | text-align: center; |
| | | } |
| | | |
| | | |
| | | ul li { |
| | | |
| | | height: 28px; |
| | | line-height: 30px; |
| | | /* background: rgb(128, 128, 128); */ |
| | |
| | | text-align: left; |
| | | /* border-radius:8px; */ |
| | | /* outline: none; */ |
| | | |
| | | |
| | | /* background: #5CADFE; */ |
| | | /* box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); */ |
| | | } |
| | | |
| | | |
| | | ul li:hover { |
| | | /* background:#5CADFE ; */ |
| | | color: #ffffff; |
| | | } |
| | | |
| | | |
| | | ul li a { |
| | | text-decoration: none; |
| | | color: #000000; |
| | | font-size: 14px; |
| | | } |
| | | ul li a:hover { |
| | | |
| | | color: #1087ff; |
| | | } |
| | | |
| | | |
| | | .item_divider { |
| | | width: 118px; |
| | | height: 0px; |
| | | /* background-color: white; |
| | | opacity: 0.8; */ |
| | | margin-bottom:2px; |
| | | margin-bottom: 2px; |
| | | } |
| | | .item a{ |
| | | |
| | | .item a { |
| | | width: 138px; |
| | | height: 35px; |
| | | display: block; |
| | |
| | | font-size: 14px; |
| | | text-decoration: none; |
| | | } |
| | | |
| | | |
| | | .menu_title { |
| | | width: 140px; |
| | | height: 45px; |
| | |
| | | position: relative; |
| | | font-weight: bold; |
| | | overflow: hidden; |
| | | |
| | | } |
| | | |
| | | |
| | | .menu_title:hover { |
| | | /* background: #dedede; */ |
| | | color: #3b9af9; |
| | | } |
| | | |
| | | |
| | | .indicator { |
| | | display: block; |
| | | width: 40px; |
| | |
| | | transition: all 0.3s ease; |
| | | text-align: center; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /* 动画效果 */ |
| | | .enter-x-left { |
| | | z-index: 9; |
| | |
| | | transform: translateX(-50px); |
| | | transition: all 0.3s ease; |
| | | } |
| | | .enter-x-left:nth-child(1){ |
| | | |
| | | .enter-x-left:nth-child(1) { |
| | | animation-delay: 0.1s; |
| | | } |
| | | .enter-x-left:nth-child(2){ |
| | | |
| | | .enter-x-left:nth-child(2) { |
| | | animation-delay: 0.2s; |
| | | } |
| | | |
| | | .enter-x-left:nth-child(3) { |
| | | animation-delay: 0.3s; |
| | | } |
| | | .enter-x-left:nth-child(4){ |
| | | |
| | | .enter-x-left:nth-child(4) { |
| | | animation-delay: 0.4s; |
| | | } |
| | | @keyframes enter-x-left { |
| | |
| | | transform: translateX(0); |
| | | } |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | const userStore=useUserInfoStore() |
| | | const request = axios.create({ |
| | | baseURL: `http://${config.serverUrl}`, // 注意!! 这里是全局统一加上了 后端接口前缀 前缀,后端必须进行跨域配置! |
| | | timeout: 5000 |
| | | timeout: 30000 |
| | | }) |
| | | |
| | | // |
| | |
| | | <div style="margin-left: 400px; font-size: 20px;">工程号:P20240305001 </div> |
| | | <div style="margin-left: 150px; font-size: 20px;">版图编号:1</div> |
| | | </div> |
| | | <el-scrollbar height="650px"> |
| | | <div id="home-card"> |
| | | <div id="home-item" v-for="n in 20" :key="n"> |
| | | <svg width="100%" height="690" xmlns="http://www.w3.org/2000/svg" style="margin-top: -40px;"> |
| | | <defs> |
| | | <marker id="arrow" markerUnits="strokeWidth" markerWidth="12" markerHeight="12" viewBox="0 0 12 12" refX="6" |
| | |
| | | /> |
| | | <line x1='510' y1='309' x2='260' y2='310' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <line x1='850' y1='309' x2='1100' y2='310' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <line x1='510' y1='409' x2='260' y2='410' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <line x1='1200' y1='650' x2='1200' y2='470' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <text x="370" y="240" dominant-baseline="middle" text-anchor="middle">NG2024030501A-01</text> |
| | | <text x="370" y="260" dominant-baseline="middle" text-anchor="middle">500*300</text> |
| | | |
| | | <text x="970" y="240" dominant-baseline="middle" text-anchor="middle">NG2024030501A-02</text> |
| | | <text x="970" y="260" dominant-baseline="middle" text-anchor="middle">500*300</text> |
| | | |
| | | <text x="600" y="500" dominant-baseline="middle" text-anchor="middle">NG2024030501A-03</text> |
| | | <text x="600" y="520" dominant-baseline="middle" text-anchor="middle">800*450</text> |
| | | |
| | | |
| | | <text x="1280" y="520" dominant-baseline="middle" text-anchor="middle">NG2024030501A-04</text> |
| | | <text x="1280" y="540" dominant-baseline="middle" text-anchor="middle">400*300</text> |
| | | <g v-for="(item, itemIndex) in rack.items" :key="itemIndex"> |
| | | <rect |
| | | :x="calculateItemXPosition(rack, item, itemIndex)" |
| | |
| | | </g> |
| | | </g> |
| | | </svg> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | </template> |
| | | |
| | |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG12345678' } |
| | | ] |
| | | }, |
| | | { |
| | | x: 685, y: 126, width: 600, height: 240, fillColor: '#93d2f3', |
| | | items: [ |
| | | { position: 'bottom-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG1234567' } |
| | | ] |
| | | }, |
| | | { |
| | | x: 70, y: 380, width: 1100, height: 260, fillColor: '#81b337', |
| | | items: [ |
| | | { position: 'top-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG1234567' } |
| | | ] |
| | | }, |
| | | { |
| | | x: 1185, y: 380, width: 200, height: 300,fillColor: '#81b337', |
| | | items: [ |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-right',width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG1234567' }, |
| | | ] |
| | | } |
| | | |
| | | // Add more racks and items here as needed |
| | | ], |
| | |
| | | color: black; |
| | | border: 1px solid black; |
| | | } |
| | | |
| | | #home-card { |
| | | width: 100%; |
| | | overflow: hidden; |
| | | padding: 10px 0px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | #home-item { |
| | | border-style: solid; |
| | | border-width: 1px; |
| | | border-color: #E4E4E4; |
| | | width: calc(34% - 20px); |
| | | padding: 20px 0px 20px 20px; |
| | | margin-right: 10px; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | justify-content: center; |
| | | /* align-items: center; */ |
| | | background: #fff; |
| | | #home-img { |
| | | display: inline-block; |
| | | width: 160px; |
| | | height: 60px; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | #home-right { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: flex-start; |
| | | margin-left: 10px; |
| | | #home-num { |
| | | font-size: 40px; |
| | | margin: 5px 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | if (valid) { |
| | | loginLoadings.value = true |
| | | request |
| | | .post('/userinfo/login', userForm) |
| | | .post('/loadGlass/userinfo/login', userForm) |
| | | .then((res) => { |
| | | if (res['code'] == 200) { |
| | | store.$patch({user: res.data}) |
| | |
| | | |
| | | import { ref, onMounted } from "vue"; |
| | | // import http from "@/http/index"; |
| | | const tableData = ref([]) |
| | | // const tableData = ref([]) |
| | | // let app = ref({ |
| | | // data(){ |
| | | // return { |
| | | // enableState:'', |
| | | // } |
| | | // }, |
| | | // }) |
| | | // const tableData = ref({ |
| | | // workstationId:'', |
| | | // patternWidth :'', |
| | | // patternHeigth :'', |
| | | // filmsId :'', |
| | | // number :'', |
| | | // patternThickness :'', |
| | | // enableState:'', |
| | | // }) |
| | | // request.post(`/LoadGlass/list`).then((res) => { |
| | | // if (res.code == 200) { |
| | | // console.log(res.data); |
| | |
| | | // router.push("/login") |
| | | // } |
| | | // }); |
| | | onMounted(() => { |
| | | request |
| | | .get("/LoadGlass/list") |
| | | |
| | | // request |
| | | // const requestData = { |
| | | // projectNo:"P24030805", |
| | | // state:0 |
| | | // }; |
| | | |
| | | |
| | | const requestData = { |
| | | // projectNo:"P24030805", |
| | | state:100 |
| | | }; |
| | | |
| | | const tableData = reactive([]); |
| | | |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | | try { |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData); |
| | | const response = await request.get("/loadGlass/LoadGlass/list"); |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | | // 更新表格数据 |
| | | console.log('成功获取表格数据:', response.data); |
| | | tableData.splice(0, tableData.length, ...response.data); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求失败的情况 |
| | | ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | const user = ref(''); |
| | | const remoteMethod = () => { |
| | | request.post("/loadGlass/optimizeProject/listByState", requestData) |
| | | .then((res: any) => { |
| | | // if (res.code == 200) { |
| | | tableData.value = res.data; |
| | | // let self = this |
| | | // } |
| | | }) |
| | | .catch((err: any) => {}); |
| | | }); |
| | | onMounted(() => { |
| | | request |
| | | .post("/LoadGlass/selectPriority") |
| | | .then((res: any) => { |
| | | tableData.value = res.data; |
| | | }) |
| | | .catch((err: any) => {}); |
| | | }); |
| | | } |
| | | |
| | | |
| | | onMounted(fetchTableData); |
| | | |
| | | |
| | | // onMounted(() => { |
| | | // request |
| | | // .post("/loadGlass/LoadGlass/selectPriority") |
| | | // .then((res: any) => { |
| | | // tableData.value = res.data; |
| | | // }) |
| | | // .catch((err: any) => {}); |
| | | // }); |
| | | interface User { |
| | | id: string |
| | | name: string |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option4', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option5', |
| | | label: 'P202561456', |
| | | }, |
| | | ] |
| | | // const tableData: User[] = [ |
| | | |
| | | // { |
| | | // id: 'P202561456', |
| | | // long: '1005', |
| | | // wide: '183.6', |
| | | // thick: '1991', |
| | | // }, |
| | | // { |
| | | // id: 'P202561456', |
| | | // long: '105', |
| | | // wide: '183', |
| | | // thick: '191', |
| | | // } |
| | | // ] |
| | | const tableDataa = [ |
| | | { |
| | | long: '1005', |
| | | wide: '183.6', |
| | | thick: '1991', |
| | | station: '1' |
| | | }, |
| | | { |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | station: '1' |
| | | } |
| | | ] |
| | | } |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="danger" >停止任务</el-button> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto"> |
| | | <!-- <el-table height="100%" ref="table" :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" label="工程号" min-width="80" /> |
| | | <el-table-column prop="long" align="center" label="原片宽" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="原片长" min-width="120" /> |
| | | <el-table-column prop="thick" align="center" label="膜系" min-width="120" /> |
| | | <el-table-column prop="thick" align="center" label="数量" min-width="120" /> |
| | | <el-table-column |
| | | align="center" |
| | | label="状态" |
| | | min-width="80" |
| | | > |
| | | <el-tag type="success">就绪</el-tag> |
| | | </el-table-column> |
| | | </el-table> --> |
| | | <el-table |
| | | height="100%" |
| | | ref="table" |
| | |
| | | :data="tableData" |
| | | :span-method="objectSpanMethod" |
| | | > |
| | | <el-table-column prop="workstationId" label="工程号" width="200" align="center"/> |
| | | <el-table-column prop="workstationId" label="工程号" width="200" align="center"/> |
| | | <el-table-column prop="patternWidth" label="原片宽" align="center"/> |
| | | <el-table-column prop="patternHeigth" label="原片长" align="center"/> |
| | | <el-table-column prop="filmsId" label="膜系" align="center"/> |
| | |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | | <el-form-item label="工程号:" :required="true"> |
| | | <el-select |
| | | v-model="form.workstationId" |
| | | clearable |
| | | placeholder="请选择工程" |
| | | style="width: 300px" |
| | | filterable |
| | | :remote-method="remoteMethod" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | v-for="item in remoteMethod" |
| | | :key="item.projectNo" |
| | | :label="item.projectNo" |
| | | :value="item.projectNo" |
| | | /> |
| | | </el-select> |
| | | <!-- <el-select clearable filterable size="mini" v-model="form.fvId" |
| | | style="margin-right: 50px;width: 200px" placeholder="请选择果蔬种类"> |
| | | <el-option v-for="item in billall" |
| | | :key="item.id" |
| | | :label="item.fruitVagetableCate" |
| | | :value="item.id"></el-option> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | </div> |
| | | <template #footer> |
| | |
| | | |
| | | const currentPage4 = ref(4) |
| | | const pageSize4 = ref(100) |
| | | // const tableData = [ |
| | | // { |
| | | // id: '1', |
| | | // long: '1005', |
| | | // wide: '183.6', |
| | | // thick: '1991', |
| | | // type: '1234567', |
| | | // typea: '1', |
| | | // }, |
| | | // ] |
| | | // const tableDatab = [ |
| | | // { |
| | | // idb: '2', |
| | | // longb: '105', |
| | | // wideb: '183', |
| | | // typeb: '123456', |
| | | // } |
| | | // ] |
| | | const tableDataa = [ |
| | | const tableData = [ |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | id: '1', |
| | | a: '1', |
| | | b: '1', |
| | | c: '123456789', |
| | | d: '1568251', |
| | | e: '1', |
| | | f: '100', |
| | | g: '', |
| | | }, |
| | | ] |
| | | |
| | | const tableDatab = [ |
| | | { |
| | | id: '2', |
| | | a: '2', |
| | | b: '2', |
| | | c: '123456789', |
| | | d: '1568251', |
| | | e: '1', |
| | | f: '100', |
| | | g: '', |
| | | } |
| | | ] |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '确定要急停吗?', |
| | |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" label="出片玻璃ID" min-width="80" /> |
| | | <el-table-column prop="long" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="钢化版图号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="结束任务" min-width="120" /> |
| | | <el-table-column prop="a" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="b" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="c" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="d" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="e" align="center" label="钢化版图号" min-width="157" /> |
| | | <el-table-column prop="f" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="g" align="center" label="结束任务" min-width="120" /> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | |
| | | <el-table height="100%" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="idb" align="center" label="进片玻璃ID" min-width="80" /> |
| | | <el-table-column prop="longb" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="wideb" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="钢化版图号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="结束任务" min-width="120" /> |
| | | <el-table-column prop="id" align="center" label="进片玻璃ID" min-width="80" /> |
| | | <el-table-column prop="a" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="b" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="c" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="d" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="e" align="center" label="钢化版图号" min-width="157" /> |
| | | <el-table-column prop="f" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="g" align="center" label="结束任务" min-width="120" /> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | | <!-- <div id="awatch"> |
| | | <img src="../../assets/lpl.jpg" alt="" style="width: 10%;height: 10%;margin-left: 160px;"> |
| | | </div> --> |
| | | |
| | | |
| | | <div id="awatch"> |
| | | <img src="../../assets/xmjc.png" alt="" style="width: 70%;height: 100%;margin-left: 160px;"> |
| | | <img src="../../assets/cp.png" alt="" style="width: 1305px;height: 400px;margin-left: 240px;margin-top: 50px;"> |
| | | </div> |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisible" top="12vh" width="85%" title="请确认玻璃信息" > |
| | |
| | | ::-webkit-scrollbar { |
| | | width: 0 !important;height: 0; |
| | | } |
| | | .img-list{ |
| | | |
| | | position:relative; |
| | | } |
| | | .data-img{ |
| | | @apply float-none ; |
| | | |
| | | width:100%; |
| | | height:16rem; |
| | | background: rgba(0, 0, 0, 0); |
| | | opacity: 1; |
| | | border-radius: 0.5rem 0.5rem 0px 0px; |
| | | |
| | | } |
| | | .check-img{ |
| | | position: absolute; |
| | | width: 3.3125rem; |
| | | height: 2.9375rem; |
| | | top:20rem; |
| | | right: 52rem; |
| | | z-index: 10; |
| | | |
| | | } |
| | | .check-imga{ |
| | | position: absolute; |
| | | width: 3.3125rem; |
| | | height: 2.9375rem; |
| | | top:15rem; |
| | | right: 37rem; |
| | | z-index: 10; |
| | | |
| | | } |
| | | |
| | | </style> |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive, onMounted} from "vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | const dialogFormVisiblea = ref(false) |
| | | import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import Landingindication from "./Landingindication.vue"; |
| | | import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | import unloadrequest from "@/utils/unloadrequest"; |
| | | const dialogFormVisiblea = ref(false) |
| | | // import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | |
| | | |
| | | |
| | | const dialogFormVisiblea2 = ref(false) |
| | | |
| | | |
| | | const tableData = reactive([]); |
| | | |
| | | |
| | | let socket; |
| | | |
| | | |
| | | const initWebSocket = (token) =>{ //初始化we |
| | | |
| | | let viewname = "unloadglass"; |
| | | |
| | | if (typeof WebSocket === "undefined") { |
| | | console.log("您的浏览器不支持WebSocket"); |
| | | } else { |
| | | let socketUrl = "ws://" + "localhost"+":88" + "/api/unLoadGlass/api/talk/" + viewname; |
| | | if (socket != null) { |
| | | socket.close(); |
| | | socket = null; |
| | | } |
| | | |
| | | // 开启一个websocket服务 |
| | | socket = new WebSocket(socketUrl); |
| | | |
| | | // 打开事件 |
| | | socket.onopen = function () { |
| | | console.log("websocket已打开"); |
| | | }; |
| | | |
| | | |
| | | |
| | | socket.onmessage = (msg) => { |
| | | if (!msg.data) { |
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑 |
| | | } |
| | | |
| | | |
| | | |
| | | let obj = JSON.parse(msg.data); |
| | | |
| | | |
| | | console.log('收到消息:', obj.data); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // 数据 |
| | | const loading = ref(false); |
| | | |
| | | |
| | | // 弹框显示控制 |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | |
| | | // 表单数据 |
| | | const workstationId = ref(''); |
| | | const flowCardId = ref(''); |
| | | const flowCardOptions = ref([]); |
| | | |
| | | |
| | | // 方法 |
| | | const handleSelectionChange = () => { |
| | | // 处理表格行选择事件 |
| | | }; |
| | | |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | |
| | | // 发起接口请求获取流程卡号 |
| | | fetchFlowCardId(); |
| | | |
| | | |
| | | dialogFormVisiblea.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | |
| | | |
| | | |
| | | //获取流程卡号 |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | const response = await unloadrequest.get('/api/unLoadGlass/getflowCardId'); |
| | | console.log(response) |
| | | if (response.code === 200) { |
| | | flowCardOptions.value = response.data.map(item => ({ flowcard_id: item.flowcard_id })); |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | }; |
| | | //确认 |
| | | const handleConfirm = async () => { |
| | | try { |
| | | const response = await unloadrequest.post('/api/unLoadGlass/updateFlowCardId', { |
| | | workstationId: workstationId.value, |
| | | flowCardId: flowCardId.value |
| | | }); |
| | | |
| | | console.log(response) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | console.log('绑定成功'); |
| | | ElMessage.success(response.message); |
| | | dialogFormVisiblea.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | const handleBindRack2 = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | |
| | | |
| | | |
| | | |
| | | dialogFormVisiblea2.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | //清除内容 |
| | | const handleclear = async () => { |
| | | try { |
| | | const response = await unloadrequest.post('/api/unLoadGlass/clear', { |
| | | workstationId: workstationId.value, |
| | | }); |
| | | |
| | | console.log(response); |
| | | |
| | | if (response.code === 200) { |
| | | // 清除成功的逻辑 |
| | | console.log('清除成功'); |
| | | ElMessage.success(response.message); |
| | | dialogFormVisiblea2.value = false; |
| | | } else if (response.code === 400) { |
| | | // 清除失败的逻辑 |
| | | console.log('清除失败'); |
| | | console.log(response.message); // 打印服务器返回的错误信息 |
| | | ElMessage.error(response.message); |
| | | dialogFormVisiblea2.value = false; |
| | | } |
| | | } catch (error) { |
| | | // console.log(error); |
| | | ElMessage.error("清除失败"); |
| | | dialogFormVisiblea2.value = false; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | | try { |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | const response = await unloadrequest.get('/api/unLoadGlass/getone'); |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | | // 更新表格数据 |
| | | console.log('成功获取表格数据:', response.data); |
| | | tableData.splice(0, tableData.length, ...response.data); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求失败的情况 |
| | | ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | initWebSocket(); |
| | | onMounted(fetchTableData); |
| | | setInterval(fetchTableData, 2000) |
| | | |
| | | const tableData = [ |
| | | { |
| | | id: '1', |
| | | long: '1005', |
| | | wide: '183.6', |
| | | thick: '1991', |
| | | state: '未启用', |
| | | }, |
| | | { |
| | | id: '2', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '3', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '4', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '5', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | ] |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | |
| | | } |
| | | } |
| | | |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '是否清空该条信息?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | } |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | ], |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <el-table height="100%" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="workstationId" align="center" label="下片位" min-width="80" /> |
| | | <el-table-column prop="workstationId" align="center" label="架号" min-width="120" /> |
| | | <el-table-column prop="flowCardId" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="totalquantity" align="center" label="总数量" min-width="120" /> |
| | | <el-table-column prop="racksnumber" align="center" label="已落架数量" min-width="120" /> |
| | | <el-table-column prop="work_state" align="center" label="状态" min-width="120" /> |
| | | <el-table-column prop="deviceId" align="center" label="设备号" min-width="120" /> |
| | | <el-table-column prop="enableState" align="center" label="启用状态" min-width="120" /> |
| | | <el-table-column prop="id" align="center" label="下片位" min-width="80" /> |
| | | <el-table-column prop="long" align="center" label="架号" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="总数量" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="已落架数量" min-width="120" /> |
| | | <el-table-column prop="state" align="center" label="启用状态" min-width="120" /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain v-show="scope.row.enableState !== '已启用' " @click="handleBindRack(scope.row)">绑定架子</el-button> |
| | | <el-button size="mini" type="text" plain @click="handleBindRack2(scope.row)">清空</el-button> |
| | | </template> |
| | | <template #default> |
| | | <el-button size="mini" type="text" plain v-show="state !== '已启用' " @click="dialogFormVisiblea = true">绑定架子</el-button> |
| | | <el-button size="mini" type="text" plain @click="dialogForm">清空</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | |
| | | |
| | | |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div id="main-body"> |
| | | <Landingindication></Landingindication> |
| | | </div> |
| | | <!-- <div id="main-body"> |
| | | <Landingindicationtwo></Landingindicationtwo> |
| | | </div> --> |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisiblea" top="21vh" width="30%" title="绑定架子" > |
| | | <div style="margin-left: 50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="100px" label-position="right"> |
| | | <el-form-item label="架号:" :required="true" style="width: 18vw"> |
| | | <el-input v-model="workstationId" autocomplete="off"/> |
| | | </el-form-item> |
| | | <el-form-item label="流程卡号:" :required="true" style="width: 18vw;"> |
| | | <el-select v-model="flowCardId" placeholder="请选择流程卡号"> |
| | | <el-option v-for="item in flowCardOptions" :key="item.flowcard_id" :label="item.flowcard_id" :value="item.flowcard_id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="100px" label-position="right"> |
| | | <el-form-item label="架号:" :required="true" style="width: 18vw"> |
| | | <el-input autocomplete="off"/> |
| | | </el-form-item> |
| | | <el-form-item label="流程卡号:" :required="true" style="width: 18vw;"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleConfirm"> |
| | | <el-button type="primary" @click="dialogFormVisiblea = false"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisiblea = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | |
| | | <el-dialog v-model="dialogFormVisiblea2" top="21vh" width="30%" title="清除架子玻璃" > |
| | | |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleclear"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisiblea2 = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | |
| | | <!-- workstationId: '1', |
| | | workstationId: '1005', |
| | | flowCardId: '183.6', |
| | | totalquantity: '1991', |
| | | racksnumber:"1", |
| | | work_state: '待识别', --> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div id="main-body"> |
| | | <Landingindication></Landingindication> |
| | | </div> |
| | | <div id="main-bodya"> |
| | | <Landingindicationtwo></Landingindicationtwo> |
| | | </div></div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | |
| | | height: 450px; |
| | | } |
| | | #main-body{ |
| | | margin-top: -20px; |
| | | margin-left: 300px; |
| | | } |
| | | #main-bodya{ |
| | | margin-top: -10px; |
| | | margin-left: 100px; |
| | | margin-left: 450px; |
| | | } |
| | | </style> |
| | |
| | | https: false, |
| | | proxy: { |
| | | '/api': { |
| | | target: 'http://localhost:8080/mesModuleTools', |
| | | target: 'http://localhost:88/', |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/api/, '/'), |
| | | }, |
| | | '/api2': { |
| | | target: 'http://localhost:8085/mesModuleTools', |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/api2': '', |
| | | }, |
| | | }, |
| | | // '/api2': { |
| | | // target: 'http://localhost:8085/mesModuleTools', |
| | | // changeOrigin: true, |
| | | // pathRewrite: { |
| | | // '^/api2': '', |
| | | // }, |
| | | // }, |
| | | }, |
| | | }, |
| | | configureServer: ({ middlewares }) => { |
| | |
| | | |
| | | <artifactId>servicebase</artifactId> |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.github.yulichang</groupId> |
| | | <artifactId>mybatis-plus-join</artifactId> |
| | | <version>1.1.6</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | |
| | | public class Swagger2Config { |
| | | |
| | | @Bean |
| | | public Docket webApiConfig(){ |
| | | public Docket webApiConfig() { |
| | | List<Parameter> pars = new ArrayList<>(); |
| | | ParameterBuilder tokenPar = new ParameterBuilder(); |
| | | tokenPar.name("userId") |
| | |
| | | } |
| | | |
| | | @Bean |
| | | public Docket adminApiConfig(){ |
| | | public Docket adminApiConfig() { |
| | | List<Parameter> pars = new ArrayList<>(); |
| | | ParameterBuilder tokenPar = new ParameterBuilder(); |
| | | tokenPar.name("adminId") |
| | |
| | | .globalOperationParameters(pars); |
| | | } |
| | | |
| | | private ApiInfo webApiInfo(){ |
| | | private ApiInfo webApiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("网站-API文档") |
| | | .description("本文档描述了mes网站微服务接口定义") |
| | |
| | | .build(); |
| | | } |
| | | |
| | | private ApiInfo adminApiInfo(){ |
| | | private ApiInfo adminApiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("后台管理系统-API文档") |
| | | .description("本文档描述了mes后台系统服务接口定义") |
| | |
| | | private static String PlcMes = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath(); |
| | | private static String PlcRead = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath(); |
| | | private static String Plcframe = PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath(); |
| | | // private static String PlcParameter = PLCAutomaticParameterSettingReview2.class |
| | | // private static String PlcParameter = PLCAutomaticParameterSettingReview2.class |
| | | // .getResource("/JsonFile/PlcParameter.json").getPath(); |
| | | // private static String PlcSign = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcSign.json") |
| | | // .getPath(); |
| | | // private static String PlcState = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcState.json") |
| | | // .getPath(); |
| | | private static String PlcAlarm = PLCAutoMes.class.getResource("/JsonFile/PlcAlarm.json").getPath(); |
| | | // private static String PlcTest = PLCAutoMes.class.getResource("/JsonFile/PlcTest.json").getPath(); |
| | | // private static String PlcTest = PLCAutoMes.class.getResource("/JsonFile/PlcTest.json").getPath(); |
| | | |
| | | // 调用initword方法 |
| | | |
| | | // |
| | | // public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm); |
| | | // |
| | | // public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm); |
| | | public static PlcParameterObject PlcMesObject = initUtil.initword(PlcMes); |
| | | public static PlcParameterObject PlcReadObject = initUtil.initword(PlcRead); |
| | | public static PlcParameterObject PlcframeObject = initUtil.initword(Plcframe); |
| | |
| | | |
| | | // System.out.println(jsonFilePath); |
| | | |
| | | // readAndUpdateWordValues(PlcReadObject); |
| | | // readAndUpdateWordValues(PlcReadObject); |
| | | InitUtil.readAndUpdateWordValues(PlcMesObject); |
| | | // readAndUpdateWordValues(PlcframeObject); |
| | | // readAndUpdateWordValues(PlcframeObject); |
| | | |
| | | // readAndUpdateWordValues(plcStateObject); |
| | | // int index = PlcMesObject.getPlcParameter("AddStart").getAddressIndex(); |
| | | // int index = PlcMesObject.getPlcParameter("AddStart").getAddressIndex(); |
| | | // System.out.println(index); |
| | | // PlcMesObject.getPlcParameter("AddStart").getAddress(index); |
| | | // PlcMesObject.getPlcParameter("AddStart").getAddress(index); |
| | | // System.out.println(PlcMesObject.getPlcParameter("AddStart").getAddress(index)); |
| | | List<String> addresses = new ArrayList<>(); |
| | | addresses.add("FeedID"); |
| | |
| | | addresses2.add("FeedID"); |
| | | addresses2.add("FeedCarStatus"); |
| | | |
| | | // System.out.println(PlcReadObject.getPlcParameterValues(addresses2)); |
| | | // System.out.println(PlcReadObject.getPlcParameterValues(addresses2)); |
| | | |
| | | } |
| | | } |
| | |
| | | package com.mes.device; |
| | | |
| | | public class PlcBitInfo { |
| | | public class PlcBitInfo { |
| | | |
| | | public PlcBitInfo(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | public PlcBitInfo(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | |
| | | // 参数名称 |
| | | private String name; |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | |
| | | // 读取 参数值 |
| | | private Boolean value; |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | // 参数名称 |
| | | private String name; |
| | | |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | // 读取 参数值 |
| | | private Boolean value; |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | |
| | | public Boolean getValue() { |
| | | return this.value; |
| | | } |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public void setValue(Boolean value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | public Boolean getValue() { |
| | | return this.value; |
| | | } |
| | | |
| | | public int getAddressIndex() { |
| | | return this.addressIndex; |
| | | } |
| | | /** |
| | | public void setValue(Boolean value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | |
| | | public int getAddressIndex() { |
| | | return this.addressIndex; |
| | | } |
| | | |
| | | /** |
| | | * 获取地址 |
| | | * |
| | | * |
| | | * @param index 索引地址 |
| | | */ |
| | | public String getAddress(int index) { |
| | | String[] stringdatas = this.startAddress.trim().split("\\."); |
| | | if (stringdatas.length < 2 ) |
| | | return null; |
| | | int dbwindex = 0; |
| | | int bitindex = 0; |
| | | if (stringdatas.length == 3) { |
| | | dbwindex = Integer.parseInt(stringdatas[1]); |
| | | bitindex = Integer.parseInt(stringdatas[2]); |
| | | } else |
| | | return null; |
| | | dbwindex+=index/8; |
| | | bitindex+=index%8; |
| | | return stringdatas[0]+"."+dbwindex+"."+bitindex; |
| | | } |
| | | |
| | | |
| | | public String getAddress(int index) { |
| | | String[] stringdatas = this.startAddress.trim().split("\\."); |
| | | if (stringdatas.length < 2) |
| | | return null; |
| | | int dbwindex = 0; |
| | | int bitindex = 0; |
| | | if (stringdatas.length == 3) { |
| | | dbwindex = Integer.parseInt(stringdatas[1]); |
| | | bitindex = Integer.parseInt(stringdatas[2]); |
| | | } else |
| | | return null; |
| | | dbwindex += index / 8; |
| | | bitindex += index % 8; |
| | | return stringdatas[0] + "." + dbwindex + "." + bitindex; |
| | | } |
| | | |
| | | |
| | | public void setAddressIndex(int addressindex) { |
| | | this.addressIndex = addressindex; |
| | | } |
| | | this.addressIndex = addressindex; |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 添加参数实例 |
| | | * |
| | | * |
| | | * @param param 参数实例 |
| | | */ |
| | | public void addPlcBit(PlcBitInfo param) { |
| | |
| | | |
| | | /** |
| | | * 根据PLC返回的数据 给参数实例赋值 |
| | | * |
| | | * |
| | | * @param plcValueArray PLC读取回来的byte类型数据集合 |
| | | */ |
| | | public void setPlcBitList(List<Boolean> plcValueArray) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.device; |
| | | public class PlcParameterInfo { |
| | | public PlcParameterInfo(String startAddress) { |
| | | |
| | | public class PlcParameterInfo { |
| | | public PlcParameterInfo(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | } |
| | | |
| | | // 参数名称 |
| | | private String name; |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | |
| | | // 读取 参数值 |
| | | private String value; |
| | | // 参数名称 |
| | | private String name; |
| | | |
| | | // // 写入 参数值 |
| | | // private String writeValue; |
| | | // 读取 参数值 |
| | | private String value; |
| | | |
| | | // 参数单位 |
| | | private String unit; |
| | | // // 写入 参数值 |
| | | // private String writeValue; |
| | | |
| | | // 参数值转换系数 |
| | | private int ratio; |
| | | // 参数单位 |
| | | private String unit; |
| | | |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | // 参数值转换系数 |
| | | private int ratio; |
| | | |
| | | // 参数地址位长度 |
| | | private int addressLength; |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | // 参数地址位长度 |
| | | private int addressLength; |
| | | |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return this.value; |
| | | } |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | public String getValue() { |
| | | return this.value; |
| | | } |
| | | |
| | | // public String getWriteValue() { |
| | | // return this.writeValue; |
| | | // } |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | // public void setWriteValue(String writeValue) { |
| | | // this.writeValue = writeValue; |
| | | // } |
| | | // public String getWriteValue() { |
| | | // return this.writeValue; |
| | | // } |
| | | |
| | | public String getUnit() { |
| | | return this.unit; |
| | | } |
| | | // public void setWriteValue(String writeValue) { |
| | | // this.writeValue = writeValue; |
| | | // } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | public String getUnit() { |
| | | return this.unit; |
| | | } |
| | | |
| | | public int getAddressIndex() { |
| | | return this.addressIndex; |
| | | } |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public void setAddressIndex(int addressindex) { |
| | | this.addressIndex = addressindex; |
| | | } |
| | | public int getAddressIndex() { |
| | | return this.addressIndex; |
| | | } |
| | | |
| | | public int getAddressLength() { |
| | | return this.addressLength; |
| | | } |
| | | public void setAddressIndex(int addressindex) { |
| | | this.addressIndex = addressindex; |
| | | } |
| | | |
| | | public void setAddressLength(int addresslength) { |
| | | this.addressLength = addresslength; |
| | | } |
| | | public int getAddressLength() { |
| | | return this.addressLength; |
| | | } |
| | | |
| | | public int getRatio() { |
| | | return this.ratio; |
| | | } |
| | | public void setAddressLength(int addresslength) { |
| | | this.addressLength = addresslength; |
| | | } |
| | | |
| | | public void setRatio(int ratio) { |
| | | this.ratio = ratio; |
| | | } |
| | | public int getRatio() { |
| | | return this.ratio; |
| | | } |
| | | |
| | | /** |
| | | public void setRatio(int ratio) { |
| | | this.ratio = ratio; |
| | | } |
| | | |
| | | /** |
| | | * 获取地址 |
| | | * |
| | | * |
| | | * @param index 索引地址 |
| | | */ |
| | | public String getAddress(int index) { |
| | | String[] stringdatas = this.startAddress.trim().split("\\."); |
| | | int addressLength=this.addressLength; |
| | | if (addressLength < 2 ){ |
| | | int addressLength = this.addressLength; |
| | | if (addressLength < 2) { |
| | | return null; |
| | | } |
| | | |
| | | if (addressLength == 2 ) { |
| | | if (addressLength == 2) { |
| | | int wordindex = index; |
| | | |
| | | return stringdatas[0] + "." + wordindex; |
| | | } |
| | | if (addressLength == 14 ) { |
| | | if (addressLength == 14) { |
| | | int wordindex = index; |
| | | int newIndex = wordindex + 13; |
| | | return stringdatas[0] + "." + wordindex +"-" + newIndex; |
| | | return stringdatas[0] + "." + wordindex + "-" + newIndex; |
| | | } |
| | | return null; |
| | | } |
| | |
| | | private ArrayList<PlcParameterInfo> plcParameterList; |
| | | |
| | | |
| | | |
| | | /** |
| | | * @return 数据区开始地址 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * |
| | | * @param codeids 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加参数实例 |
| | | * |
| | | * |
| | | * @param param 参数实例 |
| | | */ |
| | | public void addPlcParameter(PlcParameterInfo param) { |
| | |
| | | |
| | | /** |
| | | * 根据PLC返回的数据 给参数实例赋值 |
| | | * |
| | | * |
| | | * @param plcValueArray PLC读取回来的byte类型数据集合 |
| | | */ |
| | | public void setPlcParameterList(byte[] plcValueArray) { |
| | | if (plcParameterList != null) { |
| | | |
| | | |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | |
| | | |
| | | byte[] valueList = new byte[plcParameterInfo.getAddressLength()]; |
| | | |
| | | // System.out.println(plcParameterInfo.getAddressLength()); |
| | |
| | | Array.setByte(valueList, i, plcValueArray[plcParameterInfo.getAddressIndex() + i]); |
| | | |
| | | } |
| | | if (plcParameterInfo.getAddressLength()==2) { |
| | | plcParameterInfo.setValue(String.valueOf(byte2short(valueList))); |
| | | } |
| | | else if (plcParameterInfo.getAddressLength()==14) { |
| | | if (plcParameterInfo.getAddressLength() == 2) { |
| | | plcParameterInfo.setValue(String.valueOf(byte2short(valueList))); |
| | | } else if (plcParameterInfo.getAddressLength() == 14) { |
| | | plcParameterInfo.setValue((byteToHexString(valueList))); |
| | | } |
| | | |
| | | else |
| | | { |
| | | } else { |
| | | String valuestr = new String(valueList); |
| | | plcParameterInfo.setValue(valuestr); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | |
| | | /** |
| | | * short类型转byte[] |
| | | * |
| | | * |
| | | * @param s short类型值 |
| | | */ |
| | | public static byte[] short2byte(short s){ |
| | | byte[] b = new byte[2]; |
| | | for(int i = 0; i < 2; i++){ |
| | | int offset = 16 - (i+1)*8; //因为byte占4个字节,所以要计算偏移量 |
| | | b[i] = (byte)((s >> offset)&0xff); //把16位分为2个8位进行分别存储 |
| | | public static byte[] short2byte(short s) { |
| | | byte[] b = new byte[2]; |
| | | for (int i = 0; i < 2; i++) { |
| | | int offset = 16 - (i + 1) * 8; //因为byte占4个字节,所以要计算偏移量 |
| | | b[i] = (byte) ((s >> offset) & 0xff); //把16位分为2个8位进行分别存储 |
| | | } |
| | | return b; |
| | | } |
| | | /** |
| | | } |
| | | |
| | | /** |
| | | * byte[]类型转short |
| | | * |
| | | * |
| | | * @param b byte[]类型值 |
| | | */ |
| | | public static short byte2short(byte[] b){ |
| | | short l = 0; |
| | | for (int i = 0; i < 2; i++) { |
| | | l<<=8; //<<=和我们的 +=是一样的,意思就是 l = l << 8 |
| | | l |= (b[i] & 0xff); //和上面也是一样的 l = l | (b[i]&0xff) |
| | | } |
| | | return l; |
| | | } |
| | | public static short byte2short(byte[] b) { |
| | | short l = 0; |
| | | for (int i = 0; i < 2; i++) { |
| | | l <<= 8; //<<=和我们的 +=是一样的,意思就是 l = l << 8 |
| | | l |= (b[i] & 0xff); //和上面也是一样的 l = l | (b[i]&0xff) |
| | | } |
| | | return l; |
| | | } |
| | | |
| | | public static String byteToHexString(byte[] bytes) { |
| | | |
| | | String str = new String(bytes, StandardCharsets.UTF_8); |
| | | return str; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | // public Result<List<OptimizeProject>> saveProject(@RequestBody OptimizeRequest optimizeRequest) { |
| | | // log.info("将请求参数封装在请求类里面"); |
| | | // List<OptimizeProject> glass = optimizeProjectService.saveProject(optimizeRequest); |
| | | // log.info("显示工程选择信息:{}", glass); |
| | | // return Result.build(200, "", glass); |
| | | // } |
| | | @ApiOperation("保存工程信息") |
| | | @PostMapping("/saveProject") //显示工程选择信息 |
| | | public Result<List<OptimizeProject>> saveProject(@RequestBody OptimizeRequest optimizeRequest) { |
| | | log.info("获取选择好的工程id进行查询数据后保存"); |
| | | List<OptimizeProject> glass = optimizeProjectService.saveProject(optimizeRequest); |
| | | log.info("显示工程选择信息后进行保存:{}", glass); |
| | | //void insetProject(glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | */ |
| | | @Data |
| | | public class OptimizeRequest { |
| | | @ApiParam("") |
| | | private String projectNo; |
| | | |
| | | @ApiParam("") |
| | | private Integer state; |
| | | |
| | | @ApiParam("") |
| | | private String projectNo; |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | package com.mes.pp.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.entity.request.OptimizeRequest; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Mapper |
| | | @DS("pp") |
| | | public interface OptimizeProjectMapper extends BaseMapper<OptimizeProject> { |
| | | |
| | | List<OptimizeProject> saveProject(OptimizeRequest optimizeRequest); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 查询可领取的任务工程信息 |
| | | * |
| | | * @return |
| | | */ |
| | | List<OptimizeProject> listByState(OptimizeRequest optimizeRequest); |
| | | |
| | | /** |
| | | * 查询保存到原片使用详情表的数据 |
| | | * |
| | | * @return |
| | | */ |
| | | List<OptimizeProject> saveProject(OptimizeRequest optimizeRequest); |
| | | |
| | | /** |
| | | * 将工程信息保存到原片使用详情表 |
| | | * |
| | | * @return |
| | | */ |
| | | void insetProject(OptimizeProject glass); |
| | | } |
| | |
| | | public List<OptimizeProject> listByState(OptimizeRequest optimizeRequest) { |
| | | log.info("将参数传入到查询类里,工程号做非空判断模糊查询"); |
| | | LambdaQueryWrapper<OptimizeProject> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(OptimizeProject::getState,optimizeRequest.getState()) |
| | | .like(StringUtils.isNotBlank(optimizeRequest.getProjectNo()),OptimizeProject::getProjectNo,optimizeRequest.getProjectNo()) |
| | | .groupBy(OptimizeProject::getProjectNo); |
| | | wrapper.eq(OptimizeProject::getState, optimizeRequest.getState()) |
| | | .like(StringUtils.isNotBlank(optimizeRequest.getProjectNo()), OptimizeProject::getProjectNo, optimizeRequest.getProjectNo()) |
| | | //.groupBy(OptimizeProject::getProjectNo) |
| | | ; |
| | | log.info("返回工程信息"); |
| | | return this.list(wrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void insetProject(OptimizeProject glass) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<OptimizeProject> saveProject(OptimizeRequest optimizeRequest) { |
| | | log.info("将参数传入到查询类里,工程号做非空判断模糊查询"); |
| | | |
| | | log.info("返回工程信息"); |
| | | return this.baseMapper.saveProject(optimizeRequest); |
| | | } |
| | | |
| | | } |
| | |
| | | // 2、全局配置 |
| | | // 全局配置 |
| | | GlobalConfig gc = new GlobalConfig(); |
| | | gc.setOutputDir("D:\\workspace\\hangzhoumesParent1\\"); |
| | | gc.setOutputDir("D:\\Documents\\hangzhoumesParent1\\"); |
| | | |
| | | gc.setServiceName("%sService"); //去掉Service接口的首字母I |
| | | gc.setAuthor("zhoush"); |
| | |
| | | // 5、策略配置 |
| | | StrategyConfig strategy = new StrategyConfig(); |
| | | |
| | | // strategy.setInclude("activity_info", "activity_rule", "activity_sku", "coupon_info", "coupon_range", |
| | | // "coupon_use"); |
| | | strategy.setInclude("up_patten_usage"); |
| | | |
| | | strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 |
| | | |
| | |
| | | //数据源 |
| | | HikariConfig hikariConfig = new HikariConfig(); |
| | | hikariConfig.setDriverClassName("com.mysql.cj.jdbc.Driver"); |
| | | hikariConfig.setJdbcUrl("jdbc:mysql://10.153.19.150:3306/hangzhoumes"+"?serverTimezone=GMT%2B8"); |
| | | hikariConfig.setJdbcUrl("jdbc:mysql://10.153.19.150:3306/hangzhoumes" + "?serverTimezone=GMT%2B8"); |
| | | hikariConfig.setUsername("root"); |
| | | hikariConfig.setPassword("beibo.123/"); |
| | | //设置可以获取tables remarks信息 |
| | |
| | | plcParameterInfo.setUnit(parameterObj.getStr("unit")); |
| | | plcParameterObject.addPlcParameter(plcParameterInfo); |
| | | } |
| | | // byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02}; |
| | | // byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | // plcParameterObject.setPlcParameterList(getplcvlues); |
| | | // byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02}; |
| | | // byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | // plcParameterObject.setPlcParameterList(getplcvlues); |
| | | |
| | | return plcParameterObject; |
| | | } catch (IOException e) { |
| | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | //Boolean[] values1 = { false, true, true, true, false, false, true, false, |
| | | // false, true ,true }; |
| | | // List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1)); |
| | | //Boolean[] values1 = { false, true, true, true, false, false, true, false, |
| | | // false, true ,true }; |
| | | // List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1)); |
| | | |
| | | // List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength()); |
| | | // plcBitObject.setPlcBitList(getplcvlues); |
| | | return plcBitObject; |
| | | } |
| | | |
| | | // |
| | | // |
| | | public static void readAndUpdateBitValues(PlcBitObject plcBitObject) { |
| | | |
| | | Boolean[] values1 = { false, true, true, true, false, false, true, false, |
| | | false, true ,true }; |
| | | List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1)); |
| | | Boolean[] values1 = {false, true, true, true, false, false, true, false, |
| | | false, true, true}; |
| | | List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1)); |
| | | //List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength()); |
| | | plcBitObject.setPlcBitList(getplcvlues); |
| | | } |
| | |
| | | |
| | | public static void readAndUpdateWordValues(PlcParameterObject plcParameterObject) { |
| | | |
| | | byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03,0x03}; |
| | | // byte[] getplcvlues = MockS7PLC.getInstance().readByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x03}; |
| | | // byte[] getplcvlues = MockS7PLC.getInstance().readByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | plcParameterObject.setPlcParameterList(getplcvlues); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.uppattenusage.controller; |
| | | |
| | | |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.UpPattenUsageService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/up-patten-usage") |
| | | @Slf4j |
| | | public class UpPattenUsageController { |
| | | |
| | | @Autowired |
| | | private UpPattenUsageService upPattenUsageService; |
| | | @ApiOperation("显示正在出片的工程信息") |
| | | @GetMapping("/prioritylist") //查询现在上片机的玻璃信息 |
| | | public Result<List<UpPattenUsage>> prioritylist() { |
| | | List<UpPattenUsage> glass = upPattenUsageService.prioritylist(1); |
| | | log.info("显示工位上的玻璃信息:{}", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.uppattenusage.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class UpPattenUsage implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 原片使用情况表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private String engineeringId; |
| | | |
| | | /** |
| | | * 膜系id |
| | | */ |
| | | private Integer filmsId; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * 高 |
| | | */ |
| | | private Double height; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private Double thickness; |
| | | |
| | | /** |
| | | * 原片版图片序 |
| | | */ |
| | | private Integer layoutSequence; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | private Integer state; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.uppattenusage.mapper; |
| | | |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-18 |
| | | */ |
| | | public interface UpPattenUsageMapper extends BaseMapper<UpPattenUsage> { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.mes.uppattenusage.mapper.UpPattenUsageMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.mes.uppattenusage.service; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-18 |
| | | */ |
| | | public interface UpPattenUsageService extends IService<UpPattenUsage> { |
| | | List<UpPattenUsage> prioritylist(int state); |
| | | } |
New file |
| | |
| | | package com.mes.uppattenusage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.UpPattenUsageService; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-18 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class UpPattenUsageServiceImpl extends ServiceImpl<UpPattenUsageMapper, UpPattenUsage> implements UpPattenUsageService { |
| | | @Override |
| | | public List<UpPattenUsage> prioritylist(int state) { |
| | | log.info("将参数传入到查询类里,工程号做非空判断模糊查询"); |
| | | LambdaQueryWrapper<UpPattenUsage> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(UpPattenUsage::getState,state); |
| | | log.info("返回工程信息"); |
| | | return this.list(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | public static String encrypt(String strSrc) { |
| | | try { |
| | | char hexChars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', |
| | | '9', 'a', 'b', 'c', 'd', 'e', 'f' }; |
| | | char hexChars[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', |
| | | '9', 'a', 'b', 'c', 'd', 'e', 'f'}; |
| | | byte[] bytes = strSrc.getBytes(); |
| | | MessageDigest md = MessageDigest.getInstance("MD5"); |
| | | md.update(bytes); |
| | |
| | | @Getter |
| | | public enum ResultCodeEnum { |
| | | |
| | | SUCCESS(200,"成功"), |
| | | SUCCESS(200, "成功"), |
| | | FAIL(201, "失败"), |
| | | SERVICE_ERROR(2012, "服务异常"), |
| | | DATA_ERROR(204, "数据异常"), |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.mes.pp.mapper.OptimizeProjectMapper"> |
| | | |
| | | <resultMap id="sequenceMap" type="com.mes.uppattenusage.entity.UpPattenUsage"> |
| | | <result property="engineeringId" column="project_no"/> |
| | | <result property="filmsId" column="glass_type"/> |
| | | <result property="width" column="width"/> |
| | | <result property="height" column="height"/> |
| | | <result property="thickness" column="glass_thickness"/> |
| | | <result property="layoutSequence" column="heat_layout_sort"/> |
| | | <result property="state" column="state"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="saveProject" parameterType="com.mes.pp.entity.request.OptimizeRequest" resultMap="sequenceMap"> |
| | | select a.project_no, 1 as glass_type, a.width, a.height, REGEXP_REPLACE(b.glass_thickness, '\\D', '')as glass_thickness, a.heat_layout_sort, 0 as state |
| | | from optimize_detail a |
| | | left join optimize_project b on a.project_no = b.project_no |
| | | where a.project_no = #{projectNo} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | public static void main(String[] args) { |
| | | try { |
| | | SpringApplication.run(CacheGlassModuleApplication.class, args); |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import static com.mes.common.InitUtil.readAndUpdateWordValues; |
| | | |
| | |
| | | // private static String PlcRead = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath(); |
| | | // private static String Plcframe = PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath(); |
| | | // private static String PlcParameter = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcParameter.json").getPath(); |
| | | |
| | | |
| | | // private static String PlcSign = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcSign.json").getPath(); |
| | | |
| | | |
| | | // private static String PlcState = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcState.json").getPath(); |
| | | |
| | | |
| | | // private static String PlcAlarm = PLCAutoMes.class.getResource("/JsonFile/PlcAlarm.json").getPath(); |
| | | // private static String PlcTest = PLCAutoMes.class.getResource("/JsonFile/PlcTest.json").getPath(); |
| | | |
| | |
| | | public static PlcParameterObject PlcMesObject = InitUtil.initword(PlcAlbania); |
| | | // public static PlcParameterObject PlcReadObject = initUtil.initword(PlcRead); |
| | | // public static PlcParameterObject PlcframeObject = initUtil.initword(Plcframe); |
| | | |
| | | |
| | | // 私有构造函数 |
| | | public PLCAutoMes() throws IOException { |
| | | //config = new Configuration("config.properties"); |
| | |
| | | package com.mes.common; |
| | | |
| | | |
| | | public class PlcBitInfo { |
| | | |
| | | public class PlcBitInfo { |
| | | public PlcBitInfo(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | |
| | | public PlcBitInfo(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | |
| | | // 参数名称 |
| | | private String name; |
| | | // 参数名称 |
| | | private String name; |
| | | |
| | | // 读取 参数值 |
| | | private Boolean value; |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | // 读取 参数值 |
| | | private Boolean value; |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Boolean getValue() { |
| | | return this.value; |
| | | } |
| | | public Boolean getValue() { |
| | | return this.value; |
| | | } |
| | | |
| | | public void setValue(Boolean value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | public void setValue(Boolean value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | public int getAddressIndex() { |
| | | return this.addressIndex; |
| | | } |
| | | /** |
| | | |
| | | public int getAddressIndex() { |
| | | return this.addressIndex; |
| | | } |
| | | |
| | | /** |
| | | * 获取地址 |
| | | * |
| | | * |
| | | * @param index 索引地址 |
| | | */ |
| | | public String getAddress(int index) { |
| | | String[] stringdatas = this.startAddress.trim().split("\\."); |
| | | if (stringdatas.length < 2 ) |
| | | return null; |
| | | int dbwindex = 0; |
| | | int bitindex = 0; |
| | | if (stringdatas.length == 3) { |
| | | dbwindex = Integer.parseInt(stringdatas[1]); |
| | | bitindex = Integer.parseInt(stringdatas[2]); |
| | | } else |
| | | return null; |
| | | dbwindex+=index/8; |
| | | bitindex+=index%8; |
| | | return stringdatas[0]+"."+dbwindex+"."+bitindex; |
| | | } |
| | | |
| | | |
| | | public String getAddress(int index) { |
| | | String[] stringdatas = this.startAddress.trim().split("\\."); |
| | | if (stringdatas.length < 2) |
| | | return null; |
| | | int dbwindex = 0; |
| | | int bitindex = 0; |
| | | if (stringdatas.length == 3) { |
| | | dbwindex = Integer.parseInt(stringdatas[1]); |
| | | bitindex = Integer.parseInt(stringdatas[2]); |
| | | } else |
| | | return null; |
| | | dbwindex += index / 8; |
| | | bitindex += index % 8; |
| | | return stringdatas[0] + "." + dbwindex + "." + bitindex; |
| | | } |
| | | |
| | | |
| | | public void setAddressIndex(int addressindex) { |
| | | this.addressIndex = addressindex; |
| | | } |
| | | this.addressIndex = addressindex; |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 添加参数实例 |
| | | * |
| | | * |
| | | * @param param 参数实例 |
| | | */ |
| | | public void addPlcBit(PlcBitInfo param) { |
| | |
| | | |
| | | /** |
| | | * 根据PLC返回的数据 给参数实例赋值 |
| | | * |
| | | * |
| | | * @param plcValueArray PLC读取回来的byte类型数据集合 |
| | | */ |
| | | public void setPlcBitList(List<Boolean> plcValueArray) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.common; |
| | | public class PlcParameterInfo { |
| | | public PlcParameterInfo(String startAddress) { |
| | | |
| | | public class PlcParameterInfo { |
| | | public PlcParameterInfo(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | } |
| | | |
| | | // 参数名称 |
| | | private String name; |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | |
| | | // 读取 参数值 |
| | | private String value; |
| | | // 参数名称 |
| | | private String name; |
| | | |
| | | // // 写入 参数值 |
| | | // private String writeValue; |
| | | // 读取 参数值 |
| | | private String value; |
| | | |
| | | // 参数单位 |
| | | private String unit; |
| | | // // 写入 参数值 |
| | | // private String writeValue; |
| | | |
| | | // 参数值转换系数 |
| | | private int ratio; |
| | | // 参数单位 |
| | | private String unit; |
| | | |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | // 参数值转换系数 |
| | | private int ratio; |
| | | |
| | | // 参数地址位长度 |
| | | private int addressLength; |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | // 参数地址位长度 |
| | | private int addressLength; |
| | | |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return this.value; |
| | | } |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | public String getValue() { |
| | | return this.value; |
| | | } |
| | | |
| | | // public String getWriteValue() { |
| | | // return this.writeValue; |
| | | // } |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | // public void setWriteValue(String writeValue) { |
| | | // this.writeValue = writeValue; |
| | | // } |
| | | // public String getWriteValue() { |
| | | // return this.writeValue; |
| | | // } |
| | | |
| | | public String getUnit() { |
| | | return this.unit; |
| | | } |
| | | // public void setWriteValue(String writeValue) { |
| | | // this.writeValue = writeValue; |
| | | // } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | public String getUnit() { |
| | | return this.unit; |
| | | } |
| | | |
| | | public int getAddressIndex() { |
| | | return this.addressIndex; |
| | | } |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public void setAddressIndex(int addressindex) { |
| | | this.addressIndex = addressindex; |
| | | } |
| | | public int getAddressIndex() { |
| | | return this.addressIndex; |
| | | } |
| | | |
| | | public int getAddressLength() { |
| | | return this.addressLength; |
| | | } |
| | | public void setAddressIndex(int addressindex) { |
| | | this.addressIndex = addressindex; |
| | | } |
| | | |
| | | public void setAddressLength(int addresslength) { |
| | | this.addressLength = addresslength; |
| | | } |
| | | public int getAddressLength() { |
| | | return this.addressLength; |
| | | } |
| | | |
| | | public int getRatio() { |
| | | return this.ratio; |
| | | } |
| | | public void setAddressLength(int addresslength) { |
| | | this.addressLength = addresslength; |
| | | } |
| | | |
| | | public void setRatio(int ratio) { |
| | | this.ratio = ratio; |
| | | } |
| | | |
| | | public int getRatio() { |
| | | return this.ratio; |
| | | } |
| | | |
| | | /** |
| | | public void setRatio(int ratio) { |
| | | this.ratio = ratio; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取地址 |
| | | * |
| | | * |
| | | * @param index 索引地址 |
| | | */ |
| | | public String getAddress(int index) { |
| | | String[] stringdatas = this.startAddress.trim().split("\\."); |
| | | int addressLength=this.addressLength; |
| | | if (addressLength < 2 ){ |
| | | int addressLength = this.addressLength; |
| | | if (addressLength < 2) { |
| | | return null; |
| | | } |
| | | |
| | | if (addressLength == 2 ) { |
| | | if (addressLength == 2) { |
| | | int wordindex = index; |
| | | |
| | | return stringdatas[0] + "." + wordindex; |
| | | } |
| | | if (addressLength == 14 ) { |
| | | if (addressLength == 14) { |
| | | int wordindex = index; |
| | | //int newIndex = wordindex + 13; |
| | | return stringdatas[0] + "." + wordindex ; |
| | | return stringdatas[0] + "." + wordindex; |
| | | } |
| | | return null; |
| | | } |
| | |
| | | |
| | | return addressIndex; |
| | | } |
| | | |
| | | public String getAddress() { |
| | | return getAddress(this.addressIndex); |
| | | return getAddress(this.addressIndex); |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * |
| | | * @param codeids 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加参数实例 |
| | | * |
| | | * |
| | | * @param param 参数实例 |
| | | */ |
| | | public void addPlcParameter(PlcParameterInfo param) { |
| | |
| | | |
| | | /** |
| | | * 根据PLC返回的数据 给参数实例赋值 |
| | | * |
| | | * |
| | | * @param plcValueArray PLC读取回来的byte类型数据集合 |
| | | */ |
| | | public void setPlcParameterList(byte[] plcValueArray) { |
| | | if (plcParameterList != null) { |
| | | |
| | | |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | |
| | | |
| | | byte[] valueList = new byte[plcParameterInfo.getAddressLength()]; |
| | | |
| | | // System.out.println(plcParameterInfo.getAddressLength()); |
| | |
| | | Array.setByte(valueList, i, plcValueArray[plcParameterInfo.getAddressIndex() + i]); |
| | | |
| | | } |
| | | if (plcParameterInfo.getAddressLength()==2) { |
| | | plcParameterInfo.setValue(String.valueOf(byte2short(valueList))); |
| | | } |
| | | else if (plcParameterInfo.getAddressLength()==14) { |
| | | if (plcParameterInfo.getAddressLength() == 2) { |
| | | plcParameterInfo.setValue(String.valueOf(byte2short(valueList))); |
| | | } else if (plcParameterInfo.getAddressLength() == 14) { |
| | | plcParameterInfo.setValue((byteToHexString(valueList))); |
| | | } |
| | | |
| | | else |
| | | { |
| | | } else { |
| | | String valuestr = new String(valueList); |
| | | plcParameterInfo.setValue(valuestr); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | |
| | | /** |
| | | * short类型转byte[] |
| | | * |
| | | * |
| | | * @param s short类型值 |
| | | */ |
| | | public static byte[] short2byte(short s){ |
| | | byte[] b = new byte[2]; |
| | | for(int i = 0; i < 2; i++){ |
| | | int offset = 16 - (i+1)*8; //因为byte占4个字节,所以要计算偏移量 |
| | | b[i] = (byte)((s >> offset)&0xff); //把16位分为2个8位进行分别存储 |
| | | public static byte[] short2byte(short s) { |
| | | byte[] b = new byte[2]; |
| | | for (int i = 0; i < 2; i++) { |
| | | int offset = 16 - (i + 1) * 8; //因为byte占4个字节,所以要计算偏移量 |
| | | b[i] = (byte) ((s >> offset) & 0xff); //把16位分为2个8位进行分别存储 |
| | | } |
| | | return b; |
| | | } |
| | | /** |
| | | } |
| | | |
| | | /** |
| | | * byte[]类型转short |
| | | * |
| | | * |
| | | * @param b byte[]类型值 |
| | | */ |
| | | public static short byte2short(byte[] b){ |
| | | short l = 0; |
| | | for (int i = 0; i < 2; i++) { |
| | | l<<=8; //<<=和我们的 +=是一样的,意思就是 l = l << 8 |
| | | l |= (b[i] & 0xff); //和上面也是一样的 l = l | (b[i]&0xff) |
| | | } |
| | | return l; |
| | | } |
| | | public static short byte2short(byte[] b) { |
| | | short l = 0; |
| | | for (int i = 0; i < 2; i++) { |
| | | l <<= 8; //<<=和我们的 +=是一样的,意思就是 l = l << 8 |
| | | l |= (b[i] & 0xff); //和上面也是一样的 l = l | (b[i]&0xff) |
| | | } |
| | | return l; |
| | | } |
| | | |
| | | public static String byteToHexString(byte[] bytes) { |
| | | |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * 磨边前理片笼表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * 磨边前理片笼详情表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 设备id |
| | |
| | | package com.mes.edgstoragecage.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * 玻璃信息表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("task_cache") |
| | | public class TaskCache { |
| | | private String ID;//任务编号 |
| | | private String startcell;//起始 |
| | | private String endcell;//结束 |
| | | private String tasktype;//任务类型 |
| | | private String taskstauts;//任务状态 |
| | | |
| | | private String ID;//任务编号 |
| | | private String startcell;//起始 |
| | | private String endcell;//结束 |
| | | private String tasktype;//任务类型 |
| | | private String taskstauts;//任务状态 |
| | | |
| | | } |
| | |
| | | package com.mes.taskcache.mapper; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.taskcache.entity.TaskCache; |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface HangzhouMesMapper { |
| | | |
| | | |
| | | // 玻璃信息 按ID查询 |
| | | @Select("select * from `glass_info` where id=#{id}") |
| | | GlassInfo selectGlassId(String id); |
| | | |
| | | // 查询磨边信息 |
| | | @Select("select * from task_cache where task_type='2' and task_stauts='2' and end_cell=#{EndCell}") |
| | | List<Map> selectEdgInfo(String EndCell); |
| | |
| | | |
| | | // 查询可进此片玻璃的栅格号 |
| | | @Select("select escd.* from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null escd.tempering_layout_id=#{tempering_layout_id} and escd.tempering_feed_sequence<#{tempering_feed_sequence} and esc.remain_width-#{width}>0 order by escd.tempering_feed_sequence") |
| | | List<EdgStorageCageDetails> selectIsExistIntoCache(Integer tempering_layout_id, Integer tempering_feed_sequence,double width); |
| | | List<EdgStorageCageDetails> selectIsExistIntoCache(Integer tempering_layout_id, Integer tempering_feed_sequence, double width); |
| | | |
| | | // 查询可进此片玻璃的栅格号 |
| | | @Select("select escd.* from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null escd.tempering_layout_id<#{tempering_layout_id} and esc.remain_width-#{width}>0 order by escd.tempering_layout_id desc,escd.tempering_feed_sequence") |
| | |
| | | package com.mes.taskcache.mapper; |
| | | |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.apache.ibatis.annotations.*; |
| | | // |
| | | //@DS("pp") |
| | | @Mapper |
| | | public interface PpMapper { |
| | | |
| | | |
| | | // // 钢化按工程查询 |
| | | // @Select("select * from `v_optimize_heat_layout` where project_no=#{projeceid} ") |
| | | // List<Tempered> selectTemperedTerritory(String projeceid); |
| | | |
| | | // 切割版图 按工程,版图编号查询 |
| | | @Select("select * from optimize_detail where project_no=#{projeceid} and stock_id=#{TerritoryId}") |
| | | List<Map> selectCutTerritory(String projeceid,String TerritoryId); |
| | | List<Map> selectCutTerritory(String projeceid, String TerritoryId); |
| | | |
| | | // 切割版图 按工程查询 |
| | | @Select("select * from optimize_detail where project_no=#{projeceid} ") |
| | |
| | | |
| | | @Autowired |
| | | private HangzhouMesMapper hangzhouMesMapper; |
| | | |
| | | //根据编号 查找玻璃小片信息 |
| | | public GlassInfo getUserInfo(String process_id){ |
| | | public GlassInfo getUserInfo(String process_id) { |
| | | return hangzhouMesMapper.selectGlassId(process_id); |
| | | } |
| | | |
| | | //理片缓存 笼内信息 |
| | | public List<Map> SelectCageInfo(){ |
| | | public List<Map> SelectCageInfo() { |
| | | return hangzhouMesMapper.selectCachInfo(); |
| | | } |
| | | |
| | | //磨边小片信息 |
| | | public List<Map> SelectEdgInfo(String line){ |
| | | public List<Map> SelectEdgInfo(String line) { |
| | | return hangzhouMesMapper.selectEdgInfo(line); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | // } |
| | | |
| | | //切割版图 当前识别版图 |
| | | public List<Map> selectCutTerritory(){ |
| | | public List<Map> selectCutTerritory() { |
| | | //得到要显示的 工程ID 以及版图ID |
| | | //1.在Hangzhoumes数据库里 得到目前已经 领取但未完成的 工程ID集合 |
| | | //2.拿工程集合去PP数据库里 得到对应的小片集合 |
| | | //3.拿对应的小片集合 与 缓存任务表进行对比 查找下一版图显示 |
| | | String process_id = "P24032204"; |
| | | String territory_id = "1"; |
| | | return selectInfoMapper.selectCutTerritory(process_id,territory_id); |
| | | } |
| | | //切割版图 根据工程号查询 所有版图小片数据 |
| | | public List<Map> selectCutTerritory(String process_id){ |
| | | return selectInfoMapper.selectCutTerritory(process_id); |
| | | } |
| | | //切割版图 根据工程号,版图编号查询 版图编号里所有小片数据 |
| | | public List<Map> selectCutTerritory(String process_id,String TerritoryId){ |
| | | return selectInfoMapper.selectCutTerritory(process_id,TerritoryId); |
| | | return selectInfoMapper.selectCutTerritory(process_id, territory_id); |
| | | } |
| | | |
| | | |
| | | //切割版图 根据工程号查询 所有版图小片数据 |
| | | public List<Map> selectCutTerritory(String process_id) { |
| | | return selectInfoMapper.selectCutTerritory(process_id); |
| | | } |
| | | |
| | | //切割版图 根据工程号,版图编号查询 版图编号里所有小片数据 |
| | | public List<Map> selectCutTerritory(String process_id, String TerritoryId) { |
| | | return selectInfoMapper.selectCutTerritory(process_id, TerritoryId); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 大理片笼信息 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @ApiModel("大理片笼信息") |
| | | @ApiModel("理片笼信息") |
| | | @RestController |
| | | @RequestMapping("/bigStorageCage") |
| | | public class BigStorageCageController { |
| | |
| | | @Autowired |
| | | private BigStorageCageService bigStorageCageService; |
| | | |
| | | // public Result<BigStorageCageDetails> feedGlass(GlassInfo glassInfo, BigStorageCageDetails bigStorageCageDetails){ |
| | | // |
| | | // } |
| | | //todo: 实例代码 待删除 |
| | | @ApiOperation("测试") |
| | | @GetMapping("/index") |
| | | public String index() { |
| | | return "hello world"; |
| | | } |
| | | |
| | | @ApiOperation("理片笼信息") |
| | | @GetMapping("/bigStorageCage") |
| | | public Result<List<BigStorageCage>> querybigStorageCageDetail() { |
| | | return Result.success(bigStorageCageService.querybigStorageCageDetail()); |
| | | public List<BigStorageCage> querybigStorageCageDetail() { |
| | | return bigStorageCageService.querybigStorageCageDetail(); |
| | | } |
| | | |
| | | @ApiOperation("手动完成任务") |
| | | @PostMapping("/finishTask") |
| | | public Result<String> finishTask(int type, int id) { |
| | | // bigStorageCageDetailsService.FinishTask(); |
| | | return Result.success("success"); |
| | | } |
| | | } |
| | |
| | | * 大理片笼详情表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | private Long id; |
| | | |
| | | /** |
| | | * 设备id |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import feign.Param; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public interface BigStorageCageService extends IService<BigStorageCage> { |
| | | |
| | | void updateRemainWidth(int slot); |
| | | void updateRemainWidth(int Slot); |
| | | |
| | | BigStorageCageDetails feedGlass(GlassInfo glassInfo, BigStorageCageDetails bigStorageCageDetails); |
| | | |
| | |
| | | package com.mes.bigstorage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | |
| | | import com.mes.bigstorage.mapper.BigStorageCageMapper; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | @Service |
| | | @Slf4j |
| | | public class BigStorageCageServiceImpl extends ServiceImpl<BigStorageCageMapper, BigStorageCage> implements BigStorageCageService { |
| | | @Resource |
| | | private BigStorageCageMapper bigStorageCageMapper; |
| | | |
| | | @Resource |
| | | private BigStorageCageDetailsMapper bigStorageCageDetailsMapper; |
| | | |
| | | @Resource |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | |
| | | @Override |
| | | public BigStorageCageDetails feedGlass(GlassInfo glassInfo, BigStorageCageDetails bigStorageCageDetails) { |
| | | |
| | | //1、查询理片笼内玻璃片序等于当前玻璃片序-1的玻璃 |
| | | log.info("1、查询理片笼内片序+1等于当前玻璃片序的玻璃"); |
| | | LambdaQueryWrapper<BigStorageCageDetails> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(BigStorageCageDetails::getTemperingLayoutId, glassInfo.getTemperingLayoutId()) |
| | | .eq(BigStorageCageDetails::getTemperingFeedSequence, glassInfo.getTemperingFeedSequence() + 1); |
| | | BigStorageCageDetails layoutSlotInfo; |
| | | layoutSlotInfo= bigStorageCageDetailsMapper.selectOne(wrapper); |
| | | |
| | | BigStorageCageDetails layoutSlotInfo = bigStorageCageDetailsMapper.selectOne(wrapper); |
| | | BeanUtils.copyProperties(glassInfo, bigStorageCageDetails); |
| | | bigStorageCageDetails.setSlot(layoutSlotInfo.getSlot()); |
| | | |
| | | //2、有符合条件的格子活片序为1时 |
| | | log.info("有符合条件的格子活片序为1时"); |
| | | log.info("2、查询理片笼内片序+1等于当前玻璃片序的玻璃的结果不为空时"); |
| | | if (layoutSlotInfo.getSlot() != null) { |
| | | bigStorageCageDetails.setSlot(layoutSlotInfo.getSlot()); |
| | | } else { |
| | | //获取不到时: |
| | | // LambdaQueryWrapper<BigStorageCageDetails> BigStorageCageDetailslambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | // BigStorageCageDetailslambdaQueryWrapper |
| | | // .select(BigStorageCageDetails::getTemperingLayoutId) |
| | | // .groupBy(BigStorageCageDetails::getTemperingLayoutId); |
| | | // List<Map<String, Object>> temperingLayoutIdList= bigStorageCageDetailsMapper.selectMaps(BigStorageCageDetailslambdaQueryWrapper); |
| | | // for (Map<String, Object> map : temperingLayoutIdList) { |
| | | // for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | // String prefix = entry.getKey().substring(0, entry.getKey().indexOf('-')); |
| | | // String suffix = entry.getKey().substring(entry.getKey().indexOf('-') + 1); |
| | | // if(suffix.equals(entry.getValue())){ |
| | | // |
| | | // } |
| | | // } |
| | | // } |
| | | log.info("3、查询理片笼内片序+1等于当前玻璃片序的玻璃的结果为空时获取当前玻璃版图id是否存在理片笼内"); |
| | | LambdaQueryWrapper<BigStorageCageDetails> BigStorageCageDetailslambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | BigStorageCageDetailslambdaQueryWrapper |
| | | .select(BigStorageCageDetails::getTemperingLayoutId); |
| | | layoutSlotInfo = bigStorageCageDetailsMapper.selectOne(BigStorageCageDetailslambdaQueryWrapper); |
| | | |
| | | if(layoutSlotInfo != null){ |
| | | log.info("4、获取笼子内适合的格子"); |
| | | BigStorageCage bigStorageCage=bigStorageCageSlot(layoutSlotInfo.getDeviceId()); |
| | | bigStorageCageDetails.setSlot(bigStorageCage.getSlot()); |
| | | }else{ |
| | | log.info("5、获取每个笼子版图id的个数"); |
| | | QueryWrapper<BigStorageCageDetails> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.select("a.device_id", "COUNT(DISTINCT b.tempering_layout_id) AS layoutCount") |
| | | .groupBy("a.device_id") |
| | | .apply("LEFT JOIN (SELECT device_id, tempering_layout_id FROM big_storage_cage_details) b ON a.device_id = b.device_id AND a.slot = b.slot") |
| | | .orderByAsc("layoutCount") |
| | | .orderByAsc("a.device_id"); |
| | | List<Map<String, Object>> BigStorageCageDetailsCount= bigStorageCageDetailsMapper.selectMaps(queryWrapper); |
| | | |
| | | //获取可进片格子信息 |
| | | // BigStorageCageDetails EmptySlotInfo = bigStorageCageMapper.selectEmptyFeedSlot(); |
| | | // if (EmptySlotInfo != null) { |
| | | // bigStorageCageDetails.setSlot(EmptySlotInfo.getSlot()); |
| | | // } else { |
| | | // //获取其他笼格子- |
| | | // BigStorageCageDetails OtherSlotInfo = bigStorageCageMapper.selectOtherFeedSlot(); |
| | | // bigStorageCageDetails.setSlot(OtherSlotInfo.getSlot()); |
| | | // } |
| | | //将玻璃信息放入该格子 |
| | | |
| | | log.info("5、查询笼子内是否有合适的格子"); |
| | | for (Map<String, Object> map : BigStorageCageDetailsCount) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | int deviceId = Integer.parseInt(entry.getKey()); |
| | | BigStorageCage bigStorageCage=bigStorageCageSlot(deviceId); |
| | | if(bigStorageCage!=null){ |
| | | bigStorageCageDetails.setSlot(bigStorageCage.getSlot()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | log.info("6、当找到合适的格子时添加玻璃到笼子表"); |
| | | if (bigStorageCageDetails.getSlot() != null) { |
| | | bigStorageCageDetails.setState(0); |
| | | bigStorageCageDetailsMapper.insert(bigStorageCageDetails); |
| | | updateRemainWidth(bigStorageCageDetails.getSlot()); |
| | | updateRemainWidth(bigStorageCageDetails.getSlot()) ; |
| | | } |
| | | return bigStorageCageDetails; |
| | | } |
| | | |
| | | //获取笼子内的空格子 |
| | | private BigStorageCage bigStorageCageSlot(Integer deviceId) { |
| | | LambdaQueryWrapper<BigStorageCage> bigStorageCageWrapper=new LambdaQueryWrapper<>(); |
| | | bigStorageCageWrapper |
| | | .eq(BigStorageCage::getRemainWidth,"5000") |
| | | .eq(BigStorageCage::getEnableState,"0") |
| | | .eq(BigStorageCage::getDeviceId,deviceId) |
| | | .orderByAsc(BigStorageCage::getSlot) |
| | | .last("LIMIT 1"); |
| | | return bigStorageCageMapper.selectOne(bigStorageCageWrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public boolean outGlass() { |
| | | // // 1、查询钢化小片任务表是否有待出玻璃 |
| | | // List<TemperingGlassInfo> temperingGlassInfoList = temperingGlassInfoService.SelectTemperingGlassInfo(); |
| | | // //没有可出的玻璃时 |
| | | // if (temperingGlassInfoList != null) { |
| | | // //查询是否有小片全部到齐的钢化版图 |
| | | // } else { |
| | | // //继续当前钢化版图的任务 |
| | | // } |
| | | LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailslambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | bigStorageCageDetailslambdaQueryWrapper |
| | | .select(BigStorageCageDetails::getTemperingLayoutId) |
| | | .groupBy(BigStorageCageDetails::getTemperingLayoutId); |
| | | List<Map<String, Object>> temperingLayoutIdList = bigStorageCageDetailsMapper.selectMaps(bigStorageCageDetailslambdaQueryWrapper); |
| | | for (Map<String, Object> map : temperingLayoutIdList) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String prefix = entry.getKey().substring(0, entry.getKey().indexOf('-')); |
| | | String suffix = entry.getKey().substring(entry.getKey().indexOf('-') + 1); |
| | | if (suffix.equals(entry.getValue())) { |
| | | List<TemperingGlassInfo> temperingGlassInfoList = temperingGlassInfoService.list(); |
| | | log.info("1、查询钢化小片任务表是否有待出玻璃"+temperingGlassInfoList.size()); |
| | | |
| | | if(temperingGlassInfoList!=null){ |
| | | temperingGlassInfoService.addOutTask(temperingGlassInfoList); |
| | | log.info("2、添加任务到任务表"); |
| | | return true; |
| | | }else{ |
| | | log.info("3、没有可出的玻璃时获取是否有小片到齐的版图"); |
| | | LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailslambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | bigStorageCageDetailslambdaQueryWrapper |
| | | .select(BigStorageCageDetails::getTemperingLayoutId) |
| | | .groupBy(BigStorageCageDetails::getTemperingLayoutId); |
| | | List<Map<String, Object>> temperingLayoutIdList = bigStorageCageDetailsMapper.selectMaps(bigStorageCageDetailslambdaQueryWrapper); |
| | | for (Map<String, Object> map : temperingLayoutIdList) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String layoutId = entry.getKey().substring(0, entry.getKey().indexOf('-')); |
| | | String layoutNum = entry.getKey().substring(entry.getKey().indexOf('-') + 1); |
| | | if (layoutNum.equals(entry.getValue())) { |
| | | //4、添加此钢化版图id所有小片小片到钢化小片表 |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return true; |
| | | return false; |
| | | } |
| | | |
| | | //修改格子剩余宽度 |
| | | //计算格子剩余宽度 |
| | | @Override |
| | | public void updateRemainWidth(int slot) { |
| | | //获取该格子内玻璃信息 |
| | | log.info("获取该格子内玻璃信息,计算格子剩余宽度"); |
| | | Integer width = 5000; |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = Collections.singletonList(bigStorageCageDetailsMapper.selectById(slot)); |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList |
| | |
| | | bigStorageCage.setRemainWidth(width); |
| | | UpdateWrapper<BigStorageCage> bigStorageCageWrapper = new UpdateWrapper<>(); |
| | | bigStorageCageWrapper.eq("remain_width", width); |
| | | baseMapper.update(bigStorageCage, bigStorageCageWrapper); |
| | | bigStorageCageMapper.update(bigStorageCage, bigStorageCageWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<BigStorageCage> querybigStorageCageDetail() { |
| | | //1、获取大理片笼信息 |
| | | List<BigStorageCage> bigStorageCages = baseMapper.selectList(null); |
| | | List<BigStorageCage> bigStorageCages = bigStorageCageMapper.selectList(null); |
| | | log.info("1、获取大理片笼信息完成,获取到的数据{}", bigStorageCages.size()); |
| | | //2获取理片笼所有信息 |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = bigStorageCageDetailsMapper.selectList(null); |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | @Autowired |
| | | private BigStorageCageOutTaskService bigStorageCageOutTaskService; |
| | | |
| | | @ApiOperation("进片任务信息") |
| | | @GetMapping("/querybigStorageCageTask") |
| | | public List<BigStorageCageOutTask> querybigStorageCageOutTask(int taskState) { |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | private Long id; |
| | | |
| | | private Integer tragetSlot; |
| | | |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | private Long id; |
| | | |
| | | private Integer startSlot; |
| | | |
| | |
| | | public interface BigStorageCageOutTaskService extends IService<BigStorageCageOutTask> { |
| | | |
| | | List<BigStorageCageOutTask> querybigStorageCageOutTask(int taskState); |
| | | |
| | | void updateOutTask(); |
| | | |
| | | void deleteOutTask(Long taskId); |
| | | } |
| | |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper; |
| | | import com.mes.bigstoragetask.service.BigStorageCageFeedTaskService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import net.bytebuddy.matcher.FilterableList; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | package com.mes.bigstoragetask.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.mapper.BigStorageCageDetailsMapper; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageOutTaskMapper; |
| | | import com.mes.bigstoragetask.service.BigStorageCageOutTaskService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.temperingglass.mapper.TemperingGlassInfoMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class BigStorageCageOutTaskServiceImpl extends ServiceImpl<BigStorageCageOutTaskMapper, BigStorageCageOutTask> implements BigStorageCageOutTaskService { |
| | | |
| | | @Resource |
| | | TemperingGlassInfoMapper temperingGlassInfoMapper; |
| | | @Resource |
| | | BigStorageCageOutTaskMapper bigStorageCageOutTaskMapper; |
| | | @Resource |
| | | BigStorageCageDetailsMapper bigStorageCageDetailsMapper; |
| | | @Override |
| | | public List<BigStorageCageOutTask> querybigStorageCageOutTask(int taskState) { |
| | | LambdaQueryWrapper<BigStorageCageOutTask> getOutTaskWrapper = new LambdaQueryWrapper<>(); |
| | | getOutTaskWrapper.eq(BigStorageCageOutTask::getTaskState, taskState); |
| | | public List<BigStorageCageOutTask> querybigStorageCageOutTask(int taskState){ |
| | | log.info("根据传入的任务状态查询任务信息:"+taskState); |
| | | LambdaQueryWrapper<BigStorageCageOutTask> getOutTaskWrapper=new LambdaQueryWrapper<>(); |
| | | getOutTaskWrapper.eq(BigStorageCageOutTask::getTaskState,taskState); |
| | | return baseMapper.selectList(getOutTaskWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void updateOutTask(){ |
| | | List<BigStorageCageOutTask> bigStorageCageOutTaskList=querybigStorageCageOutTask(1); |
| | | log.info("查询任务表是否有已完成的出片任务"+bigStorageCageOutTaskList.size()); |
| | | for (BigStorageCageOutTask bigStorageCageOutTask:bigStorageCageOutTaskList |
| | | ) { |
| | | deleteOutTask(bigStorageCageOutTask.getId()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void deleteOutTask(Long taskId){ |
| | | log.info("根据任务id修改钢化小片表状态,删除已完成的出片任务,删除笼子表玻璃"); |
| | | temperingGlassInfoMapper.deleteById(taskId); |
| | | bigStorageCageOutTaskMapper.deleteById(taskId); |
| | | bigStorageCageDetailsMapper.deleteById(taskId); |
| | | } |
| | | } |
| | |
| | | package com.mes.component; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.service.BigStorageCageFeedTaskService; |
| | | import com.mes.bigstoragetask.service.BigStorageCageOutTaskService; |
| | | import com.mes.edgstoragetask.service.TaskCacheService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | public class PlcStorageCage extends Thread { |
| | | |
| | | @Autowired |
| | |
| | | @Autowired |
| | | private BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | @Autowired |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | @Autowired |
| | | private BigStorageCageFeedTaskService bigStorageCageFeedTaskService; |
| | | @Autowired |
| | | private BigStorageCageOutTaskService bigStorageCageOutTaskService; |
| | | @Autowired |
| | | private TaskCacheService taskCacheService; |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | try { |
| | | Thread.sleep(500); |
| | | String plcFeedReq = "0"; |
| | | String plcFeedGlassid = "111"; |
| | | //Plc进片请求时 |
| | | if ("1".equals(plcFeedReq)) { |
| | | BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails(); |
| | | //传入玻璃id |
| | | GlassInfo glassInfo = glassInfoService.getById(plcFeedGlassid); |
| | | Thread.sleep(300); |
| | | boolean bigStorageCageFullAlarm=false; |
| | | |
| | | String plcD01FeedReq = "0"; |
| | | String plcD04FeedReq = "0"; |
| | | String plcFeedGlassid = "111"; |
| | | String plcFeedReqLine="0"; |
| | | if("1".equals(plcD01FeedReq)){ |
| | | plcFeedReqLine="1"; |
| | | }else { |
| | | //plc任务发送字0 |
| | | } |
| | | if("1".equals(plcD04FeedReq)){ |
| | | plcFeedReqLine="2"; |
| | | }else { |
| | | //plc任务发送字0 |
| | | } |
| | | |
| | | if (!("0".equals(plcFeedReqLine))) { |
| | | log.info("1、Plc进片请求时"); |
| | | BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails(); |
| | | GlassInfo glassInfo = glassInfoService.getById(plcFeedGlassid); |
| | | log.info("2、根据玻璃id获取玻璃信息"+glassInfo); |
| | | BigStorageCageDetails slotInfo = bigStorageCageService.feedGlass(glassInfo, bigStorageCageDetails); |
| | | if (slotInfo != null) { |
| | | //plc任务发送字 |
| | | int taskType=taskCacheService.judgeTasktype(); |
| | | log.info("3、查询任务表判断当前任务类型为上车等到还是上车启动"+taskType); |
| | | bigStorageCageFeedTaskService.addFeedTask(slotInfo,Integer.parseInt(plcFeedReqLine),taskType); |
| | | log.info("4、添加任务到任务表"); |
| | | //plc任务发送字1 |
| | | bigStorageCageFullAlarm=false; |
| | | }else{ |
| | | //理片笼爆笼报警 |
| | | bigStorageCageFullAlarm=true; |
| | | } |
| | | }else{ |
| | | List<BigStorageCageFeedTask> bigStorageCageFeedTaskList=bigStorageCageFeedTaskService.querybigStorageCageFeedTask(1); |
| | | log.info("5、查询任务表是否有已经完成的进片任务"+bigStorageCageFeedTaskList.size()); |
| | | for (BigStorageCageFeedTask bigStorageCageFeedTask:bigStorageCageFeedTaskList |
| | | ) { |
| | | BigStorageCageDetails bigStorageCageDetails=new BigStorageCageDetails(); |
| | | bigStorageCageDetails.setId(bigStorageCageFeedTask.getId()); |
| | | bigStorageCageDetails.setState(1); |
| | | bigStorageCageDetailsService.updateById(bigStorageCageDetails); |
| | | log.info("6、修改理片笼详情玻璃状态"); |
| | | bigStorageCageFeedTaskService.removeById(bigStorageCageFeedTask); |
| | | log.info("7、删除已经完成的进片任务"); |
| | | } |
| | | } |
| | | |
| | |
| | | String plcOutReq = "0"; |
| | | boolean result = false; |
| | | if ("1".equals(plcOutReq)) { |
| | | //获取钢化小片表未出笼信息 |
| | | |
| | | |
| | | if (result == true) { |
| | | //plc任务发送字 |
| | | result=bigStorageCageService.outGlass(); |
| | | log.info("8、出片请求时调用出片接口"+result); |
| | | if (result) { |
| | | //plc任务发送字1 |
| | | } |
| | | }else{ |
| | | bigStorageCageOutTaskService.updateOutTask(); |
| | | //plc任务发送字0 |
| | | } |
| | | |
| | | //显示剩余空格子 |
| | | |
| | | //报警信息 |
| | | jsonObject.append("bigStorageCageFullAlarm", bigStorageCageFullAlarm); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | * ID编号 |
| | | */ |
| | | @TableId("ID") |
| | | private String id; |
| | | private Long id; |
| | | |
| | | /** |
| | | * 起始 |
| | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private Integer engineerId; |
| | | private Long engineerId; |
| | | |
| | | /** |
| | | * 生产规则id |
| | |
| | | * @since 2024-03-27 |
| | | */ |
| | | public interface TemperingGlassInfoService extends IService<TemperingGlassInfo> { |
| | | |
| | | public void addOutTask(List<TemperingGlassInfo> temperingGlassInfoList); |
| | | |
| | | public List<TemperingGlassInfo> SelectTemperingGlassInfo(); |
| | | } |
| | |
| | | package com.mes.temperingglass.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.mapper.TemperingGlassInfoMapper; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class TemperingGlassInfoServiceImpl extends ServiceImpl<TemperingGlassInfoMapper, TemperingGlassInfo> implements TemperingGlassInfoService { |
| | | |
| | | @Override |
| | | public void addOutTask(List<TemperingGlassInfo> temperingGlassInfoList) { |
| | | double carwidth=5000; |
| | | double gay=50; |
| | | double carWidth=5000; |
| | | double gap=50; |
| | | //写入任务到任务表 |
| | | for (TemperingGlassInfo temperingGlassInfo:temperingGlassInfoList |
| | | ) { |
| | | if((carwidth-gay-temperingGlassInfo.getWidth())>0){ |
| | | //添加任务到任务表 |
| | | log.info("1、当出片车宽度大于玻璃宽度时"); |
| | | if((carWidth-temperingGlassInfo.getWidth())>0){ |
| | | carWidth-=temperingGlassInfo.getWidth()-gap; |
| | | log.info("2、添加刚小片表信息到任务表"); |
| | | temperingGlassInfo.setState(1); |
| | | baseMapper.updateById(temperingGlassInfo); |
| | | log.info("3、添加刚小片表信息到任务表"); |
| | | BigStorageCageOutTask bigStorageCageOutTask =new BigStorageCageOutTask(); |
| | | bigStorageCageOutTask.setId(temperingGlassInfo.getId()); |
| | | }else{ |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<TemperingGlassInfo> SelectTemperingGlassInfo() { |
| | | return null; |
| | | } |
| | | } |
| | |
| | | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: beibo.123/ |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <parent> |
| | | <parent> |
| | | <artifactId>moduleService</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
New file |
| | |
| | | { |
| | | "plcAddressBegin":"DB14.0", |
| | | "plcAddressLenght":"208", |
| | | "dataType":"word", |
| | | "parameteInfor":[ |
| | | { |
| | | "codeId": "PLCToMES", |
| | | "addressIndex":"0", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "IDStatus1", |
| | | "addressIndex":"2", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "IDStatus2", |
| | | "addressIndex":"4", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "IDStatus3", |
| | | "addressIndex":"6", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "IDStatus4", |
| | | "addressIndex":"8", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "IDStatus5", |
| | | "addressIndex":"10", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "IDStatus6", |
| | | "addressIndex":"12", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "StautsID1", |
| | | "addressIndex":"14", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "StautsID2", |
| | | "addressIndex":"16", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "StautsID3", |
| | | "addressIndex":"18", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "StautsID4", |
| | | "addressIndex":"20", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "StautsID5", |
| | | "addressIndex":"22", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "StautsID6", |
| | | "addressIndex":"24", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "GaToMES", |
| | | "addressIndex":"26", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "Height", |
| | | "addressIndex":"28", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "width", |
| | | "addressIndex":"30", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "ExportTOMES1", |
| | | "addressIndex":"32", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "ExportToMES2", |
| | | "addressIndex":"34", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } , |
| | | { |
| | | "codeId": "MESToPLC", |
| | | "addressIndex":"36", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } , |
| | | { |
| | | "codeId": "MESID1", |
| | | "addressIndex":"38", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } , |
| | | { |
| | | "codeId": "MESID2", |
| | | "addressIndex":"54", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "MESID3", |
| | | "addressIndex":"70", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "MESID4", |
| | | "addressIndex":"86", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "MESID5", |
| | | "addressIndex":"102", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "MESID6", |
| | | "addressIndex":"118", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "MESToPLCStart1", |
| | | "addressIndex":"134", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStart2", |
| | | "addressIndex":"136", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStart3", |
| | | "addressIndex":"138", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | ,{ |
| | | "codeId": "MESToPLCStart4", |
| | | "addressIndex":"140", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | ,{ |
| | | "codeId": "MESToPLCStart5", |
| | | "addressIndex":"142", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | ,{ |
| | | "codeId": "MESToPLCStart6", |
| | | "addressIndex":"144", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget1", |
| | | "addressIndex":"146", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget2", |
| | | "addressIndex":"148", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget3", |
| | | "addressIndex":"150", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget4", |
| | | "addressIndex":"152", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget5", |
| | | "addressIndex":"154", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget6", |
| | | "addressIndex":"156", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus1", |
| | | "addressIndex":"158", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus2", |
| | | "addressIndex":"160", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus3", |
| | | "addressIndex":"162", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus4", |
| | | "addressIndex":"164", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus5", |
| | | "addressIndex":"166", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus6", |
| | | "addressIndex":"168", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToGaStatus", |
| | | "addressIndex":"170", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "A01Err", |
| | | "addressIndex":"172", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "A02Err", |
| | | "addressIndex":"174", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "B01Err", |
| | | "addressIndex":"176", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C01Err", |
| | | "addressIndex":"178", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C02Err", |
| | | "addressIndex":"180", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "ErrSpace1", |
| | | "addressIndex":"182", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "ErrSpace2", |
| | | "addressIndex":"184", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "ErrSpace3", |
| | | "addressIndex":"186", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "B01Position", |
| | | "addressIndex":"188", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C01Position", |
| | | "addressIndex":"190", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C02Position", |
| | | "addressIndex":"192", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "DeviceState", |
| | | "addressIndex":"194", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "AllFVRun", |
| | | "addressIndex":"196", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "A01State", |
| | | "addressIndex":"198", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "A02State", |
| | | "addressIndex":"200", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "B01State", |
| | | "addressIndex":"202", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C01State", |
| | | "addressIndex":"204", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C02State", |
| | | "addressIndex":"206", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | ] |
| | | } |
| | |
| | | |
| | | private S7object() { |
| | | if (plccontrol == null) { |
| | | plccontrol = new S7control(plcType, ip, port,0,0); |
| | | plccontrol = new S7control(plcType, ip, port, 0, 0); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * 原片使用情况表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | package com.mes.glassinfo.service.impl; |
| | | |
| | | import com.mes.glassinfo.entity.UpPattenUsage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.glassinfo.entity.UpPattenUsage; |
| | | import com.mes.glassinfo.mapper.UpPattenUsageMapper; |
| | | import com.mes.glassinfo.service.UpPattenUsageService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | package com.mes.workstation.controller; |
| | | |
| | | |
| | | import com.mes.utils.Result; |
| | | import com.mes.workstation.entity.GlassInfo; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | |
| | | //新增工位信息修改一条工位信息,接收实例类字段为宽高厚膜系数量工位id |
| | | //删除工位信息也用这个,除了工位id玻璃信息传null |
| | | @ApiOperation("修改工位表增加玻璃信息或者删除玻璃信息") |
| | | @PostMapping("/updateGlassMessage") |
| | | @ResponseBody |
| | | public void updateGlassMessage(@RequestBody UpWorkstation upwork) { |
| | | upWorkstationService.updateGlassMessage(upwork); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("开始上片任务") |
| | | @PostMapping("/selectPriority") //开始上片任务 |
| | | @ResponseBody |
| | | public void selectPriority() { |
| | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private Integer engineerId; |
| | | private Long engineerId; |
| | | |
| | | /** |
| | | * 生产规则id |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * 上片工位表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | |
| | | package com.mes.workstation.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.Map; |
| | | |
| | | import org.apache.ibatis.annotations.*; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | @Mapper |
| | | public interface LoadGlassMapper extends BaseMapper<UpWorkstation> { |
| | | //判断优先工位吸片 |
| | | @Select("select b.layout_sequence,a.number from up_workstation a left join up_patten_usage b " + |
| | | "on a.pattern_width=b.width and a.pattern_heigth=b.width " + |
| | | "and a.pattern_thickness=b.thickness where a.workstation_id=#{id}") |
| | | Map<String,Object> selectPriority(int id); |
| | | |
| | | Map<String, Object> selectPriority(int id); |
| | | |
| | | } |
| | |
| | | public interface UpWorkstationMapper extends BaseMapper<UpWorkstation> { |
| | | |
| | | List<UpWorkSequence> selectPriority(@Param("id") int id); |
| | | |
| | | } |
| | |
| | | //判断是否可以吸片进行任务 |
| | | |
| | | //判断优先吸片位置后发送出片任务 |
| | | public void selectPriority() ; |
| | | public void selectPriority(); |
| | | |
| | | //查询正在进行的工程 |
| | | |
| | | |
| | | /** |
| | | * 增加人工输入的工位玻璃信息 |
| | | * |
| | | * @param upwork |
| | | */ |
| | | void updateGlassMessage(UpWorkstation upwork); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | //import com.mes.common.S7object; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import com.mes.workstation.mapper.UpWorkstationMapper; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class UpWorkstationServiceImpl extends ServiceImpl<UpWorkstationMapper, UpWorkstation> implements UpWorkstationService { |
| | | |
| | | public static final String DB_100_10 = "DB_100_10"; |
| | | |
| | | //判断是否可以吸片进行任务 |
| | | public boolean isCanLoadGlass() { |
| | | String loadstart="吸片信号";//plcmes.getPlcParameter("吸片信号").getValue(); |
| | | String loadstart = "吸片信号";//plcmes.getPlcParameter("吸片信号").getValue(); |
| | | return "1".equals(loadstart); |
| | | |
| | | } |
| | | //显示正在进行任务的工程信息 |
| | | |
| | | |
| | | //判断优先吸片位置后发送出片任务 |
| | | public void selectPriority() { |
| | | //todo:判断是否可以吸片进行任务 |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.mes.workstation.mapper.UpWorkstationMapper"> |
| | | |
| | | <resultMap id="sequenceMap" type="com.mes.workstation.entity.UpWorkSequence"> |
| | | <id property="sequence" column="layout_sequence"/> |
| | | <result property="number" column="number"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectPriority" resultMap="sequenceMap"> |
| | | SELECT |
| | | b.layout_sequence,a."number" |
| | | FROM |
| | | up_workstation a |
| | | LEFT JOIN up_patten_usage b ON a.pattern_width = b.width |
| | | AND a.pattern_heigth = b.width |
| | | AND a.pattern_thickness = b.thickness |
| | | WHERE |
| | | a.workstation_id = #{id} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | import com.mes.pp.service.OptimizeDetailService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/16 9:46 |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = LoadGlassModuleApplication.class) |
| | | public class ApplicationTest { |
| | | |
| | | |
| | | @Resource |
| | | OptimizeDetailService optimizationDetailService; |
| | | |
| | | @Test |
| | | public void test() { |
| | | List<OptimizeDetail> list = optimizationDetailService.list(); |
| | | System.out.println("获取记录数:" + list.size()); |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/3/27 16:37 |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = LoadGlassModuleApplication.class) |
| | | public class LoadGlassModuleApplicationTest { |
| | | |
| | | @Resource |
| | | private OptimizeProjectMapper optimizeProjectMapper; |
| | | |
| | | @Test |
| | | public void test() { |
| | | // List<OptimizeProject> list = optimizeProjectMapper.saveProject("P24032204"); |
| | | // log.info("list:{}", list); |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | | log.info("完整路径:{}", Arrays.asList("123")); |
| | | } |
| | | } |
| | |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <parent> |
| | | <artifactId>moduleService</artifactId> |
| | | <artifactId>moduleService</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | </parent> |
| | |
| | | package com.mes.temperingglass.controller; |
| | | import java.util.List; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingOverService; |
| | | import com.mes.temperingglass.service.TemperingService; |
| | | import com.mes.utils.Result; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | @RestController |
| | |
| | | public class TemperingGlassInfoController { |
| | | |
| | | @Autowired |
| | | TemperingService temperingService; |
| | | TemperingService temperingService; |
| | | |
| | | @Autowired |
| | | private TemperingOverService temperingOverService; |
| | |
| | | public Result SelectWaitingGlass(@RequestParam(name = "ProcessId", required = false) String ProcessId) { |
| | | List<TemperingGlassInfo> glass = temperingService.SelectWaitingGlass(); |
| | | System.out.println(glass); |
| | | return Result.build(200,"", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @GetMapping("/SelectIntoGlass") // 查询进炉中的钢化等片中的版图信息,状态全为1的为已到。 |
| | |
| | | public Result SelectIntoGlass(String ProcessId) { |
| | | List<TemperingGlassInfo> glass = temperingService.SelectIntoGlass(); |
| | | System.out.println(glass); |
| | | return Result.build(200,"", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @GetMapping("/SelectOutGlass") //钢化后显示出炉的版图信息 |
| | |
| | | public Result SelectOutGlass(String ProcessId) { |
| | | List<TemperingGlassInfo> glass = temperingOverService.SelectOutGlass(); |
| | | System.out.println(glass); |
| | | return Result.build(200,"", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.temperingglass.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class GlassInfo implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 玻璃信息表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 流程卡 |
| | | */ |
| | | private String flowcardId; |
| | | |
| | | /** |
| | | * 流程卡玻璃类型 |
| | | */ |
| | | private Integer glassType; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * 高 |
| | | */ |
| | | private Double height; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private Double thickness; |
| | | |
| | | /** |
| | | * 膜系 |
| | | */ |
| | | private Integer filmsid; |
| | | |
| | | /** |
| | | * 磨前宽 |
| | | */ |
| | | private Double edgWidth; |
| | | |
| | | /** |
| | | * 磨前高 |
| | | */ |
| | | private Double edgHeight; |
| | | |
| | | /** |
| | | * 是否配片 |
| | | */ |
| | | private Integer ismultiple; |
| | | |
| | | /** |
| | | * 配片最大宽 |
| | | */ |
| | | private Double maxWidth; |
| | | |
| | | /** |
| | | * 配片最大高 |
| | | */ |
| | | private Double maxHeight; |
| | | |
| | | /** |
| | | * 钢化是否接受横放 |
| | | */ |
| | | private Integer ishorizontal; |
| | | |
| | | /** |
| | | * 原片顺序 |
| | | */ |
| | | private Integer patternSequence; |
| | | |
| | | /** |
| | | * 钢化版图id |
| | | */ |
| | | private Integer temperingLayoutId; |
| | | |
| | | /** |
| | | * 钢化版图片序 |
| | | */ |
| | | private Integer temperingFeedSequence; |
| | | |
| | | /** |
| | | * x坐标 |
| | | */ |
| | | private Integer xCoordinate; |
| | | |
| | | /** |
| | | * y坐标 |
| | | */ |
| | | private Integer yCoordinate; |
| | | |
| | | /** |
| | | * 旋转角度(逆时针) |
| | | */ |
| | | private Integer angle; |
| | | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private Long engineerId; |
| | | |
| | | /** |
| | | * 生产规则id |
| | | */ |
| | | private Integer ruleId; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * 钢化小片信息表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | package com.mes.temperingglass.service; |
| | | |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.mapper.TemperingMapper; |
| | | import java.util.List; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class TemperingOverService { |
| | | private final TemperingMapper temperingMapper; |
| | | //PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | private final TemperingMapper temperingMapper; |
| | | |
| | | //PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | public TemperingOverService(TemperingMapper temperingMapper) { |
| | | this.temperingMapper = temperingMapper; |
| | | } |
| | | |
| | | //接收出炉信号和炉号 |
| | | public String SelectOutSignal () { |
| | | |
| | | public String SelectOutSignal() { |
| | | |
| | | //S7control.getinstance().WriteWord("出炉信号", (short)1); |
| | | return "GlassInfo"; |
| | | } |
| | | |
| | | //发送确认收到信号 |
| | | public void OverSignal () { |
| | | public void OverSignal() { |
| | | //S7control.getinstance().WriteWord("确认字", (short)1); |
| | | } |
| | | |
| | | //显示钢化出炉后的版图信息 |
| | | public List <TemperingGlassInfo> SelectOutGlass () { |
| | | public List<TemperingGlassInfo> SelectOutGlass() { |
| | | return temperingMapper.SelectOutGlass(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | int tempering = temperingMapper.SelectTempering(glassid); |
| | | if (tempering == 1) { |
| | | return 1; |
| | | } |
| | | else { |
| | | } else { |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | //发送进炉信号 |
| | | public void SendIntoGlass (short start) { |
| | | public void SendIntoGlass(short start) { |
| | | s7control.WriteWord("DB100.10", start); |
| | | } |
| | | |
| | | //接受完成字回复确认字 |
| | | public void SendIntoGlass () { |
| | | s7control.WriteWord("DB100.10", (short)1); |
| | | public void SendIntoGlass() { |
| | | s7control.WriteWord("DB100.10", (short) 1); |
| | | } |
| | | |
| | | //显示等待中的版图 |
| | | public List <TemperingGlassInfo> SelectWaitingGlass () { |
| | | public List<TemperingGlassInfo> SelectWaitingGlass() { |
| | | List<TemperingGlassInfo> WaitingGlass = temperingMapper.SelectWaitingGlass(); |
| | | return WaitingGlass; |
| | | } |
| | | |
| | | //显示正在进炉的版图 |
| | | public List<TemperingGlassInfo> SelectIntoGlass () { |
| | | public List<TemperingGlassInfo> SelectIntoGlass() { |
| | | List<TemperingGlassInfo> IntoGlass = temperingMapper.SelectInGlass(); |
| | | return IntoGlass; |
| | | } |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | </dependency> |
| | | |
| | | |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>com.github.yulichang</groupId> |
| | | <artifactId>mybatis-plus-join</artifactId> |
| | |
| | | public class UnLoadGlassApplication { |
| | | |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication springApplication = new SpringApplication(UnLoadGlassApplication.class); |
| | | ConfigurableApplicationContext applicationContext = springApplication.run(args); |
| | |
| | | private static String PlcMes = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath(); |
| | | private static String PlcRead = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath(); |
| | | private static String Plcframe = PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath(); |
| | | // private static String PlcParameter = PLCAutomaticParameterSettingReview2.class |
| | | // private static String PlcParameter = PLCAutomaticParameterSettingReview2.class |
| | | // .getResource("/JsonFile/PlcParameter.json").getPath(); |
| | | // private static String PlcSign = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcSign.json") |
| | | // .getPath(); |
| | | // private static String PlcState = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcState.json") |
| | | // .getPath(); |
| | | private static String PlcAlarm = PLCAutoMes.class.getResource("/JsonFile/PlcAlarm.json").getPath(); |
| | | // private static String PlcTest = PLCAutoMes.class.getResource("/JsonFile/PlcTest.json").getPath(); |
| | | // private static String PlcTest = PLCAutoMes.class.getResource("/JsonFile/PlcTest.json").getPath(); |
| | | |
| | | // 调用initword方法 |
| | | |
| | | // |
| | | // public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm); |
| | | // |
| | | // public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm); |
| | | public static PlcParameterObject PlcMesObject = initUtil.initword(PlcMes); |
| | | public static PlcParameterObject PlcReadObject = initUtil.initword(PlcRead); |
| | | public static PlcParameterObject PlcframeObject = initUtil.initword(Plcframe); |
| | |
| | | |
| | | // System.out.println(jsonFilePath); |
| | | |
| | | // readAndUpdateWordValues(PlcReadObject); |
| | | // readAndUpdateWordValues(PlcReadObject); |
| | | readAndUpdateWordValues(PlcMesObject); |
| | | // readAndUpdateWordValues(PlcframeObject); |
| | | // readAndUpdateWordValues(PlcframeObject); |
| | | |
| | | // readAndUpdateWordValues(plcStateObject); |
| | | // int index = PlcMesObject.getPlcParameter("AddStart").getAddressIndex(); |
| | | // int index = PlcMesObject.getPlcParameter("AddStart").getAddressIndex(); |
| | | // System.out.println(index); |
| | | // PlcMesObject.getPlcParameter("AddStart").getAddress(index); |
| | | // PlcMesObject.getPlcParameter("AddStart").getAddress(index); |
| | | // System.out.println(PlcMesObject.getPlcParameter("AddStart").getAddress(index)); |
| | | List<String> addresses = new ArrayList<>(); |
| | | addresses.add("FeedID"); |
| | |
| | | addresses2.add("FeedID"); |
| | | addresses2.add("FeedCarStatus"); |
| | | |
| | | // System.out.println(PlcReadObject.getPlcParameterValues(addresses2)); |
| | | // System.out.println(PlcReadObject.getPlcParameterValues(addresses2)); |
| | | |
| | | } |
| | | } |
| | |
| | | package com.mes.common;
|
| | |
|
| | | import cn.hutool.json.JSONObject;
|
| | | import com.mes.downworkstation.service.DownGlassLogic;
|
| | | import com.mes.tools.WebSocketServer;
|
| | | import org.apache.logging.log4j.LogManager;
|
| | | import org.apache.logging.log4j.Logger;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.function.Supplier;
|
| | |
|
| | | @Component
|
| | | public class Plchome extends Thread {
|
| | | private int i = 1;
|
| | | private static final Logger log = LogManager.getLogger(Plchome.class);
|
| | |
|
| | | private final Supplier<DownGlassLogic> plcServiceSupplier;
|
| | |
|
| | | public Plchome() {
|
| | | this.plcServiceSupplier = () -> WebSocketServer.applicationContext.getBean(DownGlassLogic.class);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | while (!Thread.currentThread().isInterrupted()) {
|
| | | try {
|
| | | i++;
|
| | | Thread.sleep(100);
|
| | | DownGlassLogic plcService = plcServiceSupplier.get();
|
| | | // plcService.performPlcActions();
|
| | | //plcService.unloadpush();
|
| | |
|
| | | //当下片任务表状态为1时候将数据插入到下片玻璃信息表
|
| | | plcService.insertdownglassinfo();
|
| | |
|
| | |
|
| | |
|
| | | //当机械手任务表中状态为1 更新已经落架数量,并且把下片任务表的那条记录删掉 工位表流程卡绑定了架子
|
| | | plcService.downWorkstation();
|
| | |
|
| | |
|
| | | } catch (InterruptedException e) {
|
| | | Thread.currentThread().interrupt();
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | JSONObject jsonObject = new JSONObject();
|
| | | // System.out.println(arraylist6);
|
| | | jsonObject.append("data", 1);
|
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unloadglass");
|
| | | if (sendwServer != null) {
|
| | | for (WebSocketServer webserver : sendwServer) {
|
| | | webserver.sendMessage(jsonObject.toString());
|
| | | log.info("准备向 WebSocket 服务器发送消息: {}", jsonObject.toString());
|
| | | }}
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | | package com.mes.common; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.mes.downworkstation.service.DownGlassLogic; |
| | | import com.mes.tools.WebSocketServer; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.function.Supplier; |
| | | |
| | | @Component |
| | | public class Plchome extends Thread { |
| | | private int i = 1; |
| | | private static final Logger log = LogManager.getLogger(Plchome.class); |
| | | |
| | | private final Supplier<DownGlassLogic> plcServiceSupplier; |
| | | |
| | | public Plchome() { |
| | | this.plcServiceSupplier = () -> WebSocketServer.applicationContext.getBean(DownGlassLogic.class); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | i++; |
| | | Thread.sleep(100); |
| | | DownGlassLogic plcService = plcServiceSupplier.get(); |
| | | // plcService.performPlcActions(); |
| | | //plcService.unloadpush(); |
| | | |
| | | //当下片任务表状态为1时候将数据插入到下片玻璃信息表 |
| | | plcService.insertdownglassinfo(); |
| | | |
| | | |
| | | //当机械手任务表中状态为1 更新已经落架数量,并且把下片任务表的那条记录删掉 工位表流程卡绑定了架子 |
| | | plcService.downWorkstation(); |
| | | |
| | | |
| | | } catch (InterruptedException e) { |
| | | Thread.currentThread().interrupt(); |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // System.out.println(arraylist6); |
| | | jsonObject.append("data", 1); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unloadglass"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | log.info("准备向 WebSocket 服务器发送消息: {}", jsonObject.toString()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | private S7control() { |
| | | if (s7PLC == null) |
| | | s7PLC = new S7PLC(plcType, ip, port,0,0); |
| | | s7PLC = new S7PLC(plcType, ip, port, 0, 0); |
| | | } |
| | | |
| | | // 单例模式 获取类的唯一实例 |
| | |
| | | } |
| | | return instance; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 关闭西门子s7通讯连接 |
| | | */ |
| | | public void CloseS7client() { |
| | | if (s7PLC == null) |
| | | s7PLC.close(); |
| | | s7PLC.checkConnected(); |
| | | s7PLC.checkConnected(); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 按指定的地址 写入一个word |
| | | * |
| | | * |
| | | * @param address 地址 |
| | | * @param data word的值 |
| | | */ |
| | | public void WriteWord(String address, short data) { |
| | | if (s7PLC==null) |
| | | { |
| | | if (s7PLC == null) { |
| | | return; |
| | | } |
| | | s7PLC.writeInt16(address, data); |
| | |
| | | |
| | | /** |
| | | * 从某地址连续 写入多个word |
| | | * |
| | | * |
| | | * @param address 地址 |
| | | * @param datas word的值 |
| | | */ |
| | | public void WriteWord(String address, List<Short> datas) { |
| | | if (s7PLC==null) |
| | | if (s7PLC == null) |
| | | return; |
| | | // s7PLC.write(address, data); |
| | | List<String> addresslist = GetAddressList(address, datas.size(), 16); |
| | |
| | | |
| | | /** |
| | | * 按指定的地址 写入多个word |
| | | * |
| | | * |
| | | * @param address 地址 |
| | | * @param datas word的值 |
| | | */ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 按指定的地址 写入一个Bit |
| | | * |
| | | * |
| | | * @param address 地址 |
| | | * @param data Bit的值 |
| | | */ |
| | | public void WriteBit(String address, Boolean data) { |
| | | if (s7PLC==null) |
| | | if (s7PLC == null) |
| | | return; |
| | | s7PLC.writeBoolean(address, data); |
| | | } |
| | | |
| | | /** |
| | | * 按指定的地址 写入多个bit |
| | | * |
| | | * |
| | | * @param address 地址 |
| | | * @param datas bit的值 |
| | | */ |
| | | public void WriteBit(List<String> address, List<Boolean> datas) { |
| | | if (s7PLC==null) |
| | | if (s7PLC == null) |
| | | return; |
| | | // s7PLC.write(address, data); |
| | | |
| | |
| | | |
| | | /** |
| | | * 从某地址连续 写入多个bit |
| | | * |
| | | * |
| | | * @param address 地址 |
| | | * @param datas word的值 |
| | | */ |
| | | public void WriteBit(String address, List<Boolean> datas) { |
| | | if (s7PLC==null) |
| | | if (s7PLC == null) |
| | | return; |
| | | // s7PLC.write(address, data); |
| | | List<String> addresslist = GetAddressList(address, datas.size(), 1); |
| | |
| | | } |
| | | s7PLC.writeMultiData(addressWrite); |
| | | } |
| | | /** |
| | | |
| | | /** |
| | | * 按指定的地址 写入多个byte |
| | | * |
| | | * |
| | | * @param address 地址 |
| | | * @param datas byte的值 |
| | | */ |
| | | public void WriteByte(String address, byte[] datas) { |
| | | if (s7PLC==null) |
| | | if (s7PLC == null) |
| | | return; |
| | | // s7PLC.write(address, data); |
| | | s7PLC.writeByte(address, datas); |
| | |
| | | |
| | | /** |
| | | * 按指定的地址 读取word结果集 |
| | | * |
| | | * |
| | | * @param address 地址 |
| | | * @return 结果 |
| | | */ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | private int getIndexFromAddress(String address) { |
| | | |
| | | // 可以解析出地址中的数字部分,并转换为整数 |
| | |
| | | |
| | | /** |
| | | * 按指定的地址 读取word结果集 |
| | | * |
| | | * |
| | | * @param address 地址 |
| | | * @param count 连续读多少个word |
| | | * @return 结果 |
| | |
| | | |
| | | /** |
| | | * 按指定的地址 读取byte结果集 |
| | | * |
| | | * |
| | | * @param address 地址 |
| | | * @param count 连续读多少个byte |
| | | * @return 结果 |
| | | */ |
| | | public byte[] ReadByte(String address, int count) { |
| | | if (s7PLC==null) |
| | | return null; |
| | | // List<String> addresslist = GetAddressList(address, count, 16); |
| | | if (s7PLC == null) |
| | | return null; |
| | | // List<String> addresslist = GetAddressList(address, count, 16); |
| | | |
| | | try { |
| | | return s7PLC.readByte(address, count); |
| | | }catch (Exception e) { |
| | | } catch (Exception e) { |
| | | // 处理异常 |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | return null; |
| | |
| | | * @return Boolean结果 |
| | | */ |
| | | public List<Boolean> ReadBits(List<String> addresslist) { |
| | | if (s7PLC==null) |
| | | return null; |
| | | if (s7PLC == null) |
| | | return null; |
| | | return s7PLC.readBoolean(addresslist); |
| | | } |
| | | //读取不连续地址bit |
| | | public List<Boolean> readBits(List<String> addressList) { |
| | | if (s7PLC == null || addressList.isEmpty()) { |
| | | return null; |
| | | } |
| | | |
| | | List<Boolean> values = new ArrayList<>(); |
| | | for (String address : addressList) { |
| | | try { |
| | | boolean value = s7PLC.readBoolean(address); |
| | | values.add(value); |
| | | } catch (Exception e) { |
| | | // 处理异常 |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | //读取不连续地址bit |
| | | public List<Boolean> readBits(List<String> addressList) { |
| | | if (s7PLC == null || addressList.isEmpty()) { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | return values; |
| | | } |
| | | |
| | | |
| | | //读取String |
| | | public List<String> readStrings(List<String> addressList) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | | } |
| | | List<String> result = new ArrayList<>(); |
| | | for (String address : addressList) { |
| | | try { |
| | | byte[] bytes = s7PLC.readByte(address, 14); |
| | | if (bytes != null) { |
| | | String str = new String(bytes, StandardCharsets.UTF_8); |
| | | result.add(str); |
| | | List<Boolean> values = new ArrayList<>(); |
| | | for (String address : addressList) { |
| | | try { |
| | | boolean value = s7PLC.readBoolean(address); |
| | | values.add(value); |
| | | } catch (Exception e) { |
| | | // 处理异常 |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | } |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | result.add(null); |
| | | } |
| | | |
| | | return values; |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | //读取String |
| | | public List<String> readStrings(List<String> addressList) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | | } |
| | | List<String> result = new ArrayList<>(); |
| | | for (String address : addressList) { |
| | | try { |
| | | byte[] bytes = s7PLC.readByte(address, 14); |
| | | if (bytes != null) { |
| | | String str = new String(bytes, StandardCharsets.UTF_8); |
| | | result.add(str); |
| | | } |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | result.add(null); |
| | | } |
| | | } |
| | | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | public List<String> readStringsandword(List<String> addressList) { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | //不连续地址写入Word |
| | | //不连续地址写入Word |
| | | public void WriteWord(List<String> address, List<Short> datas) { |
| | | if (s7PLC == null) |
| | | return; |
| | |
| | | short data = datas.get(i); |
| | | |
| | | if (addr.contains("-")) { |
| | | outmesid(String.valueOf(data),addr); // 单独处理带破折号的地址 |
| | | outmesid(String.valueOf(data), addr); // 单独处理带破折号的地址 |
| | | } else { |
| | | s7PLC.writeInt16(addr, data); // 将数据写入单个地址 |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //字符串写入 |
| | | |
| | | |
| | | //字符串写入 |
| | | public void outmesid(String data, String addr) { |
| | | // System.out.println("outmesid: " + data); |
| | | List<Byte> glassidlist = new ArrayList<>(); |
| | |
| | | S7control.getinstance().WriteByte(addr, bytes); |
| | | } |
| | | |
| | | //读取不连续word |
| | | //读取不连续word |
| | | public List<Short> readWords(List<String> addresses) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | |
| | | return data; |
| | | } |
| | | |
| | | //读取时间 |
| | | public Long readtime(String address) { |
| | | if (s7PLC == null) |
| | | return null; |
| | | try { |
| | | return s7PLC.readTime(address); |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | return null; |
| | | //读取时间 |
| | | public Long readtime(String address) { |
| | | if (s7PLC == null) |
| | | return null; |
| | | try { |
| | | return s7PLC.readTime(address); |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public void writetime(String address, long datas) { |
| | |
| | | |
| | | s7PLC.writeTime(address, datas); // 将数据写入单个地址 |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | private int extractAddressNumber(String address) { |
| | |
| | | return null; |
| | | } |
| | | |
| | | }; |
| | | |
| | | |
| | | public void writeString(String addr,String data) { |
| | | s7PLC.writeString(addr,data); |
| | | } |
| | | |
| | | |
| | | |
| | | ; |
| | | |
| | | |
| | | public void writeString(String addr, String data) { |
| | | s7PLC.writeString(addr, data); |
| | | } |
| | | |
| | | |
| | | private List<String> GetAddressList(String address, int count, int addedbit) { |
| | | List<String> addresslist = new ArrayList<String>(); |
| | |
| | | } else |
| | | return null; |
| | | |
| | | addresslist.add(address); |
| | | for (int i = 0; i < count-1; i++) { |
| | | addresslist.add(address); |
| | | for (int i = 0; i < count - 1; i++) { |
| | | |
| | | int bitcurrent = bitindex + addedbit; |
| | | if (bitcurrent > 7) { |
| | |
| | | } else |
| | | bitindex = bitcurrent; |
| | | |
| | | String endstr=stringdatas.length==3?"." + bitindex:""; |
| | | String endstr = stringdatas.length == 3 ? "." + bitindex : ""; |
| | | addresslist.add(stringdatas[0] + "." + dbwindex + endstr); |
| | | } |
| | | return addresslist; |
| | |
| | | System.out.println("启动完成"); |
| | | |
| | | |
| | | new PLCAutoMes().start(); |
| | | |
| | | new PLCAutoMes().start(); |
| | | |
| | | new Plchome().start(); |
| | | new Plchome().start(); |
| | | |
| | | } |
| | | } |
| | |
| | | package com.mes.downglassinfo.controller; |
| | | |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | @RequestMapping("/downGlassInfo") |
| | | public class DownGlassInfoController { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // Other endpoints can be added for CRUD operations |
| | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | package com.mes.downglassinfo.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * 下片玻璃信息表id |
| | | */ |
| | | private int id; |
| | | private Long id; |
| | | |
| | | /** |
| | | * 流程卡号 |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 起始 |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Repository |
| | | public interface DownGlassInfoMapper extends BaseMapper<DownGlassInfo> { |
| | |
| | | package com.mes.downglassinfo.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | public interface DownGlassInfoService extends IService<DownGlassInfo> { |
| | | |
| | | |
| | | |
| | | |
| | | Integer getMaxSequenceByFlowCardId(String flowCardId); |
| | | |
| | | void insertDownGlassInfo(DownGlassInfo downGlassInfo); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | List<DownGlassTask> getUnloadingTaskState(); |
| | | |
| | | void updateTaskStateToZero(String flowCardId); |
| | | |
| | | void deleteTask(String flowCardId); |
| | | |
| | | DownGlassTask selectLastOutCacheInfo(String endCell); |
| | | DownGlassTask selectLastOutCacheInfo(String endCell); |
| | | |
| | | Integer insertCacheTask(int id, String start, String end, String type, double width, double height, String filmsId, double thickness, String flowCardId); |
| | | } |
| | |
| | | package com.mes.downglassinfo.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | |
| | | public void insertDownGlassInfo(DownGlassInfo downGlassInfo) { |
| | | baseMapper.insert(downGlassInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.mapper.DownGlassTaskMapper; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | */ |
| | | @Service |
| | | public class DownGlassTaskServiceImpl extends ServiceImpl<DownGlassTaskMapper, DownGlassTask> implements DownGlassTaskService { |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | updateWrapper.set("task_stauts", 0).eq("flow_card_id", flowCardId); |
| | | baseMapper.update(null, updateWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteTask(String flowCardId) { |
| | | LambdaQueryWrapper<DownGlassTask> queryWrapper = new LambdaQueryWrapper<>(); |
| | |
| | | |
| | | baseMapper.delete(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public DownGlassTask selectLastOutCacheInfo(String endCell) { |
| | | QueryWrapper<DownGlassTask> queryWrapper = new QueryWrapper<>(); |
| | |
| | | |
| | | return baseMapper.selectOne(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertCacheTask(int id, String start, String end, String type, double width, double height, String filmsId, double thickness, String flowCardId) { |
| | | DownGlassTask glassInfo = new DownGlassTask(); |
| | |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.service.DownStorageCageDetailsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | @RequestMapping("/down-storage-cage-details") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * 下片前理片笼表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * 下片前理片笼明细表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 设备id |
| | |
| | | package com.mes.downstorage.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import org.apache.ibatis.annotations.*; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | */ |
| | | @Mapper |
| | | public interface DownStorageCageDetailsMapper extends BaseMapper<DownStorageCageDetails> { |
| | | // |
| | | // |
| | | // @Select("select * from `glass_info` where id=#{id}") |
| | | // GlassInfo SelectGlassId(String id); |
| | | // 查询笼子内空闲 |
| | |
| | | |
| | | // 查询符合工位的出片玻璃 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot left join down_workstation as dw on escd.flow_card_id=dw.flow_card_id WHERE escd.slot IS NOT NULL and dw.workstation_id BETWEEN #{start} and #{end} order by escd.tempering_layout_id,escd.tempering_feed_sequence") |
| | | List<DownStorageCageDetails> SelectCacheOut(int start,int end); |
| | | List<DownStorageCageDetails> SelectCacheOut(int start, int end); |
| | | |
| | | // 查询笼子内信息 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot order by esc.slot") |
| | |
| | | |
| | | // 添加下片任务 |
| | | @Insert("INSERT into down_glass_task VALUES(#{id},#{start},#{end},#{type},0,)") |
| | | Integer insertCacheTask(String id, String start, String end, String type,double width,double height,Integer filmsId,double thickness,String flowCardId); |
| | | Integer insertCacheTask(String id, String start, String end, String type, double width, double height, Integer filmsId, double thickness, String flowCardId); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | import com.mes.common.PLCAutoMes; |
| | | import com.mes.common.S7control; |
| | | import com.mes.device.PlcParameterObject; |
| | | |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.mapper.DownStorageCageDetailsMapper; |
| | | import com.mes.downworkstation.mapper.DownWorkstationMapper; |
| | | import com.mes.tools.WebSocketServer; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.tools.WebSocketServer; |
| | | import lombok.Data; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private DownGlassTaskService downGlassTaskService; |
| | | |
| | | /** |
| | | * @param Number |
| | | * //识别逻辑 不交互 |
| | | * @param Number //识别逻辑 不交互 |
| | | */ |
| | | |
| | | public void identify(String Number){ |
| | | public void identify(String Number) { |
| | | //查询任务 |
| | | PlcParameterObject plcmes= PLCAutoMes.PlcMesObject; |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | String s=S7control.getinstance().ReadWord("DB14.26", 1).get(0)+""; |
| | | boolean isexist=isExist(Number); |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 1); |
| | | String s = S7control.getinstance().ReadWord("DB14.26", 1).get(0) + ""; |
| | | boolean isexist = isExist(Number); |
| | | if (isexist) { |
| | | //存在逻辑 1.添加信息 2.回复PLC存在 |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | }else { |
| | | } else { |
| | | //不存在逻辑 1.回复PLC不存在 |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 2); |
| | | } |
| | | } |
| | | |
| | | //下片前理片 |
| | | public static final String RESULT_IN = "1"; |
| | | public static final String RESULT_OUT = "2"; |
| | |
| | | |
| | | /** |
| | | * @param Number |
| | | * @return |
| | | * //下片前理片 进 |
| | | * @return //下片前理片 进 |
| | | */ |
| | | |
| | | public boolean processInto(String Number){ |
| | | public boolean processInto(String Number) { |
| | | GlassInfoService = WebSocketServer.applicationContext.getBean(GlassInfoService.class); |
| | | //按id查询玻璃信息表里的玻璃 |
| | | GlassInfo GlassInfo=GlassInfoService.selectGlassId(Number); |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | GlassInfo GlassInfo = GlassInfoService.selectGlassId(Number); |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | //存在此玻璃编号 |
| | | if(GlassInfo!=null){ |
| | | if (GlassInfo != null) { |
| | | //同钢化版图内的栅格号 |
| | | List<DownStorageCageDetails> list=selectInfo.SelectIsExistIntoCache(GlassInfo.getTemperingLayoutId(),GlassInfo.getTemperingFeedSequence(),GlassInfo.getWidth()); |
| | | List<DownStorageCageDetails> list = selectInfo.SelectIsExistIntoCache(GlassInfo.getTemperingLayoutId(), GlassInfo.getTemperingFeedSequence(), GlassInfo.getWidth()); |
| | | //空栅格号 |
| | | if (list.size()==0) { |
| | | list=selectInfo.SelectCacheLeisure(); |
| | | if (list.size() == 0) { |
| | | list = selectInfo.SelectCacheLeisure(); |
| | | } |
| | | //小于此玻璃钢化版图序号的栅格号 |
| | | if(list.size()==0){ |
| | | list=selectInfo.SelectIsExistIntoCache(GlassInfo.getTemperingLayoutId(),GlassInfo.getWidth()); |
| | | if (list.size() == 0) { |
| | | list = selectInfo.SelectIsExistIntoCache(GlassInfo.getTemperingLayoutId(), GlassInfo.getWidth()); |
| | | } |
| | | if(list.size()>0){ |
| | | if (list.size() > 0) { |
| | | //存在空格 |
| | | //1.生成任务: 起始位置0 结束位置this.slot 任务类型 1 (进片任务) |
| | | //2.回复 1进片 |
| | | DownStorageCageDetails item=list.get(0); |
| | | selectInfo.insertCacheTask(GlassInfo.getId()+"","0",item.getSlot()+"","1",GlassInfo.getWidth(),GlassInfo.getHeight(),GlassInfo.getFilmsid(),GlassInfo.getThickness(),GlassInfo.getFlowcardId()); |
| | | DownStorageCageDetails item = list.get(0); |
| | | selectInfo.insertCacheTask(GlassInfo.getId() + "", "0", item.getSlot() + "", "1", GlassInfo.getWidth(), GlassInfo.getHeight(), GlassInfo.getFilmsid(), GlassInfo.getThickness(), GlassInfo.getFlowcardId()); |
| | | |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 1); |
| | | return true; |
| | | } |
| | | |
| | | }else{ |
| | | |
| | | } else { |
| | | // ID编号不存在 不处理/回复PLC 进行报警提示 |
| | | } |
| | | //返回结果 |
| | | return false; |
| | | } |
| | | |
| | | //理片 出 |
| | | public boolean processOut() { |
| | | // 查询任务 |
| | |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | List<DownStorageCageDetails> list = selectInfo.SelectCacheOut(1, 5); |
| | | List<DownStorageCageDetails> list2 = selectInfo.SelectCacheOut(6, 10); |
| | | List<DownStorageCageDetails> list3 = selectInfo.SelectCacheOut(1, 10); |
| | | List<DownStorageCageDetails> list3 = selectInfo.SelectCacheOut(1, 10); |
| | | |
| | | // 按照顺序符合前端出片 |
| | | if (!list.isEmpty()) { |
| | |
| | | // } |
| | | |
| | | /** |
| | | * @param Number |
| | | * //磨边 不交互 理片和磨边机自己交互 |
| | | * @param Number //磨边 不交互 理片和磨边机自己交互 |
| | | */ |
| | | |
| | | public void processMb(String Number){ |
| | | //按id查询玻璃信息表里的玻璃 |
| | | GlassInfo GlassInfo=GlassInfoService.selectGlassId(Number); |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | if(GlassInfo!=null){ |
| | | public void processMb(String Number) { |
| | | //按id查询玻璃信息表里的玻璃 |
| | | GlassInfo GlassInfo = GlassInfoService.selectGlassId(Number); |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | if (GlassInfo != null) { |
| | | //发送任务 ID 长 宽 厚 倒角 工艺功能等 |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.22").getAddress(),"N10000"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.24").getAddress(), "1000"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.26").getAddress(),"800"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(),"60"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.30").getAddress(), "2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.22").getAddress(), "N10000"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.24").getAddress(), "1000"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.26").getAddress(), "800"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "60"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.30").getAddress(), "2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | } |
| | | //返回结果 |
| | | } |
| | |
| | | |
| | | /** |
| | | * @param Number |
| | | * @return |
| | | * 查询消息队列里此玻璃ID的数据 |
| | | * @return 查询消息队列里此玻璃ID的数据 |
| | | */ |
| | | public boolean selectMessageId(String Number){ |
| | | public boolean selectMessageId(String Number) { |
| | | //查询是否存在 |
| | | |
| | | GlassInfo GlassInfo=GlassInfoService.selectGlassId(Number); |
| | | if(GlassInfo==null){ |
| | | GlassInfo GlassInfo = GlassInfoService.selectGlassId(Number); |
| | | if (GlassInfo == null) { |
| | | //返回 不存在 |
| | | return false; |
| | | |
| | |
| | | |
| | | /** |
| | | * @param Number |
| | | * @return |
| | | * 删除消息队列里此玻璃ID的数据 |
| | | * @return 删除消息队列里此玻璃ID的数据 |
| | | */ |
| | | |
| | | public boolean deleteMessageId(String Number){ |
| | | public boolean deleteMessageId(String Number) { |
| | | //查询是否存在 |
| | | GlassInfo GlassInfo=GlassInfoService.selectGlassId(Number); |
| | | if(GlassInfo==null){ |
| | | GlassInfo GlassInfo = GlassInfoService.selectGlassId(Number); |
| | | if (GlassInfo == null) { |
| | | //返回 不存在 |
| | | return false; |
| | | } |
| | | //返回 存在 |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * @param Number |
| | | * @return |
| | | * //是否存在此编号玻璃 |
| | | * @return //是否存在此编号玻璃 |
| | | */ |
| | | public boolean isExist(String Number){ |
| | | public boolean isExist(String Number) { |
| | | //查询是否存在 |
| | | GlassInfo GlassInfo=GlassInfoService.selectGlassId(Number); |
| | | if(GlassInfo==null){ |
| | | GlassInfo GlassInfo = GlassInfoService.selectGlassId(Number); |
| | | if (GlassInfo == null) { |
| | | //返回 不存在 |
| | | return false; |
| | | } |
| | | //返回 存在 |
| | | return true; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | void addDownStorageCageDetails(DownStorageCageDetails details); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // Other business methods can be implemented here |
| | | } |
| | |
| | | package com.mes.downstorage.service.impl; |
| | | |
| | | import com.mes.downstorage.entity.DownStorageCage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downstorage.entity.DownStorageCage; |
| | | import com.mes.downstorage.mapper.DownStorageCageMapper; |
| | | import com.mes.downstorage.service.DownStorageCageService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | public class DownStorageCageServiceImpl extends ServiceImpl<DownStorageCageMapper, DownStorageCage> implements DownStorageCageService { |
| | | @Autowired |
| | | private DownStorageCageMapper downStorageCageMapper; |
| | | |
| | | @Override |
| | | public List<Map> gettask(){ |
| | | public List<Map> gettask() { |
| | | downStorageCageMapper.selectList(null); |
| | | // downStorageCageMapper.selectJoin(); |
| | | return null; |
| | | }; |
| | | } |
| | | |
| | | ; |
| | | } |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | @GetMapping("/getone") |
| | | public ResponseEntity<?> getOneDownWorkstations() { |
| | | try { |
| | | List<DownWorkstation> data = downWorkstationService.getoneDownWorkstations(1,5); |
| | | List<DownWorkstation> data = downWorkstationService.getoneDownWorkstations(1, 5); |
| | | // 构建符合预期格式的响应数据 |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | responseData.put("code", 200); |
| | |
| | | |
| | | @GetMapping("/gettwo") |
| | | public List<DownWorkstation> gettwoDownWorkstations() { |
| | | return downWorkstationService.getoneDownWorkstations(6,10); |
| | | return downWorkstationService.getoneDownWorkstations(6, 10); |
| | | } |
| | | |
| | | @GetMapping("/getflowCardId") |
| | | public ResponseEntity<Map<String, Object>> getflowCardId() { |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | //绑定架子 |
| | | //绑定架子 |
| | | @PostMapping("/updateFlowCardId") |
| | | public ResponseEntity<Map<String, Object>> updateFlowCardId(@RequestBody Map<String, Object> requestData) { |
| | | // 从 requestData 中获取传入的 flowCardId |
| | |
| | | responseData.put("code", 200); |
| | | // 返回处理结果 |
| | | return ResponseEntity.ok(responseData); |
| | | } |
| | | else { |
| | | } else { |
| | | // 如果总数量和落架数量不一致,返回错误响应 |
| | | Map<String, Object> errorResponse = new HashMap<>(); |
| | | errorResponse.put("message", "Total workstations count does not match down workstations count."); |
| | |
| | | // 构建响应数据 |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.downworkstation.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * 下片工位表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 宽 |
| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import org.apache.ibatis.annotations.*; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | public interface DownWorkstationMapper extends BaseMapper<DownWorkstation> { |
| | | |
| | | |
| | | //查询工位表和任务表中状态为1的流程卡号和已落架数量 |
| | | //查询工位表和任务表中状态为1的流程卡号和已落架数量 |
| | | @Select("SELECT dwt.flow_card_id,dw.id,dw.racks_number FROM down_workstation_task dwt JOIN down_workstation dw ON dwt.flow_card_id = dw.flow_card_id WHERE dwt.state = 1 LIMIT 1") |
| | | List<DownWorkstation> selectdownWorkstationstate(); |
| | | |
| | |
| | | // void updateFlowCardId(DownWorkstation downWorkstation); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // @Update("UPDATE down_workstation_task SET state = 0 WHERE flow_card_id = #{flowCardId}") |
| | | // void update_task_state_to_zero(@Param("flowCardId") String flowCardId); |
| | | |
| | | |
| | | // @Select("SELECT * FROM down_workstation WHERE workstation_id BETWEEN #{startId} AND #{endId}") |
| | | // List<DownWorkstation> getDownWorkstationsInRange(@Param("startId") int startId, @Param("endId") int endId); |
| | | |
| | | |
| | | |
| | | // @Select("SELECT DISTINCT flowcard_id from glass_info") |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | package com.mes.downworkstation.service;
|
| | |
|
| | | import com.mes.common.PLCAutoMes;
|
| | | import com.mes.downglassinfo.entity.DownGlassInfo;
|
| | | import com.mes.downglassinfo.entity.DownGlassTask;
|
| | | import com.mes.downglassinfo.service.DownGlassInfoService;
|
| | | import com.mes.downglassinfo.service.DownGlassTaskService;
|
| | | import com.mes.downstorage.entity.DownStorageCageDetails;
|
| | | import com.mes.downworkstation.entity.DownWorkstation;
|
| | | import com.mes.device.PlcParameterObject;
|
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper;
|
| | | import com.mes.downworkstation.mapper.DownWorkstationMapper;
|
| | | import com.mes.tools.WebSocketServer;
|
| | | import lombok.Data;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | @Data
|
| | | @Service
|
| | | public class DownGlassLogic {
|
| | | @Autowired
|
| | | private DownGlassInfo downGlassInfo;
|
| | | private DownWorkstation downWorkstation;
|
| | | private DownGlassInfoMapper downGlassInfoMapper;
|
| | | private DownGlassInfoService downGlassInfoService;
|
| | | private DownGlassTaskService downGlassTaskService;
|
| | | private DownWorkstationMapper downWorkstationMapper;
|
| | | private DownWorkstationService downWorkstationService;
|
| | | private DownWorkstationTaskService downWorkstationTaskService;
|
| | | PlcParameterObject plcread = PLCAutoMes.PlcReadObject;
|
| | | /**
|
| | | * // 机械手1PLC请求字
|
| | | */
|
| | | String robot1PLCrequestword = plcread.getPlcParameter("A01Position").getValue();
|
| | | /**
|
| | | * // 机械手2PLC请求字
|
| | | */
|
| | | String robot2PLCrequestword = plcread.getPlcParameter("A01Position").getValue();
|
| | | /**
|
| | | * // 玻璃id
|
| | | */
|
| | | String glassID = plcread.getPlcParameter("A01Position").getValue();
|
| | | String glasswidth = plcread.getPlcParameter("A01Position").getValue();
|
| | | String glassheight = plcread.getPlcParameter("A01Position").getValue();
|
| | | //
|
| | | String glassthickness = plcread.getPlcParameter("A01Position").getValue();
|
| | | String pLcwancheng = plcread.getPlcParameter("A01Position").getValue();
|
| | |
|
| | | /**
|
| | | * // 存放待处理的玻璃信息
|
| | | */
|
| | | private List<DownGlassInfo> glassList;
|
| | | /**
|
| | | * 存放玻璃放置在缓存笼中的详细信息
|
| | | */
|
| | | private List<DownStorageCageDetails> cageDetailsList;
|
| | |
|
| | | /**
|
| | | * //当下片任务表状态为1时候将数据插入到下片玻璃信息表
|
| | | */
|
| | |
|
| | | public void insertdownglassinfo() {
|
| | |
|
| | |
|
| | | downWorkstationMapper = WebSocketServer.applicationContext.getBean(DownWorkstationMapper.class);
|
| | | downWorkstationService = WebSocketServer.applicationContext.getBean(DownWorkstationService.class);
|
| | | downWorkstationTaskService = WebSocketServer.applicationContext.getBean(DownWorkstationTaskService.class);
|
| | | downGlassInfoService = WebSocketServer.applicationContext.getBean(DownGlassInfoService.class);
|
| | | downGlassInfoMapper = WebSocketServer.applicationContext.getBean(DownGlassInfoMapper.class);
|
| | | downGlassTaskService = WebSocketServer.applicationContext.getBean(DownGlassTaskService.class);
|
| | | List<DownGlassTask> taskdownGlassInf = downGlassTaskService.getUnloadingTaskState();
|
| | | //
|
| | |
|
| | |
|
| | | if (taskdownGlassInf != null && !taskdownGlassInf.isEmpty()) {
|
| | |
|
| | | //
|
| | |
|
| | | for (DownGlassTask downGlassInfo : taskdownGlassInf) {
|
| | | // 创建新的 DownGlassInfo 对象并设置相关属性
|
| | | DownGlassInfo newdownGlassInfo = new DownGlassInfo();
|
| | |
|
| | | newdownGlassInfo.setFlowCardId(downGlassInfo.getFlowCardId());
|
| | | Integer maxSequence = downGlassInfoService.getMaxSequenceByFlowCardId(downGlassInfo.getFlowCardId());
|
| | | // 初始化顺序字段值
|
| | | int sequence = maxSequence != null ? maxSequence + 1 : 1;
|
| | |
|
| | | newdownGlassInfo.setWidth(downGlassInfo.getWidth());
|
| | | newdownGlassInfo.setHeight(downGlassInfo.getHeight());
|
| | | newdownGlassInfo.setThickness(downGlassInfo.getThickness());
|
| | | newdownGlassInfo.setFilmsid(downGlassInfo.getFilmsid());
|
| | | // 设置顺序字段值
|
| | | newdownGlassInfo.setSequence(sequence);
|
| | |
|
| | | // 插入数据到下片玻璃信息表
|
| | | downGlassInfoService.insertDownGlassInfo(newdownGlassInfo);
|
| | | //插入数据到机械手任务表
|
| | |
|
| | | downWorkstationTaskService.insertdownWorkstationtask(newdownGlassInfo);
|
| | | //更新下片任务表状态为0
|
| | | downGlassTaskService.updateTaskStateToZero(downGlassInfo.getFlowCardId());
|
| | |
|
| | | sequence++; // 递增顺序字段值
|
| | |
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * //当机械手任务表中状态为1,工位表流程卡绑定了架子 更新已经落架数量,并且把下片任务表的对应记录删掉
|
| | | */
|
| | |
|
| | | public void downWorkstation() {
|
| | |
|
| | |
|
| | | try {
|
| | | //查询下片工位表中架子是否绑定了流程卡号 工位表和任务表中状态为1的流程卡号和已落架数量
|
| | | List<DownWorkstation> taskdownWorkstation = downWorkstationMapper.selectdownWorkstationstate();
|
| | | if (taskdownWorkstation != null && !taskdownWorkstation.isEmpty()) {
|
| | | //,如果已经绑定则更新已落架数量,并且删除下片任务表中的记录
|
| | | for (DownWorkstation downWorkstation : taskdownWorkstation) {
|
| | | //更新下片工位表中已落架数量
|
| | | downWorkstationService.updateracksnumber(downWorkstation.getFlowCardId(), downWorkstation.getRacksnumber() + 1);
|
| | | //更新机械任务表中状态为0
|
| | | downWorkstationTaskService.updateTaskStateToZero(downWorkstation.getFlowCardId());
|
| | | //删除下片任务表中的记录
|
| | | downGlassTaskService.deleteTask(downWorkstation.getFlowCardId());
|
| | |
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | | // 打印异常信息
|
| | | e.printStackTrace();
|
| | | // 或者可以进行其他异常处理,比如记录日志或者返回特定的错误信息
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | | * @param downWorkstation // 满架拉走 清除流程卡信息
|
| | | */
|
| | |
|
| | | // public void clearFlowCardId(DownWorkstation downWorkstation) {
|
| | | //
|
| | | // downWorkstationMapper.clearFlowCardId(downWorkstation);
|
| | | // }
|
| | |
|
| | |
|
| | | package com.mes.downworkstation.service; |
| | | |
| | | import com.mes.common.PLCAutoMes; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.mapper.DownWorkstationMapper; |
| | | import com.mes.tools.WebSocketServer; |
| | | import lombok.Data; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @Service |
| | | public class DownGlassLogic { |
| | | @Autowired |
| | | private DownGlassInfo downGlassInfo; |
| | | private DownWorkstation downWorkstation; |
| | | private DownGlassInfoMapper downGlassInfoMapper; |
| | | private DownGlassInfoService downGlassInfoService; |
| | | private DownGlassTaskService downGlassTaskService; |
| | | private DownWorkstationMapper downWorkstationMapper; |
| | | private DownWorkstationService downWorkstationService; |
| | | private DownWorkstationTaskService downWorkstationTaskService; |
| | | PlcParameterObject plcread = PLCAutoMes.PlcReadObject; |
| | | /** |
| | | * // 机械手1PLC请求字 |
| | | */ |
| | | String robot1PLCrequestword = plcread.getPlcParameter("A01Position").getValue(); |
| | | /** |
| | | * // 机械手2PLC请求字 |
| | | */ |
| | | String robot2PLCrequestword = plcread.getPlcParameter("A01Position").getValue(); |
| | | /** |
| | | * // 玻璃id |
| | | */ |
| | | String glassID = plcread.getPlcParameter("A01Position").getValue(); |
| | | String glasswidth = plcread.getPlcParameter("A01Position").getValue(); |
| | | String glassheight = plcread.getPlcParameter("A01Position").getValue(); |
| | | // |
| | | String glassthickness = plcread.getPlcParameter("A01Position").getValue(); |
| | | String pLcwancheng = plcread.getPlcParameter("A01Position").getValue(); |
| | | |
| | | /** |
| | | * // 存放待处理的玻璃信息 |
| | | */ |
| | | private List<DownGlassInfo> glassList; |
| | | /** |
| | | * 存放玻璃放置在缓存笼中的详细信息 |
| | | */ |
| | | private List<DownStorageCageDetails> cageDetailsList; |
| | | |
| | | /** |
| | | * //当下片任务表状态为1时候将数据插入到下片玻璃信息表 |
| | | */ |
| | | |
| | | public void insertdownglassinfo() { |
| | | |
| | | |
| | | downWorkstationMapper = WebSocketServer.applicationContext.getBean(DownWorkstationMapper.class); |
| | | downWorkstationService = WebSocketServer.applicationContext.getBean(DownWorkstationService.class); |
| | | downWorkstationTaskService = WebSocketServer.applicationContext.getBean(DownWorkstationTaskService.class); |
| | | downGlassInfoService = WebSocketServer.applicationContext.getBean(DownGlassInfoService.class); |
| | | downGlassInfoMapper = WebSocketServer.applicationContext.getBean(DownGlassInfoMapper.class); |
| | | downGlassTaskService = WebSocketServer.applicationContext.getBean(DownGlassTaskService.class); |
| | | List<DownGlassTask> taskdownGlassInf = downGlassTaskService.getUnloadingTaskState(); |
| | | // |
| | | |
| | | |
| | | if (taskdownGlassInf != null && !taskdownGlassInf.isEmpty()) { |
| | | |
| | | // |
| | | |
| | | for (DownGlassTask downGlassInfo : taskdownGlassInf) { |
| | | // 创建新的 DownGlassInfo 对象并设置相关属性 |
| | | DownGlassInfo newdownGlassInfo = new DownGlassInfo(); |
| | | |
| | | newdownGlassInfo.setFlowCardId(downGlassInfo.getFlowCardId()); |
| | | Integer maxSequence = downGlassInfoService.getMaxSequenceByFlowCardId(downGlassInfo.getFlowCardId()); |
| | | // 初始化顺序字段值 |
| | | int sequence = maxSequence != null ? maxSequence + 1 : 1; |
| | | |
| | | newdownGlassInfo.setWidth(downGlassInfo.getWidth()); |
| | | newdownGlassInfo.setHeight(downGlassInfo.getHeight()); |
| | | newdownGlassInfo.setThickness(downGlassInfo.getThickness()); |
| | | newdownGlassInfo.setFilmsid(downGlassInfo.getFilmsid()); |
| | | // 设置顺序字段值 |
| | | newdownGlassInfo.setSequence(sequence); |
| | | |
| | | // 插入数据到下片玻璃信息表 |
| | | downGlassInfoService.insertDownGlassInfo(newdownGlassInfo); |
| | | //插入数据到机械手任务表 |
| | | |
| | | downWorkstationTaskService.insertdownWorkstationtask(newdownGlassInfo); |
| | | //更新下片任务表状态为0 |
| | | downGlassTaskService.updateTaskStateToZero(downGlassInfo.getFlowCardId()); |
| | | |
| | | sequence++; // 递增顺序字段值 |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * //当机械手任务表中状态为1,工位表流程卡绑定了架子 更新已经落架数量,并且把下片任务表的对应记录删掉 |
| | | */ |
| | | |
| | | public void downWorkstation() { |
| | | |
| | | |
| | | try { |
| | | //查询下片工位表中架子是否绑定了流程卡号 工位表和任务表中状态为1的流程卡号和已落架数量 |
| | | List<DownWorkstation> taskdownWorkstation = downWorkstationMapper.selectdownWorkstationstate(); |
| | | if (taskdownWorkstation != null && !taskdownWorkstation.isEmpty()) { |
| | | //,如果已经绑定则更新已落架数量,并且删除下片任务表中的记录 |
| | | for (DownWorkstation downWorkstation : taskdownWorkstation) { |
| | | //更新下片工位表中已落架数量 |
| | | downWorkstationService.updateracksnumber(downWorkstation.getFlowCardId(), downWorkstation.getRacksnumber() + 1); |
| | | //更新机械任务表中状态为0 |
| | | downWorkstationTaskService.updateTaskStateToZero(downWorkstation.getFlowCardId()); |
| | | //删除下片任务表中的记录 |
| | | downGlassTaskService.deleteTask(downWorkstation.getFlowCardId()); |
| | | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | // 打印异常信息 |
| | | e.printStackTrace(); |
| | | // 或者可以进行其他异常处理,比如记录日志或者返回特定的错误信息 |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param downWorkstation // 满架拉走 清除流程卡信息 |
| | | */ |
| | | |
| | | // public void clearFlowCardId(DownWorkstation downWorkstation) { |
| | | // |
| | | // downWorkstationMapper.clearFlowCardId(downWorkstation); |
| | | // } |
| | | |
| | | |
| | | } |
| | |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | void clearFlowCardId(int workstationId); |
| | | |
| | | void updateracksnumber( String flowCardId, int racksnumber); |
| | | void updateracksnumber(String flowCardId, int racksnumber); |
| | | |
| | | |
| | | int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId); |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface DownWorkstationTaskService extends IService<DownWorkstationTask> { |
| | | void insertdownWorkstationtask(DownGlassInfo downGlassInfo); |
| | | void updateTaskStateToZero(String flowCardId); |
| | | void insertdownWorkstationtask(DownGlassInfo downGlassInfo); |
| | | |
| | | void updateTaskStateToZero(String flowCardId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | import com.mes.downworkstation.mapper.DownWorkstationMapper; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | public class DownWorkstationServiceImpl extends ServiceImpl<DownWorkstationMapper, DownWorkstation> implements DownWorkstationService { |
| | |
| | | private DownWorkstationTaskMapper downWorkstationTaskMapper; |
| | | |
| | | |
| | | |
| | | // @Override |
| | | // @Override |
| | | // public List<DownWorkstation> gettwoDownWorkstations() { |
| | | // return downWorkstationMapper.getDownWorkstationsInRange(6,10); |
| | | // } |
| | |
| | | // return totalQuantity != null ? totalQuantity : 0; |
| | | // } |
| | | |
| | | // @Override |
| | | // @Override |
| | | // public int getRacksNumber(int workstationId) { |
| | | // Integer racksNumber = downWorkstationMapper.getRacksNumber(workstationId); |
| | | // return racksNumber != null ? racksNumber : 0; |
| | |
| | | DownWorkstation result = baseMapper.selectOne(queryWrapper); |
| | | return result != null ? result.getRacksnumber() : 0; |
| | | } |
| | | //根据条件获取工位玻璃信息 |
| | | |
| | | //根据条件获取工位玻璃信息 |
| | | @Override |
| | | public List<DownWorkstation> getoneDownWorkstations(int startId, int endId) { |
| | | QueryWrapper<DownWorkstation> queryWrapper = new QueryWrapper<>(); |
| | |
| | | @Override |
| | | public void updateracksnumber(String flowCardId, int racksNumber) { |
| | | UpdateWrapper<DownWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("racks_number",racksNumber).eq("flow_card_id", flowCardId); |
| | | updateWrapper.set("racks_number", racksNumber).eq("flow_card_id", flowCardId); |
| | | baseMapper.update(null, updateWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Transactional |
| | | public void crossDatabaseQuery() { |
| | | // 从 MySQL 数据库中查询数据,只返回一条符合条件的数据 |
| | |
| | | |
| | | // 从 SQL Server 数据库中查询数据 |
| | | List<DownWorkstationTask> downWorkstationTasks = downWorkstationTaskMapper.selectList(); |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | */ |
| | | @Service |
| | | public class DownWorkstationTaskServiceImpl extends ServiceImpl<DownWorkstationTaskMapper, DownWorkstationTask> implements DownWorkstationTaskService { |
| | | |
| | | |
| | | |
| | | public void insertdownWorkstationtask(DownGlassInfo downGlassInfo) { |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | /** |
| | | * 玻璃信息表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | int getGlassInfoCountByFlowCardId(String flowCardId); |
| | | |
| | | List<Map<String, Object>> getFlowCardId(); |
| | | |
| | | GlassInfo selectGlassId(String id); |
| | | } |
| | |
| | | package com.mes.uppattenusage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | |
| | | return baseMapper.selectCount(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getFlowCardId() { |
| | | return baseMapper.selectMaps(new QueryWrapper<GlassInfo>().select("DISTINCT flowcard_id")); |
| | | } |
| | | |
| | | @Override |
| | | public GlassInfo selectGlassId(String id) { |
| | | QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>(); |
| | |
| | | |
| | | return baseMapper.selectOne(queryWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | // public void updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId) { |
| | |
| | | package com.mes.tools;
|
| | |
|
| | | import java.io.FileNotFoundException;
|
| | | import java.io.IOException;
|
| | | import java.io.InputStream;
|
| | | import java.util.Properties;
|
| | |
|
| | | /**
|
| | | * @author SNG-012
|
| | | *
|
| | | * Configuration 类用于加载配置文件并提供访问配置项的方法。
|
| | | */
|
| | | public class Configuration {
|
| | |
|
| | | /**
|
| | | * // Properties 对象,用于存储配置文件中的键值对。
|
| | | */
|
| | | private Properties properties;
|
| | |
|
| | | /**
|
| | | * @param fileName
|
| | | * @throws IOException
|
| | | * // 构造函数,根据传入的文件名加载配置文件。
|
| | | */
|
| | |
|
| | | public Configuration(String fileName) throws IOException {
|
| | | // 使用类加载器获取资源文件的输入流。
|
| | | InputStream inputStream = getClass().getClassLoader().getResourceAsStream(fileName);
|
| | | // 如果输入流为null,表示未找到文件,抛出FileNotFoundException。
|
| | | if (inputStream == null) {
|
| | | throw new FileNotFoundException("Property file '" + fileName + "' not found in the classpath");
|
| | | }
|
| | | // 实例化Properties对象。
|
| | | properties = new Properties();
|
| | | // 从输入流加载配置项。
|
| | | properties.load(inputStream);
|
| | | }
|
| | |
|
| | | /**
|
| | | * @param key
|
| | | * @return
|
| | | * // 根据配置项的键获取其对应的值。
|
| | | */
|
| | |
|
| | | public String getProperty(String key) {
|
| | | return properties.getProperty(key);
|
| | | }
|
| | | }
|
| | | package com.mes.tools; |
| | | |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.Properties; |
| | | |
| | | /** |
| | | * @author SNG-012 |
| | | * <p> |
| | | * Configuration 类用于加载配置文件并提供访问配置项的方法。 |
| | | */ |
| | | public class Configuration { |
| | | |
| | | /** |
| | | * // Properties 对象,用于存储配置文件中的键值对。 |
| | | */ |
| | | private Properties properties; |
| | | |
| | | /** |
| | | * @param fileName |
| | | * @throws IOException // 构造函数,根据传入的文件名加载配置文件。 |
| | | */ |
| | | |
| | | public Configuration(String fileName) throws IOException { |
| | | // 使用类加载器获取资源文件的输入流。 |
| | | InputStream inputStream = getClass().getClassLoader().getResourceAsStream(fileName); |
| | | // 如果输入流为null,表示未找到文件,抛出FileNotFoundException。 |
| | | if (inputStream == null) { |
| | | throw new FileNotFoundException("Property file '" + fileName + "' not found in the classpath"); |
| | | } |
| | | // 实例化Properties对象。 |
| | | properties = new Properties(); |
| | | // 从输入流加载配置项。 |
| | | properties.load(inputStream); |
| | | } |
| | | |
| | | /** |
| | | * @param key |
| | | * @return // 根据配置项的键获取其对应的值。 |
| | | */ |
| | | |
| | | public String getProperty(String key) { |
| | | return properties.getProperty(key); |
| | | } |
| | | } |
| | |
| | | package com.mes.tools;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import org.apache.poi.ss.usermodel.Cell;
|
| | | import org.apache.poi.ss.usermodel.Row;
|
| | | import org.apache.poi.ss.usermodel.Sheet;
|
| | | import org.apache.poi.ss.usermodel.Workbook;
|
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
| | |
|
| | | import java.io.FileInputStream;
|
| | | import java.io.FileWriter;
|
| | | import java.io.IOException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Iterator;
|
| | | import java.util.LinkedHashMap;
|
| | | import java.util.List;
|
| | |
|
| | | public class ExcelToJsonConverter {
|
| | |
|
| | | public static void main(String[] args) {
|
| | | String excelFilePath = "src/main/resources/JsonFile/alarm.xlsx";
|
| | | String sheetName = "Sheet1";
|
| | | int addressColumnIndex = 0;
|
| | | int nameColumnIndex = 1;
|
| | |
|
| | | //int unitColumnIndex = 2;
|
| | | String outputFilePath = "src/main/resources/JsonFile/PlcAlarm.json";
|
| | |
|
| | | try (Workbook workbook = new XSSFWorkbook(new FileInputStream(excelFilePath))) {
|
| | | Sheet sheet = workbook.getSheet(sheetName);
|
| | |
|
| | | List<LinkedHashMap<String, Object>> jsonList = new ArrayList<>();
|
| | |
|
| | | Iterator<Row> rowIterator = sheet.iterator();
|
| | | // Skip the header row
|
| | | if (rowIterator.hasNext()) {
|
| | | rowIterator.next();
|
| | | }
|
| | |
|
| | | int plcAddressLength = 0; // 记录所有 addressLenght 的和
|
| | | int addressIndex = 0; // 自增的地址索引
|
| | | while (rowIterator.hasNext()) {
|
| | | Row row = rowIterator.next();
|
| | |
|
| | | Cell nameCell = row.getCell(nameColumnIndex);
|
| | | Cell addressCell = row.getCell(addressColumnIndex);
|
| | | // Cell unitCell = row.getCell(unitColumnIndex);
|
| | |
|
| | | String name = nameCell.getStringCellValue();
|
| | | String address = addressCell.getStringCellValue();
|
| | | // String unit = unitCell.getStringCellValue();
|
| | |
|
| | | // String addressIndex = extractAddressIndex(address);
|
| | |
|
| | | LinkedHashMap<String, Object> jsonObject = new LinkedHashMap<>();
|
| | | jsonObject.put("codeId", name);
|
| | | jsonObject.put("addressIndex", addressIndex);
|
| | |
|
| | | int addressLength = 0;
|
| | | if (address.contains("~")) {
|
| | | addressLength = 14;
|
| | | } else {
|
| | | addressLength = 2;
|
| | | }
|
| | | // jsonObject.put("addressLenght", String.valueOf(addressLength));
|
| | |
|
| | | //jsonObject.put("unit", unit);
|
| | |
|
| | | plcAddressLength += addressLength;
|
| | |
|
| | | jsonList.add(jsonObject);
|
| | | addressIndex++;
|
| | | }
|
| | |
|
| | | LinkedHashMap<String, Object> resultObject = new LinkedHashMap<>();
|
| | | resultObject.put("plcAddressBegin", "DB100.0");
|
| | | resultObject.put("plcAddressLenght", String.valueOf(plcAddressLength));
|
| | | // resultObject.put("dataType", "word");
|
| | | resultObject.put("dataType", "bit");
|
| | | resultObject.put("parameteInfor", jsonList);
|
| | |
|
| | | Gson gson = new Gson();
|
| | | String jsonOutput = gson.toJson(resultObject);
|
| | |
|
| | | try (FileWriter fileWriter = new FileWriter(outputFilePath)) {
|
| | | fileWriter.write(jsonOutput);
|
| | | }
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | private static String extractAddressIndex(String address) {
|
| | | // Assuming the address format is "DB103.DBW0" or "DB103.DBB100~DBB113"
|
| | | if (address.startsWith("DB") && address.contains(".DBW")) {
|
| | | int startIndex = address.indexOf(".DBW") + 4;
|
| | | int endIndex = address.length();
|
| | | return address.substring(startIndex, endIndex);
|
| | | } else if (address.startsWith("DB") && address.contains(".DBB")) {
|
| | | int startIndex2 = address.indexOf(".DBB") + 4;
|
| | | int endIndex2 = address.indexOf("~");
|
| | | return address.substring(startIndex2, endIndex2);
|
| | | }
|
| | | return "";
|
| | | }
|
| | | }
|
| | | package com.mes.tools; |
| | | |
| | | import com.google.gson.Gson; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | |
| | | import java.io.FileInputStream; |
| | | import java.io.FileWriter; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | | |
| | | public class ExcelToJsonConverter { |
| | | |
| | | public static void main(String[] args) { |
| | | String excelFilePath = "src/main/resources/JsonFile/alarm.xlsx"; |
| | | String sheetName = "Sheet1"; |
| | | int addressColumnIndex = 0; |
| | | int nameColumnIndex = 1; |
| | | |
| | | //int unitColumnIndex = 2; |
| | | String outputFilePath = "src/main/resources/JsonFile/PlcAlarm.json"; |
| | | |
| | | try (Workbook workbook = new XSSFWorkbook(new FileInputStream(excelFilePath))) { |
| | | Sheet sheet = workbook.getSheet(sheetName); |
| | | |
| | | List<LinkedHashMap<String, Object>> jsonList = new ArrayList<>(); |
| | | |
| | | Iterator<Row> rowIterator = sheet.iterator(); |
| | | // Skip the header row |
| | | if (rowIterator.hasNext()) { |
| | | rowIterator.next(); |
| | | } |
| | | |
| | | int plcAddressLength = 0; // 记录所有 addressLenght 的和 |
| | | int addressIndex = 0; // 自增的地址索引 |
| | | while (rowIterator.hasNext()) { |
| | | Row row = rowIterator.next(); |
| | | |
| | | Cell nameCell = row.getCell(nameColumnIndex); |
| | | Cell addressCell = row.getCell(addressColumnIndex); |
| | | // Cell unitCell = row.getCell(unitColumnIndex); |
| | | |
| | | String name = nameCell.getStringCellValue(); |
| | | String address = addressCell.getStringCellValue(); |
| | | // String unit = unitCell.getStringCellValue(); |
| | | |
| | | // String addressIndex = extractAddressIndex(address); |
| | | |
| | | LinkedHashMap<String, Object> jsonObject = new LinkedHashMap<>(); |
| | | jsonObject.put("codeId", name); |
| | | jsonObject.put("addressIndex", addressIndex); |
| | | |
| | | int addressLength = 0; |
| | | if (address.contains("~")) { |
| | | addressLength = 14; |
| | | } else { |
| | | addressLength = 2; |
| | | } |
| | | // jsonObject.put("addressLenght", String.valueOf(addressLength)); |
| | | |
| | | //jsonObject.put("unit", unit); |
| | | |
| | | plcAddressLength += addressLength; |
| | | |
| | | jsonList.add(jsonObject); |
| | | addressIndex++; |
| | | } |
| | | |
| | | LinkedHashMap<String, Object> resultObject = new LinkedHashMap<>(); |
| | | resultObject.put("plcAddressBegin", "DB100.0"); |
| | | resultObject.put("plcAddressLenght", String.valueOf(plcAddressLength)); |
| | | // resultObject.put("dataType", "word"); |
| | | resultObject.put("dataType", "bit"); |
| | | resultObject.put("parameteInfor", jsonList); |
| | | |
| | | Gson gson = new Gson(); |
| | | String jsonOutput = gson.toJson(resultObject); |
| | | |
| | | try (FileWriter fileWriter = new FileWriter(outputFilePath)) { |
| | | fileWriter.write(jsonOutput); |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | private static String extractAddressIndex(String address) { |
| | | // Assuming the address format is "DB103.DBW0" or "DB103.DBB100~DBB113" |
| | | if (address.startsWith("DB") && address.contains(".DBW")) { |
| | | int startIndex = address.indexOf(".DBW") + 4; |
| | | int endIndex = address.length(); |
| | | return address.substring(startIndex, endIndex); |
| | | } else if (address.startsWith("DB") && address.contains(".DBB")) { |
| | | int startIndex2 = address.indexOf(".DBB") + 4; |
| | | int endIndex2 = address.indexOf("~"); |
| | | return address.substring(startIndex2, endIndex2); |
| | | } |
| | | return ""; |
| | | } |
| | | } |
| | |
| | | } else { |
| | | webSocketServers.add(this); |
| | | } |
| | | |
| | | |
| | | log.info("有新用户加入,username={}, 当前在线人数为:{}", username, sessionMap.get(username).size()); |
| | | |
| | | // JSONObject result = new JSONObject(); |
| | |
| | | public void onClose(Session session, @PathParam("username") String username) { |
| | | List<WebSocketServer> webSocketServers = sessionMap.get(username); |
| | | ArrayList<WebSocketServer> arrayListwebserver = new ArrayList<WebSocketServer>(); |
| | | if (webSocketServers.size()>1) { |
| | | if (webSocketServers.size() > 1) { |
| | | for (WebSocketServer webSocketServer : webSocketServers) { |
| | | if(webSocketServer!=this){ |
| | | if (webSocketServer != this) { |
| | | arrayListwebserver.add(webSocketServer); |
| | | } |
| | | } |
| | | sessionMap.put(username, arrayListwebserver); |
| | | log.info("移除username={}一名用户session, {}的当前在线人数为:{}", username, username, sessionMap.get(username).size()); |
| | | }else{ |
| | | } else { |
| | | sessionMap.remove(username); |
| | | log.info("移除username={}一名用户session, {}连接关闭, 当前连接数为:{}", username, username, sessionMap.size()); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | * 后台收到客户端发送过来的消息 |
| | | * onMessage 是一个消息的中转站 |
| | | * 接受 浏览器端 socket.send 发送过来的 json数据 |
| | | * |
| | | * |
| | | * @param message 客户端发送过来的消息 |
| | | */ |
| | | @OnMessage |
| | |
| | | public void clearMessages() { |
| | | messages.clear(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | {
|
| | | "plcAddressBegin": "DB104.0.0",
|
| | | "plcAddressLenght": "91",
|
| | | "dataType": "bit",
|
| | | "parameteInfor": [
|
| | | {
|
| | | "codeId": "D01VFDerror",
|
| | | "addressIndex": 0
|
| | | },
|
| | | {
|
| | | "codeId": "D02VFDerror",
|
| | | "addressIndex": 1
|
| | | },
|
| | | {
|
| | | "codeId": "D03VFDerror",
|
| | | "addressIndex": 2
|
| | | },
|
| | | {
|
| | | "codeId": "D04VFDerror",
|
| | | "addressIndex": 3
|
| | | },
|
| | | {
|
| | | "codeId": "D05VFDerror",
|
| | | "addressIndex": 4
|
| | | },
|
| | | {
|
| | | "codeId": "D06VFDerror",
|
| | | "addressIndex": 5
|
| | | },
|
| | | {
|
| | | "codeId": "B01VFDerror",
|
| | | "addressIndex": 6
|
| | | },
|
| | | {
|
| | | "codeId": "B02VFDerror",
|
| | | "addressIndex": 7
|
| | | },
|
| | | {
|
| | | "codeId": "A01VFDerror",
|
| | | "addressIndex": 8
|
| | | },
|
| | | {
|
| | | "codeId": "A02VFDerror",
|
| | | "addressIndex": 9
|
| | | },
|
| | | {
|
| | | "codeId": "A01servoturnerror",
|
| | | "addressIndex": 10
|
| | | },
|
| | | {
|
| | | "codeId": "A02servoturnerror",
|
| | | "addressIndex": 11
|
| | | },
|
| | | {
|
| | | "codeId": "A01servotravelerror",
|
| | | "addressIndex": 12
|
| | | },
|
| | | {
|
| | | "codeId": "A02servotravelerror",
|
| | | "addressIndex": 13
|
| | | },
|
| | | {
|
| | | "codeId": "B01servotravelerror",
|
| | | "addressIndex": 14
|
| | | },
|
| | | {
|
| | | "codeId": "B02servotravelerror",
|
| | | "addressIndex": 15
|
| | | },
|
| | | {
|
| | | "codeId": "D01DECerror",
|
| | | "addressIndex": 16
|
| | | },
|
| | | {
|
| | | "codeId": "D01poserror",
|
| | | "addressIndex": 17
|
| | | },
|
| | | {
|
| | | "codeId": "D02DECerror",
|
| | | "addressIndex": 18
|
| | | },
|
| | | {
|
| | | "codeId": "D02poserror",
|
| | | "addressIndex": 19
|
| | | },
|
| | | {
|
| | | "codeId": "D03DECerror",
|
| | | "addressIndex": 20
|
| | | },
|
| | | {
|
| | | "codeId": "D03poserror",
|
| | | "addressIndex": 21
|
| | | },
|
| | | {
|
| | | "codeId": "D04DECerror",
|
| | | "addressIndex": 22
|
| | | },
|
| | | {
|
| | | "codeId": "D04poserror",
|
| | | "addressIndex": 23
|
| | | },
|
| | | {
|
| | | "codeId": "D05DECerror",
|
| | | "addressIndex": 24
|
| | | },
|
| | | {
|
| | | "codeId": "D05poserror",
|
| | | "addressIndex": 25
|
| | | },
|
| | | {
|
| | | "codeId": "D06DECerror",
|
| | | "addressIndex": 26
|
| | | },
|
| | | {
|
| | | "codeId": "D06poserror",
|
| | | "addressIndex": 27
|
| | | },
|
| | | {
|
| | | "codeId": "A01DECerror",
|
| | | "addressIndex": 28
|
| | | },
|
| | | {
|
| | | "codeId": "A01poserror",
|
| | | "addressIndex": 29
|
| | | },
|
| | | {
|
| | | "codeId": "A02DECerror",
|
| | | "addressIndex": 30
|
| | | },
|
| | | {
|
| | | "codeId": "A02poserror",
|
| | | "addressIndex": 31
|
| | | },
|
| | | {
|
| | | "codeId": "B01INDECerror",
|
| | | "addressIndex": 32
|
| | | },
|
| | | {
|
| | | "codeId": "B01INposerror",
|
| | | "addressIndex": 33
|
| | | },
|
| | | {
|
| | | "codeId": "B01OUTDECerror",
|
| | | "addressIndex": 34
|
| | | },
|
| | | {
|
| | | "codeId": "B01OUTposerror",
|
| | | "addressIndex": 35
|
| | | },
|
| | | {
|
| | | "codeId": "B02INDECerror",
|
| | | "addressIndex": 36
|
| | | },
|
| | | {
|
| | | "codeId": "B02INposerror",
|
| | | "addressIndex": 37
|
| | | },
|
| | | {
|
| | | "codeId": "B02OUTDECerror",
|
| | | "addressIndex": 38
|
| | | },
|
| | | {
|
| | | "codeId": "B02OUTposerror",
|
| | | "addressIndex": 39
|
| | | },
|
| | | {
|
| | | "codeId": "D01Scanglassexceedinglimit",
|
| | | "addressIndex": 40
|
| | | },
|
| | | {
|
| | | "codeId": "emergencystopalarm",
|
| | | "addressIndex": 41
|
| | | },
|
| | | {
|
| | | "codeId": "Moreglassthanknown",
|
| | | "addressIndex": 42
|
| | | },
|
| | | {
|
| | | "codeId": "lessglassthanknown",
|
| | | "addressIndex": 43
|
| | | },
|
| | | {
|
| | | "codeId": "D01conveyortimeoutalarm",
|
| | | "addressIndex": 44
|
| | | },
|
| | | {
|
| | | "codeId": "D02conveyortimeoutalarm",
|
| | | "addressIndex": 45
|
| | | },
|
| | | {
|
| | | "codeId": "D03conveyortimeoutalarm",
|
| | | "addressIndex": 46
|
| | | },
|
| | | {
|
| | | "codeId": "D04conveyortimeoutalarm",
|
| | | "addressIndex": 47
|
| | | },
|
| | | {
|
| | | "codeId": "D05conveyortimeoutalarm",
|
| | | "addressIndex": 48
|
| | | },
|
| | | {
|
| | | "codeId": "D06conveyortimeoutalarm",
|
| | | "addressIndex": 49
|
| | | },
|
| | | {
|
| | | "codeId": "A01conveyortimeoutalarm",
|
| | | "addressIndex": 50
|
| | | },
|
| | | {
|
| | | "codeId": "A02conveyortimeoutalarm",
|
| | | "addressIndex": 51
|
| | | },
|
| | | {
|
| | | "codeId": "B01conveyortimeoutalarm",
|
| | | "addressIndex": 52
|
| | | },
|
| | | {
|
| | | "codeId": "B02conveyortimeoutalarm",
|
| | | "addressIndex": 53
|
| | | },
|
| | | {
|
| | | "codeId": "A01conveyorLeftsafetyalarm",
|
| | | "addressIndex": 54
|
| | | },
|
| | | {
|
| | | "codeId": "A01conveyorrightsafetyalarm",
|
| | | "addressIndex": 55
|
| | | },
|
| | | {
|
| | | "codeId": "A02conveyorLeftsafetyalarm",
|
| | | "addressIndex": 56
|
| | | },
|
| | | {
|
| | | "codeId": "A02conveyorrightsafetyalarm",
|
| | | "addressIndex": 57
|
| | | },
|
| | | {
|
| | | "codeId": "1#buffersafetyalarm",
|
| | | "addressIndex": 58
|
| | | },
|
| | | {
|
| | | "codeId": "2#buffersafetyalarm",
|
| | | "addressIndex": 59
|
| | | },
|
| | | {
|
| | | "codeId": "3#buffersafetyalarm",
|
| | | "addressIndex": 60
|
| | | },
|
| | | {
|
| | | "codeId": "4#buffersafetyalarm",
|
| | | "addressIndex": 61
|
| | | },
|
| | | {
|
| | | "codeId": "A01.SRrightinposerror",
|
| | | "addressIndex": 62
|
| | | },
|
| | | {
|
| | | "codeId": "A02.SRleftinposerror",
|
| | | "addressIndex": 63
|
| | | },
|
| | | {
|
| | | "codeId": "B01.SRleftinposerror",
|
| | | "addressIndex": 64
|
| | | },
|
| | | {
|
| | | "codeId": "B01.SRleftdecerror",
|
| | | "addressIndex": 65
|
| | | },
|
| | | {
|
| | | "codeId": "B01.SRrightdecerror",
|
| | | "addressIndex": 66
|
| | | },
|
| | | {
|
| | | "codeId": "B01.SRrightinposerror",
|
| | | "addressIndex": 67
|
| | | },
|
| | | {
|
| | | "codeId": "B02.SRleftinposerror",
|
| | | "addressIndex": 68
|
| | | },
|
| | | {
|
| | | "codeId": "B02.SRleftdecerror",
|
| | | "addressIndex": 69
|
| | | },
|
| | | {
|
| | | "codeId": "B02.SRrightdecerror",
|
| | | "addressIndex": 70
|
| | | },
|
| | | {
|
| | | "codeId": "B02.SRrightinposerror",
|
| | | "addressIndex": 71
|
| | | },
|
| | | {
|
| | | "codeId": "A01servoturnhomed",
|
| | | "addressIndex": 72
|
| | | },
|
| | | {
|
| | | "codeId": "A02servoturnhomed",
|
| | | "addressIndex": 73
|
| | | },
|
| | | {
|
| | | "codeId": "A01servotravelhomed",
|
| | | "addressIndex": 74
|
| | | },
|
| | | {
|
| | | "codeId": "A02servotravelhomed",
|
| | | "addressIndex": 75
|
| | | },
|
| | | {
|
| | | "codeId": "B01servotravelhomed",
|
| | | "addressIndex": 76
|
| | | },
|
| | | {
|
| | | "codeId": "B02servotravelhomed",
|
| | | "addressIndex": 77
|
| | | },
|
| | | {
|
| | | "codeId": "resetDelay",
|
| | | "addressIndex": 78
|
| | | },
|
| | | {
|
| | | "codeId": "A01travelNegativelimit",
|
| | | "addressIndex": 79
|
| | | },
|
| | | {
|
| | | "codeId": "A01travelPositivelimit",
|
| | | "addressIndex": 80
|
| | | },
|
| | | {
|
| | | "codeId": "A01turnuplimit",
|
| | | "addressIndex": 81
|
| | | },
|
| | | {
|
| | | "codeId": "A01turndownlimit",
|
| | | "addressIndex": 82
|
| | | },
|
| | | {
|
| | | "codeId": "A02travelNegativelimit",
|
| | | "addressIndex": 83
|
| | | },
|
| | | {
|
| | | "codeId": "A02travelPositivelimit",
|
| | | "addressIndex": 84
|
| | | },
|
| | | {
|
| | | "codeId": "A02turnuplimit",
|
| | | "addressIndex": 85
|
| | | },
|
| | | {
|
| | | "codeId": "A02turndownlimit",
|
| | | "addressIndex": 86
|
| | | },
|
| | | {
|
| | | "codeId": "B01travelNegativelimit",
|
| | | "addressIndex": 87
|
| | | },
|
| | | {
|
| | | "codeId": "B01travelPositivelimit",
|
| | | "addressIndex": 88
|
| | | },
|
| | | {
|
| | | "codeId": "B02travelNegativelimit",
|
| | | "addressIndex": 89
|
| | | },
|
| | | {
|
| | | "codeId": "B02travelPositivelimit",
|
| | | "addressIndex": 90
|
| | | }
|
| | | ]
|
| | | { |
| | | "plcAddressBegin": "DB104.0.0", |
| | | "plcAddressLenght": "91", |
| | | "dataType": "bit", |
| | | "parameteInfor": [ |
| | | { |
| | | "codeId": "D01VFDerror", |
| | | "addressIndex": 0 |
| | | }, |
| | | { |
| | | "codeId": "D02VFDerror", |
| | | "addressIndex": 1 |
| | | }, |
| | | { |
| | | "codeId": "D03VFDerror", |
| | | "addressIndex": 2 |
| | | }, |
| | | { |
| | | "codeId": "D04VFDerror", |
| | | "addressIndex": 3 |
| | | }, |
| | | { |
| | | "codeId": "D05VFDerror", |
| | | "addressIndex": 4 |
| | | }, |
| | | { |
| | | "codeId": "D06VFDerror", |
| | | "addressIndex": 5 |
| | | }, |
| | | { |
| | | "codeId": "B01VFDerror", |
| | | "addressIndex": 6 |
| | | }, |
| | | { |
| | | "codeId": "B02VFDerror", |
| | | "addressIndex": 7 |
| | | }, |
| | | { |
| | | "codeId": "A01VFDerror", |
| | | "addressIndex": 8 |
| | | }, |
| | | { |
| | | "codeId": "A02VFDerror", |
| | | "addressIndex": 9 |
| | | }, |
| | | { |
| | | "codeId": "A01servoturnerror", |
| | | "addressIndex": 10 |
| | | }, |
| | | { |
| | | "codeId": "A02servoturnerror", |
| | | "addressIndex": 11 |
| | | }, |
| | | { |
| | | "codeId": "A01servotravelerror", |
| | | "addressIndex": 12 |
| | | }, |
| | | { |
| | | "codeId": "A02servotravelerror", |
| | | "addressIndex": 13 |
| | | }, |
| | | { |
| | | "codeId": "B01servotravelerror", |
| | | "addressIndex": 14 |
| | | }, |
| | | { |
| | | "codeId": "B02servotravelerror", |
| | | "addressIndex": 15 |
| | | }, |
| | | { |
| | | "codeId": "D01DECerror", |
| | | "addressIndex": 16 |
| | | }, |
| | | { |
| | | "codeId": "D01poserror", |
| | | "addressIndex": 17 |
| | | }, |
| | | { |
| | | "codeId": "D02DECerror", |
| | | "addressIndex": 18 |
| | | }, |
| | | { |
| | | "codeId": "D02poserror", |
| | | "addressIndex": 19 |
| | | }, |
| | | { |
| | | "codeId": "D03DECerror", |
| | | "addressIndex": 20 |
| | | }, |
| | | { |
| | | "codeId": "D03poserror", |
| | | "addressIndex": 21 |
| | | }, |
| | | { |
| | | "codeId": "D04DECerror", |
| | | "addressIndex": 22 |
| | | }, |
| | | { |
| | | "codeId": "D04poserror", |
| | | "addressIndex": 23 |
| | | }, |
| | | { |
| | | "codeId": "D05DECerror", |
| | | "addressIndex": 24 |
| | | }, |
| | | { |
| | | "codeId": "D05poserror", |
| | | "addressIndex": 25 |
| | | }, |
| | | { |
| | | "codeId": "D06DECerror", |
| | | "addressIndex": 26 |
| | | }, |
| | | { |
| | | "codeId": "D06poserror", |
| | | "addressIndex": 27 |
| | | }, |
| | | { |
| | | "codeId": "A01DECerror", |
| | | "addressIndex": 28 |
| | | }, |
| | | { |
| | | "codeId": "A01poserror", |
| | | "addressIndex": 29 |
| | | }, |
| | | { |
| | | "codeId": "A02DECerror", |
| | | "addressIndex": 30 |
| | | }, |
| | | { |
| | | "codeId": "A02poserror", |
| | | "addressIndex": 31 |
| | | }, |
| | | { |
| | | "codeId": "B01INDECerror", |
| | | "addressIndex": 32 |
| | | }, |
| | | { |
| | | "codeId": "B01INposerror", |
| | | "addressIndex": 33 |
| | | }, |
| | | { |
| | | "codeId": "B01OUTDECerror", |
| | | "addressIndex": 34 |
| | | }, |
| | | { |
| | | "codeId": "B01OUTposerror", |
| | | "addressIndex": 35 |
| | | }, |
| | | { |
| | | "codeId": "B02INDECerror", |
| | | "addressIndex": 36 |
| | | }, |
| | | { |
| | | "codeId": "B02INposerror", |
| | | "addressIndex": 37 |
| | | }, |
| | | { |
| | | "codeId": "B02OUTDECerror", |
| | | "addressIndex": 38 |
| | | }, |
| | | { |
| | | "codeId": "B02OUTposerror", |
| | | "addressIndex": 39 |
| | | }, |
| | | { |
| | | "codeId": "D01Scanglassexceedinglimit", |
| | | "addressIndex": 40 |
| | | }, |
| | | { |
| | | "codeId": "emergencystopalarm", |
| | | "addressIndex": 41 |
| | | }, |
| | | { |
| | | "codeId": "Moreglassthanknown", |
| | | "addressIndex": 42 |
| | | }, |
| | | { |
| | | "codeId": "lessglassthanknown", |
| | | "addressIndex": 43 |
| | | }, |
| | | { |
| | | "codeId": "D01conveyortimeoutalarm", |
| | | "addressIndex": 44 |
| | | }, |
| | | { |
| | | "codeId": "D02conveyortimeoutalarm", |
| | | "addressIndex": 45 |
| | | }, |
| | | { |
| | | "codeId": "D03conveyortimeoutalarm", |
| | | "addressIndex": 46 |
| | | }, |
| | | { |
| | | "codeId": "D04conveyortimeoutalarm", |
| | | "addressIndex": 47 |
| | | }, |
| | | { |
| | | "codeId": "D05conveyortimeoutalarm", |
| | | "addressIndex": 48 |
| | | }, |
| | | { |
| | | "codeId": "D06conveyortimeoutalarm", |
| | | "addressIndex": 49 |
| | | }, |
| | | { |
| | | "codeId": "A01conveyortimeoutalarm", |
| | | "addressIndex": 50 |
| | | }, |
| | | { |
| | | "codeId": "A02conveyortimeoutalarm", |
| | | "addressIndex": 51 |
| | | }, |
| | | { |
| | | "codeId": "B01conveyortimeoutalarm", |
| | | "addressIndex": 52 |
| | | }, |
| | | { |
| | | "codeId": "B02conveyortimeoutalarm", |
| | | "addressIndex": 53 |
| | | }, |
| | | { |
| | | "codeId": "A01conveyorLeftsafetyalarm", |
| | | "addressIndex": 54 |
| | | }, |
| | | { |
| | | "codeId": "A01conveyorrightsafetyalarm", |
| | | "addressIndex": 55 |
| | | }, |
| | | { |
| | | "codeId": "A02conveyorLeftsafetyalarm", |
| | | "addressIndex": 56 |
| | | }, |
| | | { |
| | | "codeId": "A02conveyorrightsafetyalarm", |
| | | "addressIndex": 57 |
| | | }, |
| | | { |
| | | "codeId": "1#buffersafetyalarm", |
| | | "addressIndex": 58 |
| | | }, |
| | | { |
| | | "codeId": "2#buffersafetyalarm", |
| | | "addressIndex": 59 |
| | | }, |
| | | { |
| | | "codeId": "3#buffersafetyalarm", |
| | | "addressIndex": 60 |
| | | }, |
| | | { |
| | | "codeId": "4#buffersafetyalarm", |
| | | "addressIndex": 61 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRrightinposerror", |
| | | "addressIndex": 62 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRleftinposerror", |
| | | "addressIndex": 63 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRleftinposerror", |
| | | "addressIndex": 64 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRleftdecerror", |
| | | "addressIndex": 65 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRrightdecerror", |
| | | "addressIndex": 66 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRrightinposerror", |
| | | "addressIndex": 67 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRleftinposerror", |
| | | "addressIndex": 68 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRleftdecerror", |
| | | "addressIndex": 69 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRrightdecerror", |
| | | "addressIndex": 70 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRrightinposerror", |
| | | "addressIndex": 71 |
| | | }, |
| | | { |
| | | "codeId": "A01servoturnhomed", |
| | | "addressIndex": 72 |
| | | }, |
| | | { |
| | | "codeId": "A02servoturnhomed", |
| | | "addressIndex": 73 |
| | | }, |
| | | { |
| | | "codeId": "A01servotravelhomed", |
| | | "addressIndex": 74 |
| | | }, |
| | | { |
| | | "codeId": "A02servotravelhomed", |
| | | "addressIndex": 75 |
| | | }, |
| | | { |
| | | "codeId": "B01servotravelhomed", |
| | | "addressIndex": 76 |
| | | }, |
| | | { |
| | | "codeId": "B02servotravelhomed", |
| | | "addressIndex": 77 |
| | | }, |
| | | { |
| | | "codeId": "resetDelay", |
| | | "addressIndex": 78 |
| | | }, |
| | | { |
| | | "codeId": "A01travelNegativelimit", |
| | | "addressIndex": 79 |
| | | }, |
| | | { |
| | | "codeId": "A01travelPositivelimit", |
| | | "addressIndex": 80 |
| | | }, |
| | | { |
| | | "codeId": "A01turnuplimit", |
| | | "addressIndex": 81 |
| | | }, |
| | | { |
| | | "codeId": "A01turndownlimit", |
| | | "addressIndex": 82 |
| | | }, |
| | | { |
| | | "codeId": "A02travelNegativelimit", |
| | | "addressIndex": 83 |
| | | }, |
| | | { |
| | | "codeId": "A02travelPositivelimit", |
| | | "addressIndex": 84 |
| | | }, |
| | | { |
| | | "codeId": "A02turnuplimit", |
| | | "addressIndex": 85 |
| | | }, |
| | | { |
| | | "codeId": "A02turndownlimit", |
| | | "addressIndex": 86 |
| | | }, |
| | | { |
| | | "codeId": "B01travelNegativelimit", |
| | | "addressIndex": 87 |
| | | }, |
| | | { |
| | | "codeId": "B01travelPositivelimit", |
| | | "addressIndex": 88 |
| | | }, |
| | | { |
| | | "codeId": "B02travelNegativelimit", |
| | | "addressIndex": 89 |
| | | }, |
| | | { |
| | | "codeId": "B02travelPositivelimit", |
| | | "addressIndex": 90 |
| | | } |
| | | ] |
| | | } |
| | |
| | | {
|
| | | "plcAddressBegin": "DB103.0",
|
| | | "plcAddressLenght": "258",
|
| | | "dataType": "word",
|
| | | "parameteInfor": [
|
| | | {
|
| | | "codeId": "D01.State",
|
| | | "addressIndex": "0",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "D02.State",
|
| | | "addressIndex": "2",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B01.State",
|
| | | "addressIndex": "4",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B02.State",
|
| | | "addressIndex": "6",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A01.State",
|
| | | "addressIndex": "8",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A02.State",
|
| | | "addressIndex": "10",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "D03.State",
|
| | | "addressIndex": "12",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "D04.State",
|
| | | "addressIndex": "14",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "D05.State",
|
| | | "addressIndex": "16",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "D06.State",
|
| | | "addressIndex": "18",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A01tavelActualPosition",
|
| | | "addressIndex": "20",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A01turnActualangle",
|
| | | "addressIndex": "22",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A02tavelActualPosition",
|
| | | "addressIndex": "24",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A02turnActualangle",
|
| | | "addressIndex": "26",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B01tavelActualPosition",
|
| | | "addressIndex": "28",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B02tavelActualPosition",
|
| | | "addressIndex": "30",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A01CurrentGrid",
|
| | | "addressIndex": "32",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A02CurrentGrid",
|
| | | "addressIndex": "34",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B01CurrentGrid",
|
| | | "addressIndex": "36",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B01TargetGrid",
|
| | | "addressIndex": "38",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B02CurrentGrid",
|
| | | "addressIndex": "40",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B02TargetGrid",
|
| | | "addressIndex": "42",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "D01ID",
|
| | | "addressIndex": "44",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "D02ID",
|
| | | "addressIndex": "58",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "D03ID",
|
| | | "addressIndex": "72",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "D04ID",
|
| | | "addressIndex": "86",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "D05ID",
|
| | | "addressIndex": "100",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "D06ID",
|
| | | "addressIndex": "114",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A01ID1",
|
| | | "addressIndex": "128",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A01ID2",
|
| | | "addressIndex": "142",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A02ID1",
|
| | | "addressIndex": "156",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A02ID2",
|
| | | "addressIndex": "170",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B01ID1",
|
| | | "addressIndex": "184",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B01ID2",
|
| | | "addressIndex": "198",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B02ID1",
|
| | | "addressIndex": "212",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B02ID2",
|
| | | "addressIndex": "226",
|
| | | "addressLenght": "14",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A01conveyorFaultcodes",
|
| | | "addressIndex": "240",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A01turnservoFaultcodes",
|
| | | "addressIndex": "242",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A01travelservoFaultcodes",
|
| | | "addressIndex": "244",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A02conveyorFaultcodes",
|
| | | "addressIndex": "246",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A02turnservoFaultcodes",
|
| | | "addressIndex": "248",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "A02travelservoFaultcodes",
|
| | | "addressIndex": "250",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B01travelservoFaultcodes",
|
| | | "addressIndex": "252",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | },
|
| | | {
|
| | | "codeId": "B02travelservoFaultcodes",
|
| | | "addressIndex": "254",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | }
|
| | | ,
|
| | | {
|
| | | "codeId": "Scanningguns",
|
| | | "addressIndex": "256",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | }
|
| | | ,
|
| | | {
|
| | | "codeId": "Frameid",
|
| | | "addressIndex": "270",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | }
|
| | | ]
|
| | | { |
| | | "plcAddressBegin": "DB103.0", |
| | | "plcAddressLenght": "258", |
| | | "dataType": "word", |
| | | "parameteInfor": [ |
| | | { |
| | | "codeId": "D01.State", |
| | | "addressIndex": "0", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D02.State", |
| | | "addressIndex": "2", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B01.State", |
| | | "addressIndex": "4", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B02.State", |
| | | "addressIndex": "6", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A01.State", |
| | | "addressIndex": "8", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A02.State", |
| | | "addressIndex": "10", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03.State", |
| | | "addressIndex": "12", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D04.State", |
| | | "addressIndex": "14", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05.State", |
| | | "addressIndex": "16", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D06.State", |
| | | "addressIndex": "18", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A01tavelActualPosition", |
| | | "addressIndex": "20", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A01turnActualangle", |
| | | "addressIndex": "22", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A02tavelActualPosition", |
| | | "addressIndex": "24", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A02turnActualangle", |
| | | "addressIndex": "26", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B01tavelActualPosition", |
| | | "addressIndex": "28", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B02tavelActualPosition", |
| | | "addressIndex": "30", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A01CurrentGrid", |
| | | "addressIndex": "32", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A02CurrentGrid", |
| | | "addressIndex": "34", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B01CurrentGrid", |
| | | "addressIndex": "36", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B01TargetGrid", |
| | | "addressIndex": "38", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B02CurrentGrid", |
| | | "addressIndex": "40", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B02TargetGrid", |
| | | "addressIndex": "42", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D01ID", |
| | | "addressIndex": "44", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D02ID", |
| | | "addressIndex": "58", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID", |
| | | "addressIndex": "72", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D04ID", |
| | | "addressIndex": "86", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID", |
| | | "addressIndex": "100", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D06ID", |
| | | "addressIndex": "114", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A01ID1", |
| | | "addressIndex": "128", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A01ID2", |
| | | "addressIndex": "142", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A02ID1", |
| | | "addressIndex": "156", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A02ID2", |
| | | "addressIndex": "170", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B01ID1", |
| | | "addressIndex": "184", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B01ID2", |
| | | "addressIndex": "198", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B02ID1", |
| | | "addressIndex": "212", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B02ID2", |
| | | "addressIndex": "226", |
| | | "addressLenght": "14", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A01conveyorFaultcodes", |
| | | "addressIndex": "240", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A01turnservoFaultcodes", |
| | | "addressIndex": "242", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A01travelservoFaultcodes", |
| | | "addressIndex": "244", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A02conveyorFaultcodes", |
| | | "addressIndex": "246", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A02turnservoFaultcodes", |
| | | "addressIndex": "248", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "A02travelservoFaultcodes", |
| | | "addressIndex": "250", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B01travelservoFaultcodes", |
| | | "addressIndex": "252", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "B02travelservoFaultcodes", |
| | | "addressIndex": "254", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "Scanningguns", |
| | | "addressIndex": "256", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "Frameid", |
| | | "addressIndex": "270", |
| | | "addressLenght": "2", |
| | | "unit": "" |
| | | } |
| | | ] |
| | | } |
| | |
| | | {
|
| | | "plcAddressBegin": "DB101.0.0",
|
| | | "plcAddressLenght": "93",
|
| | | "dataType": "bit",
|
| | | "parameteInfor": [
|
| | | {
|
| | | "codeId": "D01VFDconveyor",
|
| | | "addressIndex": 0
|
| | | },
|
| | | {
|
| | | "codeId": "D02VFDconveyor",
|
| | | "addressIndex": 1
|
| | | },
|
| | | {
|
| | | "codeId": "D03VFDconveyor",
|
| | | "addressIndex": 2
|
| | | },
|
| | | {
|
| | | "codeId": "D04VFDconveyor",
|
| | | "addressIndex": 3
|
| | | },
|
| | | {
|
| | | "codeId": "D05VFDconveyor",
|
| | | "addressIndex": 4
|
| | | },
|
| | | {
|
| | | "codeId": "D06VFDconveyor",
|
| | | "addressIndex": 5
|
| | | },
|
| | | {
|
| | | "codeId": "A01VFDconveyor",
|
| | | "addressIndex": 6
|
| | | },
|
| | | {
|
| | | "codeId": "A02VFDconveyor",
|
| | | "addressIndex": 7
|
| | | },
|
| | | {
|
| | | "codeId": "B01VFDconveyor",
|
| | | "addressIndex": 8
|
| | | },
|
| | | {
|
| | | "codeId": "B02VFDconveyor",
|
| | | "addressIndex": 9
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETURN",
|
| | | "addressIndex": 10
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETURN",
|
| | | "addressIndex": 11
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETRAVEL",
|
| | | "addressIndex": 12
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETRAVEL",
|
| | | "addressIndex": 13
|
| | | },
|
| | | {
|
| | | "codeId": "B01SERVETRAVEL",
|
| | | "addressIndex": 14
|
| | | },
|
| | | {
|
| | | "codeId": "B02SERVETRAVEL",
|
| | | "addressIndex": 15
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETURNPOS",
|
| | | "addressIndex": 16
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETURNPOS",
|
| | | "addressIndex": 17
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETRAVELPOS",
|
| | | "addressIndex": 18
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETRAVELPOS",
|
| | | "addressIndex": 19
|
| | | },
|
| | | {
|
| | | "codeId": "B01SERVETRAVELPOS",
|
| | | "addressIndex": 20
|
| | | },
|
| | | {
|
| | | "codeId": "B02SERVETRAVELPOS",
|
| | | "addressIndex": 21
|
| | | },
|
| | | {
|
| | | "codeId": "B01YVTURN",
|
| | | "addressIndex": 22
|
| | | },
|
| | | {
|
| | | "codeId": "B01YVUPDOWN",
|
| | | "addressIndex": 23
|
| | | },
|
| | | {
|
| | | "codeId": "B02YVTURN",
|
| | | "addressIndex": 24
|
| | | },
|
| | | {
|
| | | "codeId": "B02YVUPDOWN",
|
| | | "addressIndex": 25
|
| | | },
|
| | | {
|
| | | "codeId": "B01YVGassing",
|
| | | "addressIndex": 26
|
| | | },
|
| | | {
|
| | | "codeId": "B02YVGassing",
|
| | | "addressIndex": 27
|
| | | },
|
| | | {
|
| | | "codeId": "A01VFDconveyorreverse",
|
| | | "addressIndex": 28
|
| | | },
|
| | | {
|
| | | "codeId": "A02VFDconveyorreverse",
|
| | | "addressIndex": 29
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETURNreset",
|
| | | "addressIndex": 30
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETURNhome",
|
| | | "addressIndex": 31
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETRAVELreset",
|
| | | "addressIndex": 32
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETURNreset",
|
| | | "addressIndex": 33
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETURNhome",
|
| | | "addressIndex": 34
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETRAVELreset",
|
| | | "addressIndex": 35
|
| | | },
|
| | | {
|
| | | "codeId": "B01SERVETRAVELreset",
|
| | | "addressIndex": 36
|
| | | },
|
| | | {
|
| | | "codeId": "B01SERVETRAVELhome",
|
| | | "addressIndex": 37
|
| | | },
|
| | | {
|
| | | "codeId": "B02SERVETRAVELreset",
|
| | | "addressIndex": 38
|
| | | },
|
| | | {
|
| | | "codeId": "B02SERVETRAVELhome",
|
| | | "addressIndex": 39
|
| | | },
|
| | | {
|
| | | "codeId": "Manualstoragestartup",
|
| | | "addressIndex": 40
|
| | | },
|
| | | {
|
| | | "codeId": "Manualoutputstartup",
|
| | | "addressIndex": 41
|
| | | },
|
| | | {
|
| | | "codeId": "A01oilpump",
|
| | | "addressIndex": 42
|
| | | },
|
| | | {
|
| | | "codeId": "A02oilpump",
|
| | | "addressIndex": 43
|
| | | },
|
| | | {
|
| | | "codeId": "A01get1#gridaddress",
|
| | | "addressIndex": 44
|
| | | },
|
| | | {
|
| | | "codeId": "A01get22#gridaddress",
|
| | | "addressIndex": 45
|
| | | },
|
| | | {
|
| | | "codeId": "A01get43#gridaddress",
|
| | | "addressIndex": 46
|
| | | },
|
| | | {
|
| | | "codeId": "A01get64#gridaddress",
|
| | | "addressIndex": 47
|
| | | },
|
| | | {
|
| | | "codeId": "A01get85#gridaddress",
|
| | | "addressIndex": 48
|
| | | },
|
| | | {
|
| | | "codeId": "A01get106#gridaddress",
|
| | | "addressIndex": 49
|
| | | },
|
| | | {
|
| | | "codeId": "A01get127#gridaddress",
|
| | | "addressIndex": 50
|
| | | },
|
| | | {
|
| | | "codeId": "A01get148#gridaddress",
|
| | | "addressIndex": 51
|
| | | },
|
| | | {
|
| | | "codeId": "A01get169#gridaddress",
|
| | | "addressIndex": 52
|
| | | },
|
| | | {
|
| | | "codeId": "A02get190#gridaddress",
|
| | | "addressIndex": 53
|
| | | },
|
| | | {
|
| | | "codeId": "A02get1#gridaddress",
|
| | | "addressIndex": 54
|
| | | },
|
| | | {
|
| | | "codeId": "A02get22#gridaddress",
|
| | | "addressIndex": 55
|
| | | },
|
| | | {
|
| | | "codeId": "A02get43#gridaddress",
|
| | | "addressIndex": 56
|
| | | },
|
| | | {
|
| | | "codeId": "A02get64#gridaddress",
|
| | | "addressIndex": 57
|
| | | },
|
| | | {
|
| | | "codeId": "A02get85#gridaddress",
|
| | | "addressIndex": 58
|
| | | },
|
| | | {
|
| | | "codeId": "A02get106#gridaddress",
|
| | | "addressIndex": 59
|
| | | },
|
| | | {
|
| | | "codeId": "A02get127#gridaddress",
|
| | | "addressIndex": 60
|
| | | },
|
| | | {
|
| | | "codeId": "A02get148#gridaddress",
|
| | | "addressIndex": 61
|
| | | },
|
| | | {
|
| | | "codeId": "A02get169#gridaddress",
|
| | | "addressIndex": 62
|
| | | },
|
| | | {
|
| | | "codeId": "A02get190#gridaddress",
|
| | | "addressIndex": 63
|
| | | },
|
| | | {
|
| | | "codeId": "B01get1#gridaddress",
|
| | | "addressIndex": 64
|
| | | },
|
| | | {
|
| | | "codeId": "B01get22#gridaddress",
|
| | | "addressIndex": 65
|
| | | },
|
| | | {
|
| | | "codeId": "B01get43#gridaddress",
|
| | | "addressIndex": 66
|
| | | },
|
| | | {
|
| | | "codeId": "B01get64#gridaddress",
|
| | | "addressIndex": 67
|
| | | },
|
| | | {
|
| | | "codeId": "B01get85#gridaddress",
|
| | | "addressIndex": 68
|
| | | },
|
| | | {
|
| | | "codeId": "B02get106#gridaddress",
|
| | | "addressIndex": 69
|
| | | },
|
| | | {
|
| | | "codeId": "B02get127#gridaddress",
|
| | | "addressIndex": 70
|
| | | },
|
| | | {
|
| | | "codeId": "B02get148#gridaddress",
|
| | | "addressIndex": 71
|
| | | },
|
| | | {
|
| | | "codeId": "B02get169#gridaddress",
|
| | | "addressIndex": 72
|
| | | },
|
| | | {
|
| | | "codeId": "B02get190#gridaddress",
|
| | | "addressIndex": 73
|
| | | },
|
| | | {
|
| | | "codeId": "D01IDClean",
|
| | | "addressIndex": 74
|
| | | },
|
| | | {
|
| | | "codeId": "D02IDClean",
|
| | | "addressIndex": 75
|
| | | },
|
| | | {
|
| | | "codeId": "D03IDClean",
|
| | | "addressIndex": 76
|
| | | },
|
| | | {
|
| | | "codeId": "D04IDClean",
|
| | | "addressIndex": 77
|
| | | },
|
| | | {
|
| | | "codeId": "D05IDClean",
|
| | | "addressIndex": 78
|
| | | },
|
| | | {
|
| | | "codeId": "D06IDClean",
|
| | | "addressIndex": 79
|
| | | },
|
| | | {
|
| | | "codeId": "A01IDClean",
|
| | | "addressIndex": 80
|
| | | },
|
| | | {
|
| | | "codeId": "A02IDClean",
|
| | | "addressIndex": 81
|
| | | },
|
| | | {
|
| | | "codeId": "B01IDClean",
|
| | | "addressIndex": 82
|
| | | },
|
| | | {
|
| | | "codeId": "B02IDClean",
|
| | | "addressIndex": 83
|
| | | },
|
| | | {
|
| | | "codeId": "abort/resumeTasks",
|
| | | "addressIndex": 84
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETRAVELhome",
|
| | | "addressIndex": 85
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETRAVELhome",
|
| | | "addressIndex": 86
|
| | | },
|
| | | {
|
| | | "codeId": "A01A02travelHoming",
|
| | | "addressIndex": 87
|
| | | },
|
| | | {
|
| | | "codeId": "A01halfAutoSelect",
|
| | | "addressIndex": 88
|
| | | },
|
| | | {
|
| | | "codeId": "A02halfAutoSelect",
|
| | | "addressIndex": 89
|
| | | },
|
| | | {
|
| | | "codeId": "A02abortTasks",
|
| | | "addressIndex": 90
|
| | | },
|
| | | {
|
| | | "codeId": "emgHMI",
|
| | | "addressIndex": 91
|
| | | },
|
| | | {
|
| | | "codeId": "Scanningmethod",
|
| | | "addressIndex": 92
|
| | | ]
|
| | | { |
| | | "plcAddressBegin": "DB101.0.0", |
| | | "plcAddressLenght": "93", |
| | | "dataType": "bit", |
| | | "parameteInfor": [ |
| | | { |
| | | "codeId": "D01VFDconveyor", |
| | | "addressIndex": 0 |
| | | }, |
| | | { |
| | | "codeId": "D02VFDconveyor", |
| | | "addressIndex": 1 |
| | | }, |
| | | { |
| | | "codeId": "D03VFDconveyor", |
| | | "addressIndex": 2 |
| | | }, |
| | | { |
| | | "codeId": "D04VFDconveyor", |
| | | "addressIndex": 3 |
| | | }, |
| | | { |
| | | "codeId": "D05VFDconveyor", |
| | | "addressIndex": 4 |
| | | }, |
| | | { |
| | | "codeId": "D06VFDconveyor", |
| | | "addressIndex": 5 |
| | | }, |
| | | { |
| | | "codeId": "A01VFDconveyor", |
| | | "addressIndex": 6 |
| | | }, |
| | | { |
| | | "codeId": "A02VFDconveyor", |
| | | "addressIndex": 7 |
| | | }, |
| | | { |
| | | "codeId": "B01VFDconveyor", |
| | | "addressIndex": 8 |
| | | }, |
| | | { |
| | | "codeId": "B02VFDconveyor", |
| | | "addressIndex": 9 |
| | | }, |
| | | { |
| | | "codeId": "A01SERVETURN", |
| | | "addressIndex": 10 |
| | | }, |
| | | { |
| | | "codeId": "A02SERVETURN", |
| | | "addressIndex": 11 |
| | | }, |
| | | { |
| | | "codeId": "A01SERVETRAVEL", |
| | | "addressIndex": 12 |
| | | }, |
| | | { |
| | | "codeId": "A02SERVETRAVEL", |
| | | "addressIndex": 13 |
| | | }, |
| | | { |
| | | "codeId": "B01SERVETRAVEL", |
| | | "addressIndex": 14 |
| | | }, |
| | | { |
| | | "codeId": "B02SERVETRAVEL", |
| | | "addressIndex": 15 |
| | | }, |
| | | { |
| | | "codeId": "A01SERVETURNPOS", |
| | | "addressIndex": 16 |
| | | }, |
| | | { |
| | | "codeId": "A02SERVETURNPOS", |
| | | "addressIndex": 17 |
| | | }, |
| | | { |
| | | "codeId": "A01SERVETRAVELPOS", |
| | | "addressIndex": 18 |
| | | }, |
| | | { |
| | | "codeId": "A02SERVETRAVELPOS", |
| | | "addressIndex": 19 |
| | | }, |
| | | { |
| | | "codeId": "B01SERVETRAVELPOS", |
| | | "addressIndex": 20 |
| | | }, |
| | | { |
| | | "codeId": "B02SERVETRAVELPOS", |
| | | "addressIndex": 21 |
| | | }, |
| | | { |
| | | "codeId": "B01YVTURN", |
| | | "addressIndex": 22 |
| | | }, |
| | | { |
| | | "codeId": "B01YVUPDOWN", |
| | | "addressIndex": 23 |
| | | }, |
| | | { |
| | | "codeId": "B02YVTURN", |
| | | "addressIndex": 24 |
| | | }, |
| | | { |
| | | "codeId": "B02YVUPDOWN", |
| | | "addressIndex": 25 |
| | | }, |
| | | { |
| | | "codeId": "B01YVGassing", |
| | | "addressIndex": 26 |
| | | }, |
| | | { |
| | | "codeId": "B02YVGassing", |
| | | "addressIndex": 27 |
| | | }, |
| | | { |
| | | "codeId": "A01VFDconveyorreverse", |
| | | "addressIndex": 28 |
| | | }, |
| | | { |
| | | "codeId": "A02VFDconveyorreverse", |
| | | "addressIndex": 29 |
| | | }, |
| | | { |
| | | "codeId": "A01SERVETURNreset", |
| | | "addressIndex": 30 |
| | | }, |
| | | { |
| | | "codeId": "A01SERVETURNhome", |
| | | "addressIndex": 31 |
| | | }, |
| | | { |
| | | "codeId": "A01SERVETRAVELreset", |
| | | "addressIndex": 32 |
| | | }, |
| | | { |
| | | "codeId": "A02SERVETURNreset", |
| | | "addressIndex": 33 |
| | | }, |
| | | { |
| | | "codeId": "A02SERVETURNhome", |
| | | "addressIndex": 34 |
| | | }, |
| | | { |
| | | "codeId": "A02SERVETRAVELreset", |
| | | "addressIndex": 35 |
| | | }, |
| | | { |
| | | "codeId": "B01SERVETRAVELreset", |
| | | "addressIndex": 36 |
| | | }, |
| | | { |
| | | "codeId": "B01SERVETRAVELhome", |
| | | "addressIndex": 37 |
| | | }, |
| | | { |
| | | "codeId": "B02SERVETRAVELreset", |
| | | "addressIndex": 38 |
| | | }, |
| | | { |
| | | "codeId": "B02SERVETRAVELhome", |
| | | "addressIndex": 39 |
| | | }, |
| | | { |
| | | "codeId": "Manualstoragestartup", |
| | | "addressIndex": 40 |
| | | }, |
| | | { |
| | | "codeId": "Manualoutputstartup", |
| | | "addressIndex": 41 |
| | | }, |
| | | { |
| | | "codeId": "A01oilpump", |
| | | "addressIndex": 42 |
| | | }, |
| | | { |
| | | "codeId": "A02oilpump", |
| | | "addressIndex": 43 |
| | | }, |
| | | { |
| | | "codeId": "A01get1#gridaddress", |
| | | "addressIndex": 44 |
| | | }, |
| | | { |
| | | "codeId": "A01get22#gridaddress", |
| | | "addressIndex": 45 |
| | | }, |
| | | { |
| | | "codeId": "A01get43#gridaddress", |
| | | "addressIndex": 46 |
| | | }, |
| | | { |
| | | "codeId": "A01get64#gridaddress", |
| | | "addressIndex": 47 |
| | | }, |
| | | { |
| | | "codeId": "A01get85#gridaddress", |
| | | "addressIndex": 48 |
| | | }, |
| | | { |
| | | "codeId": "A01get106#gridaddress", |
| | | "addressIndex": 49 |
| | | }, |
| | | { |
| | | "codeId": "A01get127#gridaddress", |
| | | "addressIndex": 50 |
| | | }, |
| | | { |
| | | "codeId": "A01get148#gridaddress", |
| | | "addressIndex": 51 |
| | | }, |
| | | { |
| | | "codeId": "A01get169#gridaddress", |
| | | "addressIndex": 52 |
| | | }, |
| | | { |
| | | "codeId": "A02get190#gridaddress", |
| | | "addressIndex": 53 |
| | | }, |
| | | { |
| | | "codeId": "A02get1#gridaddress", |
| | | "addressIndex": 54 |
| | | }, |
| | | { |
| | | "codeId": "A02get22#gridaddress", |
| | | "addressIndex": 55 |
| | | }, |
| | | { |
| | | "codeId": "A02get43#gridaddress", |
| | | "addressIndex": 56 |
| | | }, |
| | | { |
| | | "codeId": "A02get64#gridaddress", |
| | | "addressIndex": 57 |
| | | }, |
| | | { |
| | | "codeId": "A02get85#gridaddress", |
| | | "addressIndex": 58 |
| | | }, |
| | | { |
| | | "codeId": "A02get106#gridaddress", |
| | | "addressIndex": 59 |
| | | }, |
| | | { |
| | | "codeId": "A02get127#gridaddress", |
| | | "addressIndex": 60 |
| | | }, |
| | | { |
| | | "codeId": "A02get148#gridaddress", |
| | | "addressIndex": 61 |
| | | }, |
| | | { |
| | | "codeId": "A02get169#gridaddress", |
| | | "addressIndex": 62 |
| | | }, |
| | | { |
| | | "codeId": "A02get190#gridaddress", |
| | | "addressIndex": 63 |
| | | }, |
| | | { |
| | | "codeId": "B01get1#gridaddress", |
| | | "addressIndex": 64 |
| | | }, |
| | | { |
| | | "codeId": "B01get22#gridaddress", |
| | | "addressIndex": 65 |
| | | }, |
| | | { |
| | | "codeId": "B01get43#gridaddress", |
| | | "addressIndex": 66 |
| | | }, |
| | | { |
| | | "codeId": "B01get64#gridaddress", |
| | | "addressIndex": 67 |
| | | }, |
| | | { |
| | | "codeId": "B01get85#gridaddress", |
| | | "addressIndex": 68 |
| | | }, |
| | | { |
| | | "codeId": "B02get106#gridaddress", |
| | | "addressIndex": 69 |
| | | }, |
| | | { |
| | | "codeId": "B02get127#gridaddress", |
| | | "addressIndex": 70 |
| | | }, |
| | | { |
| | | "codeId": "B02get148#gridaddress", |
| | | "addressIndex": 71 |
| | | }, |
| | | { |
| | | "codeId": "B02get169#gridaddress", |
| | | "addressIndex": 72 |
| | | }, |
| | | { |
| | | "codeId": "B02get190#gridaddress", |
| | | "addressIndex": 73 |
| | | }, |
| | | { |
| | | "codeId": "D01IDClean", |
| | | "addressIndex": 74 |
| | | }, |
| | | { |
| | | "codeId": "D02IDClean", |
| | | "addressIndex": 75 |
| | | }, |
| | | { |
| | | "codeId": "D03IDClean", |
| | | "addressIndex": 76 |
| | | }, |
| | | { |
| | | "codeId": "D04IDClean", |
| | | "addressIndex": 77 |
| | | }, |
| | | { |
| | | "codeId": "D05IDClean", |
| | | "addressIndex": 78 |
| | | }, |
| | | { |
| | | "codeId": "D06IDClean", |
| | | "addressIndex": 79 |
| | | }, |
| | | { |
| | | "codeId": "A01IDClean", |
| | | "addressIndex": 80 |
| | | }, |
| | | { |
| | | "codeId": "A02IDClean", |
| | | "addressIndex": 81 |
| | | }, |
| | | { |
| | | "codeId": "B01IDClean", |
| | | "addressIndex": 82 |
| | | }, |
| | | { |
| | | "codeId": "B02IDClean", |
| | | "addressIndex": 83 |
| | | }, |
| | | { |
| | | "codeId": "abort/resumeTasks", |
| | | "addressIndex": 84 |
| | | }, |
| | | { |
| | | "codeId": "A01SERVETRAVELhome", |
| | | "addressIndex": 85 |
| | | }, |
| | | { |
| | | "codeId": "A02SERVETRAVELhome", |
| | | "addressIndex": 86 |
| | | }, |
| | | { |
| | | "codeId": "A01A02travelHoming", |
| | | "addressIndex": 87 |
| | | }, |
| | | { |
| | | "codeId": "A01halfAutoSelect", |
| | | "addressIndex": 88 |
| | | }, |
| | | { |
| | | "codeId": "A02halfAutoSelect", |
| | | "addressIndex": 89 |
| | | }, |
| | | { |
| | | "codeId": "A02abortTasks", |
| | | "addressIndex": 90 |
| | | }, |
| | | { |
| | | "codeId": "emgHMI", |
| | | "addressIndex": 91 |
| | | }, |
| | | { |
| | | "codeId": "Scanningmethod", |
| | | "addressIndex": 92 |
| | | ] |
| | | } |
| | |
| | | </dependency> |
| | | |
| | | <!--依赖服务的工具类--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.mes</groupId>--> |
| | | <!-- <artifactId>common</artifactId>--> |
| | | <!-- <version>1.0-SNAPSHOT</version>--> |
| | | <!-- </dependency>--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.mes</groupId>--> |
| | | <!-- <artifactId>common</artifactId>--> |
| | | <!-- <version>1.0-SNAPSHOT</version>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <dependency> |
| | | <artifactId>servicebase</artifactId> |
| | |
| | | 1、本项目是基于SpringBoot+Mybatis-plus+Mysql+Vue+ElementUI+Maven+Nginx的项目,目录结果结构如下: |
| | | |
| | | |
| | | ├─src |
| | | ├─com 插件生成的代码,用于各自开发使用 |
| | | │ └─mes |
| | |
| | | ├─-LoadGlassModule |
| | | ├─-TemperingGlassModule |
| | | └─-UnLoadGlassModule |
| | | 2、运行项目: |
| | | 1、启动项目:启动各自模块启动类 例如:CacheGlassModuleApplication.java#main() |
| | | 2、访问项目: |
| | | 3、项目地址:http://localhost:8081/mesModuleCache/doc.html#/home |
| | | 4、项目说明: 本界面为Api文档,公开人员用于调试 |
| | | 3、项目说明: |
| | | 1、项目分为公共模块common,业务模块moduleService。 |
| | | 2、common模块中包含公共的类,例如:公共的实体类、拦截器、工具类、常量类、异常处理等。 |
| | | 3、moduleService中包含各个业务模块,每个业务模块中包含一个启动类,开发人员需要开发各自负责的业务模块。 |
| | | 4、com目录下的文件为插件生成的代码,用于各自开发使用。用完删除即可,避免影响开发。 |
| | | |
| | | 2、运行项目: 1、启动项目:启动各自模块启动类 例如:CacheGlassModuleApplication.java#main() |
| | | 2、访问项目: 3、项目地址:http://localhost:8081/mesModuleCache/doc.html#/home |
| | | 4、项目说明: 本界面为Api文档,公开人员用于调试 3、项目说明: 1、项目分为公共模块common,业务模块moduleService。 2、common模块中包含公共的类,例如:公共的实体类、拦截器、工具类、常量类、异常处理等。 |
| | | 3、moduleService中包含各个业务模块,每个业务模块中包含一个启动类,开发人员需要开发各自负责的业务模块。 4、com目录下的文件为插件生成的代码,用于各自开发使用。用完删除即可,避免影响开发。 |