Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# CacheGlassModule/MES-Module.iml
# CacheGlassModule/src/main/java/com/mes/mapper/userInfo/SysMenuItemMapper.java
# CacheGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java
# CacheGlassModule/target/classes/application.yml
24个文件已修改
113个文件已添加
2个文件已删除
| | |
| | | |
| | | # Ignore .idea files |
| | | **/.idea/ |
| | | |
| | | #忽略所有.svn目录 |
| | | .svn/ |
| | | #忽略所有target目录 |
| | | target/ |
| | | #忽略所有.idea目录 |
| | | .idea/ |
| | | #忽略所有.iml文件 |
| | | *.iml |
| | | |
New file |
| | |
| | | { |
| | | "CurrentProjectSetting": null |
| | | } |
New file |
| | |
| | | { |
| | | "ExpandedNodes": [ |
| | | "" |
| | | ], |
| | | "PreviewInSolutionExplorer": false |
| | | } |
| | |
| | | <<<<<<< HEAD |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> |
| | | <component name="FacetManager"> |
| | |
| | | <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> |
| | | ======= |
| | | <?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> |
| | | <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> |
| | | <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> |
| | | >>>>>>> e9b0059e5ee9551f7b9b81c9358ce3d42886ae9a |
| | | </module> |
| | |
| | | <relativePath/> <!-- lookup parent from repository --> |
| | | </parent> |
| | | <groupId>com.MES-Module</groupId> |
| | | <artifactId>MES-Module</artifactId> |
| | | <artifactId>MES-UnLoadGlassModule</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | <name>MES-Module</name> |
| | | <name>MES-UnLoadGlassModule</name> |
| | | <description>project for Spring Boot</description> |
| | | <properties> |
| | | <java.version>1.8</java.version> |
| | |
| | | <artifactId>spring-boot-starter-cache</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- rabbitmq --> |
| | | <dependency> |
| | | <groupId>com.rabbitmq</groupId> |
| | | <artifactId>amqp-client</artifactId> |
| | | <version>5.13.1</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-amqp</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.fasterxml.jackson.core</groupId> |
| | | <artifactId>jackson-databind</artifactId> |
| | | <version>2.12.2</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.fasterxml.jackson.core</groupId> |
| | | <artifactId>jackson-core</artifactId> |
| | | <version>2.13.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.fasterxml.jackson.core</groupId> |
| | | <artifactId>jackson-databind</artifactId> |
| | | <version>2.13.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.fasterxml.jackson.core</groupId> |
| | | <artifactId>jackson-annotations</artifactId> |
| | | <version>2.13.0</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-websocket</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.xingshuangs</groupId> |
| | | <artifactId>iot-communication</artifactId> |
| | | <version>1.4.2</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-websocket</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.google.code.gson</groupId> |
| | | <artifactId>gson</artifactId> |
| | | <version>2.8.9</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi</artifactId> |
| | | <version>5.2.4</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>5.2.4</version> |
| | | </dependency> |
| | | |
| | | <!--websocket--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.boot</groupId>--> |
| | |
| | | <artifactId>netty-all</artifactId> |
| | | <version>4.1.36.Final</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-jpa</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.common.PlcTools.S7object; |
| | | import com.mes.mapper.SelectInfo; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cache.annotation.EnableCaching; |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | // TODO Auto-generated method stub |
| | | // |
| | | System.out.println("启动完成"); |
| | | System.out.println("启动完成1"); |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.controller; |
| | | |
| | | import com.mes.mapper.OrderTestMapper; |
| | | import com.mes.mapper.SelectInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.mes.common.Result; |
| | | import com.mes.entity.Tempered; |
| | | import com.mes.service.pp.SelectdppService; |
| | | |
| | | //@CrossOrigin //解决单个controller 跨域问题 |
| | | @RestController |
| | | @RequestMapping("/order11111111") |
| | | @RequestMapping("/Temper") |
| | | |
| | | public class OrderTestController { |
| | | @Autowired |
| | | private OrderTestMapper orderMapper; |
| | | private SelectInfo SelectInfo; |
| | | |
| | | // @GetMapping //查询order表结果集 |
| | | // public Result index(){ |
| | | // return Result.seccess(orderMapper.findAll()); |
| | | // |
| | | // } |
| | | @Autowired |
| | | private SelectdppService SelectppService; |
| | | |
| | | @GetMapping("/Tindex") //查询order表结果集 |
| | | @ResponseBody |
| | | public Result index(){ |
| | | System.out.println(1); |
| | | List<Tempered> h=SelectppService.getSelectTempered("P24030707"); |
| | | System.out.println(h.size()); |
| | | return Result.seccess(h); |
| | | |
| | | } |
| | | // |
| | | // @PostMapping //插入 |
| | | // public Integer save(@RequestBody Order order) { |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`big_storage_cage`") |
| | | public class BigStorageCage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//大理片笼表id |
| | | private Integer device_id;//设备id |
| | | private String slot;//栅格号 |
| | | private String enable_state;//启用状态 |
| | | private Integer remain_width;//剩余宽度 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`big_storage_cage_details`") |
| | | public class BigStorageCageDetails { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//大理片笼详情表id |
| | | private Integer deviceid;//设备id |
| | | private Integer slot;//栅格号 |
| | | private Integer glassid;//玻璃id |
| | | private Integer sequence;//小片在格内的顺序 |
| | | private String flowcardid;//流程卡号 |
| | | private Integer glasstype;//玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer temperingfeedsequence;//钢化版图片序 |
| | | private Integer state;//状态 |
| | | private Integer gap;//玻璃间隙 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_glass_info`") |
| | | public class DownGlassInfo { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片玻璃信息表id |
| | | private String flowcardid;//流程卡号 |
| | | private Integer sequence;//顺序 |
| | | private Integer width;//宽 |
| | | private Integer height;//高 |
| | | private Integer thickness;//厚度 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_storage_cage`") |
| | | public class DownStorageCage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片前理片笼表id |
| | | private Integer deviceid;//设备id |
| | | private String slot;//栅格号 |
| | | private String enablestate;//启用状态 |
| | | private Integer remainwidth;//剩余 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_storage_cage_details`") |
| | | public class DownStorageCagedetails { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片前理片笼明细表id |
| | | private Integer deviceid;//设备id |
| | | private Integer slot;//栅格号 |
| | | private Integer glassid;//玻璃id |
| | | private Integer sequence;//小片在格内的顺序 |
| | | private String flow_card_id;//流程卡号 |
| | | private Integer glass_type;//玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer tempering_feed_sequence;//钢化版图片序 |
| | | private Integer state;//状态 |
| | | private Integer gap;//玻璃间隙 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_workstation`") |
| | | public class DownWorkstation { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片工位表id |
| | | private Integer flowcard_id;//工位id |
| | | private String glass_type;//流程卡号 |
| | | private Integer width;//设备id |
| | | private Integer height;//启用状态 |
| | | private Integer thickness;//工作状态 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`edg_storage_cage`") |
| | | public class EdgStorageCage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//磨边前理片笼表id |
| | | private Integer flowcard_id;//设备id |
| | | private String glass_type;//栅格号 |
| | | private String height;//启用状态 |
| | | private Integer thickness;//剩余 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`edg_storage_cage_details`") |
| | | public class EdgStorageCageDetails { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//磨边前理片笼详情表id |
| | | private Integer deviceid;//设备id |
| | | private Integer slot;//栅格号 |
| | | private Integer glassid;//玻璃id |
| | | private Integer sequence;//小片在格内的顺序 |
| | | private String flowcardid;//流程卡号 |
| | | private Integer glasstype;//玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Double edgwidth;//磨前宽 |
| | | private Double edgheight;//磨前高 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer temperingfeedsequence;//钢化版图片序 |
| | | private Integer patternsequence;//原片顺序 |
| | | private Integer state;//状态 |
| | | private Integer gap;//玻璃间隙 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import java.math.BigInteger; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`engineering`") |
| | | public class Engineering { |
| | | @TableId(type = IdType.AUTO) |
| | | private BigInteger id;//工程表id |
| | | private Integer engineerid;//工程号 |
| | | private String engineername;//工程名称 |
| | | private Double avgavailability;//平均利用率 |
| | | private Double validavailability;//有效利用率 |
| | | private Double lastavailability;//尾片利用率 |
| | | private Integer state;//状态 |
| | | private Integer glasstotal;//小片总数 |
| | | private Double glasstotalarea;//小片总面积 |
| | | private Integer planpatterntotal;//计划原片总数 |
| | | private Double planpatterntotalarea;//计划原片总面积 |
| | | private Integer realitypatterntotal;//实际原片总数 |
| | | private Double realitypatterntotalarea;//实际原片总面积 |
| | | private Integer filmsid;//膜系id |
| | | private String notes;//备注 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`glass_films`") |
| | | public class GlassFilms { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//膜系表id |
| | | private Integer films_id;//膜系id |
| | | private String films_name;//膜系 |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import java.math.BigInteger; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`glass_info`") |
| | | public class GlassInfo { |
| | | @TableId(type = IdType.AUTO) |
| | | private BigInteger id;//玻璃信息表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;//原片顺序 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer temperingfeedsequence;//钢化版图片序 |
| | | private Integer xcoordinate;//x坐标 |
| | | private Integer ycoordinate;//y坐标 |
| | | private Integer angle;//旋转角度(逆时针) |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("v_optimize_heat_layout") |
| | | public class Tempered { |
| | | private String projectno;//工程号 |
| | | private String glassthickness;//厚度 |
| | | private String glasstype;//类型 |
| | | private String loadrate;//装载率 |
| | | private String furnacesqty;//钢化炉数 |
| | | private String glasstotal;//玻璃数量 |
| | | private String glasstotalarea;//玻璃面积 |
| | | private String layoutid;//版图ID |
| | | private String layoutrate;//当前版图装载率 |
| | | private String glassqty;//当前版图玻璃数量 |
| | | private String loadwidth;//炉宽 |
| | | private String loadlength;//炉长 |
| | | private String xspace;//X间隔 |
| | | private String width;//宽 |
| | | private String height;//高 |
| | | private String yspace;//Y间隔 |
| | | private String xaxis;//坐标 |
| | | private String yaxis;//坐标 |
| | | private String rotateangle;//旋转角度 |
| | | private String processid;//流程卡 |
| | | private String id;//版图优化玻璃ID |
| | | private String glassid;//玻璃ID |
| | | private String sort;//玻璃ID |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`tempering_glass_info`") |
| | | public class Tempering { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//钢化小片信息表id |
| | | private String flowcard_id;//流程卡 |
| | | private Integer glass_type;//流程卡玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer filmsid;//膜系 |
| | | private Integer ishorizontal;//钢化是否接受横放 |
| | | private Integer tempering_layout_id;//钢化版图id |
| | | private Integer tempering_feed_sequence;//钢化版图片序 |
| | | private Integer x_coordinate;//x坐标 |
| | | private Integer y_coordinate;//y坐标 |
| | | private Integer angle;//旋转角度(逆时针) |
| | | private Integer state;//状态 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`up_patten_usage`") |
| | | public class UpPattenUsage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//原片使用情况表id |
| | | private Integer engineeringid;//工程号 |
| | | private Integer filmsid;//膜系id |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer layoutsequence;//原片版图片序 |
| | | private Integer state;//状态 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`up_workstation`") |
| | | public class UpWorkstation { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//上片工位表id |
| | | private Integer workstationid;//工位号 |
| | | private Integer deviceid;//设备id |
| | | private Integer enablestate;//启用状态 |
| | | private Integer workstate;//工作状态 |
| | | private Double patternwidth;//原片宽 |
| | | private Double patternheigth;//原片高 |
| | | private Double patternthickness;//原片厚度 |
| | | private Integer filmsid;//膜系 |
| | | private Integer number;//数量 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.entity.GlassInfo; |
| | | import com.mes.entity.OrderTest; |
| | | import com.mes.entity.Tempered; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | @Mapper |
| | | public interface SelectInfo { |
| | | //玻璃信息 按ID查询 |
| | | @Select("select * from `glass_info` where id=#{id}") |
| | | GlassInfo SelectGlassId(String id); |
| | | |
| | | //钢化按工程查询 |
| | | @Select("select * from `v_optimize_heat_layout` where project_no=#{projeceid} ") |
| | | List<Tempered> SelectTempered(String projeceid); |
| | | // |
| | | // @Insert("INSERT `order`(order_id)VALUES(#{order_id})") |
| | | // Integer insert(Order order); |
| | | // |
| | | // @Delete("delete from `order` where id=#{id}") |
| | | // Integer deleteById(@Param("id") Integer id); |
| | | // |
| | | // @Update("update `order` set order_id=#{order_id} where id=#{id}") |
| | | // Integer update(@Param("id") Integer id,@Param("order_id") String order_id); |
| | | } |
| | |
| | | |
| | | @Mapper |
| | | public interface SysMenuItemMapper { |
| | | <<<<<<< HEAD |
| | | @Select("select * from `sys_menu_item` as a where a.state=1 order by a.menuId,a.listSort;") |
| | | ======= |
| | | @Select("select * from sys_menu_item") |
| | | >>>>>>> e9b0059e5ee9551f7b9b81c9358ce3d42886ae9a |
| | | List<SysMenuItem> findAll() ; |
| | | } |
| | |
| | | List<User> findAll(); |
| | | |
| | | User findOne(Integer id); |
| | | <<<<<<< HEAD |
| | | @Select("select user_name FROM `user` where login_name=#{LoginName}") |
| | | ======= |
| | | |
| | | @Select("select user_name FROM `user` where login_name=#{LoginName} ") |
| | | >>>>>>> e9b0059e5ee9551f7b9b81c9358ce3d42886ae9a |
| | | User findOneLoginName(String LoginName); |
| | | |
| | | @Select("select count(id) FROM `user` where login_name=#{userName} and password=#{password} ") |
| | | int checkUser(@Param("userName") String userName,@Param("password") String password); |
| | | |
New file |
| | |
| | | package com.mes.service.CacheGlassService; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.mes.common.PlcTools.S7control; |
| | | import com.mes.entity.GlassInfo; |
| | | import com.mes.mapper.SelectInfo; |
| | | |
| | | |
| | | @Service |
| | | public class Logic { |
| | | @Autowired |
| | | private SelectInfo selectInfo; |
| | | //识别逻辑 |
| | | public void identify(String Number){ |
| | | //查询任务 |
| | | // PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | boolean isexist=isExist(Number); |
| | | if (isexist) { |
| | | //存在逻辑 1.添加信息 2.回复PLC存在 |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | }else { |
| | | //不存在逻辑 1.回复PLC不存在 |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 2); |
| | | } |
| | | } |
| | | //理片 进 |
| | | public void process(String imagePath){ |
| | | //查询消息队列里的玻璃 |
| | | |
| | | //返回结果 |
| | | } |
| | | //理片 出 |
| | | public void processOut(String imagePath){ |
| | | //查询任务 |
| | | |
| | | //返回结果 |
| | | } |
| | | //磨边 |
| | | public void processMb(String imagePath){ |
| | | //查询任务 |
| | | |
| | | //返回结果 |
| | | } |
| | | |
| | | //查询消息队列里此玻璃ID的数据 |
| | | public boolean SelectMessageId(String Number){ |
| | | //查询是否存在 |
| | | GlassInfo GlassInfo=selectInfo.SelectGlassId(Number); |
| | | if(GlassInfo==null){ |
| | | return false;//返回 不存在 |
| | | } |
| | | return true;//返回 存在 |
| | | } |
| | | //删除消息队列里此玻璃ID的数据 |
| | | public boolean DeleteMessageId(String Number){ |
| | | //查询是否存在 |
| | | GlassInfo GlassInfo=selectInfo.SelectGlassId(Number); |
| | | if(GlassInfo==null){ |
| | | return false;//返回 不存在 |
| | | } |
| | | return true;//返回 存在 |
| | | } |
| | | //是否存在此编号玻璃 |
| | | public boolean isExist(String Number){ |
| | | //查询是否存在 |
| | | GlassInfo GlassInfo=selectInfo.SelectGlassId(Number); |
| | | if(GlassInfo==null){ |
| | | return false;//返回 不存在 |
| | | } |
| | | return true;//返回 存在 |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.service; |
| | | |
| | | import com.rabbitmq.client.Channel; |
| | | import com.rabbitmq.client.Connection; |
| | | import com.rabbitmq.client.ConnectionFactory; |
| | | import com.rabbitmq.client.DeliverCallback; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | public class ModuleB { |
| | | private final static String QUEUE_NAME = "hangzhou2"; |
| | | |
| | | public static void main(String[] argv) throws Exception { |
| | | // 创建连接工厂 |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost("10.153.19.150"); |
| | | //factory.setHost("localhost"); |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | // 声明队列 |
| | | Map<String, Object> args = new HashMap<>(); |
| | | args.put("x-max-length-bytes",20000); |
| | | // args.put("x-max-length",5000); |
| | | channel.queueDeclare(QUEUE_NAME, false, false, false, args); |
| | | |
| | | // 创建消费者 |
| | | DeliverCallback deliverCallback = (consumerTag, delivery) -> { |
| | | String receivedMessage = new String(delivery.getBody(), "UTF-8"); |
| | | System.out.println(" [x] Received '" + receivedMessage + "'"); |
| | | }; |
| | | // 开始消费消息 |
| | | channel.basicConsume(QUEUE_NAME, true, deliverCallback, consumerTag -> { |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.service; |
| | | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Service |
| | | public class MqMessage { |
| | | @Autowired |
| | | private RabbitMQUtils rabbitMQUtils; |
| | | |
| | | public boolean Add(String message, String queueName,String messageId){ |
| | | try { |
| | | return rabbitMQUtils.sendMessageWithId(message, queueName,messageId); |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | return false;//异常时错误 |
| | | } |
| | | } |
| | | //根据ID查找消息 |
| | | public String SelectId(String queueName,boolean isDelete,String messageId){ |
| | | |
| | | try { |
| | | String content=rabbitMQUtils.consumeMessageById(messageId,queueName,isDelete); |
| | | |
| | | return content; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | return null;//异常时错误 |
| | | } |
| | | } |
| | | public boolean Delete(String queueName,String messageId){ |
| | | try |
| | | { |
| | | rabbitMQUtils.consumeMessageById(messageId,queueName,false); |
| | | return true; |
| | | }catch(Exception e){ |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | //无修改 |
| | | public void Update(){ |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.service; |
| | | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.rabbitmq.client.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.ArrayBlockingQueue; |
| | | import java.util.concurrent.BlockingQueue; |
| | | |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Repository |
| | | public class RabbitMQUtils { |
| | | // ObjectMapper对象,用于序列化和反序列化JSON |
| | | private static ObjectMapper objectMapper = new ObjectMapper(); |
| | | private static String host = "10.153.19.150"; // RabbitMQ 主机名 |
| | | private static Map<String, Object> args = new HashMap<>(); // 队列参数 |
| | | |
| | | static { |
| | | // 设置队列参数 |
| | | args.put("x-max-length-bytes", 1024 * 1024); |
| | | } |
| | | |
| | | // private static Map<String, Object> args = new HashMap<>(); |
| | | // args.put("x-max-length-bytes",1024 * 1024); |
| | | // 发送消息到 RabbitMQ 队列中 |
| | | public String sendMessage(String message, String queueName) throws Exception { |
| | | // 创建连接工厂并设置主机名 |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | |
| | | // 使用 try-with-resources 语句创建连接和通道,并发送消息 |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | // 声明队列 |
| | | channel.queueDeclare(queueName, false, false, false, args); |
| | | |
| | | // 发布消息到队列 |
| | | channel.basicPublish("", queueName, null, message.getBytes("UTF-8")); |
| | | System.out.println(" [x] Sent '" + message + "' to queue '" + queueName + "'"); |
| | | } |
| | | |
| | | return message; |
| | | } |
| | | |
| | | |
| | | // 从 RabbitMQ 队列中接收消息 |
| | | public String receiveMessage(String queueName) throws Exception { |
| | | // 创建连接工厂并设置主机名 |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | |
| | | // 创建阻塞队列 |
| | | BlockingQueue<String> messageQueue = new ArrayBlockingQueue<>(1); |
| | | |
| | | // 使用 try-with-resources 语句创建连接和通道,并接收消息 |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | // 声明队列 |
| | | channel.queueDeclare(queueName, false, false, false, args); |
| | | |
| | | // 设置消息接收回调 |
| | | DeliverCallback deliverCallback = (consumerTag, delivery) -> { |
| | | String receivedMessage = new String(delivery.getBody(), "UTF-8"); |
| | | // System.out.println(" [x] Received '" + receivedMessage + "'"); |
| | | |
| | | // 将接收到的消息放入阻塞队列 |
| | | try { |
| | | messageQueue.put(receivedMessage); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }; |
| | | |
| | | // 消费队列中的消息 |
| | | channel.basicConsume(queueName, true, deliverCallback, consumerTag -> { |
| | | |
| | | }); |
| | | |
| | | // 阻塞并等待获取消息 |
| | | return messageQueue.take(); |
| | | } |
| | | } |
| | | |
| | | |
| | | //获取消息 并消费? |
| | | public List<String> readMessage(String queueName,boolean is) throws Exception { |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | List<String> messages = new ArrayList<>(); |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | boolean autoAck = false; |
| | | |
| | | GetResponse response = channel.basicGet(queueName, autoAck); |
| | | if (response != null) { |
| | | String message = new String(response.getBody(), "UTF-8"); |
| | | messages.add(message); |
| | | // 手动确认消息处理完成 |
| | | if(is){ |
| | | long deliveryTag = response.getEnvelope().getDeliveryTag(); |
| | | channel.basicAck(deliveryTag, false); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | return messages; |
| | | } |
| | | |
| | | |
| | | |
| | | private static Set<String> sentMessageIds = new HashSet<>(); |
| | | //根据id发送消息 |
| | | public boolean sendMessageWithId(String queueName, String message, String messageId) throws Exception { |
| | | if (sentMessageIds.contains(messageId)) { |
| | | System.err.println("Message with ID " + messageId + " has already been sent."); |
| | | return false; // 消息重复,发送失败 |
| | | } |
| | | |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | |
| | | try (Connection connection = factory.newConnection(); Channel channel = connection.createChannel()) { |
| | | channel.queueDeclare(queueName, false, false, false, args); |
| | | |
| | | AMQP.BasicProperties properties = new AMQP.BasicProperties.Builder() |
| | | .messageId(messageId) |
| | | .build(); |
| | | |
| | | channel.basicPublish("", queueName, properties, message.getBytes("UTF-8")); |
| | | System.out.println("Sent message with ID: " + messageId); |
| | | |
| | | sentMessageIds.add(messageId); // 将 messageId 添加到已发送集合中 |
| | | |
| | | return true; // 消息成功发送 |
| | | } catch (Exception e) { |
| | | System.err.println("Failed to send message: " + e.getMessage()); |
| | | return false; // 消息发送失败 |
| | | } |
| | | } |
| | | //根据id查找消息 是否删除 |
| | | public String consumeMessageById(String messageId,String queueName,boolean isDelete) throws Exception { |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | |
| | | try (Connection connection = factory.newConnection(); Channel channel = connection.createChannel()) { |
| | | channel.queueDeclare(queueName, false, false, false, args); |
| | | |
| | | GetResponse response; |
| | | while ((response = channel.basicGet(queueName, false)) != null) { |
| | | String receivedMessage = new String(response.getBody(), "UTF-8"); |
| | | if (response.getProps().getMessageId().equals(messageId)) { |
| | | if(isDelete){ |
| | | long deliveryTag = response.getEnvelope().getDeliveryTag(); |
| | | channel.basicAck(deliveryTag, false); |
| | | } |
| | | System.out.println("Selected message: "+messageId+ receivedMessage); |
| | | return receivedMessage; // 返回选定的消息内容 |
| | | } else { |
| | | // 对于不符合条件的消息,进行 Nack 操作 |
| | | // long deliveryTag = response.getEnvelope().getDeliveryTag(); |
| | | // channel.basicNack(deliveryTag, false, true); |
| | | return "Specified message not found in the queue."; |
| | | } |
| | | } |
| | | |
| | | return "Specified message not found in the queue."; |
| | | } |
| | | } |
| | | |
| | | // //消费指定消息 |
| | | // public String consumeSelectedMessage(int messageToConsume, String queueName) throws Exception { |
| | | // ConnectionFactory factory = new ConnectionFactory(); |
| | | // factory.setHost(host); |
| | | |
| | | // try (Connection connection = factory.newConnection(); Channel channel = connection.createChannel()) { |
| | | // channel.queueDeclare(queueName, false, false, false, args); |
| | | |
| | | // for (int i = 0; i < messageToConsume; i++) { |
| | | // GetResponse response = channel.basicGet(queueName, false); |
| | | // if (response == null) { |
| | | // return "Queue does not have enough messages."; |
| | | // } |
| | | // // long deliveryTag = response.getEnvelope().getDeliveryTag(); |
| | | // // channel.basicAck(deliveryTag, false); |
| | | // } |
| | | |
| | | // GetResponse selectedResponse = channel.basicGet(queueName, false); |
| | | // if (selectedResponse != null) { |
| | | // byte[] body = selectedResponse.getBody(); |
| | | // String selectedMessage = new String(body, "UTF-8"); |
| | | // long deliveryTag = selectedResponse.getEnvelope().getDeliveryTag(); |
| | | // channel.basicAck(deliveryTag, false); |
| | | // return selectedMessage; |
| | | // } else { |
| | | // return "Specified message not found in the queue."; |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // 发送 JSON 消息到队列 |
| | | public boolean sendJsonMessage(Object message, String queueName) throws Exception { |
| | | // 创建连接工厂并设置主机名 |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | |
| | | // 使用 try-with-resources 语句创建连接和通道,并发送 JSON 消息 |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | // 声明队列 |
| | | channel.queueDeclare(queueName, false, false, false, args); |
| | | |
| | | // 将对象转换为 JSON 字符串 |
| | | String jsonMessage = objectMapper.writeValueAsString(message); |
| | | |
| | | // 发布 JSON 消息到队列 |
| | | channel.basicPublish("", queueName, null, jsonMessage.getBytes()); |
| | | System.out.println(" [x] Sent JSON message: '" + jsonMessage + "' to queue '" + queueName + "'"); |
| | | |
| | | return true; // 发送消息成功 |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; // 发送消息失败 |
| | | } |
| | | } |
| | | |
| | | // 接收 JSON 消息并转换为对象 |
| | | public <T> T receiveJsonMessage(Class<T> valueType, String queueName) throws Exception { |
| | | // 创建连接工厂并设置主机名 |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | |
| | | // 使用 try-with-resources 语句创建连接和通道,并接收 JSON 消息 |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | // 声明队列 |
| | | channel.queueDeclare(queueName, false, false, false, args); |
| | | |
| | | // 获取队列中的消息 |
| | | GetResponse response = channel.basicGet(queueName, true); |
| | | if (response != null) { |
| | | byte[] body = response.getBody(); |
| | | String jsonMessage = new String(body, "UTF-8"); |
| | | System.out.println(" [x] Received JSON message: '" + jsonMessage + "' from queue '" + queueName + "'"); |
| | | |
| | | // 将 JSON 消息转换为对象 |
| | | return objectMapper.readValue(jsonMessage, valueType); |
| | | } else { |
| | | return null; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return null; // 接收消息失败 |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // RabbitMQUtils.sendMessage("Hello, world!", "module_queue"); |
| | | //RabbitMQUtils.receiveMessage("module_queue"); |
| | | //RabbitMQUtils.sendJsonMessage(someObject, "another_queue"); |
| | | //RabbitMQUtils.receiveJsonMessage(SomeClass.class, "another_queue"); |
| | | // 需要将 someObject 替换为你要发送的对象,并将 SomeClass 替换为你要接收并转换的对象类型。 |
New file |
| | |
| | | package com.mes.service; |
| | | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.rabbitmq.client.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.ArrayBlockingQueue; |
| | | import java.util.concurrent.BlockingQueue; |
| | | |
| | | public class RabbitMQUtils33 { |
| | | // ObjectMapper对象,用于序列化和反序列化JSON |
| | | private static ObjectMapper objectMapper = new ObjectMapper(); |
| | | private static String host = "10.153.19.150"; // RabbitMQ 主机名 |
| | | private static Map<String, Object> args = new HashMap<>(); // 队列参数 |
| | | |
| | | static { |
| | | // 设置队列参数 |
| | | args.put("x-max-length-bytes", 1024 * 1024); |
| | | } |
| | | |
| | | // private static Map<String, Object> args = new HashMap<>(); |
| | | // args.put("x-max-length-bytes",1024 * 1024); |
| | | // 发送消息到 RabbitMQ 队列中 |
| | | public boolean sendMessage(String message, String queueName) throws Exception { |
| | | // 创建连接工厂并设置主机名 |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | |
| | | // 使用 try-with-resources 语句创建连接和通道,并发送消息 |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | // 声明队列 |
| | | channel.queueDeclare(queueName, false, false, false, args); |
| | | |
| | | // 发布消息到队列 |
| | | channel.basicPublish("", queueName, null, message.getBytes("UTF-8")); |
| | | System.out.println(" [x] Sent '" + message + "' to queue '" + queueName + "'"); |
| | | return true; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | // 从 RabbitMQ 队列中接收消息 |
| | | public String receiveMessage(String queueName) throws Exception { |
| | | // 创建连接工厂并设置主机名 |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | |
| | | // 创建阻塞队列 |
| | | BlockingQueue<String> messageQueue = new ArrayBlockingQueue<>(1); |
| | | |
| | | // 使用 try-with-resources 语句创建连接和通道,并接收消息 |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | // 声明队列 |
| | | channel.queueDeclare(queueName, false, false, false, args); |
| | | |
| | | // 设置消息接收回调 |
| | | DeliverCallback deliverCallback = (consumerTag, delivery) -> { |
| | | String receivedMessage = new String(delivery.getBody(), "UTF-8"); |
| | | // System.out.println(" [x] Received '" + receivedMessage + "'"); |
| | | |
| | | // 将接收到的消息放入阻塞队列 |
| | | try { |
| | | messageQueue.put(receivedMessage); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }; |
| | | |
| | | // 消费队列中的消息 |
| | | channel.basicConsume(queueName, true, deliverCallback, consumerTag -> { |
| | | |
| | | }); |
| | | |
| | | // 阻塞并等待获取消息 |
| | | return messageQueue.take(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public List<String> readMessage(String queueName,boolean isDelete) throws Exception { |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | List<String> messages = new ArrayList<>(); |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | boolean autoAck = false; |
| | | |
| | | GetResponse response = channel.basicGet(queueName, autoAck); |
| | | if (response != null) { |
| | | String message = new String(response.getBody(), "UTF-8"); |
| | | messages.add(message); |
| | | |
| | | |
| | | // 手动确认消息处理完成 |
| | | if (isDelete) { |
| | | long deliveryTag = response.getEnvelope().getDeliveryTag(); |
| | | channel.basicAck(deliveryTag, false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return messages; |
| | | } |
| | | |
| | | // 发送 JSON 消息到队列 |
| | | public static boolean sendJsonMessage(Object message, String queueName) throws Exception { |
| | | // 创建连接工厂并设置主机名 |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | |
| | | // 使用 try-with-resources 语句创建连接和通道,并发送 JSON 消息 |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | // 声明队列 |
| | | channel.queueDeclare(queueName, false, false, false, args); |
| | | |
| | | // 将对象转换为 JSON 字符串 |
| | | String jsonMessage = objectMapper.writeValueAsString(message); |
| | | |
| | | // 发布 JSON 消息到队列 |
| | | channel.basicPublish("", queueName, null, jsonMessage.getBytes()); |
| | | System.out.println(" [x] Sent JSON message: '" + jsonMessage + "' to queue '" + queueName + "'"); |
| | | |
| | | return true; // 发送消息成功 |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; // 发送消息失败 |
| | | } |
| | | } |
| | | |
| | | // 接收 JSON 消息并转换为对象 |
| | | public static <T> T receiveJsonMessage(Class<T> valueType, String queueName) throws Exception { |
| | | // 创建连接工厂并设置主机名 |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost(host); |
| | | |
| | | // 使用 try-with-resources 语句创建连接和通道,并接收 JSON 消息 |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | // 声明队列 |
| | | channel.queueDeclare(queueName, false, false, false, args); |
| | | |
| | | // 获取队列中的消息 |
| | | GetResponse response = channel.basicGet(queueName, true); |
| | | if (response != null) { |
| | | byte[] body = response.getBody(); |
| | | String jsonMessage = new String(body, "UTF-8"); |
| | | System.out.println(" [x] Received JSON message: '" + jsonMessage + "' from queue '" + queueName + "'"); |
| | | |
| | | // 将 JSON 消息转换为对象 |
| | | return objectMapper.readValue(jsonMessage, valueType); |
| | | } else { |
| | | return null; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return null; // 接收消息失败 |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // RabbitMQUtils.sendMessage("Hello, world!", "module_queue"); |
| | | //RabbitMQUtils.receiveMessage("module_queue"); |
| | | //RabbitMQUtils.sendJsonMessage(someObject, "another_queue"); |
| | | //RabbitMQUtils.receiveJsonMessage(SomeClass.class, "another_queue"); |
| | | // 需要将 someObject 替换为你要发送的对象,并将 SomeClass 替换为你要接收并转换的对象类型。 |
New file |
| | |
| | | package com.mes.service.pp; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.mes.common.CacheUtil; |
| | | import com.mes.common.Result; |
| | | import com.mes.entity.GlassInfo; |
| | | import com.mes.entity.Tempered; |
| | | import com.mes.entity.userInfo.User; |
| | | import com.mes.mapper.SelectInfo; |
| | | import com.mes.mapper.userInfo.UserMapper; |
| | | import com.mes.controller.dto.UserDTO; |
| | | import com.mes.tools.TokenTools; |
| | | import org.apache.ibatis.jdbc.Null; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @DS("pp") |
| | | public class SelectdppService { |
| | | |
| | | @Autowired |
| | | private SelectInfo SelectInfo; |
| | | |
| | | public GlassInfo getUserInfo(String process_id){ |
| | | return SelectInfo.SelectGlassId(process_id); |
| | | } |
| | | |
| | | public List<Tempered> getSelectTempered(String process_id){ |
| | | return SelectInfo.SelectTempered(process_id); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | <<<<<<< HEAD |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | ======= |
| | | primary: user_info #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | user_info: |
| | | url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | mm: |
| | | url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | >>>>>>> e9b0059e5ee9551f7b9b81c9358ce3d42886ae9a |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
New file |
| | |
| | | { |
| | | "CurrentProjectSetting": null |
| | | } |
New file |
| | |
| | | { |
| | | "ExpandedNodes": [ |
| | | "" |
| | | ], |
| | | "PreviewInSolutionExplorer": false |
| | | } |
New file |
| | |
| | | package com.mes.common; |
| | | |
| | | import com.mes.common.PlcTools.S7control; |
| | | import com.mes.entity.BigStorageCage; |
| | | import com.mes.entity.BigStorageCageDetails; |
| | | import com.mes.service.BigStorageCageService; |
| | | |
| | | public class PlcStorageCage extends Thread { |
| | | private BigStorageCageService bigStorageCageService; |
| | | private S7control s7control; |
| | | public void run() { |
| | | try { |
| | | Thread.sleep(1000); |
| | | String glassid="11111"; |
| | | String tempering_layout_id="123"; |
| | | String tempering_feed_sequence="123"; |
| | | |
| | | //识别台 |
| | | //获取识别台请求 |
| | | //根据请求的玻璃id从消息空间站获取玻璃信息 |
| | | |
| | | //检测识别台是否有玻璃 |
| | | //有:允许清洗机出片信号关闭 |
| | | //无:允许清洗机出片信息开启 |
| | | |
| | | //获取进片请求 |
| | | //有请求时 |
| | | //获取请求的玻璃id |
| | | //根据玻璃id获取玻璃信息判断是否与消息队列一致 |
| | | //不一致:标记玻璃为破损 |
| | | //一致: |
| | | //获取笼内进片侧相同同钢化版图的玻璃片序+1等于当前玻璃id钢化片序的格子 |
| | | |
| | | //将消息队列的信息放入实例中 |
| | | BigStorageCageDetails bigStorageCageDetails=new BigStorageCageDetails(); |
| | | |
| | | bigStorageCageDetails.setGlassId("1111"); |
| | | bigStorageCageDetails.setTemperingLayoutId(123); |
| | | bigStorageCageDetails.setTemperingFeedSequence(3); |
| | | BigStorageCageDetails SlotInfo=bigStorageCageService.FeedGlass(bigStorageCageDetails); |
| | | |
| | | //发送给plc |
| | | |
| | | //出片请求 |
| | | //获取当前 |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | // TODO Auto-generated method stub |
| | | // |
| | | System.out.println("启动完成"); |
| | | System.out.println("启动完成2"); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * big_storage_cage大理片笼表实体类 |
| | | */ |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("big_storage_cage") |
| | | public class BigStorageCage { |
| | | |
| | | /** |
| | | * 主键,自动递增 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 设备id |
| | | */ |
| | | private Integer deviceId; |
| | | |
| | | /** |
| | | * 栅格号 |
| | | */ |
| | | private String slot; |
| | | |
| | | /** |
| | | * 启用状态 |
| | | */ |
| | | private String enableState; |
| | | |
| | | /** |
| | | * 剩余宽度 |
| | | */ |
| | | private Integer remainWidth; |
| | | |
| | | /** |
| | | * 理片笼详情 |
| | | */ |
| | | private BigStorageCageDetails bigStorageCageDetail; |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * big_storage_cage_details大理片笼详情表实体类 |
| | | */ |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("big_storage_cage_details") |
| | | public class BigStorageCageDetails { |
| | | /** |
| | | * 表主键,自动递增 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 设备id |
| | | */ |
| | | private Integer deviceId; |
| | | |
| | | /** |
| | | * 栅格号 |
| | | */ |
| | | private Integer slot; |
| | | |
| | | /** |
| | | * 玻璃id |
| | | */ |
| | | private String glassId; |
| | | |
| | | /** |
| | | * 小片在格内的顺序 |
| | | */ |
| | | private Integer sequence; |
| | | |
| | | /** |
| | | * 流程卡号 |
| | | */ |
| | | private String flowCardId; |
| | | |
| | | /** |
| | | * 玻璃类型 |
| | | */ |
| | | private Integer glassType; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * 高 |
| | | */ |
| | | private Double height; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private Double thickness; |
| | | |
| | | /** |
| | | * 钢化版图id |
| | | */ |
| | | private Integer temperingLayoutId; |
| | | |
| | | /** |
| | | * 钢化版图片序 |
| | | */ |
| | | private Integer temperingFeedSequence; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 玻璃间隙 |
| | | */ |
| | | private Integer gap; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.repository.CrudRepository; |
| | | |
| | | import com.mes.entity.BigStorageCage; |
| | | import com.mes.entity.BigStorageCageDetails; |
| | | |
| | | @Mapper |
| | | public interface BigStorageCageMapper extends CrudRepository<BigStorageCage,Long>{ |
| | | // public class BigStorageCageMapper { |
| | | |
| | | BigStorageCageDetails SelectTemperingFeedSlot(@Param("bigStorageCageDetails") BigStorageCageDetails bigStorageCageDetails); |
| | | |
| | | BigStorageCageDetails SelectEmptyFeedSlot(); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | User findOne(Integer id); |
| | | |
| | | @Select("select user_name FROM `user` where login_name=#{LoginName} ") |
| | | User findOneLoginName(String LoginName); |
| | | |
| | | @Select("select count(id) FROM `user` where login_name=#{userName} and password=#{password} ") |
| | | int checkUser(@Param("userName") String userName,@Param("password") String password); |
| | | |
New file |
| | |
| | | package com.mes.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.mes.entity.*; |
| | | import com.mes.mapper.BigStorageCageMapper; |
| | | |
| | | @Service |
| | | public class BigStorageCageService { |
| | | |
| | | // private BigStorageCageMapper bigStorageCageMapper; |
| | | |
| | | // // 获取玻璃存放格子 |
| | | // public BigStorageCageDetails FeedGlass(BigStorageCageDetails bigStorageCageDetails) { |
| | | // //获取同钢化版图id可进片的格子 |
| | | // BigStorageCageDetails LayoutSlotInfo=bigStorageCageMapper.SelectTemperingFeedSlot(bigStorageCageDetails); |
| | | // //有符合条件的格子时 |
| | | // if (LayoutSlotInfo!=null) { |
| | | // //将玻璃信息填入理片笼详情表 |
| | | // bigStorageCageDetails.setSlot(LayoutSlotInfo.getSlot()); |
| | | // }else{ |
| | | // //获取不到时: |
| | | |
| | | // //获取可进片格子信息 |
| | | // BigStorageCageDetails EmptySlotInfo=bigStorageCageMapper.SelectEmptyFeedSlot(); |
| | | // bigStorageCageDetails.setSlot(EmptySlotInfo.getSlot()); |
| | | // //获取其他笼格子 |
| | | |
| | | // //将玻璃信息放入该格子 |
| | | |
| | | // } |
| | | |
| | | // UpdateRemainWidth(bigStorageCageDetails.getSlot()); |
| | | // return bigStorageCageDetails; |
| | | // } |
| | | |
| | | // //修改格子剩余宽度 |
| | | // private void UpdateRemainWidth(int Slot){ |
| | | // //获取该格子内玻璃信息 |
| | | |
| | | // //修改格子剩余宽度 |
| | | // BigStorageCageMapper.UpdateRemainWidth(Slot); |
| | | // } |
| | | |
| | | |
| | | } |
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.example.mess.mapper.BigStorageCageMapper"> |
| | | <!-- <resultMap id="BigStorageCage" type="com.example.mes.entity.BigStorageCage" > |
| | | <id column="id" property="id"/> |
| | | <result column="device_id" property="deviceId"/> |
| | | <result column="slot" property="slot"/> |
| | | <result column="enable_state" property="enableState"/> |
| | | <result column="remain_width" property="remainWidth"/> |
| | | |
| | | <result column="glass_id" property="bigStorageCageDetail.glassId"/> |
| | | <result column="sequence" property="bigStorageCageDetail.sequence"/> |
| | | <result column="flow_card_id" property="bigStorageCageDetail.flowCardId"/> |
| | | <result column="glass_type" property="bigStorageCageDetail.glassType"/> |
| | | <result column="width" property="bigStorageCageDetail.width"/> |
| | | <result column="height" property="bigStorageCageDetail.height"/> |
| | | <result column="thickness" property="bigStorageCageDetail.thickness"/> |
| | | <result column="tempering_layout_id" property="bigStorageCageDetail.temperingLayoutId"/> |
| | | <result column="tempering_feed_sequence" property="bigStorageCageDetail.temperingFeedSequence"/> |
| | | <result column="state" property="bigStorageCageDetail.state"/> |
| | | <result column="gap" property="bigStorageCageDetail.gap"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="BigStorageCageDetails" type="com.example.mes.entity.BigStorageCageDetails" > |
| | | <id column="id" property="id"/> |
| | | <result column="device_id" property="deviceId"/> |
| | | <result column="slot" property="slot"/> |
| | | <result column="glass_id" property="glassId"/> |
| | | <result column="sequence" property="sequence"/> |
| | | <result column="flow_card_id" property="flowCardId"/> |
| | | <result column="glass_type" property="glassType"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="thickness" property="thickness"/> |
| | | <result column="tempering_layout_id" property="temperingLayoutId"/> |
| | | <result column="tempering_feed_sequence" property="temperingFeedSequence"/> |
| | | <result column="state" property="state"/> |
| | | <result column="gap" property="gap"/> |
| | | </resultMap> |
| | | |
| | | <select id="SelectTemperingFeedSlot" resultMap="BigStorageCageDetails"> |
| | | select * from big_storage_cage bsc inner join big_storage_cage_details as bscd on bsc.slot=bscd.slot |
| | | <where> |
| | | and bscd.id=(select id from big_storage_cage_details where slot=bscd.slot |
| | | and tempering_feed_sequence=#{bigStorageCageDetails.temperingFeedSequence}-1 |
| | | and bsc.remain_width>#{bigStorageCageDetails.width} |
| | | ORDER BY sequence desc LIMIT 1) |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="SelectStorageCageSummary" resultMap="BigStorageCageDetails"> |
| | | select min(case when bsc.remain_width=5000 then bsc.id else null end ) as id,bsc.device_id, |
| | | min(case when bsc.remain_width=5000 then bsc.slot else null end ) as slot, |
| | | count(distinct bscd.tempering_layout_id) as tempering_layout_ids |
| | | from big_storage_cage bsc left join big_storage_cage_details bscd on bsc.slot=bscd.slot |
| | | <where> |
| | | and bsc.enable_state=0 |
| | | </where> |
| | | group by bsc.device_id |
| | | order by tempering_layout_ids,bsc.device_id limit 1 |
| | | </select> --> |
| | | |
| | | </mapper> |
New file |
| | |
| | | |
| | | server: |
| | | port: 8080 |
| | | servlet: |
| | | context-path: /mesModuleTools |
| | | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: user_info #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | user_info: |
| | | url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | mm: |
| | | url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
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.example.mess.mapper.BigStorageCageMapper"> |
| | | <!-- <resultMap id="BigStorageCage" type="com.example.mes.entity.BigStorageCage" > |
| | | <id column="id" property="id"/> |
| | | <result column="device_id" property="deviceId"/> |
| | | <result column="slot" property="slot"/> |
| | | <result column="enable_state" property="enableState"/> |
| | | <result column="remain_width" property="remainWidth"/> |
| | | |
| | | <result column="glass_id" property="bigStorageCageDetail.glassId"/> |
| | | <result column="sequence" property="bigStorageCageDetail.sequence"/> |
| | | <result column="flow_card_id" property="bigStorageCageDetail.flowCardId"/> |
| | | <result column="glass_type" property="bigStorageCageDetail.glassType"/> |
| | | <result column="width" property="bigStorageCageDetail.width"/> |
| | | <result column="height" property="bigStorageCageDetail.height"/> |
| | | <result column="thickness" property="bigStorageCageDetail.thickness"/> |
| | | <result column="tempering_layout_id" property="bigStorageCageDetail.temperingLayoutId"/> |
| | | <result column="tempering_feed_sequence" property="bigStorageCageDetail.temperingFeedSequence"/> |
| | | <result column="state" property="bigStorageCageDetail.state"/> |
| | | <result column="gap" property="bigStorageCageDetail.gap"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="BigStorageCageDetails" type="com.example.mes.entity.BigStorageCageDetails" > |
| | | <id column="id" property="id"/> |
| | | <result column="device_id" property="deviceId"/> |
| | | <result column="slot" property="slot"/> |
| | | <result column="glass_id" property="glassId"/> |
| | | <result column="sequence" property="sequence"/> |
| | | <result column="flow_card_id" property="flowCardId"/> |
| | | <result column="glass_type" property="glassType"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="thickness" property="thickness"/> |
| | | <result column="tempering_layout_id" property="temperingLayoutId"/> |
| | | <result column="tempering_feed_sequence" property="temperingFeedSequence"/> |
| | | <result column="state" property="state"/> |
| | | <result column="gap" property="gap"/> |
| | | </resultMap> |
| | | |
| | | <select id="SelectTemperingFeedSlot" resultMap="BigStorageCageDetails"> |
| | | select * from big_storage_cage bsc inner join big_storage_cage_details as bscd on bsc.slot=bscd.slot |
| | | <where> |
| | | and bscd.id=(select id from big_storage_cage_details where slot=bscd.slot |
| | | and tempering_feed_sequence=#{bigStorageCageDetails.temperingFeedSequence}-1 |
| | | and bsc.remain_width>#{bigStorageCageDetails.width} |
| | | ORDER BY sequence desc LIMIT 1) |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="SelectStorageCageSummary" resultMap="BigStorageCageDetails"> |
| | | select min(case when bsc.remain_width=5000 then bsc.id else null end ) as id,bsc.device_id, |
| | | min(case when bsc.remain_width=5000 then bsc.slot else null end ) as slot, |
| | | count(distinct bscd.tempering_layout_id) as tempering_layout_ids |
| | | from big_storage_cage bsc left join big_storage_cage_details bscd on bsc.slot=bscd.slot |
| | | <where> |
| | | and bsc.enable_state=0 |
| | | </where> |
| | | group by bsc.device_id |
| | | order by tempering_layout_ids,bsc.device_id limit 1 |
| | | </select> --> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`big_storage_cage`") |
| | | public class BigStorageCage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//大理片笼表id |
| | | private Integer device_id;//设备id |
| | | private Integer slot;//栅格号 |
| | | private String enable_state;//启用状态 |
| | | private Integer remain_width;//剩余宽度 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`big_storage_cage_details`") |
| | | public class BigStorageCageDetails { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//大理片笼详情表id |
| | | private Integer deviceid;//设备id |
| | | private Integer slot;//栅格号 |
| | | private Integer glassid;//玻璃id |
| | | private Integer sequence;//小片在格内的顺序 |
| | | private String flowcardid;//流程卡号 |
| | | private Integer glasstype;//玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer temperingfeedsequence;//钢化版图片序 |
| | | private Integer state;//状态 |
| | | private Integer gap;//玻璃间隙 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_glass_info`") |
| | | public class DownGlassInfo { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片玻璃信息表id |
| | | private String flowcardid;//流程卡号 |
| | | private Integer sequence;//顺序 |
| | | private Integer width;//宽 |
| | | private Integer height;//高 |
| | | private Integer thickness;//厚度 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_storage_cage`") |
| | | public class DownStorageCage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片前理片笼表id |
| | | private Integer deviceid;//设备id |
| | | private Integer slot;//栅格号 |
| | | private String enablestate;//启用状态 |
| | | private Integer remainwidth;//剩余 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_storage_cage_details`") |
| | | public class DownStorageCagedetails { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片前理片笼明细表id |
| | | private Integer deviceid;//设备id |
| | | private Integer slot;//栅格号 |
| | | private Integer glassid;//玻璃id |
| | | private Integer sequence;//小片在格内的顺序 |
| | | private String flow_card_id;//流程卡号 |
| | | private Integer glass_type;//玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer tempering_feed_sequence;//钢化版图片序 |
| | | private Integer state;//状态 |
| | | private Integer gap;//玻璃间隙 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_workstation`") |
| | | public class DownWorkstation { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片工位表id |
| | | private Integer flowcard_id;//工位id |
| | | private String glass_type;//流程卡号 |
| | | private Integer width;//设备id |
| | | private Integer height;//启用状态 |
| | | private Integer thickness;//工作状态 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`edg_storage_cage`") |
| | | public class EdgStorageCage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//磨边前理片笼表id |
| | | private Integer flowcard_id;//设备id |
| | | private Integer glass_type;//栅格号 |
| | | private String height;//启用状态 |
| | | private Integer thickness;//剩余 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`edg_storage_cage_details`") |
| | | public class EdgStorageCageDetails { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//磨边前理片笼详情表id |
| | | private Integer deviceid;//设备id |
| | | private Integer slot;//栅格号 |
| | | private Integer glassid;//玻璃id |
| | | private Integer sequence;//小片在格内的顺序 |
| | | private String flowcardid;//流程卡号 |
| | | private Integer glasstype;//玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Double edgwidth;//磨前宽 |
| | | private Double edgheight;//磨前高 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer temperingfeedsequence;//钢化版图片序 |
| | | private Integer patternsequence;//原片顺序 |
| | | private Integer state;//状态 |
| | | private Integer gap;//玻璃间隙 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import java.math.BigInteger; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`engineering`") |
| | | public class Engineering { |
| | | @TableId(type = IdType.AUTO) |
| | | private BigInteger id;//工程表id |
| | | private Integer engineerid;//工程号 |
| | | private String engineername;//工程名称 |
| | | private Double avgavailability;//平均利用率 |
| | | private Double validavailability;//有效利用率 |
| | | private Double lastavailability;//尾片利用率 |
| | | private Integer state;//状态 |
| | | private Integer glasstotal;//小片总数 |
| | | private Double glasstotalarea;//小片总面积 |
| | | private Integer planpatterntotal;//计划原片总数 |
| | | private Double planpatterntotalarea;//计划原片总面积 |
| | | private Integer realitypatterntotal;//实际原片总数 |
| | | private Double realitypatterntotalarea;//实际原片总面积 |
| | | private Integer filmsid;//膜系id |
| | | private String notes;//备注 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`glass_films`") |
| | | public class GlassFilms { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//膜系表id |
| | | private Integer films_id;//膜系id |
| | | private String films_name;//膜系 |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import java.math.BigInteger; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`glass_info`") |
| | | public class GlassInfo { |
| | | @TableId(type = IdType.AUTO) |
| | | private BigInteger id;//玻璃信息表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;//原片顺序 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer temperingfeedsequence;//钢化版图片序 |
| | | private Integer xcoordinate;//x坐标 |
| | | private Integer ycoordinate;//y坐标 |
| | | private Integer angle;//旋转角度(逆时针) |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`tempering_glass_info`") |
| | | public class Tempering { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//钢化小片信息表id |
| | | private String flowcard_id;//流程卡 |
| | | private Integer glass_type;//流程卡玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer filmsid;//膜系 |
| | | private Integer ishorizontal;//钢化是否接受横放 |
| | | private Integer tempering_layout_id;//钢化版图id |
| | | private Integer tempering_feed_sequence;//钢化版图片序 |
| | | private Integer x_coordinate;//x坐标 |
| | | private Integer y_coordinate;//y坐标 |
| | | private Integer angle;//旋转角度(逆时针) |
| | | private Integer state;//状态 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`up_patten_usage`") |
| | | public class UpPattenUsage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//原片使用情况表id |
| | | private Integer engineeringid;//工程号 |
| | | private Integer filmsid;//膜系id |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer layoutsequence;//原片版图片序 |
| | | private Integer state;//状态 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`up_workstation`") |
| | | public class UpWorkstation { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//上片工位表id |
| | | private Integer workstationid;//工位号 |
| | | private Integer deviceid;//设备id |
| | | private Integer enablestate;//启用状态 |
| | | private Integer workstate;//工作状态 |
| | | private Double patternwidth;//原片宽 |
| | | private Double patternheigth;//原片高 |
| | | private Double patternthickness;//原片厚度 |
| | | private Integer filmsid;//膜系 |
| | | private Integer number;//数量 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.entity.OrderTest; |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | @Mapper |
| | | public interface LoadGlassMapper extends BaseMapper<UpWorkstation> { |
| | | //显示目前工位玻璃信息 |
| | | @Select("SELECT * FROM up_workstation") |
| | | UpWorkstation SelectALL(); |
| | | //删除工位的玻璃信息 |
| | | @Delete("DELETE FROM up_workstation where workstation_id=#{id}") |
| | | void DeleteALL(int id ); |
| | | //增加上片信息 |
| | | @Insert ("INSERT INTO up_workstation (pattern_width,pattern_heigth,pattern_thickness)value(#{patternwidth},#{patternheigth},#{patternthickness}where workstation_id=#{workstationid) ") |
| | | void InsertALL(Double patternwidth,Double patternheigth,Double patternthickness,int workstationid); |
| | | } |
New file |
| | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.example.springboot.component.PLCAutoMes; |
| | | import com.example.springboot.component.S7control; |
| | | import com.example.springboot.entity.device.PlcParameterObject; |
| | | import com.google.common.primitives.Bytes; |
| | | import com.mes.entity.GlassInfo; |
| | | import com.mes.entity.UpWorkstation; |
| | | import com.mes.mapper.LoadGlassMapper; |
| | | import com.mes.mapper.TemperingMapper; |
| | | |
| | | @Service |
| | | public class LoadGlassService { |
| | | @Autowired |
| | | private com.mes.common.PlcTools.S7control s7control; |
| | | private LoadGlassMapper LoadGlassMapper; |
| | | //显示工位上的玻璃信息 |
| | | public GlassInfo selectAll() { |
| | | GlassInfo glassInfo = LoadGlassMapper.SelectALL(); |
| | | return glassInfo; |
| | | } |
| | | //增加人工输入的工位玻璃信息 |
| | | public void insertGlass(UpWorkstation upwork) { |
| | | LoadGlassMapper.insertGlass(upwork.Getpatternwidth(),upwork.getPatternheigth(),upwork.getPatternthickness(),1); |
| | | } |
| | | //删除人工搬走的玻璃信息 |
| | | public void deleteGlass(String id) { |
| | | LoadGlassMapper.deleteGlass(id); |
| | | } |
| | | //判断是否可以吸片进行任务 |
| | | public boolean isCanLoadGlass() { |
| | | boolean result=s7control.WriteWord("100.10", 1); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | |
| | | server: |
| | | port: 8080 |
| | | servlet: |
| | | context-path: /mesModuleTools |
| | | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: user_info #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | user_info: |
| | | url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | mm: |
| | | url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`big_storage_cage`") |
| | | public class BigStorageCage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//大理片笼表id |
| | | private Integer device_id;//设备id |
| | | private Integer slot;//栅格号 |
| | | private String enable_state;//启用状态 |
| | | private Integer remain_width;//剩余宽度 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`big_storage_cage_details`") |
| | | public class BigStorageCageDetails { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//大理片笼详情表id |
| | | private Integer deviceid;//设备id |
| | | private Integer slot;//栅格号 |
| | | private Integer glassid;//玻璃id |
| | | private Integer sequence;//小片在格内的顺序 |
| | | private String flowcardid;//流程卡号 |
| | | private Integer glasstype;//玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer temperingfeedsequence;//钢化版图片序 |
| | | private Integer state;//状态 |
| | | private Integer gap;//玻璃间隙 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_glass_info`") |
| | | public class DownGlassInfo { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片玻璃信息表id |
| | | private String flowcardid;//流程卡号 |
| | | private Integer sequence;//顺序 |
| | | private Integer width;//宽 |
| | | private Integer height;//高 |
| | | private Integer thickness;//厚度 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_storage_cage`") |
| | | public class DownStorageCage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片前理片笼表id |
| | | private Integer deviceid;//设备id |
| | | private Integer slot;//栅格号 |
| | | private String enablestate;//启用状态 |
| | | private Integer remainwidth;//剩余 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_storage_cage_details`") |
| | | public class DownStorageCagedetails { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片前理片笼明细表id |
| | | private Integer deviceid;//设备id |
| | | private Integer slot;//栅格号 |
| | | private Integer glassid;//玻璃id |
| | | private Integer sequence;//小片在格内的顺序 |
| | | private String flow_card_id;//流程卡号 |
| | | private Integer glass_type;//玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer tempering_feed_sequence;//钢化版图片序 |
| | | private Integer state;//状态 |
| | | private Integer gap;//玻璃间隙 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`down_workstation`") |
| | | public class DownWorkstation { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//下片工位表id |
| | | private Integer flowcard_id;//工位id |
| | | private String glass_type;//流程卡号 |
| | | private Integer width;//设备id |
| | | private Integer height;//启用状态 |
| | | private Integer thickness;//工作状态 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`edg_storage_cage`") |
| | | public class EdgStorageCage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//磨边前理片笼表id |
| | | private Integer flowcard_id;//设备id |
| | | private Integer glass_type;//栅格号 |
| | | private String height;//启用状态 |
| | | private Integer thickness;//剩余 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`edg_storage_cage_details`") |
| | | public class EdgStorageCageDetails { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//磨边前理片笼详情表id |
| | | private Integer deviceid;//设备id |
| | | private Integer slot;//栅格号 |
| | | private Integer glassid;//玻璃id |
| | | private Integer sequence;//小片在格内的顺序 |
| | | private String flowcardid;//流程卡号 |
| | | private Integer glasstype;//玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Double edgwidth;//磨前宽 |
| | | private Double edgheight;//磨前高 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer temperingfeedsequence;//钢化版图片序 |
| | | private Integer patternsequence;//原片顺序 |
| | | private Integer state;//状态 |
| | | private Integer gap;//玻璃间隙 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import java.math.BigInteger; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`engineering`") |
| | | public class Engineering { |
| | | @TableId(type = IdType.AUTO) |
| | | private BigInteger id;//工程表id |
| | | private Integer engineerid;//工程号 |
| | | private String engineername;//工程名称 |
| | | private Double avgavailability;//平均利用率 |
| | | private Double validavailability;//有效利用率 |
| | | private Double lastavailability;//尾片利用率 |
| | | private Integer state;//状态 |
| | | private Integer glasstotal;//小片总数 |
| | | private Double glasstotalarea;//小片总面积 |
| | | private Integer planpatterntotal;//计划原片总数 |
| | | private Double planpatterntotalarea;//计划原片总面积 |
| | | private Integer realitypatterntotal;//实际原片总数 |
| | | private Double realitypatterntotalarea;//实际原片总面积 |
| | | private Integer filmsid;//膜系id |
| | | private String notes;//备注 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`glass_films`") |
| | | public class GlassFilms { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//膜系表id |
| | | private Integer films_id;//膜系id |
| | | private String films_name;//膜系 |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import java.math.BigInteger; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`glass_info`") |
| | | public class GlassInfo { |
| | | @TableId(type = IdType.AUTO) |
| | | private BigInteger id;//玻璃信息表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;//原片顺序 |
| | | private Integer temperinglayoutid;//钢化版图id |
| | | private Integer temperingfeedsequence;//钢化版图片序 |
| | | private Integer xcoordinate;//x坐标 |
| | | private Integer ycoordinate;//y坐标 |
| | | private Integer angle;//旋转角度(逆时针) |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`tempering_glass_info`") |
| | | public class Tempering { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//钢化小片信息表id |
| | | private String flowcard_id;//流程卡 |
| | | private Integer glass_type;//流程卡玻璃类型 |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer filmsid;//膜系 |
| | | private Integer ishorizontal;//钢化是否接受横放 |
| | | private Integer tempering_layout_id;//钢化版图id |
| | | private Integer tempering_feed_sequence;//钢化版图片序 |
| | | private Integer x_coordinate;//x坐标 |
| | | private Integer y_coordinate;//y坐标 |
| | | private Integer angle;//旋转角度(逆时针) |
| | | private Integer state;//状态 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`up_patten_usage`") |
| | | public class UpPattenUsage { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//原片使用情况表id |
| | | private Integer engineeringid;//工程号 |
| | | private Integer filmsid;//膜系id |
| | | private Double width;//宽 |
| | | private Double height;//高 |
| | | private Double thickness;//厚度 |
| | | private Integer layoutsequence;//原片版图片序 |
| | | private Integer state;//状态 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("`up_workstation`") |
| | | public class UpWorkstation { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id;//上片工位表id |
| | | private Integer workstationid;//工位号 |
| | | private Integer deviceid;//设备id |
| | | private Integer enablestate;//启用状态 |
| | | private Integer workstate;//工作状态 |
| | | private Double patternwidth;//原片宽 |
| | | private Double patternheigth;//原片高 |
| | | private Double patternthickness;//原片厚度 |
| | | private Integer filmsid;//膜系 |
| | | private Integer number;//数量 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.entity.GlassInfo; |
| | | import com.mes.entity.Tempering; |
| | | |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | @Mapper |
| | | public interface TemperingMapper extends BaseMapper<Tempering> { |
| | | |
| | | |
| | | //查询该玻璃的尺寸和坐标 |
| | | @Select("select *from glass_info where id=#{glassid};") |
| | | GlassInfo SelectOutGlass(String glassid); |
| | | |
| | | @Select("select *from glass_info where id=#{glassid};") |
| | | int SelectTempering(String glassid); |
| | | |
| | | } |
| | |
| | | |
| | | User findOne(Integer id); |
| | | |
| | | @Select("select user_name FROM `user` where login_name=#{LoginName} ") |
| | | User findOneLoginName(String LoginName); |
| | | |
| | | @Select("select count(id) FROM `user` where login_name=#{userName} and password=#{password} ") |
| | | int checkUser(@Param("userName") String userName,@Param("password") String password); |
| | | |
New file |
| | |
| | | package com.mes.service; |
| | | |
| | | import com.rabbitmq.client.Channel; |
| | | import com.rabbitmq.client.Connection; |
| | | import com.rabbitmq.client.ConnectionFactory; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | public class ModuleA { |
| | | private static String QUEUE_NAME = "hangzhou2"; |
| | | |
| | | public ModuleA(String QUEUENAME){ |
| | | QUEUE_NAME=QUEUENAME; |
| | | } |
| | | |
| | | |
| | | public static void main(String[] argv) throws Exception { |
| | | // 创建连接工厂 |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost("10.153.19.150"); |
| | | //factory.setHost("localhost"); |
| | | |
| | | try (Connection connection = factory.newConnection(); |
| | | //channel 是通过 connection 创建的一个 AMQP 信道对象 |
| | | Channel channel = connection.createChannel()) { |
| | | // `channel.queueDeclare(QUEUE_NAME, false, false, false, null);` 是用来声明一个队列的方法 |
| | | //该方法有五个参数: |
| | | //1. `QUEUE_NAME`:指定队列的名称,这里使用了之前声明的常量`"module_queue"`作为队列名称。 |
| | | //2. `false`:指定队列是否为持久化的。在这里设置为`false`,表示不将队列持久化到磁盘,一旦RabbitMQ服务停止或崩溃,队列将会丢失。 |
| | | //3. `false`:指定是否只允许当前连接声明此队列。在这里设置为`false`,表示可允许其他连接也声明同名的队列。 |
| | | //4. `false`:指定是否在不再使用时自动删除队列。在这里设置为`false`,表示当没有消费者或者所有消费者断开连接后,队列不会自动删除。 |
| | | //5. `null`:指定其他队列属性的参数。在这里设置为`null`,表示没有其他属性需要设置。 |
| | | //执行`channel.queueDeclare()`方法后,如果队列不存在,将会创建一个新的队列,如果队列已经存在,则不做任何操作。 |
| | | Map<String, Object> args = new HashMap<>(); |
| | | args.put("x-max-length-bytes",20000); |
| | | // args.put("x-max-length",5000); |
| | | channel.queueDeclare(QUEUE_NAME, false, false, false, args); |
| | | |
| | | String message = "你"; |
| | | |
| | | for ( int i=1;i< 5000;i++) |
| | | { |
| | | message+="你"; |
| | | |
| | | } |
| | | |
| | | message+="b"; |
| | | |
| | | |
| | | |
| | | // 将消息发布到指定的队列中。空字符串""表示默认的交换机,QUEUE_NAME指定了目标队列名称,null表示没有指定其他属性,message.getBytes()将消息内容转换为字节数组进行传输。 |
| | | channel.basicPublish("", QUEUE_NAME, null, message.getBytes()); |
| | | System.out.println(" [x] Sent '" + message + "'"); |
| | | } |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.service; |
| | | |
| | | import com.rabbitmq.client.Channel; |
| | | import com.rabbitmq.client.Connection; |
| | | import com.rabbitmq.client.ConnectionFactory; |
| | | import com.rabbitmq.client.DeliverCallback; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | public class ModuleB { |
| | | private final static String QUEUE_NAME = "hangzhou2"; |
| | | |
| | | public static void main(String[] argv) throws Exception { |
| | | // 创建连接工厂 |
| | | ConnectionFactory factory = new ConnectionFactory(); |
| | | factory.setHost("10.153.19.150"); |
| | | //factory.setHost("localhost"); |
| | | try (Connection connection = factory.newConnection(); |
| | | Channel channel = connection.createChannel()) { |
| | | // 声明队列 |
| | | Map<String, Object> args = new HashMap<>(); |
| | | args.put("x-max-length-bytes",20000); |
| | | // args.put("x-max-length",5000); |
| | | channel.queueDeclare(QUEUE_NAME, false, false, false, args); |
| | | |
| | | // 创建消费者 |
| | | DeliverCallback deliverCallback = (consumerTag, delivery) -> { |
| | | String receivedMessage = new String(delivery.getBody(), "UTF-8"); |
| | | System.out.println(" [x] Received '" + receivedMessage + "'"); |
| | | }; |
| | | // 开始消费消息 |
| | | channel.basicConsume(QUEUE_NAME, true, deliverCallback, consumerTag -> { |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.service; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.mes.entity.GlassInfo; |
| | | import com.mes.entity.userInfo.SysError; |
| | | import com.mes.mapper.TemperingMapper; |
| | | import com.mes.mapper.userInfo.SysErrorMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @DS("glass_info") |
| | | public class TemperingOverService { |
| | | private final TemperingMapper temperingMapper; |
| | | |
| | | public TemperingOverService(TemperingMapper temperingMapper) { |
| | | this.temperingMapper = temperingMapper; |
| | | } |
| | | //接收出炉信号和炉号 |
| | | public GlassInfo SelectOutGlass (String glassid) { |
| | | GlassInfo GlassInfo = temperingMapper.SelectOutGlass(glassid); |
| | | return GlassInfo; |
| | | } |
| | | //发送确认收到 |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.service; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.mes.common.PlcTools.S7control; |
| | | import com.mes.entity.GlassInfo; |
| | | import com.mes.entity.userInfo.SysError; |
| | | import com.mes.mapper.TemperingMapper; |
| | | import com.mes.mapper.userInfo.SysErrorMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @DS("glass_info") |
| | | public class TemperingService { |
| | | |
| | | private final TemperingMapper temperingMapper; |
| | | private S7control s7control; |
| | | |
| | | public TemperingService(TemperingMapper temperingMapper) { |
| | | this.temperingMapper = temperingMapper; |
| | | } |
| | | //接收id返回坐标和数据 |
| | | public GlassInfo SelectOutGlass (String glassid) { |
| | | GlassInfo GlassInfo = temperingMapper.SelectOutGlass(glassid); |
| | | return GlassInfo; |
| | | } |
| | | //发送坐标信息 |
| | | public void SendCoordinate (short glassX,short glassY) { |
| | | s7control.WriteWord("DB100.10", glassX); |
| | | s7control.WriteWord("DB100.10", glassY); |
| | | } |
| | | //判断是否可以发送进炉信号 |
| | | public int SelectTempering (String glassid) { |
| | | int tempering = temperingMapper.SelectTempering(glassid); |
| | | if (tempering == 1) { |
| | | return 1; |
| | | } |
| | | else { |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | //发送进炉信号 |
| | | public void SendIntoGlass (short start) { |
| | | s7control.WriteWord("DB100.10", start); |
| | | } |
| | | //接受完成字回复确认字 |
| | | |
| | | public void SendIntoGlass () { |
| | | s7control.WriteWord("DB100.10", (short)1); |
| | | } |
| | | } |
New file |
| | |
| | | |
| | | server: |
| | | port: 8080 |
| | | servlet: |
| | | context-path: /mesModuleTools |
| | | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: user_info #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | user_info: |
| | | url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | mm: |
| | | url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | name: 'main', |
| | | component: () => import('../layout/MainErpView.vue'), |
| | | children:[ |
| | | |
| | | |
| | | { |
| | | path: 'Temperedlayout', |
| | | name: 'Temperedlayout', |
| | | component: () => import('../views/TL/Temperedlayout/Temperedlayout.vue'), |
| | | children:[ |
| | | { |
| | | path: 'selectLayout', |
| | | name: 'selectLayout', |
| | | component: () => import('../views/TL/Temperedlayout/SelectLayout.vue'), |
| | | } |
| | | ] |
| | | }, |
| | | //sd模块 |
| | | { |
| | | path: 'product',//产品 |
New file |
| | |
| | | <script setup> |
| | | |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/ingredients/CreateIngredients', query: { id: row.id }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //子组件接收参数 |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '50'}, |
| | | // { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {field: 'materialCode', width:'150', title: '物料编码', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'materialName', width: '150',title: '物料名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'origin', width: '120',title: '产地', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'width', width: '100',title: '宽度', sortable: true}, |
| | | {field: 'height',width: '100', title: '高度', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'thickness', width: '80',title: '厚度', sortable: true}, |
| | | {field: 'model',width: '100', title: '型号', sortable: true}, |
| | | {field: 'conversionRate', width: '100',title: '换算率', sortable: true}, |
| | | {field: 'unit',width: '100', title: '单位', sortable: true}, |
| | | {field: 'conversionUnit', width: '80',title: '换算单位', sortable: true}, |
| | | {field: 'shelfLife',width: '100', title: '保质期', sortable: true}, |
| | | {field: 'weight', width: '100',title: ' 重量', sortable: true}, |
| | | {field: 'quantity',width: '110', title: '数量', sortable: true}, |
| | | {field: 'inventoryOrganization',width: '100', title: '库存组织', sortable: true}, |
| | | {field: 'remark',width: '80', title: '备注', sortable: true}, |
| | | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "materialCode": 700900000000941, |
| | | "materialName": "丝袜防晒手套套袖", |
| | | "origin": "00", |
| | | "width": "00", |
| | | "height": "00", |
| | | "thickness":'00', |
| | | "model": "服饰", |
| | | "conversionRate": "1000", |
| | | "unit": "双", |
| | | "conversionUnit": "1", |
| | | "shelfLife": "12个月", |
| | | "weight": "0.0000", |
| | | "quantity": "10000", |
| | | "inventoryOrganization": "人工库", |
| | | "remark": "测试", |
| | | }, |
| | | { |
| | | "materialCode": 700900000000941, |
| | | "materialName": "丝袜防晒手套套袖", |
| | | "origin": "00", |
| | | "width": "00", |
| | | "height": "00", |
| | | "thickness":'00', |
| | | "model": "服饰", |
| | | "conversionRate": "1000", |
| | | "unit": "双", |
| | | "conversionUnit": "1", |
| | | "shelfLife": "12个月", |
| | | "weight": "0.0000", |
| | | "quantity": "10000", |
| | | "inventoryOrganization": "人工库", |
| | | "remark": "测试", |
| | | }, |
| | | ],//table body实际数据 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | </template> |
| | | <!-- 下拉详情循环显示中文 --> |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | </style> |
New file |
| | |
| | | <!-- 物料资料 --> |
| | | |
| | | |
| | | <script setup> |
| | | import { ref } from "vue"; |
| | | import { ArrowLeftBold, ArrowRight, Search } from "@element-plus/icons-vue"; |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { useRouter } from "vue-router"; |
| | | import GlassType from '@/components/basic/product/GlassType.vue' |
| | | |
| | | |
| | | const router = useRouter() |
| | | let indexFlag = $ref(1) |
| | | function changeRouter(index) { |
| | | indexFlag = index |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | | export default { |
| | | mounted() { |
| | | //获取数据 |
| | | request.get("/Temper/Tindex").then((res) => { |
| | | if (res.code == 200) { |
| | | var StoveCount=0; |
| | | var temperid; |
| | | for(var i=0;i<res.data.length;i++){ |
| | | if (temperid != res.data[i].layoutid) { |
| | | StoveCount++; |
| | | temperid=res.data[i].layoutid; |
| | | } |
| | | } |
| | | // console.log(res.data); |
| | | this.CanvaDraws("mycanvas",res.data,StoveCount); |
| | | |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | //Canva(id,基础数据,页面长:实际长,显示行内版图数, ) |
| | | //基础数据:实际炉长,实际炉宽, 小片X轴, 小片y轴, 小片长, 小片宽,显示数据(尺寸,ID,流程卡号,版图号) |
| | | CanvaDraws(id,Datas,StoveCount) { |
| | | //var StoveCount=43;//炉数 |
| | | var ArrangementMode='linefeed';//排布方式:linefeed(换行) /Wholeline 整行 |
| | | var RowMaxCount=4;//每行最多显示的图数 |
| | | var StoveWidth=3000; //实际炉宽 2850 |
| | | var StoveLength=5500;//实际炉长 5000 |
| | | var StoveColor='#CFC8C5';//炉子背景颜色 |
| | | |
| | | |
| | | var StoveIntervalX=30; //页面每一炉之间的间距X px |
| | | var StoveIntervalY=50; //页面每一炉之间的间距Y px |
| | | |
| | | var HtmlWidth=1800; //页面横向 |
| | | //var actualWidth=12000;//页面横向所对应的实际长度 |
| | | var actualWidth=StoveWidth*RowMaxCount;//页面横向所对应的实际长度 |
| | | |
| | | var Bli = actualWidth / (HtmlWidth-StoveIntervalX*RowMaxCount);//比例:实际长度mm/页面长度px |
| | | |
| | | var StoveCross=StoveWidth/Bli; //页面炉子横向 像素 |
| | | var StoveVertical=StoveLength/Bli;//页面炉子纵向 像素 |
| | | |
| | | var Font1=(StoveCross*0.05); |
| | | var Font2=(StoveCross*0.028); |
| | | // var TerritoryWidth=dataTempered.loadwidth; //实际版图宽 |
| | | // var TerritoryLength=dataTempered.loadlength;//实际版图长 |
| | | // var TerritoryColor='#0DB637';//版图背景颜色 |
| | | |
| | | // var TerritoryCross=TerritoryWidth/Bli; //页面版图横向 像素 |
| | | // var TerritoryVertical=TerritoryLength/Bli;//页面版图纵向 像素 |
| | | console.log(Font1); |
| | | |
| | | var canva = this.$refs[id]; |
| | | var content = canva.getContext('2d'); |
| | | canva.width = HtmlWidth; |
| | | canva.height = StoveCount%RowMaxCount==0?((StoveVertical+StoveIntervalY)*(StoveCount/RowMaxCount)):((StoveVertical+StoveIntervalY)*(StoveCount/RowMaxCount+1)); |
| | | //console.log(StoveCount%RowMaxCount==0?((StoveVertical+StoveIntervalY)*(StoveCount/RowMaxCount)):((StoveVertical+StoveIntervalY)*(StoveCount/RowMaxCount+1)) ); |
| | | var temperid;//初始版图 |
| | | var Xlayout = 0; //炉子X轴起点 |
| | | var Ylayout = StoveIntervalY; //炉子Y轴起点 |
| | | var layoutCount = 0;//版图数 |
| | | var row=0; |
| | | for (var i = 0; i < Datas.length; i++) { |
| | | var dataTempered = Datas[i]; |
| | | |
| | | var TerritoryWidth=dataTempered.loadwidth; //实际版图宽 |
| | | var TerritoryLength=dataTempered.loadlength;//实际版图长 |
| | | var TerritoryColor='#0DB637';//版图背景颜色 |
| | | |
| | | var TerritoryCross=TerritoryWidth/Bli; //页面版图横向 像素 |
| | | var TerritoryVertical=TerritoryLength/Bli;//页面版图纵向 像素 |
| | | |
| | | if (temperid != dataTempered.layoutid) { |
| | | //画版图 更改基础倍数 |
| | | if(layoutCount>0){ |
| | | Xlayout += StoveCross + StoveIntervalX; |
| | | if (layoutCount %RowMaxCount== 0) { |
| | | //换行 |
| | | Ylayout += StoveVertical+StoveIntervalY; |
| | | Xlayout=0; |
| | | row++; |
| | | } |
| | | } |
| | | temperid=dataTempered.layoutid; |
| | | layoutCount++; |
| | | content.font ='bold '+Font1+'px Arial' ; //文字样式:加粗 16像素 字体Arial |
| | | content.fillStyle = '#000000'; //字体颜色 |
| | | content.textAlign = 'center'; //文字居中 |
| | | content.fillText((dataTempered.layoutid), (StoveCross / 2+ Xlayout), 50/2+(StoveVertical+50)*row+10); |
| | | //炉子 |
| | | content.fillStyle = StoveColor; |
| | | content.fillRect(Xlayout, Ylayout, StoveCross, StoveVertical); |
| | | //版图 |
| | | content.fillStyle = TerritoryColor; |
| | | content.fillRect(Xlayout, Ylayout, TerritoryCross, TerritoryVertical); |
| | | } |
| | | |
| | | var Rx = dataTempered.xaxis / Bli + Xlayout; |
| | | var Ry = dataTempered.yaxis / Bli + Ylayout; |
| | | var Rwidth = dataTempered.width / Bli; |
| | | var Rheight = dataTempered.height / Bli; |
| | | var Xwidth; |
| | | var Xheight; |
| | | content.fillStyle = '#5CADFE'; |
| | | if (dataTempered.rotateangle != 0) { |
| | | Xwidth = Rwidth; |
| | | Xheight = Rheight; |
| | | } else { |
| | | Xwidth = Rheight; |
| | | Xheight = Rwidth; |
| | | } |
| | | content.fillRect(Rx, Ry, Xwidth, Xheight); |
| | | content.font = 'bold '+Font2+'px Arial' ; //文字样式:加粗 16像素 字体Arial |
| | | content.fillStyle = '#000000'; //字体颜色 |
| | | content.textAlign = 'center'; //文字居中 |
| | | |
| | | content.fillText(('版图:'+dataTempered.layoutid+'-'+dataTempered.sort), (Xwidth / 2) + Rx, (Xheight) / 2 + Ry-Font2); |
| | | content.fillText((dataTempered.width + ' * ' + dataTempered.height), (Xwidth / 2) + Rx, (Xheight) / 2 + Ry); //fillText里面的可填写的值(文本内容, x坐标, y坐标, 文本最大宽度) |
| | | content.fillText((dataTempered.processid), (Xwidth / 2) + Rx, (Xheight) / 2 + Ry+Font2); |
| | | //content.rotate(30*Math.PI/180); |
| | | content.stroke(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | |
| | | |
| | | <template> |
| | | <div ref="content"> |
| | | |
| | | </div> |
| | | <canvas ref="mycanvas" > |
| | | |
| | | </canvas> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | |
| | | |
| | | #div-title { |
| | | height: 5%; |
| | | width: 100%; |
| | | } |
| | | |
| | | #searchButton { |
| | | margin-top: -5px; |
| | | margin-left: 1rem; |
| | | } |
| | | |
| | | #searchButton1 { |
| | | /* margin-left: 10rem; */ |
| | | } |
| | | |
| | | /*main-body样式*/ |
| | | #main-body { |
| | | width: 99%; |
| | | height: 92%; |
| | | margin-top: 1%; |
| | | } |
| | | |
| | | #select { |
| | | margin-left: 0.5rem; |
| | | } |
| | | |
| | | :deep(.indexTag .el-breadcrumb__inner) { |
| | | color: #5CADFE !important; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | |
| | | <div class="center-box"> |
| | | |
| | | <el-card class="form-card"> |
| | | <el-form size="medium" > |
| | | <div> |
| | |
| | | margin-left: 1rem; |
| | | } |
| | | #searchButton1{ |
| | | //margin-left: 10rem; |
| | | /* margin-left: 10rem; */ |
| | | } |
| | | /*main-body样式*/ |
| | | #main-body{ |
| | |
| | | // '^/api': '' |
| | | // } |
| | | // rewrite: (path) => path.replace(/^\/api/, "/mesModuleTools"), //重写真实路径,替换/api |
| | | } |
| | | }, |
| | | '/api2': { |
| | | target: 'localhost:8080/mesModuleTools', |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/api2/, ""), |
| | | }, |
| | | } |
| | | } |
| | | }) |
New file |
| | |
| | | <?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>
|
| | | <facet type="jpa" name="JPA">
|
| | | <configuration>
|
| | | <setting name="validation-enabled" value="true" />
|
| | | <setting name="provider-name" value="Hibernate" />
|
| | | <datasource-mapping>
|
| | | <factory-entry name="entityManagerFactory" />
|
| | | </datasource-mapping>
|
| | | <naming-strategy-map />
|
| | | </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>
|
| | | <orderEntry type="inheritedJdk" />
|
| | | <orderEntry type="sourceFolder" forTests="false" />
|
| | | <orderEntry type="library" name="Java EE 6-Java EE 6" level="project" />
|
| | | <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.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" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
|
| | | <orderEntry type="library" 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: 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: com.rabbitmq:amqp-client:5.13.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.3.14" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.3.14" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.3.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-websocket:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-websocket:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.poi:poi:5.2.4" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: commons-io:commons-io:2.13.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.3" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:5.2.4" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-lite:5.2.4" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:5.1.1" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.24.0" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.08" level="project" />
|
| | | <orderEntry type="library" name="Maven: io.netty:netty-all:4.1.36.Final" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.5.9" level="project" />
|
| | | <orderEntry type="library" name="Maven: jakarta.transaction:jakarta.transaction-api:1.3.3" level="project" />
|
| | | <orderEntry type="library" name="Maven: jakarta.persistence:jakarta.persistence-api:2.2.3" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.4.33" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.3.Final" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.javassist:javassist:3.27.0-GA" level="project" />
|
| | | <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.jboss:jandex:2.2.3.Final" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.3" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.1.2.Final" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.5" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.5" level="project" />
|
| | | <orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.12" level="project" />
|
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.activation:jakarta.activation:1.2.2" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.5.8" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.3.15" level="project" />
|
| | | <orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.3.15" level="project" />
|
| | | </component>
|
| | | </module> |
| | |
| | | <relativePath/> <!-- lookup parent from repository --> |
| | | </parent> |
| | | <groupId>com.MES-Module</groupId> |
| | | <artifactId>MES-Module</artifactId> |
| | | <artifactId>MES-UnLoadGlassModule</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | <name>MES-Module</name> |
| | | <name>MES-UnLoadGlassModule</name> |
| | | <description>project for Spring Boot</description> |
| | | <properties> |
| | | <java.version>1.8</java.version> |
| | |
| | | <artifactId>spring-boot-starter-cache</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- rabbitmq --> |
| | | <dependency> |
| | | <groupId>com.rabbitmq</groupId> |
| | | <artifactId>amqp-client</artifactId> |
| | | <version>5.13.1</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-amqp</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.fasterxml.jackson.core</groupId> |
| | | <artifactId>jackson-databind</artifactId> |
| | | <version>2.12.2</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.fasterxml.jackson.core</groupId> |
| | | <artifactId>jackson-core</artifactId> |
| | | <version>2.13.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.fasterxml.jackson.core</groupId> |
| | | <artifactId>jackson-databind</artifactId> |
| | | <version>2.13.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.fasterxml.jackson.core</groupId> |
| | | <artifactId>jackson-annotations</artifactId> |
| | | <version>2.13.0</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-websocket</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.xingshuangs</groupId> |
| | | <artifactId>iot-communication</artifactId> |
| | | <version>1.4.2</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-websocket</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.google.code.gson</groupId> |
| | | <artifactId>gson</artifactId> |
| | | <version>2.8.9</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi</artifactId> |
| | | <version>5.2.4</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>5.2.4</version> |
| | | </dependency> |
| | | |
| | | <!--websocket--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.boot</groupId>--> |
| | |
| | | <artifactId>netty-all</artifactId> |
| | | <version>4.1.36.Final</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-jpa</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.common.PlcTools.S7object; |
| | | import com.mes.tools.WebSocketServer; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cache.annotation.EnableCaching; |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | import org.springframework.transaction.annotation.EnableTransactionManagement; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | //springboot 启动入口 |
| | | @SpringBootApplication |
| | | @EnableCaching |
| | | @EnableTransactionManagement//事务注解 |
| | | //@Transactional//在service里面有多表操作,开启事务注解 |
| | | @EnableTransactionManagement |
| | | public class MesApplication { |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(MesApplication.class, args); |
| | | try { |
| | | //new NettyServer(12345).start(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | SpringApplication springApplication = new SpringApplication(MesApplication.class); |
| | | ConfigurableApplicationContext applicationContext = springApplication.run(args); |
| | | WebSocketServer.setApplicationContext(applicationContext); |
| | | } |
| | | } |
| | |
| | | package com.mes.common.PlcTools; |
| | | |
| | | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import com.github.xingshuangs.iot.protocol.s7.enums.EPlcType; |
| | | import com.github.xingshuangs.iot.protocol.s7.service.MultiAddressWrite; |
| | | import com.github.xingshuangs.iot.protocol.s7.service.S7PLC; |
| | | import com.google.common.primitives.Bytes; |
| | | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class S7control { |
| | | |
| | | S7PLC s7PLC; // PLC通讯类实例 |
| | | private EPlcType plcType = EPlcType.S1500; // 西门子PLC类型 |
| | | private String ip = "192.168.10.1"; // plc ip地址 |
| | | private int port = 102; // plc 端口号 |
| | | |
| | | public S7control(EPlcType plcType, String ip, int port, int rack, int slot) { |
| | | private static volatile S7control instance = null; |
| | | |
| | | private S7control() { |
| | | if (s7PLC == null) |
| | | s7PLC = new S7PLC(plcType, ip, port,0,0); |
| | | } |
| | | |
| | | // 单例模式 获取类的唯一实例 |
| | | public static S7control getinstance() { |
| | | if (instance == null) { |
| | | synchronized (S7control.class) { |
| | | if (instance == null) |
| | | instance = new S7control(); |
| | | } |
| | | } |
| | | return instance; |
| | | } |
| | | |
| | | /** |
| | | * 关闭西门子s7通讯连接 |
| | | */ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public List<String> readStringsandword(List<String> addressList) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | | } |
| | | List<String> result = new ArrayList<>(); |
| | | for (String address : addressList) { |
| | | try { |
| | | if (address.contains("-")) { |
| | | address = address.substring(0, address.indexOf("-")); |
| | | |
| | | byte[] bytes = s7PLC.readByte(address, 14); |
| | | if (bytes != null) { |
| | | String str = new String(bytes, StandardCharsets.UTF_8); |
| | | result.add(str); |
| | | } |
| | | |
| | | } else { |
| | | Short value = s7PLC.readInt16(address); |
| | | result.add(value.toString()); |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | result.add(null); |
| | | } |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | //不连续地址写入Word |
| | | public void WriteWord(List<String> address, List<Short> datas) { |
| | | if (s7PLC == null) |
| | |
| | | glassidlist.add(Byte.valueOf(String.valueOf(iditem))); |
| | | } |
| | | byte[] bytes = Bytes.toArray(glassidlist); |
| | | WriteByte(addr, bytes); |
| | | S7control.getinstance().WriteByte(addr, bytes); |
| | | } |
| | | |
| | | //读取不连续word |
New file |
| | |
| | | package com.mes.common;
|
| | |
|
| | | import com.fasterxml.jackson.databind.ObjectMapper;
|
| | | import com.rabbitmq.client.*;
|
| | |
|
| | | import java.util.*;
|
| | | import java.util.concurrent.ArrayBlockingQueue;
|
| | | import java.util.concurrent.BlockingQueue;
|
| | |
|
| | | public class RabbitMQUtils {
|
| | | // ObjectMapper对象,用于序列化和反序列化JSON
|
| | | private static ObjectMapper objectMapper = new ObjectMapper();
|
| | | private static String host = "10.153.19.150"; // RabbitMQ 主机名
|
| | | private static Map<String, Object> args = new HashMap<>(); // 队列参数
|
| | |
|
| | | static {
|
| | | // 设置队列参数
|
| | | args.put("x-max-length-bytes", 1024 * 1024);
|
| | | }
|
| | |
|
| | | // private static Map<String, Object> args = new HashMap<>();
|
| | | // args.put("x-max-length-bytes",1024 * 1024);
|
| | | // 发送消息到 RabbitMQ 队列中
|
| | | public String sendMessage(String message, String queueName) throws Exception {
|
| | | // 创建连接工厂并设置主机名
|
| | | ConnectionFactory factory = new ConnectionFactory();
|
| | | factory.setHost(host);
|
| | |
|
| | | // 使用 try-with-resources 语句创建连接和通道,并发送消息
|
| | | try (Connection connection = factory.newConnection();
|
| | | Channel channel = connection.createChannel()) {
|
| | | // 声明队列
|
| | | channel.queueDeclare(queueName, false, false, false, args);
|
| | |
|
| | | // 发布消息到队列
|
| | | channel.basicPublish("", queueName, null, message.getBytes("UTF-8"));
|
| | | System.out.println(" [x] Sent '" + message + "' to queue '" + queueName + "'");
|
| | | }
|
| | |
|
| | | return message;
|
| | | }
|
| | |
|
| | |
|
| | | // 从 RabbitMQ 队列中接收消息
|
| | | public String receiveMessage(String queueName) throws Exception {
|
| | | // 创建连接工厂并设置主机名
|
| | | ConnectionFactory factory = new ConnectionFactory();
|
| | | factory.setHost(host);
|
| | |
|
| | | // 创建阻塞队列
|
| | | BlockingQueue<String> messageQueue = new ArrayBlockingQueue<>(1);
|
| | |
|
| | | // 使用 try-with-resources 语句创建连接和通道,并接收消息
|
| | | try (Connection connection = factory.newConnection();
|
| | | Channel channel = connection.createChannel()) {
|
| | | // 声明队列
|
| | | channel.queueDeclare(queueName, false, false, false, args);
|
| | |
|
| | | // 设置消息接收回调
|
| | | DeliverCallback deliverCallback = (consumerTag, delivery) -> {
|
| | | String receivedMessage = new String(delivery.getBody(), "UTF-8");
|
| | | // System.out.println(" [x] Received '" + receivedMessage + "'");
|
| | |
|
| | | // 将接收到的消息放入阻塞队列
|
| | | try {
|
| | | messageQueue.put(receivedMessage);
|
| | | } catch (InterruptedException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | };
|
| | |
|
| | | // 消费队列中的消息
|
| | | channel.basicConsume(queueName, true, deliverCallback, consumerTag -> {
|
| | |
|
| | | });
|
| | |
|
| | | // 阻塞并等待获取消息
|
| | | return messageQueue.take();
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | //消费消息
|
| | | public List<String> readMessages(String queueName,boolean is) throws Exception {
|
| | | ConnectionFactory factory = new ConnectionFactory();
|
| | | factory.setHost(host);
|
| | | List<String> messages = new ArrayList<>();
|
| | | try (Connection connection = factory.newConnection();
|
| | | Channel channel = connection.createChannel()) {
|
| | | boolean autoAck = false;
|
| | |
|
| | | GetResponse response = channel.basicGet(queueName, autoAck);
|
| | | if (response != null) {
|
| | | String message = new String(response.getBody(), "UTF-8");
|
| | | messages.add(message);
|
| | | // 手动确认消息处理完成
|
| | | if(is){
|
| | | long deliveryTag = response.getEnvelope().getDeliveryTag();
|
| | | channel.basicAck(deliveryTag, false);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | return messages;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | private static Set<String> sentMessageIds = new HashSet<>();
|
| | | //根据id发送消息
|
| | | public static boolean sendMessageWithId(String queueName, String message, String messageId) throws Exception {
|
| | | if (sentMessageIds.contains(messageId)) {
|
| | | System.err.println("Message with ID " + messageId + " has already been sent.");
|
| | | return false; // 消息重复,发送失败
|
| | | }
|
| | |
|
| | | ConnectionFactory factory = new ConnectionFactory();
|
| | | factory.setHost(host);
|
| | |
|
| | | try (Connection connection = factory.newConnection(); Channel channel = connection.createChannel()) {
|
| | | channel.queueDeclare(queueName, false, false, false, args);
|
| | |
|
| | | AMQP.BasicProperties properties = new AMQP.BasicProperties.Builder()
|
| | | .messageId(messageId)
|
| | | .build();
|
| | |
|
| | | channel.basicPublish("", queueName, properties, message.getBytes("UTF-8"));
|
| | | System.out.println("Sent message with ID: " + messageId);
|
| | |
|
| | | sentMessageIds.add(messageId); // 将 messageId 添加到已发送集合中
|
| | |
|
| | | return true; // 消息成功发送
|
| | | } catch (Exception e) {
|
| | | System.err.println("Failed to send message: " + e.getMessage());
|
| | | return false; // 消息发送失败
|
| | | }
|
| | | }
|
| | | //根据id消费消息
|
| | | public static String consumeMessageById( String messageId,String queueName) throws Exception {
|
| | | ConnectionFactory factory = new ConnectionFactory();
|
| | | factory.setHost(host);
|
| | |
|
| | | try (Connection connection = factory.newConnection(); Channel channel = connection.createChannel()) {
|
| | | channel.queueDeclare(queueName, false, false, false, args);
|
| | |
|
| | | GetResponse response;
|
| | | while ((response = channel.basicGet(queueName, false)) != null) {
|
| | | String receivedMessage = new String(response.getBody(), "UTF-8");
|
| | | if (response.getProps().getMessageId().equals(messageId)) {
|
| | | long deliveryTag = response.getEnvelope().getDeliveryTag();
|
| | | channel.basicAck(deliveryTag, false);
|
| | | System.out.println("Selected message: "+messageId+ receivedMessage);
|
| | | return receivedMessage; // 返回选定的消息内容
|
| | | } else {
|
| | | // 对于不符合条件的消息,进行 Nack 操作
|
| | | // long deliveryTag = response.getEnvelope().getDeliveryTag();
|
| | | // channel.basicNack(deliveryTag, false, true);
|
| | | return "Specified message not found in the queue.";
|
| | | }
|
| | | }
|
| | |
|
| | | return "Specified message not found in the queue.";
|
| | | }
|
| | | }
|
| | |
|
| | | //消费指定消息
|
| | | public static String consumeSelectedMessage(int messageToConsume, String queueName) throws Exception {
|
| | | ConnectionFactory factory = new ConnectionFactory();
|
| | | factory.setHost(host);
|
| | |
|
| | | try (Connection connection = factory.newConnection(); Channel channel = connection.createChannel()) {
|
| | | channel.queueDeclare(queueName, false, false, false, args);
|
| | |
|
| | | for (int i = 0; i < messageToConsume; i++) {
|
| | | GetResponse response = channel.basicGet(queueName, false);
|
| | | if (response == null) {
|
| | | return "Queue does not have enough messages.";
|
| | | }
|
| | | // long deliveryTag = response.getEnvelope().getDeliveryTag();
|
| | | // channel.basicAck(deliveryTag, false);
|
| | | }
|
| | |
|
| | | GetResponse selectedResponse = channel.basicGet(queueName, false);
|
| | | if (selectedResponse != null) {
|
| | | byte[] body = selectedResponse.getBody();
|
| | | String selectedMessage = new String(body, "UTF-8");
|
| | | long deliveryTag = selectedResponse.getEnvelope().getDeliveryTag();
|
| | | channel.basicAck(deliveryTag, false);
|
| | | return selectedMessage;
|
| | | } else {
|
| | | return "Specified message not found in the queue.";
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | // 发送 JSON 消息到队列
|
| | | public static boolean sendJsonMessage(Object message, String queueName) throws Exception {
|
| | | // 创建连接工厂并设置主机名
|
| | | ConnectionFactory factory = new ConnectionFactory();
|
| | | factory.setHost(host);
|
| | |
|
| | | // 使用 try-with-resources 语句创建连接和通道,并发送 JSON 消息
|
| | | try (Connection connection = factory.newConnection();
|
| | | Channel channel = connection.createChannel()) {
|
| | | // 声明队列
|
| | | channel.queueDeclare(queueName, false, false, false, args);
|
| | |
|
| | | // 将对象转换为 JSON 字符串
|
| | | String jsonMessage = objectMapper.writeValueAsString(message);
|
| | |
|
| | | // 发布 JSON 消息到队列
|
| | | channel.basicPublish("", queueName, null, jsonMessage.getBytes());
|
| | | System.out.println(" [x] Sent JSON message: '" + jsonMessage + "' to queue '" + queueName + "'");
|
| | |
|
| | | return true; // 发送消息成功
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | return false; // 发送消息失败
|
| | | }
|
| | | }
|
| | |
|
| | | // 接收 JSON 消息并转换为对象
|
| | | public static <T> T receiveJsonMessage(Class<T> valueType, String queueName) throws Exception {
|
| | | // 创建连接工厂并设置主机名
|
| | | ConnectionFactory factory = new ConnectionFactory();
|
| | | factory.setHost(host);
|
| | |
|
| | | // 使用 try-with-resources 语句创建连接和通道,并接收 JSON 消息
|
| | | try (Connection connection = factory.newConnection();
|
| | | Channel channel = connection.createChannel()) {
|
| | | // 声明队列
|
| | | channel.queueDeclare(queueName, false, false, false, args);
|
| | |
|
| | | // 获取队列中的消息
|
| | | GetResponse response = channel.basicGet(queueName, true);
|
| | | if (response != null) {
|
| | | byte[] body = response.getBody();
|
| | | String jsonMessage = new String(body, "UTF-8");
|
| | | System.out.println(" [x] Received JSON message: '" + jsonMessage + "' from queue '" + queueName + "'");
|
| | |
|
| | | // 将 JSON 消息转换为对象
|
| | | return objectMapper.readValue(jsonMessage, valueType);
|
| | | } else {
|
| | | return null;
|
| | | }
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | return null; // 接收消息失败
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | // RabbitMQUtils.sendMessage("Hello, world!", "module_queue");
|
| | | //RabbitMQUtils.receiveMessage("module_queue");
|
| | | //RabbitMQUtils.sendJsonMessage(someObject, "another_queue");
|
| | | //RabbitMQUtils.receiveJsonMessage(SomeClass.class, "another_queue");
|
| | | // 需要将 someObject 替换为你要发送的对象,并将 SomeClass 替换为你要接收并转换的对象类型。 |
| | |
| | | package com.mes.config; |
| | | |
| | | |
| | | import com.mes.*; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.core.annotation.Order; |
| | | import com.mes.service.Plcaction; |
| | | import com.mes.service.DownGlassInfoService; |
| | | import org.springframework.context.ApplicationListener; |
| | | import org.springframework.context.event.ContextRefreshedEvent; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | @Order(1) |
| | | class AppStartup implements ApplicationListener<ContextRefreshedEvent> { |
| | | |
| | | public class AppRunnerConfig implements ApplicationRunner { |
| | | private final DownGlassInfoService downGlassInfoService; |
| | | |
| | | public AppStartup(DownGlassInfoService downGlassInfoService) { |
| | | this.downGlassInfoService = downGlassInfoService; |
| | | } |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | // TODO Auto-generated method stub |
| | | // |
| | | System.out.println("启动完成"); |
| | | |
| | | |
| | | public void onApplicationEvent(ContextRefreshedEvent event) { |
| | | Plcaction.setDownGlassInfoService(downGlassInfoService); |
| | | new Plcaction().start(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.entity;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.IdType;
|
| | | import com.baomidou.mybatisplus.annotation.TableId;
|
| | | import lombok.Data;
|
| | |
|
| | | @Data
|
| | | public class DownGlassInfo {
|
| | |
|
| | | @TableId(type = IdType.AUTO)
|
| | | private Integer id; // 下片玻璃信息表id
|
| | |
|
| | | private String flowCardId; // 流程卡号
|
| | | private Integer sequence; // 顺序
|
| | | private Double width; // 宽
|
| | | private Double height; // 高
|
| | | private Double thickness; // 厚度
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.entity;
|
| | |
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.IdType;
|
| | | import com.baomidou.mybatisplus.annotation.TableId;
|
| | | import lombok.Data;
|
| | |
|
| | | @Data
|
| | | public class DownStorageCage {
|
| | |
|
| | | @TableId(type = IdType.AUTO)
|
| | | private int id; // 下片前理片笼表id
|
| | | private int deviceId; // 设备id
|
| | | private String slot; // 栅格号
|
| | | private String enableState; // 启用状态
|
| | | private int remainWidth; // 剩余
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.entity;
|
| | | import com.baomidou.mybatisplus.annotation.IdType;
|
| | | import com.baomidou.mybatisplus.annotation.TableId;
|
| | | import lombok.Data;
|
| | |
|
| | | @Data
|
| | | public class DownStorageCageDetails {
|
| | |
|
| | | @TableId(type = IdType.AUTO)
|
| | | private int id; // 下片前理片笼明细表id
|
| | |
|
| | | private int deviceId; // 设备id
|
| | | private int slot; // 栅格号
|
| | | private int glassId; // 玻璃id
|
| | | private int sequence; // 小片在格内的顺序
|
| | | private String flowCardId; // 流程卡号
|
| | | private int glassType; // 玻璃类型
|
| | | private double width; // 宽
|
| | | private double height; // 高
|
| | | private double thickness; // 厚度
|
| | | private int temperingLayoutId; // 钢化版图id
|
| | | private int temperingFeedSequence; // 钢化版图片序
|
| | | private int state; // 状态
|
| | | private int gap; // 玻璃间隙
|
| | | } |
New file |
| | |
| | | package com.mes.entity;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.IdType;
|
| | | import com.baomidou.mybatisplus.annotation.TableId;
|
| | | import lombok.Data;
|
| | |
|
| | | @Data
|
| | | public class DownWorkstation {
|
| | |
|
| | | @TableId(type = IdType.AUTO)
|
| | | private int id; // 下片工位表id
|
| | | private Integer workstationId; // 工位id
|
| | | private String flowCardId; // 流程卡号
|
| | | private Integer deviceId; // 设备id
|
| | | private Integer enableState; // 启用状态
|
| | | private Integer workState; // 工作状态
|
| | | } |
New file |
| | |
| | | package com.mes.entity.device; |
| | | |
| | | public class PlcBitInfo { |
| | | |
| | | public PlcBitInfo(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | |
| | | // 参数名称 |
| | | private String name; |
| | | |
| | | // 读取 参数值 |
| | | private Boolean value; |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Boolean getValue() { |
| | | return this.value; |
| | | } |
| | | |
| | | 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 void setAddressIndex(int addressindex) { |
| | | this.addressIndex = addressindex; |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.entity.device; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class PlcBitObject { |
| | | |
| | | // 该模块数据类型,数据起始位置 |
| | | private String plcAddressBegin; |
| | | // 数据地址长度:第一参数到最后一个参数的长度 |
| | | private int plcAddressLength; |
| | | private ArrayList<PlcBitInfo> plcBitList; |
| | | |
| | | /** |
| | | * @return 数据区开始地址 |
| | | */ |
| | | public String getPlcAddressBegin() { |
| | | return plcAddressBegin; |
| | | } |
| | | |
| | | /** |
| | | * @param plcAddressBegin 设置数据区开始地址 |
| | | */ |
| | | public void setPlcAddressBegin(String plcAddressBegin) { |
| | | this.plcAddressBegin = plcAddressBegin; |
| | | } |
| | | |
| | | /** |
| | | * @return 数据区 读取所有数据所需的长度(以byte类型为基准) |
| | | */ |
| | | public int getPlcAddressLength() { |
| | | return plcAddressLength; |
| | | } |
| | | |
| | | /** |
| | | * @return 设置:数据区 读取所有数据所需的长度(以byte类型为基准) |
| | | */ |
| | | public void setPlcAddressLength(int plcAddressLength) { |
| | | this.plcAddressLength = plcAddressLength; |
| | | } |
| | | |
| | | /** |
| | | * @return 获取参数实例集合 |
| | | */ |
| | | public ArrayList<PlcBitInfo> getBitList() { |
| | | return plcBitList; |
| | | } |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | | public PlcBitInfo getPlcBit(String codeid) { |
| | | if (plcBitList != null) { |
| | | for (PlcBitInfo plcbitInfo : plcBitList) { |
| | | if (plcbitInfo.getCodeId().equals(codeid)) |
| | | return plcbitInfo; |
| | | } |
| | | return null; |
| | | } else |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | | public List<Boolean> getPlcBitValues(List<String> codeids) { |
| | | List<Boolean> arrayList = new ArrayList<>(); |
| | | if (plcBitList != null) { |
| | | Map<String, Boolean> resultMap = new LinkedHashMap<>(); // 使用 LinkedHashMap 保留插入顺序 |
| | | for (PlcBitInfo plcBitInfo : plcBitList) { |
| | | if (codeids.contains(plcBitInfo.getCodeId().toString())) { |
| | | resultMap.put(plcBitInfo.getCodeId().toString(), plcBitInfo.getValue()); |
| | | } |
| | | } |
| | | for (String codeId : codeids) { // 按照传入参数的顺序遍历 |
| | | Boolean value = resultMap.get(codeId); |
| | | if (value != null) { |
| | | arrayList.add(value); |
| | | } else { |
| | | arrayList.add(null); // 如果找不到对应的值,添加 null |
| | | } |
| | | } |
| | | } |
| | | return arrayList; |
| | | } |
| | | |
| | | |
| | | public List<String> getAddressListByCodeId(List<String> codeIdList) { |
| | | List<String> addressList = new ArrayList<>(); |
| | | for (String codeId : codeIdList) { |
| | | for (PlcBitInfo plcBitInfo : plcBitList) { |
| | | if (plcBitInfo.getCodeId().equals(codeId)) { |
| | | int index = plcBitInfo.getAddressIndex(); |
| | | String address = plcBitInfo.getAddress(index); |
| | | if (address != null) { |
| | | addressList.add(address); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return addressList; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加参数实例 |
| | | * |
| | | * @param param 参数实例 |
| | | */ |
| | | public void addPlcBit(PlcBitInfo param) { |
| | | if (plcBitList != null) |
| | | plcBitList.add(param); |
| | | else { |
| | | plcBitList = new ArrayList<PlcBitInfo>(); |
| | | plcBitList.add(param); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据PLC返回的数据 给参数实例赋值 |
| | | * |
| | | * @param plcValueArray PLC读取回来的byte类型数据集合 |
| | | */ |
| | | public void setPlcBitList(List<Boolean> plcValueArray) { |
| | | if (plcBitList != null) { |
| | | for (PlcBitInfo plcbitInfo : plcBitList) { |
| | | plcbitInfo.setValue(plcValueArray.get(plcbitInfo.getAddressIndex())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity.device; |
| | | public class PlcParameterInfo { |
| | | public PlcParameterInfo(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | |
| | | // 参数名称 |
| | | private String name; |
| | | |
| | | // 读取 参数值 |
| | | private String value; |
| | | |
| | | // // 写入 参数值 |
| | | // private String writeValue; |
| | | |
| | | // 参数单位 |
| | | private String unit; |
| | | |
| | | // 参数值转换系数 |
| | | private int ratio; |
| | | |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | |
| | | // 参数地址位长度 |
| | | private int addressLength; |
| | | |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return this.value; |
| | | } |
| | | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | // public String getWriteValue() { |
| | | // return this.writeValue; |
| | | // } |
| | | |
| | | // public void setWriteValue(String writeValue) { |
| | | // this.writeValue = writeValue; |
| | | // } |
| | | |
| | | public String getUnit() { |
| | | return this.unit; |
| | | } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public int getAddressIndex() { |
| | | return this.addressIndex; |
| | | } |
| | | |
| | | public void setAddressIndex(int addressindex) { |
| | | this.addressIndex = addressindex; |
| | | } |
| | | |
| | | public int getAddressLength() { |
| | | return this.addressLength; |
| | | } |
| | | |
| | | public void setAddressLength(int addresslength) { |
| | | this.addressLength = addresslength; |
| | | } |
| | | |
| | | 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 ){ |
| | | return null; |
| | | } |
| | | |
| | | if (addressLength == 2 ) { |
| | | int wordindex = index; |
| | | |
| | | return stringdatas[0] + "." + wordindex; |
| | | } |
| | | if (addressLength == 14 ) { |
| | | int wordindex = index; |
| | | int newIndex = wordindex + 13; |
| | | return stringdatas[0] + "." + wordindex +"-" + newIndex; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public int getPlcAddress() { |
| | | |
| | | return addressIndex; |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.entity.device; |
| | | |
| | | import java.lang.reflect.Array; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class PlcParameterObject { |
| | | |
| | | // 该模块数据类型,数据起始位置 |
| | | private String plcAddressBegin; |
| | | // 数据地址长度:第一参数到最后一个参数的长度 |
| | | private int plcAddressLength; |
| | | private ArrayList<PlcParameterInfo> plcParameterList; |
| | | |
| | | /** |
| | | * @return 数据区开始地址 |
| | | */ |
| | | public String getPlcAddressBegin() { |
| | | return plcAddressBegin; |
| | | } |
| | | |
| | | /** |
| | | * @param plcAddressBegin 设置数据区开始地址 |
| | | */ |
| | | public void setPlcAddressBegin(String plcAddressBegin) { |
| | | this.plcAddressBegin = plcAddressBegin; |
| | | } |
| | | |
| | | /** |
| | | * @return 数据区 读取所有数据所需的长度(以byte类型为基准) |
| | | */ |
| | | public int getPlcAddressLength() { |
| | | return plcAddressLength; |
| | | } |
| | | |
| | | /** |
| | | * @return 设置:数据区 读取所有数据所需的长度(以byte类型为基准) |
| | | */ |
| | | public void setPlcAddressLength(int plcAddressLength) { |
| | | this.plcAddressLength = plcAddressLength; |
| | | } |
| | | |
| | | /** |
| | | * @return 获取参数实例集合 |
| | | */ |
| | | public ArrayList<PlcParameterInfo> getPlcParameterList() { |
| | | return plcParameterList; |
| | | } |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | | public PlcParameterInfo getPlcParameter(String codeid) { |
| | | if (plcParameterList != null) { |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | if (plcParameterInfo.getCodeId().equals(codeid)) |
| | | return plcParameterInfo; |
| | | } |
| | | return null; |
| | | } else |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * @param codeids 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | | public List<String> getPlcParameterValues(List<String> codeids) { |
| | | List<String> arrayList = new ArrayList<>(); |
| | | if (plcParameterList != null) { |
| | | Map<String, PlcParameterInfo> resultMap = new LinkedHashMap<>(); // 使用 LinkedHashMap 保留插入顺序 |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | if (codeids.contains(plcParameterInfo.getCodeId())) { |
| | | resultMap.put(plcParameterInfo.getCodeId(), plcParameterInfo); |
| | | } |
| | | } |
| | | for (String codeId : codeids) { // 按照传入参数的顺序遍历 |
| | | PlcParameterInfo plcParameterInfo = resultMap.get(codeId); |
| | | if (plcParameterInfo != null) { |
| | | arrayList.add(plcParameterInfo.getValue()); |
| | | } else { |
| | | arrayList.add(null); // 如果找不到对应的值,添加 null |
| | | } |
| | | } |
| | | } |
| | | return arrayList; |
| | | } |
| | | |
| | | |
| | | public List<String> getAddressListByCodeId(List<String> codeIdList) { |
| | | List<String> addressList = new ArrayList<>(); |
| | | for (String codeId : codeIdList) { |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | if (plcParameterInfo.getCodeId().equals(codeId)) { |
| | | int index = plcParameterInfo.getAddressIndex(); |
| | | String address = plcParameterInfo.getAddress(index); |
| | | if (address != null) { |
| | | addressList.add(address); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return addressList; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加参数实例 |
| | | * |
| | | * @param param 参数实例 |
| | | */ |
| | | public void addPlcParameter(PlcParameterInfo param) { |
| | | if (plcParameterList != null) |
| | | plcParameterList.add(param); |
| | | else { |
| | | plcParameterList = new ArrayList<PlcParameterInfo>(); |
| | | plcParameterList.add(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()); |
| | | |
| | | for (int i = 0; i < plcParameterInfo.getAddressLength(); i++) { |
| | | Array.setByte(valueList, i, plcValueArray[plcParameterInfo.getAddressIndex() + i]); |
| | | |
| | | } |
| | | if (plcParameterInfo.getAddressLength()==2) { |
| | | plcParameterInfo.setValue(String.valueOf(byte2short(valueList))); |
| | | } |
| | | else if (plcParameterInfo.getAddressLength()==14) { |
| | | plcParameterInfo.setValue((byteToHexString(valueList))); |
| | | } |
| | | |
| | | 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位进行分别存储 |
| | | } |
| | | 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 String byteToHexString(byte[] bytes) { |
| | | |
| | | String str = new String(bytes, StandardCharsets.UTF_8); |
| | | return str; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.mapper;
|
| | |
|
| | | import com.baomidou.dynamic.datasource.annotation.DS;
|
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.entity.DownGlassInfo;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | @Mapper
|
| | | @Repository
|
| | | @InterceptorIgnore(tenantLine = "true")
|
| | | @DS("hangzhoumes") // 指定使用 hangzhoumes 数据源
|
| | | public interface DownGlassInfoMapper extends BaseMapper<DownGlassInfo> {
|
| | | }
|
New file |
| | |
| | | package com.mes.mapper;
|
| | |
|
| | | import com.baomidou.dynamic.datasource.annotation.DS;
|
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.entity.DownStorageCageDetails;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | @Mapper
|
| | | @Repository
|
| | | @InterceptorIgnore(tenantLine = "true")
|
| | | @DS("hangzhoumes") // 指定使用 hangzhoumes 数据源
|
| | | public interface DownStorageCageDetailsMapper extends BaseMapper<DownStorageCageDetails> {
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.mes.mapper;
|
| | |
|
| | | import com.baomidou.dynamic.datasource.annotation.DS;
|
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.entity.DownStorageCage;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | @Mapper
|
| | | @Repository
|
| | | @InterceptorIgnore(tenantLine = "true")
|
| | | @DS("hangzhoumes") // 指定使用 hangzhoumes 数据源
|
| | | public interface DownStorageCageMapper extends BaseMapper<DownStorageCage> {
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.mes.mapper;
|
| | |
|
| | | import com.baomidou.dynamic.datasource.annotation.DS;
|
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.entity.DownWorkstation;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | @Mapper
|
| | | @Repository
|
| | | @InterceptorIgnore(tenantLine = "true")
|
| | | @DS("hangzhoumes") // 指定使用 hangzhoumes 数据源
|
| | | public interface DownWorkstationMapper extends BaseMapper<DownWorkstation> {
|
| | |
|
| | | }
|
| | |
| | | package com.mes.mapper.userInfo; |
| | | |
| | | |
| | | import com.mes.controller.dto.UserDTO; |
| | | import com.mes.entity.userInfo.User; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | List<User> findAll(); |
| | | |
| | | User findOne(Integer id); |
| | | |
| | | @Select("select user_name FROM `user` where login_name=#{LoginName}") |
| | | User findOneLoginName(String LoginName); |
| | | @Select("select count(id) FROM `user` where login_name=#{userName} and password=#{password} ") |
| | | int checkUser(@Param("userName") String userName,@Param("password") String password); |
New file |
| | |
| | | package com.mes.service;
|
| | |
|
| | | import com.baomidou.dynamic.datasource.annotation.DS;
|
| | | import com.mes.entity.DownGlassInfo;
|
| | | import com.mes.mapper.DownGlassInfoMapper;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | @Service
|
| | | @DS("hangzhoumes")
|
| | | public class DownGlassInfoService {
|
| | |
|
| | | @Autowired
|
| | | private DownGlassInfoMapper downGlassInfoMapper;
|
| | |
|
| | | public DownGlassInfo getDownGlassInfoById(Integer id) {
|
| | | return downGlassInfoMapper.selectById(id);
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.mes.service;
|
| | |
|
| | | import com.mes.entity.DownGlassInfo;
|
| | | import com.mes.entity.DownStorageCageDetails;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | public class GlassHandler {
|
| | |
|
| | | private List<DownGlassInfo> glassList; // 存放待处理的玻璃信息
|
| | | private List<DownStorageCageDetails> cageDetailsList; // 存放玻璃放置在缓存笼中的详细信息
|
| | |
|
| | | public void processGlass() {
|
| | | // 初始化两个机器手
|
| | | MachineHand hand1 = new MachineHand();
|
| | | MachineHand hand2 = new MachineHand();
|
| | |
|
| | | for (DownGlassInfo glass : glassList) {
|
| | | // 根据玻璃规格找到对应的缓存笼子详情
|
| | | DownStorageCageDetails cageDetails = findCageDetailsByGlassSpec(glass);
|
| | |
|
| | | if (cageDetails != null) {
|
| | | // 从缓存笼中取出玻璃放到机器手上
|
| | | hand1.placeGlass(cageDetails);
|
| | | hand2.placeGlass(cageDetails);
|
| | | }
|
| | |
|
| | | // 判断两个机器手是否都已经摆满
|
| | | if (hand1.isFull() && hand2.isFull()) {
|
| | | // 执行其他操作,比如发送指令等
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private DownStorageCageDetails findCageDetailsByGlassSpec(DownGlassInfo glass) {
|
| | | // 根据玻璃规格找到对应的缓存笼子详情
|
| | | for (DownStorageCageDetails details : cageDetailsList) {
|
| | | if (details.getWidth() == glass.getWidth() &&
|
| | | details.getHeight() == glass.getHeight() &&
|
| | | details.getThickness() == glass.getThickness()) {
|
| | | return details;
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | private class MachineHand {
|
| | | private List<DownStorageCageDetails> rack; // 存放玻璃的架子
|
| | |
|
| | | public MachineHand() {
|
| | | rack = new ArrayList<>();
|
| | | }
|
| | |
|
| | | public void placeGlass(DownStorageCageDetails details) {
|
| | | rack.add(details);
|
| | | }
|
| | |
|
| | | public boolean isFull() {
|
| | | return rack.size() >= 50; // 判断架子是否已经放满
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
New file |
| | |
| | | package com.mes.service;
|
| | |
|
| | | import com.mes.common.RabbitMQUtils;
|
| | |
|
| | | public class ModuleA {
|
| | | private static String QUEUE_NAME = "hangzhou2";
|
| | | private static RabbitMQUtils receiver;
|
| | |
|
| | | public ModuleA(String QUEUENAME) {
|
| | | QUEUE_NAME = QUEUENAME;
|
| | | receiver = new RabbitMQUtils(); // 实例化 RabbitMQUtils 对象
|
| | | }
|
| | |
|
| | | public static void main(String[] argv) throws Exception {
|
| | | // ModuleA moduleA = new ModuleA("hangzhou2"); // 实例化 ModuleA 对象
|
| | | // String message = "Your message to send666";
|
| | | // String messageId = "5"; // 消息ID
|
| | | // receiver.sendMessageWithId(QUEUE_NAME, message, messageId); // 调用 sendMessageWithId 方法发送消息
|
| | | receiver.sendMessageWithId("hangzhou2", "Hello RabbitMQ!", "1");
|
| | | receiver.sendMessageWithId("hangzhou2", "Another message", "2");
|
| | | receiver.sendMessageWithId("hangzhou2", "Yet another message", "1"); // 这条消息会打印重复消息的错误信息
|
| | |
|
| | | }
|
| | | }
|
| | |
|
New file |
| | |
| | | package com.mes.service;
|
| | |
|
| | | import com.mes.common.RabbitMQUtils;
|
| | |
|
| | | public class ModuleB {
|
| | | private final static String QUEUE_NAME = "hangzhou2";
|
| | |
|
| | | public static void main(String[] argv) throws Exception {
|
| | |
|
| | |
|
| | |
|
| | | RabbitMQUtils receiver = new RabbitMQUtils();
|
| | |
|
| | | try {
|
| | |
|
| | | receiver.consumeMessageById("2",QUEUE_NAME);
|
| | | // String receivedMessage = receiver.consumeSelectedMessage(1,QUEUE_NAME);
|
| | | // String receivedMessage = String.valueOf(receiver.readMessages(QUEUE_NAME,false));
|
| | | // System.out.println("Received message: " + receivedMessage);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | // // 创建连接工厂
|
| | | // ConnectionFactory factory = new ConnectionFactory();
|
| | | // factory.setHost("10.153.19.150");
|
| | | // //factory.setHost("localhost");
|
| | | // try (Connection connection = factory.newConnection();
|
| | | // Channel channel = connection.createChannel()) {
|
| | | // // 声明队列
|
| | | // Map<String, Object> args = new HashMap<>();
|
| | | // args.put("x-max-length-bytes",1024 * 1024);
|
| | | //// args.put("x-max-length",5000);
|
| | | // channel.queueDeclare(QUEUE_NAME, false, false, false, args);
|
| | | //
|
| | | // // 创建消费者
|
| | | // DeliverCallback deliverCallback = (consumerTag, delivery) -> {
|
| | | // String receivedMessage = new String(delivery.getBody(), "UTF-8");
|
| | | // System.out.println(" [x] Received '" + receivedMessage + "'");
|
| | | // };
|
| | | // // 开始消费消息
|
| | | // channel.basicConsume(QUEUE_NAME, true, deliverCallback, consumerTag -> {
|
| | | // });
|
| | | // }
|
| | | }
|
| | | }
|
| | |
|
New file |
| | |
| | | package com.mes.service;
|
| | |
|
| | | import com.mes.entity.DownGlassInfo;
|
| | |
|
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | |
|
| | | public class Plcaction extends Thread {
|
| | |
|
| | | private static DownGlassInfoService downGlassInfoService; // 静态变量
|
| | |
|
| | | public static void setDownGlassInfoService(DownGlassInfoService service) {
|
| | | downGlassInfoService = service;
|
| | | }
|
| | |
|
| | | private List<DownGlassInfo> downGlassInfo; //
|
| | | private int i =1; //
|
| | | @Override
|
| | | public void run() {
|
| | | while (!Thread.currentThread().isInterrupted()) {
|
| | | try {
|
| | | i++;
|
| | | Thread.sleep(1000);
|
| | | } catch (InterruptedException e) {
|
| | | Thread.currentThread().interrupt();
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | downGlassInfo = Collections.singletonList(downGlassInfoService.getDownGlassInfoById(1)); // 设置需要查询的id
|
| | | System.out.println("Down Glass Info in new thread: "+i + downGlassInfo);
|
| | | }
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.mes.service;
|
| | |
|
| | | public class ServiceContextHolder {
|
| | |
|
| | | private static final ThreadLocal<DownGlassInfoService> downGlassInfoServiceThreadLocal = new ThreadLocal<>();
|
| | |
|
| | | public static void setDownGlassInfoService(DownGlassInfoService service) {
|
| | | downGlassInfoServiceThreadLocal.set(service);
|
| | | }
|
| | |
|
| | | public static DownGlassInfoService getDownGlassInfoService() {
|
| | | return downGlassInfoServiceThreadLocal.get();
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.mes.service;
|
| | |
|
| | | import com.mes.entity.DownGlassInfo;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.boot.ApplicationArguments;
|
| | | import org.springframework.boot.ApplicationRunner;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | @Component
|
| | | public class ThreadExample implements ApplicationRunner {
|
| | |
|
| | | @Autowired
|
| | | private DownGlassInfoService downGlassInfoService;
|
| | |
|
| | | @Override
|
| | | public void run(ApplicationArguments args) throws Exception {
|
| | | Thread thread = new Thread(() -> {
|
| | | DownGlassInfo downGlassInfo = downGlassInfoService.getDownGlassInfoById(1); // 设置需要查询的id
|
| | | System.out.println("Down Glass Info in new thread: " + downGlassInfo);
|
| | | });
|
| | | thread.start();
|
| | | }
|
| | |
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.mes.tools;
|
| | |
|
| | | import java.io.FileNotFoundException;
|
| | | import java.io.IOException;
|
| | | import java.io.InputStream;
|
| | | import java.util.Properties;
|
| | |
|
| | | // Configuration 类用于加载配置文件并提供访问配置项的方法。
|
| | | public class Configuration {
|
| | | private Properties properties; // Properties 对象,用于存储配置文件中的键值对。
|
| | |
|
| | | // 构造函数,根据传入的文件名加载配置文件。
|
| | | 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 = new Properties(); // 实例化Properties对象。
|
| | | properties.load(inputStream); // 从输入流加载配置项。
|
| | | }
|
| | |
|
| | | // 根据配置项的键获取其对应的值。
|
| | | public String getProperty(String key) {
|
| | | return properties.getProperty(key);
|
| | | }
|
| | | }
|
New file |
| | |
| | | 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 "";
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.mes.tools;
|
| | |
|
| | | import cn.hutool.json.JSONArray;
|
| | | import cn.hutool.json.JSONObject;
|
| | | import com.mes.common.PlcTools.S7control;
|
| | | import com.mes.entity.device.PlcBitInfo;
|
| | | import com.mes.entity.device.PlcBitObject;
|
| | | import com.mes.entity.device.PlcParameterInfo;
|
| | | import com.mes.entity.device.PlcParameterObject;
|
| | |
|
| | | import java.io.BufferedReader;
|
| | | import java.io.FileReader;
|
| | | import java.io.IOException;
|
| | | import java.util.List;
|
| | |
|
| | | public class InitUtil {
|
| | | //初始化word
|
| | | public static PlcParameterObject initword(String jsonFilePath) {
|
| | | try {
|
| | | FileReader fileReader = new FileReader(jsonFilePath);
|
| | | BufferedReader bufferedReader = new BufferedReader(fileReader);
|
| | |
|
| | | StringBuilder content = new StringBuilder();
|
| | | String line;
|
| | |
|
| | | while ((line = bufferedReader.readLine()) != null) {
|
| | | content.append(line);
|
| | | }
|
| | |
|
| | | bufferedReader.close();
|
| | | fileReader.close();
|
| | |
|
| | | JSONObject jsonfileobj = new JSONObject(content.toString());
|
| | | JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor");
|
| | | PlcParameterObject plcParameterObject = new PlcParameterObject();
|
| | | plcParameterObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址
|
| | | plcParameterObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度
|
| | |
|
| | | for (int i = 0; i < jsonArray.size(); i++) {
|
| | | JSONObject parameterObj = jsonArray.getJSONObject(i);
|
| | | PlcParameterInfo plcParameterInfo = new PlcParameterInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例
|
| | | String codeid = parameterObj.getStr("codeId");
|
| | | plcParameterInfo.setCodeId(codeid);
|
| | | plcParameterInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex")));
|
| | | //plcParameterInfo.setRatio(Integer.valueOf(parameterObj.getStr("ratio")));
|
| | | plcParameterInfo.setAddressLength(Integer.valueOf(parameterObj.getStr("addressLenght")));
|
| | | 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);
|
| | |
|
| | | return plcParameterObject;
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | //初始化bit
|
| | | public static PlcBitObject initbit(String jsonFilePath) {
|
| | | PlcBitObject plcBitObject = new PlcBitObject();
|
| | |
|
| | | try {
|
| | | FileReader fileReader = new FileReader(jsonFilePath);
|
| | | BufferedReader bufferedReader = new BufferedReader(fileReader);
|
| | |
|
| | | StringBuilder content = new StringBuilder();
|
| | | String line;
|
| | |
|
| | | while ((line = bufferedReader.readLine()) != null) {
|
| | | content.append(line);
|
| | | }
|
| | |
|
| | | bufferedReader.close();
|
| | | fileReader.close();
|
| | |
|
| | | JSONObject jsonfileobj = new JSONObject(content.toString());
|
| | | JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor");
|
| | | plcBitObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址
|
| | | plcBitObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度
|
| | |
|
| | | for (int i = 0; i < jsonArray.size(); i++) {
|
| | | JSONObject parameterObj = jsonArray.getJSONObject(i);
|
| | |
|
| | | PlcBitInfo plcBitInfo = new PlcBitInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例
|
| | | String codeid = parameterObj.getStr("codeId");
|
| | | plcBitInfo.setCodeId(codeid);
|
| | | plcBitInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex")));
|
| | |
|
| | | plcBitObject.addPlcBit(plcBitInfo);
|
| | | }
|
| | | System.out.println("");
|
| | | } 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));
|
| | |
|
| | | // 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));
|
| | | 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, 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);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | |
| | | package com.mes.tools; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.websocket.*; |
| | | import javax.websocket.server.PathParam; |
| | | import javax.websocket.server.ServerEndpoint; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import javax.websocket.OnClose; |
| | | import javax.websocket.OnError; |
| | | import javax.websocket.OnMessage; |
| | | import javax.websocket.OnOpen; |
| | | import javax.websocket.Session; |
| | | import javax.websocket.server.PathParam; |
| | | import javax.websocket.server.ServerEndpoint; |
| | | |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | |
| | | @ServerEndpoint(value = "/api/talk/{username}") |
| | | @Component |
| | | @Component("webSocketServer") |
| | | public class WebSocketServer { |
| | | |
| | | // @Autowired |
| | | // HomeMapper homeMapper; |
| | | |
| | | static ConfigurableApplicationContext applicationContext; |
| | | public static ConfigurableApplicationContext applicationContext; |
| | | |
| | | // 解决无法注入mapper问题 //使用方法 |
| | | // homeMapper=WebSocketServer.applicationContext.getBean(HomeMapper.class); |
| | |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | mm: |
| | | url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | 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 |
New file |
| | |
| | | |
| | | server: |
| | | port: 8080 |
| | | servlet: |
| | | context-path: /mesModuleTools |
| | | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: user_info #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | user_info: |
| | | url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | 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 |
New file |
| | |
| | | artifactId=MES-UnLoadGlassModule
|
| | | groupId=com.MES-Module
|
| | | version=0.0.1-SNAPSHOT
|
New file |
| | |
| | | com\mes\controller\OrderTestController.class |
| | | com\mes\service\ModuleB.class |
| | | com\mes\common\PlcTools\S7object2.class |
| | | com\mes\entity\userInfo\SysMenuItem.class |
| | | com\mes\entity\userInfo\User.class |
| | | com\mes\config\MyCorsConfig.class |
| | | com\mes\MesApplication.class |
| | | com\mes\tools\TokenTools.class |
| | | com\mes\controller\userInfo\SysMenuItemController.class |
| | | com\mes\exception\ServiceException.class |
| | | com\mes\service\impl\OrderServiceImpl.class |
| | | com\mes\exception\GlobalExceptionHandle.class |
| | | com\mes\service\userInfo\SysMenuService.class |
| | | com\mes\service\userInfo\SysErrorService.class |
| | | com\mes\tools\WebSocketServer.class |
| | | com\mes\config\MyCorsConfig$1.class |
| | | com\mes\common\Result.class |
| | | com\mes\controller\userInfo\SysMenuController.class |
| | | com\mes\common\PlcTools\S7control.class |
| | | com\mes\service\IOrderService.class |
| | | com\mes\mapper\userInfo\UserMapper.class |
| | | com\mes\common\Constants.class |
| | | com\mes\entity\DownWorkstation.class |
| | | com\mes\entity\userInfo\SysMenu.class |
| | | com\mes\config\AppRunnerConfig.class |
| | | com\mes\entity\DownStorageCageDetails.class |
| | | com\mes\entity\DownStorageCage.class |
| | | com\mes\config\MybatisPlusConfig.class |
| | | com\mes\mapper\userInfo\SysMenuItemMapper.class |
| | | com\mes\controller\dto\UserDTO.class |
| | | com\mes\common\CacheUtil.class |
| | | com\mes\common\PlcTools\S7object.class |
| | | com\mes\service\userInfo\UserService.class |
| | | com\mes\entity\DownGlassInfo.class |
| | | com\mes\config\InterceptorConfig.class |
| | | com\mes\entity\userInfo\SysError.class |
| | | com\mes\service\ModuleA.class |
| | | com\mes\config\WebSocketConfig.class |
| | | com\mes\service\userInfo\SysMenuItemService.class |
| | | com\mes\config\SwaggerConfig.class |
| | | com\mes\controller\userInfo\UserController.class |
| | | com\mes\mapper\userInfo\SysMenuMapper.class |
| | | com\mes\entity\OrderTest.class |
| | | com\mes\mapper\OrderTestMapper.class |
| | | com\mes\mapper\userInfo\SysErrorMapper.class |
| | | com\mes\common\interceptor\JwtInterceptor.class |
New file |
| | |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\entity\userInfo\User.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\MesApplication.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\config\SwaggerConfig.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\entity\DownStorageCage.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\common\CacheUtil.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\common\interceptor\JwtInterceptor.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\common\PlcTools\S7control.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\config\MybatisPlusConfig.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\config\WebSocketConfig.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\entity\userInfo\SysMenu.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\common\PlcTools\S7object.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\controller\userInfo\SysMenuController.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\exception\ServiceException.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\mapper\userInfo\SysErrorMapper.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\config\InterceptorConfig.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\config\AppRunnerConfig.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\mapper\userInfo\SysMenuItemMapper.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\mapper\userInfo\SysMenuMapper.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\service\userInfo\SysMenuItemService.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\common\Result.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\entity\DownWorkstation.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\entity\userInfo\SysError.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\tools\WebSocketServer.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\common\PlcTools\S7object2.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\service\ModuleA.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\service\userInfo\SysErrorService.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\config\MyCorsConfig.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\entity\OrderTest.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\service\userInfo\UserService.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\controller\userInfo\SysMenuItemController.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\service\IOrderService.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\common\Constants.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\controller\OrderTestController.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\exception\GlobalExceptionHandle.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\tools\TokenTools.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\service\ModuleB.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\mapper\userInfo\UserMapper.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\entity\DownGlassInfo.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\controller\userInfo\UserController.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\entity\DownStorageCageDetails.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\service\userInfo\SysMenuService.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\entity\userInfo\SysMenuItem.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\service\impl\OrderServiceImpl.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\controller\dto\UserDTO.java |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\main\java\com\mes\mapper\OrderTestMapper.java |
New file |
| | |
| | | com\mes\MesApplicationTests.class |
New file |
| | |
| | | D:\xm4\HangZhouMes\UnLoadGlassModule\src\test\java\com\mes\MesApplicationTests.java |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="com.mes.MesApplicationTests" time="7.757" tests="1" errors="0" skipped="0" failures="0">
|
| | | <properties>
|
| | | <property name="sun.desktop" value="windows"/>
|
| | | <property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
|
| | | <property name="file.encoding.pkg" value="sun.io"/>
|
| | | <property name="java.specification.version" value="1.8"/>
|
| | | <property name="sun.cpu.isalist" value="amd64"/>
|
| | | <property name="sun.jnu.encoding" value="GBK"/>
|
| | | <property name="java.class.path" value="D:\xm4\HangZhouMes\UnLoadGlassModule\target\test-classes;D:\xm4\HangZhouMes\UnLoadGlassModule\target\classes;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.5.9\spring-boot-starter-web-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter\2.5.9\spring-boot-starter-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot\2.5.9\spring-boot-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.5.9\spring-boot-starter-logging-2.5.9.jar;C:\Users\SNG-012\.m2\repository\ch\qos\logback\logback-classic\1.2.10\logback-classic-1.2.10.jar;C:\Users\SNG-012\.m2\repository\ch\qos\logback\logback-core\1.2.10\logback-core-1.2.10.jar;C:\Users\SNG-012\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.17.1\log4j-to-slf4j-2.17.1.jar;C:\Users\SNG-012\.m2\repository\org\apache\logging\log4j\log4j-api\2.17.1\log4j-api-2.17.1.jar;C:\Users\SNG-012\.m2\repository\org\slf4j\jul-to-slf4j\1.7.33\jul-to-slf4j-1.7.33.jar;C:\Users\SNG-012\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;C:\Users\SNG-012\.m2\repository\org\yaml\snakeyaml\1.28\snakeyaml-1.28.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.5.9\spring-boot-starter-json-2.5.9.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.12.6\jackson-datatype-jdk8-2.12.6.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.12.6\jackson-datatype-jsr310-2.12.6.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.12.6\jackson-module-parameter-names-2.12.6.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.5.9\spring-boot-starter-tomcat-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.56\tomcat-embed-core-9.0.56.jar;C:\Users\SNG-012\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.56\tomcat-embed-el-9.0.56.jar;C:\Users\SNG-012\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.56\tomcat-embed-websocket-9.0.56.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-web\5.3.15\spring-web-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-webmvc\5.3.15\spring-webmvc-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-aop\5.3.15\spring-aop-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-context\5.3.15\spring-context-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-expression\5.3.15\spring-expression-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.3.1\mybatis-spring-boot-starter-2.3.1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\2.5.9\spring-boot-starter-jdbc-2.5.9.jar;C:\Users\SNG-012\.m2\repository\com\zaxxer\HikariCP\4.0.3\HikariCP-4.0.3.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-jdbc\5.3.15\spring-jdbc-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.3.1\mybatis-spring-boot-autoconfigure-2.3.1.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\mybatis\3.5.13\mybatis-3.5.13.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\mybatis-spring\2.1.1\mybatis-spring-2.1.1.jar;C:\Users\SNG-012\.m2\repository\com\alibaba\fastjson\1.2.70\fastjson-1.2.70.jar;C:\Users\SNG-012\.m2\repository\org\springframework\data\spring-data-commons\2.3.1.RELEASE\spring-data-commons-2.3.1.RELEASE.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-core\5.3.15\spring-core-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-jcl\5.3.15\spring-jcl-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-beans\5.3.15\spring-beans-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\slf4j\slf4j-api\1.7.33\slf4j-api-1.7.33.jar;C:\Users\SNG-012\.m2\repository\mysql\mysql-connector-java\8.0.20\mysql-connector-java-8.0.20.jar;C:\Users\SNG-012\.m2\repository\org\projectlombok\lombok\1.18.22\lombok-1.18.22.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-test\2.5.9\spring-boot-starter-test-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-test\2.5.9\spring-boot-test-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-test-autoconfigure\2.5.9\spring-boot-test-autoconfigure-2.5.9.jar;C:\Users\SNG-012\.m2\repository\com\jayway\jsonpath\json-path\2.5.0\json-path-2.5.0.jar;C:\Users\SNG-012\.m2\repository\net\minidev\json-smart\2.4.7\json-smart-2.4.7.jar;C:\Users\SNG-012\.m2\repository\net\minidev\accessors-smart\2.4.7\accessors-smart-2.4.7.jar;C:\Users\SNG-012\.m2\repository\org\ow2\asm\asm\9.1\asm-9.1.jar;C:\Users\SNG-012\.m2\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;C:\Users\SNG-012\.m2\repository\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar;C:\Users\SNG-012\.m2\repository\org\hamcrest\hamcrest\2.2\hamcrest-2.2.jar;C:\Users\SNG-012\.m2\repository\org\junit\jupiter\junit-jupiter\5.7.2\junit-jupiter-5.7.2.jar;C:\Users\SNG-012\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.7.2\junit-jupiter-api-5.7.2.jar;C:\Users\SNG-012\.m2\repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;C:\Users\SNG-012\.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\Users\SNG-012\.m2\repository\org\junit\platform\junit-platform-commons\1.7.2\junit-platform-commons-1.7.2.jar;C:\Users\SNG-012\.m2\repository\org\junit\jupiter\junit-jupiter-params\5.7.2\junit-jupiter-params-5.7.2.jar;C:\Users\SNG-012\.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.7.2\junit-jupiter-engine-5.7.2.jar;C:\Users\SNG-012\.m2\repository\org\junit\platform\junit-platform-engine\1.7.2\junit-platform-engine-1.7.2.jar;C:\Users\SNG-012\.m2\repository\org\mockito\mockito-core\3.9.0\mockito-core-3.9.0.jar;C:\Users\SNG-012\.m2\repository\net\bytebuddy\byte-buddy\1.10.22\byte-buddy-1.10.22.jar;C:\Users\SNG-012\.m2\repository\net\bytebuddy\byte-buddy-agent\1.10.22\byte-buddy-agent-1.10.22.jar;C:\Users\SNG-012\.m2\repository\org\objenesis\objenesis\3.2\objenesis-3.2.jar;C:\Users\SNG-012\.m2\repository\org\mockito\mockito-junit-jupiter\3.9.0\mockito-junit-jupiter-3.9.0.jar;C:\Users\SNG-012\.m2\repository\org\skyscreamer\jsonassert\1.5.0\jsonassert-1.5.0.jar;C:\Users\SNG-012\.m2\repository\com\vaadin\external\google\android-json\0.0.20131108.vaadin1\android-json-0.0.20131108.vaadin1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-test\5.3.15\spring-test-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\xmlunit\xmlunit-core\2.8.4\xmlunit-core-2.8.4.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-starter-test\2.3.1\mybatis-spring-boot-starter-test-2.3.1.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-test-autoconfigure\2.3.1\mybatis-spring-boot-test-autoconfigure-2.3.1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-tx\5.3.15\spring-tx-5.3.15.jar;C:\Users\SNG-012\.m2\repository\com\auth0\java-jwt\3.10.3\java-jwt-3.10.3.jar;C:\Users\SNG-012\.m2\repository\commons-codec\commons-codec\1.15\commons-codec-1.15.jar;C:\Users\SNG-012\.m2\repository\org\assertj\assertj-core\3.19.0\assertj-core-3.19.0.jar;C:\Users\SNG-012\.m2\repository\cn\hutool\hutool-all\5.4.0\hutool-all-5.4.0.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\mybatis-plus-boot-starter\3.5.1\mybatis-plus-boot-starter-3.5.1.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\mybatis-plus\3.5.1\mybatis-plus-3.5.1.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\mybatis-plus-extension\3.5.1\mybatis-plus-extension-3.5.1.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\mybatis-plus-core\3.5.1\mybatis-plus-core-3.5.1.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\mybatis-plus-annotation\3.5.1\mybatis-plus-annotation-3.5.1.jar;C:\Users\SNG-012\.m2\repository\com\github\jsqlparser\jsqlparser\4.3\jsqlparser-4.3.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.5.9\spring-boot-autoconfigure-2.5.9.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\dynamic-datasource-spring-boot-starter\3.5.1\dynamic-datasource-spring-boot-starter-3.5.1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.5.9\spring-boot-starter-aop-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\aspectj\aspectjweaver\1.9.7\aspectjweaver-1.9.7.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-swagger2\2.9.2\springfox-swagger2-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\swagger\swagger-models\1.5.20\swagger-models-1.5.20.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-spi\2.9.2\springfox-spi-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-core\2.9.2\springfox-core-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-schema\2.9.2\springfox-schema-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-swagger-common\2.9.2\springfox-swagger-common-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-spring-web\2.9.2\springfox-spring-web-2.9.2.jar;C:\Users\SNG-012\.m2\repository\com\google\guava\guava\20.0\guava-20.0.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\plugin\spring-plugin-core\1.2.0.RELEASE\spring-plugin-core-1.2.0.RELEASE.jar;C:\Users\SNG-012\.m2\repository\org\springframework\plugin\spring-plugin-metadata\1.2.0.RELEASE\spring-plugin-metadata-1.2.0.RELEASE.jar;C:\Users\SNG-012\.m2\repository\org\mapstruct\mapstruct\1.2.0.Final\mapstruct-1.2.0.Final.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-swagger-ui\2.9.2\springfox-swagger-ui-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\swagger\swagger-annotations\1.5.20\swagger-annotations-1.5.20.jar;C:\Users\SNG-012\.m2\repository\com\github\xingshuangs\iot-communication\1.4.2\iot-communication-1.4.2.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-cache\2.5.9\spring-boot-starter-cache-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-context-support\5.3.15\spring-context-support-5.3.15.jar;C:\Users\SNG-012\.m2\repository\com\rabbitmq\amqp-client\5.13.1\amqp-client-5.13.1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-amqp\2.5.9\spring-boot-starter-amqp-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-messaging\5.3.15\spring-messaging-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\amqp\spring-rabbit\2.3.14\spring-rabbit-2.3.14.jar;C:\Users\SNG-012\.m2\repository\org\springframework\amqp\spring-amqp\2.3.14\spring-amqp-2.3.14.jar;C:\Users\SNG-012\.m2\repository\org\springframework\retry\spring-retry\1.3.1\spring-retry-1.3.1.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.13.0\jackson-databind-2.13.0.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.13.0\jackson-core-2.13.0.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.13.0\jackson-annotations-2.13.0.jar;C:\Users\SNG-012\.m2\repository\io\netty\netty-all\4.1.36.Final\netty-all-4.1.36.Final.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.5.9\spring-boot-starter-data-jpa-2.5.9.jar;C:\Users\SNG-012\.m2\repository\jakarta\transaction\jakarta.transaction-api\1.3.3\jakarta.transaction-api-1.3.3.jar;C:\Users\SNG-012\.m2\repository\jakarta\persistence\jakarta.persistence-api\2.2.3\jakarta.persistence-api-2.2.3.jar;C:\Users\SNG-012\.m2\repository\org\hibernate\hibernate-core\5.4.33\hibernate-core-5.4.33.jar;C:\Users\SNG-012\.m2\repository\org\jboss\logging\jboss-logging\3.4.3.Final\jboss-logging-3.4.3.Final.jar;C:\Users\SNG-012\.m2\repository\org\javassist\javassist\3.27.0-GA\javassist-3.27.0-GA.jar;C:\Users\SNG-012\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\SNG-012\.m2\repository\org\jboss\jandex\2.2.3.Final\jandex-2.2.3.Final.jar;C:\Users\SNG-012\.m2\repository\org\dom4j\dom4j\2.1.3\dom4j-2.1.3.jar;C:\Users\SNG-012\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.1.2.Final\hibernate-commons-annotations-5.1.2.Final.jar;C:\Users\SNG-012\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.5\jaxb-runtime-2.3.5.jar;C:\Users\SNG-012\.m2\repository\org\glassfish\jaxb\txw2\2.3.5\txw2-2.3.5.jar;C:\Users\SNG-012\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.12\istack-commons-runtime-3.0.12.jar;C:\Users\SNG-012\.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\SNG-012\.m2\repository\org\springframework\data\spring-data-jpa\2.5.8\spring-data-jpa-2.5.8.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-orm\5.3.15\spring-orm-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-aspects\5.3.15\spring-aspects-5.3.15.jar;"/>
|
| | | <property name="java.vm.vendor" value="Oracle Corporation"/>
|
| | | <property name="sun.arch.data.model" value="64"/>
|
| | | <property name="user.variant" value=""/>
|
| | | <property name="java.vendor.url" value="http://java.oracle.com/"/>
|
| | | <property name="user.timezone" value="Asia/Shanghai"/>
|
| | | <property name="java.vm.specification.version" value="1.8"/>
|
| | | <property name="os.name" value="Windows 10"/>
|
| | | <property name="user.country" value="CN"/>
|
| | | <property name="sun.java.launcher" value="SUN_STANDARD"/>
|
| | | <property name="sun.boot.library.path" value="C:\Program Files\Java\jdk1.8.0_121\jre\bin"/>
|
| | | <property name="sun.java.command" value="C:\Users\SNG-012\AppData\Local\Temp\surefire6753504794343487260\surefirebooter2512628117312458217.jar C:\Users\SNG-012\AppData\Local\Temp\surefire6753504794343487260 2024-02-26T10-31-20_305-jvmRun1 surefire218270707117368528tmp surefire_05038678481118318350tmp"/>
|
| | | <property name="surefire.test.class.path" value="D:\xm4\HangZhouMes\UnLoadGlassModule\target\test-classes;D:\xm4\HangZhouMes\UnLoadGlassModule\target\classes;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.5.9\spring-boot-starter-web-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter\2.5.9\spring-boot-starter-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot\2.5.9\spring-boot-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.5.9\spring-boot-starter-logging-2.5.9.jar;C:\Users\SNG-012\.m2\repository\ch\qos\logback\logback-classic\1.2.10\logback-classic-1.2.10.jar;C:\Users\SNG-012\.m2\repository\ch\qos\logback\logback-core\1.2.10\logback-core-1.2.10.jar;C:\Users\SNG-012\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.17.1\log4j-to-slf4j-2.17.1.jar;C:\Users\SNG-012\.m2\repository\org\apache\logging\log4j\log4j-api\2.17.1\log4j-api-2.17.1.jar;C:\Users\SNG-012\.m2\repository\org\slf4j\jul-to-slf4j\1.7.33\jul-to-slf4j-1.7.33.jar;C:\Users\SNG-012\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;C:\Users\SNG-012\.m2\repository\org\yaml\snakeyaml\1.28\snakeyaml-1.28.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.5.9\spring-boot-starter-json-2.5.9.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.12.6\jackson-datatype-jdk8-2.12.6.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.12.6\jackson-datatype-jsr310-2.12.6.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.12.6\jackson-module-parameter-names-2.12.6.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.5.9\spring-boot-starter-tomcat-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.56\tomcat-embed-core-9.0.56.jar;C:\Users\SNG-012\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.56\tomcat-embed-el-9.0.56.jar;C:\Users\SNG-012\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.56\tomcat-embed-websocket-9.0.56.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-web\5.3.15\spring-web-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-webmvc\5.3.15\spring-webmvc-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-aop\5.3.15\spring-aop-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-context\5.3.15\spring-context-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-expression\5.3.15\spring-expression-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.3.1\mybatis-spring-boot-starter-2.3.1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\2.5.9\spring-boot-starter-jdbc-2.5.9.jar;C:\Users\SNG-012\.m2\repository\com\zaxxer\HikariCP\4.0.3\HikariCP-4.0.3.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-jdbc\5.3.15\spring-jdbc-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.3.1\mybatis-spring-boot-autoconfigure-2.3.1.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\mybatis\3.5.13\mybatis-3.5.13.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\mybatis-spring\2.1.1\mybatis-spring-2.1.1.jar;C:\Users\SNG-012\.m2\repository\com\alibaba\fastjson\1.2.70\fastjson-1.2.70.jar;C:\Users\SNG-012\.m2\repository\org\springframework\data\spring-data-commons\2.3.1.RELEASE\spring-data-commons-2.3.1.RELEASE.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-core\5.3.15\spring-core-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-jcl\5.3.15\spring-jcl-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-beans\5.3.15\spring-beans-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\slf4j\slf4j-api\1.7.33\slf4j-api-1.7.33.jar;C:\Users\SNG-012\.m2\repository\mysql\mysql-connector-java\8.0.20\mysql-connector-java-8.0.20.jar;C:\Users\SNG-012\.m2\repository\org\projectlombok\lombok\1.18.22\lombok-1.18.22.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-test\2.5.9\spring-boot-starter-test-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-test\2.5.9\spring-boot-test-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-test-autoconfigure\2.5.9\spring-boot-test-autoconfigure-2.5.9.jar;C:\Users\SNG-012\.m2\repository\com\jayway\jsonpath\json-path\2.5.0\json-path-2.5.0.jar;C:\Users\SNG-012\.m2\repository\net\minidev\json-smart\2.4.7\json-smart-2.4.7.jar;C:\Users\SNG-012\.m2\repository\net\minidev\accessors-smart\2.4.7\accessors-smart-2.4.7.jar;C:\Users\SNG-012\.m2\repository\org\ow2\asm\asm\9.1\asm-9.1.jar;C:\Users\SNG-012\.m2\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;C:\Users\SNG-012\.m2\repository\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar;C:\Users\SNG-012\.m2\repository\org\hamcrest\hamcrest\2.2\hamcrest-2.2.jar;C:\Users\SNG-012\.m2\repository\org\junit\jupiter\junit-jupiter\5.7.2\junit-jupiter-5.7.2.jar;C:\Users\SNG-012\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.7.2\junit-jupiter-api-5.7.2.jar;C:\Users\SNG-012\.m2\repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;C:\Users\SNG-012\.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\Users\SNG-012\.m2\repository\org\junit\platform\junit-platform-commons\1.7.2\junit-platform-commons-1.7.2.jar;C:\Users\SNG-012\.m2\repository\org\junit\jupiter\junit-jupiter-params\5.7.2\junit-jupiter-params-5.7.2.jar;C:\Users\SNG-012\.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.7.2\junit-jupiter-engine-5.7.2.jar;C:\Users\SNG-012\.m2\repository\org\junit\platform\junit-platform-engine\1.7.2\junit-platform-engine-1.7.2.jar;C:\Users\SNG-012\.m2\repository\org\mockito\mockito-core\3.9.0\mockito-core-3.9.0.jar;C:\Users\SNG-012\.m2\repository\net\bytebuddy\byte-buddy\1.10.22\byte-buddy-1.10.22.jar;C:\Users\SNG-012\.m2\repository\net\bytebuddy\byte-buddy-agent\1.10.22\byte-buddy-agent-1.10.22.jar;C:\Users\SNG-012\.m2\repository\org\objenesis\objenesis\3.2\objenesis-3.2.jar;C:\Users\SNG-012\.m2\repository\org\mockito\mockito-junit-jupiter\3.9.0\mockito-junit-jupiter-3.9.0.jar;C:\Users\SNG-012\.m2\repository\org\skyscreamer\jsonassert\1.5.0\jsonassert-1.5.0.jar;C:\Users\SNG-012\.m2\repository\com\vaadin\external\google\android-json\0.0.20131108.vaadin1\android-json-0.0.20131108.vaadin1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-test\5.3.15\spring-test-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\xmlunit\xmlunit-core\2.8.4\xmlunit-core-2.8.4.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-starter-test\2.3.1\mybatis-spring-boot-starter-test-2.3.1.jar;C:\Users\SNG-012\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-test-autoconfigure\2.3.1\mybatis-spring-boot-test-autoconfigure-2.3.1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-tx\5.3.15\spring-tx-5.3.15.jar;C:\Users\SNG-012\.m2\repository\com\auth0\java-jwt\3.10.3\java-jwt-3.10.3.jar;C:\Users\SNG-012\.m2\repository\commons-codec\commons-codec\1.15\commons-codec-1.15.jar;C:\Users\SNG-012\.m2\repository\org\assertj\assertj-core\3.19.0\assertj-core-3.19.0.jar;C:\Users\SNG-012\.m2\repository\cn\hutool\hutool-all\5.4.0\hutool-all-5.4.0.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\mybatis-plus-boot-starter\3.5.1\mybatis-plus-boot-starter-3.5.1.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\mybatis-plus\3.5.1\mybatis-plus-3.5.1.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\mybatis-plus-extension\3.5.1\mybatis-plus-extension-3.5.1.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\mybatis-plus-core\3.5.1\mybatis-plus-core-3.5.1.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\mybatis-plus-annotation\3.5.1\mybatis-plus-annotation-3.5.1.jar;C:\Users\SNG-012\.m2\repository\com\github\jsqlparser\jsqlparser\4.3\jsqlparser-4.3.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.5.9\spring-boot-autoconfigure-2.5.9.jar;C:\Users\SNG-012\.m2\repository\com\baomidou\dynamic-datasource-spring-boot-starter\3.5.1\dynamic-datasource-spring-boot-starter-3.5.1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.5.9\spring-boot-starter-aop-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\aspectj\aspectjweaver\1.9.7\aspectjweaver-1.9.7.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-swagger2\2.9.2\springfox-swagger2-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\swagger\swagger-models\1.5.20\swagger-models-1.5.20.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-spi\2.9.2\springfox-spi-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-core\2.9.2\springfox-core-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-schema\2.9.2\springfox-schema-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-swagger-common\2.9.2\springfox-swagger-common-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-spring-web\2.9.2\springfox-spring-web-2.9.2.jar;C:\Users\SNG-012\.m2\repository\com\google\guava\guava\20.0\guava-20.0.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\plugin\spring-plugin-core\1.2.0.RELEASE\spring-plugin-core-1.2.0.RELEASE.jar;C:\Users\SNG-012\.m2\repository\org\springframework\plugin\spring-plugin-metadata\1.2.0.RELEASE\spring-plugin-metadata-1.2.0.RELEASE.jar;C:\Users\SNG-012\.m2\repository\org\mapstruct\mapstruct\1.2.0.Final\mapstruct-1.2.0.Final.jar;C:\Users\SNG-012\.m2\repository\io\springfox\springfox-swagger-ui\2.9.2\springfox-swagger-ui-2.9.2.jar;C:\Users\SNG-012\.m2\repository\io\swagger\swagger-annotations\1.5.20\swagger-annotations-1.5.20.jar;C:\Users\SNG-012\.m2\repository\com\github\xingshuangs\iot-communication\1.4.2\iot-communication-1.4.2.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-cache\2.5.9\spring-boot-starter-cache-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-context-support\5.3.15\spring-context-support-5.3.15.jar;C:\Users\SNG-012\.m2\repository\com\rabbitmq\amqp-client\5.13.1\amqp-client-5.13.1.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-amqp\2.5.9\spring-boot-starter-amqp-2.5.9.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-messaging\5.3.15\spring-messaging-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\amqp\spring-rabbit\2.3.14\spring-rabbit-2.3.14.jar;C:\Users\SNG-012\.m2\repository\org\springframework\amqp\spring-amqp\2.3.14\spring-amqp-2.3.14.jar;C:\Users\SNG-012\.m2\repository\org\springframework\retry\spring-retry\1.3.1\spring-retry-1.3.1.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.13.0\jackson-databind-2.13.0.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.13.0\jackson-core-2.13.0.jar;C:\Users\SNG-012\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.13.0\jackson-annotations-2.13.0.jar;C:\Users\SNG-012\.m2\repository\io\netty\netty-all\4.1.36.Final\netty-all-4.1.36.Final.jar;C:\Users\SNG-012\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.5.9\spring-boot-starter-data-jpa-2.5.9.jar;C:\Users\SNG-012\.m2\repository\jakarta\transaction\jakarta.transaction-api\1.3.3\jakarta.transaction-api-1.3.3.jar;C:\Users\SNG-012\.m2\repository\jakarta\persistence\jakarta.persistence-api\2.2.3\jakarta.persistence-api-2.2.3.jar;C:\Users\SNG-012\.m2\repository\org\hibernate\hibernate-core\5.4.33\hibernate-core-5.4.33.jar;C:\Users\SNG-012\.m2\repository\org\jboss\logging\jboss-logging\3.4.3.Final\jboss-logging-3.4.3.Final.jar;C:\Users\SNG-012\.m2\repository\org\javassist\javassist\3.27.0-GA\javassist-3.27.0-GA.jar;C:\Users\SNG-012\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\SNG-012\.m2\repository\org\jboss\jandex\2.2.3.Final\jandex-2.2.3.Final.jar;C:\Users\SNG-012\.m2\repository\org\dom4j\dom4j\2.1.3\dom4j-2.1.3.jar;C:\Users\SNG-012\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.1.2.Final\hibernate-commons-annotations-5.1.2.Final.jar;C:\Users\SNG-012\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.5\jaxb-runtime-2.3.5.jar;C:\Users\SNG-012\.m2\repository\org\glassfish\jaxb\txw2\2.3.5\txw2-2.3.5.jar;C:\Users\SNG-012\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.12\istack-commons-runtime-3.0.12.jar;C:\Users\SNG-012\.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\SNG-012\.m2\repository\org\springframework\data\spring-data-jpa\2.5.8\spring-data-jpa-2.5.8.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-orm\5.3.15\spring-orm-5.3.15.jar;C:\Users\SNG-012\.m2\repository\org\springframework\spring-aspects\5.3.15\spring-aspects-5.3.15.jar;"/>
|
| | | <property name="sun.cpu.endian" value="little"/>
|
| | | <property name="user.home" value="C:\Users\SNG-012"/>
|
| | | <property name="user.language" value="zh"/>
|
| | | <property name="java.specification.vendor" value="Oracle Corporation"/>
|
| | | <property name="java.home" value="C:\Program Files\Java\jdk1.8.0_121\jre"/>
|
| | | <property name="basedir" value="D:\xm4\HangZhouMes\UnLoadGlassModule"/>
|
| | | <property name="file.separator" value="\"/>
|
| | | <property name="line.separator" value=" "/>
|
| | | <property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
| | | <property name="java.specification.name" value="Java Platform API Specification"/>
|
| | | <property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
|
| | | <property name="surefire.real.class.path" value="C:\Users\SNG-012\AppData\Local\Temp\surefire6753504794343487260\surefirebooter2512628117312458217.jar"/>
|
| | | <property name="sun.boot.class.path" value="C:\Program Files\Java\jdk1.8.0_121\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_121\jre\classes"/>
|
| | | <property name="user.script" value=""/>
|
| | | <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
| | | <property name="java.runtime.version" value="1.8.0_121-b13"/>
|
| | | <property name="user.name" value="SNG-012"/>
|
| | | <property name="path.separator" value=";"/>
|
| | | <property name="os.version" value="10.0"/>
|
| | | <property name="java.endorsed.dirs" value="C:\Program Files\Java\jdk1.8.0_121\jre\lib\endorsed"/>
|
| | | <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
|
| | | <property name="file.encoding" value="GBK"/>
|
| | | <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
|
| | | <property name="localRepository" value="C:\Users\SNG-012\.m2\repository"/>
|
| | | <property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
|
| | | <property name="java.io.tmpdir" value="C:\Users\SNG-012\AppData\Local\Temp\"/>
|
| | | <property name="idea.version" value="2021.1.3"/>
|
| | | <property name="java.version" value="1.8.0_121"/>
|
| | | <property name="user.dir" value="D:\xm4\HangZhouMes\UnLoadGlassModule"/>
|
| | | <property name="os.arch" value="amd64"/>
|
| | | <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
| | | <property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
|
| | | <property name="sun.os.patch.level" value=""/>
|
| | | <property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_121\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\vm\bin\;D:\jdk17.0.8\bin;D:\apache-jmeter-5.4.1\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:/benxiaohai/mysql8/mysql8/mysql8\bin;C:\Program Files\Java\jdk1.8.0_121\bin;C:\Program Files\Tomcat\apache-tomcat-8.0.39\bin;D:\下载\ADB;D;\github\platform-tools;C:\Program Files\python;C:\Program Files\python\Scripts;D:\BtSoft\panel\script;C:\Program Files\Google\Chrome\Application;C:\Program Files\apache-maven-3.9.1\bin;D:\微信web开发者工具\dll;C:\Pro;ram Files (x86)\NetSarang\Xshell 7\;C:\Program Files\Git\cmd;C:\Program Files\TortoiseGit\bin;D:\工作\apache-ant-1.9.16-bin\apache-ant-1.9.16\bin;D:\工作\Microsoft VS Code\bin;C:\Program Files (x86)\nodejs\;C:\Program Files\Tomcat2\apache-tomcat2\bin;C:\Program Files\Docker;C:\Program Files\Docker\Docker\resources\bin;D:\Erlang OTP\bin;D:\MQ\rabbitmq_server-3.12.12\sbin;D:\python\Scripts\;D:\python\;C:\Users\SNG-012\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Google\Chrome\Application;C:\Users\SNG-012\AppData\Roaming\npm;."/>
|
| | | <property name="java.vm.info" value="mixed mode"/>
|
| | | <property name="java.vendor" value="Oracle Corporation"/>
|
| | | <property name="java.vm.version" value="25.121-b13"/>
|
| | | <property name="java.ext.dirs" value="C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext;C:\Windows\Sun\Java\lib\ext"/>
|
| | | <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
| | | <property name="java.class.version" value="52.0"/>
|
| | | </properties>
|
| | | <testcase name="contextLoads" classname="com.mes.MesApplicationTests" time="0.09"/>
|
| | | </testsuite> |
New file |
| | |
| | | -------------------------------------------------------------------------------
|
| | | Test set: com.mes.MesApplicationTests
|
| | | -------------------------------------------------------------------------------
|
| | | Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.757 s - in com.mes.MesApplicationTests
|