From fdf078d0adec8aaa4bdf39a61db38ed68184b50d Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期四, 11 四月 2024 09:04:35 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes
---
Albania_Mes-ui/src/views/Electrical/Servomanual.vue | 4
springboot-vue3/src/main/java/com/example/springboot/component/InitUtil.java | 6
Albania_Mes-ui/src/views/Electrical/InteractionState.vue | 2
springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java | 2
springboot-vue3/src/main/java/com/example/springboot/component/PLCAutoMes.java | 3
Albania_Mes-ui/src/views/Electrical/Action.vue | 2
Albania_Mes-ui/src/views/home/index.vue | 9
Albania_Mes-ui/src/views/Electrical/AutomaticParameterSetting.vue | 2
springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java | 1
springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java | 4
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java | 82 ++++----
PlcAlbania.json | 414 ++++++++++++++++++++++++++++++++++++++++++++++
12 files changed, 474 insertions(+), 57 deletions(-)
diff --git a/Albania_Mes-ui/src/views/Electrical/Action.vue b/Albania_Mes-ui/src/views/Electrical/Action.vue
index 35546ef..0caa12a 100644
--- a/Albania_Mes-ui/src/views/Electrical/Action.vue
+++ b/Albania_Mes-ui/src/views/Electrical/Action.vue
@@ -12,7 +12,7 @@
}}</router-link> -->
<router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign')
}}</router-link>
- <router-link to="/Electrical/Servomanual" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter')
+ <router-link to="/Electrical/AlbaniaServo" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter')
}}</router-link>
</el-breadcrumb>
diff --git a/Albania_Mes-ui/src/views/Electrical/AutomaticParameterSetting.vue b/Albania_Mes-ui/src/views/Electrical/AutomaticParameterSetting.vue
index ca7eb8f..2b8e72b 100644
--- a/Albania_Mes-ui/src/views/Electrical/AutomaticParameterSetting.vue
+++ b/Albania_Mes-ui/src/views/Electrical/AutomaticParameterSetting.vue
@@ -11,7 +11,7 @@
}}</router-link> -->
<router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign')
}}</router-link>
- <router-link to="/Electrical/Servomanual" tag="el-button" type="text" active-class="blue-button">{{
+ <router-link to="/Electrical/AlbaniaServo" tag="el-button" type="text" active-class="blue-button">{{
$t('Parameter')
}}</router-link>
</el-breadcrumb>
diff --git a/Albania_Mes-ui/src/views/Electrical/InteractionState.vue b/Albania_Mes-ui/src/views/Electrical/InteractionState.vue
index a773eb9..a58a2f7 100644
--- a/Albania_Mes-ui/src/views/Electrical/InteractionState.vue
+++ b/Albania_Mes-ui/src/views/Electrical/InteractionState.vue
@@ -32,7 +32,7 @@
>{{ $t("Sign") }}</router-link
>
<router-link
- to="/Electrical/Servomanual"
+ to="/Electrical/AlbaniaServo"
tag="el-button"
type="text"
active-class="blue-button"
diff --git a/Albania_Mes-ui/src/views/Electrical/Servomanual.vue b/Albania_Mes-ui/src/views/Electrical/Servomanual.vue
index 45eab45..26576f8 100644
--- a/Albania_Mes-ui/src/views/Electrical/Servomanual.vue
+++ b/Albania_Mes-ui/src/views/Electrical/Servomanual.vue
@@ -23,7 +23,7 @@
<!-- <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{
$t('ManualJog')
}}</router-link> -->
-
+<!--
<router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{
$t('ManualonePosition')
}}</router-link>
@@ -39,7 +39,7 @@
<router-link v-if="hasPermission" to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{
$t('Speed parameter settings')
- }}</router-link>
+ }}</router-link> -->
<router-link v-if="hasPermission"
to="/Electrical/InteractionState"
diff --git a/Albania_Mes-ui/src/views/home/index.vue b/Albania_Mes-ui/src/views/home/index.vue
index cd87755..d6c887c 100644
--- a/Albania_Mes-ui/src/views/home/index.vue
+++ b/Albania_Mes-ui/src/views/home/index.vue
@@ -513,9 +513,7 @@
<span class="measuretitle">{{ $t('Height') }}锛�</span> <span class="measureValue">{{
this.LastQueue.glassheight }}</span> <span class="measureUnit">mm</span>
<br>
- <span class="measuretitle">{{ $t('Thickness') }}锛�</span> <span class="measureValue">{{
- this.LastQueue.thickness }}</span> <span class="measureUnit">mm</span>
- <br>
+
<span class="measuretitle">{{ $t('Measure Width') }}锛�</span> <span class="measureValue">{{
this.LastQueue.glasswidthmm }}</span> <span class="measureUnit">mm</span>
<br>
@@ -523,8 +521,8 @@
this.LastQueue.glassheightmm }}</span> <span class="measureUnit">mm</span>
<br>
<span class="measuretitle">{{ $t('Matching results') }}锛�</span> <span class="measureValue">{{
- this.LastQueue.state > 0 ? $t('Matching successful') : (this.LastQueue.state == 0 ? $t('Multiple data
- matching'):$t('Matching failed')) }}</span>
+ this.LastQueue.state > 0 ? $t('Matching successful') :
+ (this.LastQueue.state == 0 ? $t('Multiple data matching'):$t('Matching failed')) }}</span>
<br>
</div>
</div>
@@ -853,7 +851,6 @@
this.tableData1 = obj.OrderTask[0];
this.LastQueue = obj.LastQueue[0];
-
//鏄惁鍏佽鍑虹墖
this.isAllowQueue = obj.isAllowQueue[0];
diff --git a/PlcAlbania.json b/PlcAlbania.json
new file mode 100644
index 0000000..eed5688
--- /dev/null
+++ b/PlcAlbania.json
@@ -0,0 +1,414 @@
+{
+ "plcAddressBegin":"DB14.0",
+ "plcAddressLenght":"208",
+ "dataType":"word",
+ "parameteInfor":[
+ {
+ "codeId": "PLCToMES",
+ "addressIndex":"0",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"m/min"
+ },
+ {
+ "codeId": "IDStatus1",
+ "addressIndex":"2",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"m/min"
+ },
+ {
+ "codeId": "IDStatus2",
+ "addressIndex":"4",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"m/min"
+ },
+ {
+ "codeId": "IDStatus3",
+ "addressIndex":"6",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "IDStatus4",
+ "addressIndex":"8",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "IDStatus5",
+ "addressIndex":"10",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ }
+ ,
+ {
+ "codeId": "IDStatus6",
+ "addressIndex":"12",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "StautsID1",
+ "addressIndex":"14",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ }
+ ,
+ {
+ "codeId": "StautsID2",
+ "addressIndex":"16",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ }
+ ,
+ {
+ "codeId": "StautsID3",
+ "addressIndex":"18",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ }
+ ,
+ {
+ "codeId": "StautsID4",
+ "addressIndex":"20",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ }
+ ,
+ {
+ "codeId": "StautsID5",
+ "addressIndex":"22",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "StautsID6",
+ "addressIndex":"24",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "GaToMES",
+ "addressIndex":"26",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "Height",
+ "addressIndex":"28",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "width",
+ "addressIndex":"30",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "ExportTOMES1",
+ "addressIndex":"32",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ }
+ ,
+ {
+ "codeId": "ExportToMES2",
+ "addressIndex":"34",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ } ,
+ {
+ "codeId": "MESToPLC",
+ "addressIndex":"36",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ } ,
+ {
+ "codeId": "MESID1",
+ "addressIndex":"38",
+ "addressLenght":"14",
+ "ratio":"1",
+ "unit":"mm/S"
+ } ,
+ {
+ "codeId": "MESID2",
+ "addressIndex":"54",
+ "addressLenght":"14",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "MESID3",
+ "addressIndex":"70",
+ "addressLenght":"14",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "MESID4",
+ "addressIndex":"86",
+ "addressLenght":"14",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "MESID5",
+ "addressIndex":"102",
+ "addressLenght":"14",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "MESID6",
+ "addressIndex":"118",
+ "addressLenght":"14",
+ "ratio":"1",
+ "unit":"mm/S"
+ },
+ {
+ "codeId": "MESToPLCStart1",
+ "addressIndex":"134",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCStart2",
+ "addressIndex":"136",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCStart3",
+ "addressIndex":"138",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ }
+ ,{
+ "codeId": "MESToPLCStart4",
+ "addressIndex":"140",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ }
+ ,{
+ "codeId": "MESToPLCStart5",
+ "addressIndex":"142",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ }
+ ,{
+ "codeId": "MESToPLCStart6",
+ "addressIndex":"144",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCTarget1",
+ "addressIndex":"146",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCTarget2",
+ "addressIndex":"148",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCTarget3",
+ "addressIndex":"150",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCTarget4",
+ "addressIndex":"152",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCTarget5",
+ "addressIndex":"154",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCTarget6",
+ "addressIndex":"156",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCStatus1",
+ "addressIndex":"158",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCStatus2",
+ "addressIndex":"160",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCStatus3",
+ "addressIndex":"162",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCStatus4",
+ "addressIndex":"164",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCStatus5",
+ "addressIndex":"166",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToPLCStatus6",
+ "addressIndex":"168",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "MESToGaStatus",
+ "addressIndex":"170",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "A01Err",
+ "addressIndex":"172",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "A02Err",
+ "addressIndex":"174",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "B01Err",
+ "addressIndex":"176",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "C01Err",
+ "addressIndex":"178",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "C02Err",
+ "addressIndex":"180",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "ErrSpace1",
+ "addressIndex":"182",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "ErrSpace2",
+ "addressIndex":"184",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "ErrSpace3",
+ "addressIndex":"186",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "B01Position",
+ "addressIndex":"188",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "C01Position",
+ "addressIndex":"190",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "C02Position",
+ "addressIndex":"192",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "DeviceState",
+ "addressIndex":"194",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "AllFVRun",
+ "addressIndex":"196",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "A01State",
+ "addressIndex":"198",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "A02State",
+ "addressIndex":"200",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "B01State",
+ "addressIndex":"202",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "C01State",
+ "addressIndex":"204",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ },{
+ "codeId": "C02State",
+ "addressIndex":"206",
+ "addressLenght":"2",
+ "ratio":"1",
+ "unit":"mm/S"
+ }
+ ]
+}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/InitUtil.java b/springboot-vue3/src/main/java/com/example/springboot/component/InitUtil.java
index ac71b25..95a670a 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/InitUtil.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/InitUtil.java
@@ -7,6 +7,7 @@
import com.example.springboot.entity.device.PlcParameterObject;
import java.io.BufferedReader;
+import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
@@ -16,6 +17,11 @@
public class InitUtil {
//鍒濆鍖杦ord
public static PlcParameterObject initword(String jsonFilePath) {
+ // File file=new File(jsonFilePath);
+ // if (!file.exists()) {
+ // System.out.println(jsonFilePath);
+ // return null;
+ // }
try {
FileReader fileReader = new FileReader(jsonFilePath);
BufferedReader bufferedReader = new BufferedReader(fileReader);
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutoMes.java b/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutoMes.java
index 912d171..44b4021 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutoMes.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutoMes.java
@@ -24,7 +24,8 @@
// 鍗曚緥瀹炰緥
private static PLCAutoMes instance;
- private static String PlcAlbania = PLCAutoMes.class.getResource("/JsonFile/PlcAlbania.json").getPath();
+ private static String PlcAlbania ="D:/Code/Albania_Mes/PlcAlbania.json";
+ // PLCAutoMes.class.getResource("/JsonFile/PlcAlbania.json").getPath();
public static PlcParameterObject PlcMesObject = initUtil.initword(PlcAlbania);
// 绉佹湁鏋勯�犲嚱鏁�
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
index a1adb2b..eaf8200 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
@@ -87,6 +87,7 @@
// 鏍规嵁鍦板潃璇诲彇PCL鏁版嵁
List<Boolean> plclist = S7control.getinstance().ReadBits("DB15.0.0", Plccount);
+ // System.out.println(plclist);
// List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount);
// Boolean[] values = { false, false, true, false, true, false, true, false,
// true, false, true, false, true, false,
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
index f332474..3ac31c8 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -123,9 +123,7 @@
// if(plcmes.==null){
// }
-
-
// 鑾峰彇娴嬮噺鐨勯暱锛屽
boolean istest = true;
// String PlcRequest = "1";
@@ -135,27 +133,30 @@
// 鍖归厤
// System.err.println(PlcRequest+","+MesSend+","+width+","+height);
- // String PlcRequest = plcmes.getPlcParameter("GaToMES").getValue();// 璇锋眰
- // String MesSend = plcmes.getPlcParameter("MESToGaStatus").getValue();// 鍙戦��
- // double width = Double.valueOf(plcmes.getPlcParameter("width").getValue());// 瀹�
- // double height = Double.valueOf(plcmes.getPlcParameter("Height").getValue());// 楂�
- // if ("0".equals(PlcRequest) && istest) {
- // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 0);
- // }
- // if ("1".equals(PlcRequest) && "0".equals(MesSend)) {
- // boolean is = HomeService.Normal(width, height, "1");
- // if (is && istest) {
- // // 娴嬮噺鎴愬姛
- // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),
- // (short) 1);
+ if (plcmes.getPlcParameter("GaToMES").getValue() != null) {
+ String PlcRequest = plcmes.getPlcParameter("GaToMES").getValue();// 璇锋眰
+ String MesSend = plcmes.getPlcParameter("MESToGaStatus").getValue();// 鍙戦��
+ double width = Double.valueOf(plcmes.getPlcParameter("width").getValue());// 瀹�
+ double height = Double.valueOf(plcmes.getPlcParameter("Height").getValue());// 楂�
+ if ("0".equals(PlcRequest) && istest) {
+ S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),
+ (short) 0);
+ }
+ if ("1".equals(PlcRequest) && "0".equals(MesSend)) {
+ boolean is = HomeService.Normal(width, height, "1");
+ if (is && istest) {
+ // 娴嬮噺鎴愬姛
+ S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),
+ (short) 1);
- // } else if (istest) {
- // // 閲嶆柊娴嬮噺
- // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),
- // (short) 4);
- // }
+ } else if (istest) {
+ // 閲嶆柊娴嬮噺
+ S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),
+ (short) 4);
+ }
+ }
+ }
- // }
// S7control.getinstance().WriteWord("DB14.170", (short)0);
Queue LastQueue = QueueMapper.selectLastQueue();
if (LastQueue == null) {
@@ -192,27 +193,28 @@
List<FlowCard> OrderTask = storageCageService.SelectOrderTask();
jsonObject.append("OrderTask", OrderTask);
+ // jsonObject.append("params", new short[] { 30, 40, });
+ // System.out.println("jsonObject:" + jsonObject);
+ ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Home");
+ if (sendwServer != null) {
+ for (WebSocketServer webserver : sendwServer) {
+ webserver.sendMessage(jsonObject.toString());
+
+ if (webserver != null) {
+
+ List<String> messages = webserver.getMessages();
+
+ if (!messages.isEmpty()) {
+ // // 灏嗘渶鍚庝竴涓秷鎭浆鎹负鏁存暟绫诲瀷鐨勫垪琛�
+ webserver.clearMessages();
+ }
+ }
+
+ }
+ }
+
} catch (InterruptedException e) {
e.printStackTrace();
- }
-
- // jsonObject.append("params", new short[] { 30, 40, });
- ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Home");
- if (sendwServer != null) {
- for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
-
- if (webserver != null) {
-
- List<String> messages = webserver.getMessages();
-
- if (!messages.isEmpty()) {
- // // 灏嗘渶鍚庝竴涓秷鎭浆鎹负鏁存暟绫诲瀷鐨勫垪琛�
- webserver.clearMessages();
- }
- }
-
- }
}
}
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java
index 2e74215..de8e415 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java
@@ -74,8 +74,6 @@
}
List<String> addressList21 = Arrays.asList(config.getProperty("PlcIO.State").split(","));
List<Boolean> plclist = S7control.getinstance().readBits(addressList21);
- // List<String> addressListName = Arrays.asList(config.getProperty("PlcIO.Name").split(","));
- // List<String> addressListName1 = Arrays.asList(config.getProperty("PlcIO.Name1").split(","));
// System.out.println("鎬ュ仠"+S7control.getinstance().ReadBits("DB10.0.5", 1));
if (plclist != null) {
@@ -89,8 +87,6 @@
}
JSONObject jsonObject = new JSONObject();
jsonObject.append("sig", Intlist);
- // jsonObject.append("addressListName", addressListName);
- // jsonObject.append("addressListName1", addressListName1);
// WebSocketServer sendwServer3 = WebSocketServer.sessionMap.get("Sign");
// if (sendwServer3 != null) {
// sendwServer3.sendMessage(jsonObject.toString());
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java b/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java
index d600266..10a3b03 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java
@@ -18,7 +18,7 @@
* 鏁版嵁搴撹繛鎺ュ弬鏁�
* driver,url,username,password
*/
- private static final String DRIVER = "com.mysql.jdbc.Driver";
+ private static final String DRIVER = "com.mysql.cj.jdbc.Driver";
private static final String URL = "jdbc:mysql://10.153.19.150:3306/canadames";
private static final String USERNAME = "root";
private static final String PASSWORD = "beibo.123/";
--
Gitblit v1.8.0