From 8202416bb5fae55d50fd1d598acc56d79846f776 Mon Sep 17 00:00:00 2001
From: 严智鑫 <test>
Date: 星期二, 26 三月 2024 12:28:28 +0800
Subject: [PATCH] 更新
---
CacheGlassModule/.vs/slnx.sqlite | 0
CacheGlassModule/pom.xml | 44 +
CacheGlassModule/src/main/java/com/mes/entity/DownStorageCage.java | 18
CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCage.java | 18
CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils33.java | 178 ++++++
CacheGlassModule/src/main/java/com/mes/service/MqMessage.java | 56 ++
CacheGlassModule/src/main/resources/application.yml | 4
CacheGlassModule/src/main/java/com/mes/entity/DownStorageCagedetails.java | 27 +
CacheVerticalGlassModule/target/classes/application.yml | 32 +
CacheGlassModule/src/main/java/com/mes/mapper/SelectInfo.java | 30 +
CacheGlassModule/src/main/java/com/mes/entity/GlassInfo.java | 34 +
UI-Project/src/views/TL/Temperedlayout/Temperedlayout.vue | 207 +++++++
CacheGlassModule/src/main/java/com/mes/entity/DownWorkstation.java | 19
CacheGlassModule/src/main/java/com/mes/entity/DownGlassInfo.java | 19
CacheGlassModule/src/main/java/com/mes/entity/Engineering.java | 30 +
CacheGlassModule/src/main/java/com/mes/entity/Tempered.java | 35 +
CacheGlassModule/src/main/java/com/mes/entity/UpWorkstation.java | 23
CacheGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java | 3
CacheVerticalGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java | 2
CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCageDetails.java | 30 +
CacheVerticalGlassModule/.vs/VSWorkspaceState.json | 6
TemperingGlassModule/target/classes/application.yml | 32 +
CacheGlassModule/src/main/java/com/mes/entity/GlassFilms.java | 17
CacheGlassModule/src/main/java/com/mes/mapper/userInfo/SysMenuItemMapper.java | 3
CacheGlassModule/src/main/java/com/mes/service/ModuleB.java | 38 +
CacheGlassModule/src/main/java/com/mes/entity/BigStorageCageDetails.java | 27 +
CacheGlassModule/target/classes/application.yml | 4
CacheGlassModule/src/main/java/com/mes/entity/Tempering.java | 27 +
CacheGlassModule/src/main/java/com/mes/service/pp/SelectdppService.java | 40 +
CacheVerticalGlassModule/.vs/ProjectSettings.json | 3
UI-Project/src/views/TL/Temperedlayout/SelectLayout.vue | 176 ++++++
CacheGlassModule/src/main/java/com/mes/controller/OrderTestController.java | 29
CacheVerticalGlassModule/.vs/CacheVerticalGlassModule/v16/.suo | 0
CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils.java | 264 +++++++++
CacheGlassModule/.vs/ProjectSettings.json | 3
CacheGlassModule/src/main/java/com/mes/service/CacheGlassService/Logic.java | 77 ++
CacheGlassModule/.vs/CacheVerticalGlassModule/v16/.suo | 0
CacheVerticalGlassModule/.vs/slnx.sqlite | 0
CacheGlassModule/src/main/java/com/mes/entity/BigStorageCage.java | 18
CacheGlassModule/src/main/java/com/mes/entity/UpPattenUsage.java | 21
CacheGlassModule/.vs/VSWorkspaceState.json | 6
41 files changed, 1,581 insertions(+), 19 deletions(-)
diff --git a/CacheGlassModule/.vs/CacheVerticalGlassModule/v16/.suo b/CacheGlassModule/.vs/CacheVerticalGlassModule/v16/.suo
new file mode 100644
index 0000000..83013ee
--- /dev/null
+++ b/CacheGlassModule/.vs/CacheVerticalGlassModule/v16/.suo
Binary files differ
diff --git a/CacheGlassModule/.vs/ProjectSettings.json b/CacheGlassModule/.vs/ProjectSettings.json
new file mode 100644
index 0000000..f8b4888
--- /dev/null
+++ b/CacheGlassModule/.vs/ProjectSettings.json
@@ -0,0 +1,3 @@
+{
+ "CurrentProjectSetting": null
+}
\ No newline at end of file
diff --git a/CacheGlassModule/.vs/VSWorkspaceState.json b/CacheGlassModule/.vs/VSWorkspaceState.json
new file mode 100644
index 0000000..6b61141
--- /dev/null
+++ b/CacheGlassModule/.vs/VSWorkspaceState.json
@@ -0,0 +1,6 @@
+{
+ "ExpandedNodes": [
+ ""
+ ],
+ "PreviewInSolutionExplorer": false
+}
\ No newline at end of file
diff --git a/CacheGlassModule/.vs/slnx.sqlite b/CacheGlassModule/.vs/slnx.sqlite
new file mode 100644
index 0000000..308d5b9
--- /dev/null
+++ b/CacheGlassModule/.vs/slnx.sqlite
Binary files differ
diff --git a/CacheGlassModule/pom.xml b/CacheGlassModule/pom.xml
index dcc9ef3..66013a9 100644
--- a/CacheGlassModule/pom.xml
+++ b/CacheGlassModule/pom.xml
@@ -9,9 +9,9 @@
<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>
@@ -115,7 +115,7 @@
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
-
+ <!-- rabbitmq -->
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
@@ -148,7 +148,39 @@
<version>2.13.0</version>
</dependency>
-<!--websocket-->
+ <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>spring-boot-starter-websocket</artifactId>-->
@@ -159,6 +191,10 @@
<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>
diff --git a/CacheGlassModule/src/main/java/com/mes/controller/OrderTestController.java b/CacheGlassModule/src/main/java/com/mes/controller/OrderTestController.java
index aecbd7f..2d24de4 100644
--- a/CacheGlassModule/src/main/java/com/mes/controller/OrderTestController.java
+++ b/CacheGlassModule/src/main/java/com/mes/controller/OrderTestController.java
@@ -1,22 +1,35 @@
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 //瑙e喅鍗曚釜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) {
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/BigStorageCage.java b/CacheGlassModule/src/main/java/com/mes/entity/BigStorageCage.java
new file mode 100644
index 0000000..cc3e6bf
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/BigStorageCage.java
@@ -0,0 +1,18 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`big_storage_cage`")
+public class BigStorageCage {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//澶х悊鐗囩琛╥d
+ private Integer device_id;//璁惧id
+ private String slot;//鏍呮牸鍙�
+ private String enable_state;//鍚敤鐘舵��
+ private Integer remain_width;//鍓╀綑瀹藉害
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/BigStorageCageDetails.java b/CacheGlassModule/src/main/java/com/mes/entity/BigStorageCageDetails.java
new file mode 100644
index 0000000..3dd0188
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/BigStorageCageDetails.java
@@ -0,0 +1,27 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`big_storage_cage_details`")
+public class BigStorageCageDetails {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//澶х悊鐗囩璇︽儏琛╥d
+ 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;//鐜荤拑闂撮殭
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/DownGlassInfo.java b/CacheGlassModule/src/main/java/com/mes/entity/DownGlassInfo.java
new file mode 100644
index 0000000..bb1d86e
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/DownGlassInfo.java
@@ -0,0 +1,19 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`down_glass_info`")
+public class DownGlassInfo {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//涓嬬墖鐜荤拑淇℃伅琛╥d
+ private String flowcardid;//娴佺▼鍗″彿
+ private Integer sequence;//椤哄簭
+ private Integer width;//瀹�
+ private Integer height;//楂�
+ private Integer thickness;//鍘氬害
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/DownStorageCage.java b/CacheGlassModule/src/main/java/com/mes/entity/DownStorageCage.java
new file mode 100644
index 0000000..382f336
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/DownStorageCage.java
@@ -0,0 +1,18 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`down_storage_cage`")
+public class DownStorageCage {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//涓嬬墖鍓嶇悊鐗囩琛╥d
+ private Integer deviceid;//璁惧id
+ private String slot;//鏍呮牸鍙�
+ private String enablestate;//鍚敤鐘舵��
+ private Integer remainwidth;//鍓╀綑
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/DownStorageCagedetails.java b/CacheGlassModule/src/main/java/com/mes/entity/DownStorageCagedetails.java
new file mode 100644
index 0000000..9e26f5f
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/DownStorageCagedetails.java
@@ -0,0 +1,27 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`down_storage_cage_details`")
+public class DownStorageCagedetails {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//涓嬬墖鍓嶇悊鐗囩鏄庣粏琛╥d
+ 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;//鐜荤拑闂撮殭
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/DownWorkstation.java b/CacheGlassModule/src/main/java/com/mes/entity/DownWorkstation.java
new file mode 100644
index 0000000..847d157
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/DownWorkstation.java
@@ -0,0 +1,19 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`down_workstation`")
+public class DownWorkstation {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//涓嬬墖宸ヤ綅琛╥d
+ private Integer flowcard_id;//宸ヤ綅id
+ private String glass_type;//娴佺▼鍗″彿
+ private Integer width;//璁惧id
+ private Integer height;//鍚敤鐘舵��
+ private Integer thickness;//宸ヤ綔鐘舵��
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCage.java b/CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCage.java
new file mode 100644
index 0000000..3d10308
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCage.java
@@ -0,0 +1,18 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`edg_storage_cage`")
+public class EdgStorageCage {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//纾ㄨ竟鍓嶇悊鐗囩琛╥d
+ private Integer flowcard_id;//璁惧id
+ private String glass_type;//鏍呮牸鍙�
+ private String height;//鍚敤鐘舵��
+ private Integer thickness;//鍓╀綑
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCageDetails.java b/CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCageDetails.java
new file mode 100644
index 0000000..6cf60bd
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCageDetails.java
@@ -0,0 +1,30 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`edg_storage_cage_details`")
+public class EdgStorageCageDetails {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//纾ㄨ竟鍓嶇悊鐗囩璇︽儏琛╥d
+ 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;//鐜荤拑闂撮殭
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/Engineering.java b/CacheGlassModule/src/main/java/com/mes/entity/Engineering.java
new file mode 100644
index 0000000..95eb3a0
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/Engineering.java
@@ -0,0 +1,30 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`engineering`")
+public class Engineering {
+ @TableId(type = IdType.AUTO)
+ private BigInteger id;//宸ョ▼琛╥d
+ 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;//澶囨敞
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/GlassFilms.java b/CacheGlassModule/src/main/java/com/mes/entity/GlassFilms.java
new file mode 100644
index 0000000..a5d9044
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/GlassFilms.java
@@ -0,0 +1,17 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`glass_films`")
+public class GlassFilms {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//鑶滅郴琛╥d
+ private Integer films_id;//鑶滅郴id
+ private String films_name;//鑶滅郴
+
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/GlassInfo.java b/CacheGlassModule/src/main/java/com/mes/entity/GlassInfo.java
new file mode 100644
index 0000000..efd3847
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/GlassInfo.java
@@ -0,0 +1,34 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`glass_info`")
+public class GlassInfo {
+ @TableId(type = IdType.AUTO)
+ private BigInteger id;//鐜荤拑淇℃伅琛╥d
+ 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;//鏃嬭浆瑙掑害锛堥�嗘椂閽堬級
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/Tempered.java b/CacheGlassModule/src/main/java/com/mes/entity/Tempered.java
new file mode 100644
index 0000000..b46bac6
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/Tempered.java
@@ -0,0 +1,35 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@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
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/Tempering.java b/CacheGlassModule/src/main/java/com/mes/entity/Tempering.java
new file mode 100644
index 0000000..5b61dae
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/Tempering.java
@@ -0,0 +1,27 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`tempering_glass_info`")
+public class Tempering {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//閽㈠寲灏忕墖淇℃伅琛╥d
+ 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;//鐘舵��
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/UpPattenUsage.java b/CacheGlassModule/src/main/java/com/mes/entity/UpPattenUsage.java
new file mode 100644
index 0000000..461e04d
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/UpPattenUsage.java
@@ -0,0 +1,21 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`up_patten_usage`")
+public class UpPattenUsage {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//鍘熺墖浣跨敤鎯呭喌琛╥d
+ private Integer engineeringid;//宸ョ▼鍙�
+ private Integer filmsid;//鑶滅郴id
+ private Double width;//瀹�
+ private Double height;//楂�
+ private Double thickness;//鍘氬害
+ private Integer layoutsequence;//鍘熺墖鐗堝浘鐗囧簭
+ private Integer state;//鐘舵��
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/entity/UpWorkstation.java b/CacheGlassModule/src/main/java/com/mes/entity/UpWorkstation.java
new file mode 100644
index 0000000..1f8cb3b
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/entity/UpWorkstation.java
@@ -0,0 +1,23 @@
+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 绠�鍐檍ava浠g爜 瀹炰綋绫荤殑get涓巗et
+@TableName("`up_workstation`")
+public class UpWorkstation {
+ @TableId(type = IdType.AUTO)
+ private Integer id;//涓婄墖宸ヤ綅琛╥d
+ 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;//鏁伴噺
+
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/mapper/SelectInfo.java b/CacheGlassModule/src/main/java/com/mes/mapper/SelectInfo.java
new file mode 100644
index 0000000..2b65272
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/mapper/SelectInfo.java
@@ -0,0 +1,30 @@
+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 {
+ //鐜荤拑淇℃伅 鎸塈D鏌ヨ
+ @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);
+}
diff --git a/CacheGlassModule/src/main/java/com/mes/mapper/userInfo/SysMenuItemMapper.java b/CacheGlassModule/src/main/java/com/mes/mapper/userInfo/SysMenuItemMapper.java
index 0bf0923..206d159 100644
--- a/CacheGlassModule/src/main/java/com/mes/mapper/userInfo/SysMenuItemMapper.java
+++ b/CacheGlassModule/src/main/java/com/mes/mapper/userInfo/SysMenuItemMapper.java
@@ -2,11 +2,12 @@
import com.mes.entity.userInfo.SysMenuItem;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface SysMenuItemMapper {
-
+ @Select("select * from sys_menu_item")
List<SysMenuItem> findAll() ;
}
diff --git a/CacheGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java b/CacheGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java
index 6f40252..a2bf58d 100644
--- a/CacheGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java
+++ b/CacheGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java
@@ -15,9 +15,8 @@
List<User> findAll();
User findOne(Integer id);
-
- @Select("select user_name FROM `user` where login_name=#{LoginName} ")
+ @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} ")
diff --git a/CacheGlassModule/src/main/java/com/mes/service/CacheGlassService/Logic.java b/CacheGlassModule/src/main/java/com/mes/service/CacheGlassService/Logic.java
new file mode 100644
index 0000000..eb7da04
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/service/CacheGlassService/Logic.java
@@ -0,0 +1,77 @@
+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;//杩斿洖 瀛樺湪
+ }
+
+}
+
diff --git a/CacheGlassModule/src/main/java/com/mes/service/ModuleB.java b/CacheGlassModule/src/main/java/com/mes/service/ModuleB.java
new file mode 100644
index 0000000..fbe2d62
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/service/ModuleB.java
@@ -0,0 +1,38 @@
+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 -> {
+ });
+ }
+ }
+}
+
diff --git a/CacheGlassModule/src/main/java/com/mes/service/MqMessage.java b/CacheGlassModule/src/main/java/com/mes/service/MqMessage.java
new file mode 100644
index 0000000..9d4a539
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/service/MqMessage.java
@@ -0,0 +1,56 @@
+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(){
+
+ }
+
+
+}
+
diff --git a/CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils.java b/CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils.java
new file mode 100644
index 0000000..7914d4c
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils.java
@@ -0,0 +1,264 @@
+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瀵硅薄锛岀敤浜庡簭鍒楀寲鍜屽弽搴忓垪鍖朖SON
+ 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 鏇挎崲涓轰綘瑕佹帴鏀跺苟杞崲鐨勫璞$被鍨嬨��
\ No newline at end of file
diff --git a/CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils33.java b/CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils33.java
new file mode 100644
index 0000000..5201c4a
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils33.java
@@ -0,0 +1,178 @@
+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瀵硅薄锛岀敤浜庡簭鍒楀寲鍜屽弽搴忓垪鍖朖SON
+ 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 鏇挎崲涓轰綘瑕佹帴鏀跺苟杞崲鐨勫璞$被鍨嬨��
\ No newline at end of file
diff --git a/CacheGlassModule/src/main/java/com/mes/service/pp/SelectdppService.java b/CacheGlassModule/src/main/java/com/mes/service/pp/SelectdppService.java
new file mode 100644
index 0000000..c139c0d
--- /dev/null
+++ b/CacheGlassModule/src/main/java/com/mes/service/pp/SelectdppService.java
@@ -0,0 +1,40 @@
+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);
+ }
+
+
+}
+
diff --git a/CacheGlassModule/src/main/resources/application.yml b/CacheGlassModule/src/main/resources/application.yml
index cdf0b28..d74069d 100644
--- a/CacheGlassModule/src/main/resources/application.yml
+++ b/CacheGlassModule/src/main/resources/application.yml
@@ -1,8 +1,8 @@
server:
- port: 8081
+ port: 8080
servlet:
- context-path: /CacheGlassModule
+ context-path: /mesModuleTools
spring:
datasource:
diff --git a/CacheGlassModule/target/classes/application.yml b/CacheGlassModule/target/classes/application.yml
index cdf0b28..d74069d 100644
--- a/CacheGlassModule/target/classes/application.yml
+++ b/CacheGlassModule/target/classes/application.yml
@@ -1,8 +1,8 @@
server:
- port: 8081
+ port: 8080
servlet:
- context-path: /CacheGlassModule
+ context-path: /mesModuleTools
spring:
datasource:
diff --git a/CacheVerticalGlassModule/.vs/CacheVerticalGlassModule/v16/.suo b/CacheVerticalGlassModule/.vs/CacheVerticalGlassModule/v16/.suo
new file mode 100644
index 0000000..83013ee
--- /dev/null
+++ b/CacheVerticalGlassModule/.vs/CacheVerticalGlassModule/v16/.suo
Binary files differ
diff --git a/CacheVerticalGlassModule/.vs/ProjectSettings.json b/CacheVerticalGlassModule/.vs/ProjectSettings.json
new file mode 100644
index 0000000..f8b4888
--- /dev/null
+++ b/CacheVerticalGlassModule/.vs/ProjectSettings.json
@@ -0,0 +1,3 @@
+{
+ "CurrentProjectSetting": null
+}
\ No newline at end of file
diff --git a/CacheVerticalGlassModule/.vs/VSWorkspaceState.json b/CacheVerticalGlassModule/.vs/VSWorkspaceState.json
new file mode 100644
index 0000000..6b61141
--- /dev/null
+++ b/CacheVerticalGlassModule/.vs/VSWorkspaceState.json
@@ -0,0 +1,6 @@
+{
+ "ExpandedNodes": [
+ ""
+ ],
+ "PreviewInSolutionExplorer": false
+}
\ No newline at end of file
diff --git a/CacheVerticalGlassModule/.vs/slnx.sqlite b/CacheVerticalGlassModule/.vs/slnx.sqlite
new file mode 100644
index 0000000..308d5b9
--- /dev/null
+++ b/CacheVerticalGlassModule/.vs/slnx.sqlite
Binary files differ
diff --git a/CacheVerticalGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java b/CacheVerticalGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java
index 8ddf4a2..a2bf58d 100644
--- a/CacheVerticalGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java
+++ b/CacheVerticalGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java
@@ -16,7 +16,9 @@
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);
diff --git a/CacheVerticalGlassModule/target/classes/application.yml b/CacheVerticalGlassModule/target/classes/application.yml
new file mode 100644
index 0000000..d74069d
--- /dev/null
+++ b/CacheVerticalGlassModule/target/classes/application.yml
@@ -0,0 +1,32 @@
+
+server:
+ port: 8080
+ servlet:
+ context-path: /mesModuleTools
+
+spring:
+ datasource:
+ dynamic:
+ primary: user_info #璁剧疆榛樿鐨勬暟鎹簮鎴栬�呮暟鎹簮缁�,榛樿鍊煎嵆涓簃aster
+ 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
\ No newline at end of file
diff --git a/TemperingGlassModule/target/classes/application.yml b/TemperingGlassModule/target/classes/application.yml
new file mode 100644
index 0000000..d74069d
--- /dev/null
+++ b/TemperingGlassModule/target/classes/application.yml
@@ -0,0 +1,32 @@
+
+server:
+ port: 8080
+ servlet:
+ context-path: /mesModuleTools
+
+spring:
+ datasource:
+ dynamic:
+ primary: user_info #璁剧疆榛樿鐨勬暟鎹簮鎴栬�呮暟鎹簮缁�,榛樿鍊煎嵆涓簃aster
+ 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
\ No newline at end of file
diff --git a/UI-Project/src/views/TL/Temperedlayout/SelectLayout.vue b/UI-Project/src/views/TL/Temperedlayout/SelectLayout.vue
new file mode 100644
index 0000000..d53cd15
--- /dev/null
+++ b/UI-Project/src/views/TL/Temperedlayout/SelectLayout.vue
@@ -0,0 +1,176 @@
+<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>
\ No newline at end of file
diff --git a/UI-Project/src/views/TL/Temperedlayout/Temperedlayout.vue b/UI-Project/src/views/TL/Temperedlayout/Temperedlayout.vue
new file mode 100644
index 0000000..a574308
--- /dev/null
+++ b/UI-Project/src/views/TL/Temperedlayout/Temperedlayout.vue
@@ -0,0 +1,207 @@
+<!-- 鐗╂枡璧勬枡 -->
+
+
+<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';//鎺掑竷鏂瑰紡锛歭inefeed(鎹㈣) /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);//姣斾緥锛氬疄闄呴暱搴m/椤甸潰闀垮害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>
\ No newline at end of file
--
Gitblit v1.8.0