From dae61fa269844f76ccc9edf9eb316ef5c3dd0798 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 06 五月 2024 07:57:56 +0800
Subject: [PATCH] 根据客户需求修改复位倒计时,修改手动页面英文显示
---
CanadaMes-ui/src/views/Electrical/Positioning2.vue | 2
CanadaMes-ui/src/views/home/index.vue | 304 +++++++++++--------
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java | 11
springboot-vue3/src/main/java/com/example/springboot/component/PlcLayout.java | 11
springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java | 64 ++++
springboot-vue3/src/main/java/com/example/springboot/component/PlcPositioning1.java | 10
CanadaMes-ui/src/views/Electrical/Parameter2.vue | 2
CanadaMes-ui/src/views/Electrical/State.vue | 2
springboot-vue3/src/main/java/com/example/springboot/component/PLCManualJog.java | 12
CanadaMes-ui/src/views/Electrical/InteractionState.vue | 2
springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java | 9
springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java | 11
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java | 128 ++++++--
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java | 2
CanadaMes-ui/src/layout/index.vue | 59 ++-
springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java | 10
CanadaMes-ui/src/views/Electrical/Positioning1.vue | 2
springboot-vue3/src/main/java/com/example/springboot/component/Plcstate.java | 8
CanadaMes-ui/src/views/Electrical/AutomaticParameterSetting.vue | 2
CanadaMes-ui/src/views/Electrical/alarm.vue | 2
springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSetting.java | 12
CanadaMes-ui/src/views/Electrical/Action.vue | 2
springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java | 9
springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition2.java | 11
CanadaMes-ui/src/views/Electrical/Servomanual.vue | 2
CanadaMes-ui/src/views/Electrical/Sign.vue | 2
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java | 7
CanadaMes-ui/src/views/Electrical/ManualonePosition.vue | 2
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java | 6
springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java | 2
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java | 98 ++++++
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java | 2
CanadaMes-ui/src/lang/locales/zh-CN.json | 8
springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java | 30 +
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java | 1
CanadaMes-ui/src/lang/locales/en-US.json | 8
CanadaMes-ui/src/views/Electrical/Parameter1.vue | 2
CanadaMes-ui/src/views/Electrical/ServoManualone.vue | 2
springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition.java | 11
39 files changed, 612 insertions(+), 258 deletions(-)
diff --git a/CanadaMes-ui/src/lang/locales/en-US.json b/CanadaMes-ui/src/lang/locales/en-US.json
index 19d8a6b..d2c1e7d 100644
--- a/CanadaMes-ui/src/lang/locales/en-US.json
+++ b/CanadaMes-ui/src/lang/locales/en-US.json
@@ -1,6 +1,7 @@
{
"Clear":"Clear",
"ip":"localhost",
+ "Remaining width:":"Remaining width:",
"systemTitle": "Login System",
"usernamePlaceholder": "Please enter username",
"passwordPlaceholder": "Please enter password",
@@ -173,6 +174,7 @@
},
"Electrical": "Electrical",
"Parameter": "Parameter",
+ "Manual/Automatic": "鎵嬪姩/鑷姩",
"Action": "Action",
"Sign": "Sign",
"State": "State",
@@ -300,8 +302,10 @@
"Scan Code Point":"Scan Code Point",
"Upper film position":"Upper film position",
"Glass Information":"Glass Information",
- "current Information":"current information",
- "Modify Information":"Modify information",
+ "D01 Current Information": "D01 Current Information",
+ "D02 Current Information": "D02 Current Information",
+ "D01 Modify Information": "D01 Modify Information",
+ "Scan Code Information":"Scan Code Information",
"Clear Current":"Clear Current",
"Confirm":"Confirm",
"The glass ID already exists in the loading queue":"The glass ID already exists in the loading queue",
diff --git a/CanadaMes-ui/src/lang/locales/zh-CN.json b/CanadaMes-ui/src/lang/locales/zh-CN.json
index 1a93fd5..4e53f34 100644
--- a/CanadaMes-ui/src/lang/locales/zh-CN.json
+++ b/CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -1,6 +1,7 @@
{
"Clear":"娓呴櫎",
"ip":"localhost",
+ "Remaining width:":"鍓╀綑瀹藉害:",
"systemTitle": "鐧诲綍绯荤粺",
"usernamePlaceholder": "璇疯緭鍏ョ敤鎴峰悕",
"passwordPlaceholder": "璇疯緭鍏ュ瘑鐮�",
@@ -171,6 +172,7 @@
},
"Electrical": "璁惧绠$悊",
"Parameter": "鍙傛暟璁剧疆",
+ "Manual/Automatic": "鎵嬪姩/鑷姩",
"Action": "寮�鍏虫帶鍒�",
"Sign": "IO鐘舵��",
"State": "鐘舵��",
@@ -291,8 +293,10 @@
"Scan Code Point": "鎵爜浣�",
"Upper film position": "涓婄墖浣�",
"Glass Information": "鐜荤拑淇℃伅",
- "current Information": "褰撳墠淇℃伅",
- "Modify Information": "淇敼淇℃伅",
+ "D01 Current Information": "D01褰撳墠淇℃伅",
+ "D02 Current Information": "D02褰撳墠淇℃伅",
+ "D01 Modify Information": "D01寰呯‘璁�",
+ "Scan Code Information":"鎵爜淇℃伅",
"Clear Current": "娓呴櫎褰撳墠",
"Confirm": "纭",
"The glass ID already exists in the loading queue": "涓婄墖闃熷垪宸插瓨鍦ㄦ鐜荤拑id",
diff --git a/CanadaMes-ui/src/layout/index.vue b/CanadaMes-ui/src/layout/index.vue
index 6fcf6cd..c16840b 100644
--- a/CanadaMes-ui/src/layout/index.vue
+++ b/CanadaMes-ui/src/layout/index.vue
@@ -253,37 +253,40 @@
let obj = JSON.parse(msg.data);
if (obj.alarmmg) {
-
- if (obj.alarmmg[0].length > 0) {
- if (this.alarm.length > 0) {
- if (this.alarm[this.alarm.length - 1].id != obj.alarmmg[0][obj.alarmmg[0].length - 1].id) {
- this.alarm = obj.alarmmg[0];
- this.dialogFormVisible2 = true;
- }
- } else {
- this.alarm = obj.alarmmg[0];
- this.dialogFormVisible2 = true;
- }
- } else {
+ if( obj.alarmmg!=null){
this.alarm = obj.alarmmg[0];
- this.dialogFormVisible2 = false;
}
- //鏄惁鎬ュ仠
- if (obj.emergencystop != null) {
- this.EmergencyStop = obj.emergencystop[0];
- }
+
+ // if (obj.alarmmg[0].length > 0) {
+ // if (this.alarm.length > 0) {
+ // if (this.alarm[this.alarm.length - 1].id != obj.alarmmg[0][obj.alarmmg[0].length - 1].id) {
+ // this.alarm = obj.alarmmg[0];
+ // this.dialogFormVisible2 = true;
+ // }
+ // } else {
+ // this.alarm = obj.alarmmg[0];
+ // this.dialogFormVisible2 = true;
+ // }
+ // } else {
+ // this.alarm = obj.alarmmg[0];
+ // this.dialogFormVisible2 = false;
+ // }
+ // //鏄惁鎬ュ仠
+ // if (obj.emergencystop != null) {
+ // this.EmergencyStop = obj.emergencystop[0];
+ // }
- //澶嶄綅鍊掕鏃�
- if (obj.countdown != null) {
- if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
- this.CountDown();
- }
- }
+ // //澶嶄綅鍊掕鏃�
+ // if (obj.countdown != null) {
+ // if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
+ // this.CountDown();
+ // }
+ // }
- //澶嶄綅瀹屾垚淇″彿
- if (obj.reset != null) {
- this.reset = obj.reset[0];
- }
+ // //澶嶄綅瀹屾垚淇″彿
+ // if (obj.reset != null) {
+ // this.reset = obj.reset[0];
+ // }
}
@@ -398,7 +401,7 @@
'鐢ㄦ埛鍒楄〃': 'UserList',
'璁惧绠$悊': 'DeviceManagement',
'鎶ヨ淇℃伅': 'Alarm',
- '鍙傛暟涓嬪彂': 'Parameter',
+ '鎵嬪姩/鑷姩': 'Manual/Automatic',
'寮�鍏虫帶鍒�': 'Action',
'IO鐘舵��': 'Sign',
'鏉冮檺绠$悊': 'PermissionManagement',
diff --git a/CanadaMes-ui/src/views/Electrical/Action.vue b/CanadaMes-ui/src/views/Electrical/Action.vue
index 35546ef..122645d 100644
--- a/CanadaMes-ui/src/views/Electrical/Action.vue
+++ b/CanadaMes-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/Servomanual" tag="el-button" type="text" active-class="blue-button">{{ $t('Manual/Automatic')
}}</router-link>
</el-breadcrumb>
diff --git a/CanadaMes-ui/src/views/Electrical/AutomaticParameterSetting.vue b/CanadaMes-ui/src/views/Electrical/AutomaticParameterSetting.vue
index ca7eb8f..4621453 100644
--- a/CanadaMes-ui/src/views/Electrical/AutomaticParameterSetting.vue
+++ b/CanadaMes-ui/src/views/Electrical/AutomaticParameterSetting.vue
@@ -12,7 +12,7 @@
<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')
+ $t('Manual/Automatic')
}}</router-link>
</el-breadcrumb>
diff --git a/CanadaMes-ui/src/views/Electrical/InteractionState.vue b/CanadaMes-ui/src/views/Electrical/InteractionState.vue
index a773eb9..4dd0ec8 100644
--- a/CanadaMes-ui/src/views/Electrical/InteractionState.vue
+++ b/CanadaMes-ui/src/views/Electrical/InteractionState.vue
@@ -36,7 +36,7 @@
tag="el-button"
type="text"
active-class="blue-button"
- >{{ $t("Parameter") }}</router-link
+ >{{ $t("Manual/Automatic") }}</router-link
>
</el-breadcrumb>
diff --git a/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue b/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
index e6f8a34..9104e06 100644
--- a/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
+++ b/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
@@ -12,7 +12,7 @@
<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')
+ $t('Manual/Automatic')
}}</router-link>
</el-breadcrumb>
<el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
diff --git a/CanadaMes-ui/src/views/Electrical/Parameter1.vue b/CanadaMes-ui/src/views/Electrical/Parameter1.vue
index 3a6d51a..c8edc96 100644
--- a/CanadaMes-ui/src/views/Electrical/Parameter1.vue
+++ b/CanadaMes-ui/src/views/Electrical/Parameter1.vue
@@ -12,7 +12,7 @@
<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')
+ $t('Manual/Automatic')
}}</router-link>
</el-breadcrumb>
diff --git a/CanadaMes-ui/src/views/Electrical/Parameter2.vue b/CanadaMes-ui/src/views/Electrical/Parameter2.vue
index da4a5b6..873cf58 100644
--- a/CanadaMes-ui/src/views/Electrical/Parameter2.vue
+++ b/CanadaMes-ui/src/views/Electrical/Parameter2.vue
@@ -36,7 +36,7 @@
tag="el-button"
type="text"
active-class="blue-button"
- >{{ $t("Parameter") }}</router-link
+ >{{ $t("Manual/Automatic") }}</router-link
>
</el-breadcrumb>
diff --git a/CanadaMes-ui/src/views/Electrical/Positioning1.vue b/CanadaMes-ui/src/views/Electrical/Positioning1.vue
index 7d1bfa0..4621acb 100644
--- a/CanadaMes-ui/src/views/Electrical/Positioning1.vue
+++ b/CanadaMes-ui/src/views/Electrical/Positioning1.vue
@@ -36,7 +36,7 @@
tag="el-button"
type="text"
active-class="blue-button"
- >{{ $t("Parameter") }}</router-link
+ >{{ $t("Manual/Automatic") }}</router-link
>
</el-breadcrumb>
diff --git a/CanadaMes-ui/src/views/Electrical/Positioning2.vue b/CanadaMes-ui/src/views/Electrical/Positioning2.vue
index c8f65f9..6df53b2 100644
--- a/CanadaMes-ui/src/views/Electrical/Positioning2.vue
+++ b/CanadaMes-ui/src/views/Electrical/Positioning2.vue
@@ -12,7 +12,7 @@
<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')
+ $t('Manual/Automatic')
}}</router-link>
</el-breadcrumb>
diff --git a/CanadaMes-ui/src/views/Electrical/ServoManualone.vue b/CanadaMes-ui/src/views/Electrical/ServoManualone.vue
index 3e7885e..0e4224b 100644
--- a/CanadaMes-ui/src/views/Electrical/ServoManualone.vue
+++ b/CanadaMes-ui/src/views/Electrical/ServoManualone.vue
@@ -31,7 +31,7 @@
tag="el-button"
type="text"
active-class="blue-button"
- >{{ $t("Parameter") }}</router-link
+ >{{ $t("Manual/Automatic") }}</router-link
>
</el-breadcrumb>
diff --git a/CanadaMes-ui/src/views/Electrical/Servomanual.vue b/CanadaMes-ui/src/views/Electrical/Servomanual.vue
index 45eab45..5074191 100644
--- a/CanadaMes-ui/src/views/Electrical/Servomanual.vue
+++ b/CanadaMes-ui/src/views/Electrical/Servomanual.vue
@@ -12,7 +12,7 @@
<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')
+ $t('Manual/Automatic')
}}</router-link>
</el-breadcrumb>
diff --git a/CanadaMes-ui/src/views/Electrical/Sign.vue b/CanadaMes-ui/src/views/Electrical/Sign.vue
index ed8284f..c2b6284 100644
--- a/CanadaMes-ui/src/views/Electrical/Sign.vue
+++ b/CanadaMes-ui/src/views/Electrical/Sign.vue
@@ -13,7 +13,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/Servomanual" tag="el-button" type="text" active-class="blue-button">{{ $t('Manual/Automatic')
}}</router-link>
</el-breadcrumb>
diff --git a/CanadaMes-ui/src/views/Electrical/State.vue b/CanadaMes-ui/src/views/Electrical/State.vue
index ecb1563..d51ee02 100644
--- a/CanadaMes-ui/src/views/Electrical/State.vue
+++ b/CanadaMes-ui/src/views/Electrical/State.vue
@@ -13,7 +13,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/Servomanual" tag="el-button" type="text" active-class="blue-button">{{ $t('Manual/Automatic')
}}</router-link>
</el-breadcrumb>
<div>{{ $t('State') }}</div>
diff --git a/CanadaMes-ui/src/views/Electrical/alarm.vue b/CanadaMes-ui/src/views/Electrical/alarm.vue
index b5cc575..35dc885 100644
--- a/CanadaMes-ui/src/views/Electrical/alarm.vue
+++ b/CanadaMes-ui/src/views/Electrical/alarm.vue
@@ -8,7 +8,7 @@
<!-- <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link> -->
<!-- <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') }}</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/Servomanual" tag="el-button" type="text" active-class="blue-button">{{ $t('Manual/Automatic')
}}</router-link>
</el-breadcrumb>
<div>{{ $t('Alarm') }}</div>
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index 49b6c9e..e9f658f 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -344,6 +344,9 @@
</el-main>
<el-footer>
<div class="blocks" style="position: relative;">
+ <div :style="'position:absolute;width:40px;height:40px;top:40px;left:50px;background-Color:'+StateColor+';font-size:30px;text-align:center;border-radius: 50%;'">
+ {{ CountDowns }}
+ </div>
<div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:237px;">
<div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist1" :key="item['date']"
:style="{ height: 35 * item['glassWidth'] + 'px', left: 3.07 * index + Math.abs(item['cage'] - 10) * 6.8 + 'px' }"
@@ -416,7 +419,7 @@
</div>
<div class="glass D02" style="top: 117px;left: 1055px;position: absolute;">{{ ShowGlassIdList(1) }}
<br />
- <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.2', 1)">
+ <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.3', 1)">
{{ $t('Clear') }}</el-button>
</div>
<div class="glass B01" style="top: 270px;left: 640px;position: absolute;">
@@ -615,7 +618,6 @@
:page-sizes="[42, 84, 126, 420]" :page-size="pagesizes" layout="total, sizes, prev, pager, next, jumper"
:total="cageinfo.length > 0 ? cageinfo.length : null" background style="float: right; margin-top: 20px">
</el-pagination>
-
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible4" :title="$t('Order Info')" top="5vh">
@@ -641,11 +643,11 @@
<el-dialog :visible.sync="dialogFormVisible5" :title="$t('Please confirm the glass information')">
<el-form :model="form" label-width="100px" style="padding-right: 30px">
<div style="display: flex;justify-content: center;">
- <el-form-item>
+ <!-- <el-form-item>
{{ $t('Confirm State') }}:{{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }}
<el-button type="primary" @click="isConfirmState()">
{{ this.isConfirm == true ? $t('Not Allow') : $t('Allow') }}</el-button>
- </el-form-item>
+ </el-form-item> -->
<el-form-item>
{{ $t('Current State') }}:{{ this.Scanningmethod == false ? $t('Automatic') :
$t('Hand Movement') }}
@@ -653,7 +655,7 @@
}}</el-button>
</el-form-item>
<el-form-item>
- <el-input style="width:70%;" maxlength="13" :placeholder="$t('Enter the glass barcode')"
+ <el-input style="width:70%;" maxlength="14" :placeholder="$t('Enter the glass barcode')"
v-model="glassid1"></el-input>
<el-button type="primary" :disabled="!Scanningmethod" @click="WriteGlassID()">{{ $t('Add')
}}</el-button>
@@ -664,106 +666,112 @@
v-model="CurrrentGlassId"></el-input>
</el-form-item>
</div>
- <div style="display: flex;justify-content: space-around;">
+ <!-- <div style="display: flex;justify-content: space-around;">
<label for="">{{ $t('Upper film position') }}</label>
<label for="">{{ $t('Scan Code Point') }}</label>
- </div>
+ </div> -->
<div style="display: flex;justify-content: space-around;height: 40px;">
- <label for="">{{ $t('current Information') }}</label>
- <label for="">{{ $t('Modify Information') }}</label>
- <label for="">{{ $t('current Information') }}</label>
- <label for="">{{ $t('Modify Information') }}</label>
+ <label for="">{{ $t('D02 Current Information') }}</label>
+ <!-- <label for="">{{ $t('D01 Current Information') }}</label> -->
+ <label for="">{{ $t('D01 Modify Information') }}</label>
+ <label for="">{{ $t('Scan Code Information') }}</label>
</div>
<div style="display: flex;justify-content: space-around;">
- <el-form-item :label="$t('Barcode')">
+ <el-form-item :label="$t('Barcode')" >
<el-input v-model="form2.glassId" readonly autocomplete="off" />
</el-form-item>
- <el-form-item :label="$t('Barcode')">
- <el-input v-model="form4.glassId" readonly autocomplete="off" />
- </el-form-item>
- <el-form-item :label="$t('Barcode')">
+ <!-- <el-form-item :label="$t('Barcode')">
<el-input v-model="form3.glassId" readonly autocomplete="off" />
- </el-form-item>
+ </el-form-item> -->
<el-form-item :label="$t('Barcode')">
<el-input v-model="form5.glassId" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('Barcode')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
+ <el-input v-model="form6.barcode" readonly autocomplete="off" />
</el-form-item>
</div>
<div style="display: flex;justify-content: space-around;">
<el-form-item :label="$t('Order No')">
<el-input v-model="form2.orderId" readonly autocomplete="off" />
</el-form-item>
- <el-form-item :label="$t('Order No')">
- <el-input v-model="form4.orderId" readonly autocomplete="off" />
- </el-form-item>
- <el-form-item :label="$t('Order No')">
- <el-input v-model="form3.orderId" readonly autocomplete="off" />
- </el-form-item>
+ <!-- <el-form-item :label="$t('Order No')">
+ <el-input v-model="form3.orderId" readonly autocomplete="off" />
+ </el-form-item>-->
<el-form-item :label="$t('Order No')">
<el-input v-model="form5.orderId" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('Order No')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
+ <el-input v-model="form6.ordernumber" readonly autocomplete="off" />
</el-form-item>
</div>
<div style="display: flex;justify-content: space-around;">
<el-form-item :label="$t('List No')">
<el-input v-model="form2.listId" readonly autocomplete="off" />
</el-form-item>
- <el-form-item :label="$t('List No')">
- <el-input v-model="form4.listId" readonly autocomplete="off" />
- </el-form-item>
- <el-form-item :label="$t('List No')">
+ <!-- <el-form-item :label="$t('List No')">
<el-input v-model="form3.listId" readonly autocomplete="off" />
- </el-form-item>
+ </el-form-item> -->
<el-form-item :label="$t('List No')">
<el-input v-model="form5.listId" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('List No')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
+ <el-input v-model="form6.listnumber" readonly autocomplete="off" />
</el-form-item>
</div>
<div style="display: flex;justify-content: space-around;">
<el-form-item :label="$t('Box No')">
<el-input v-model="form2.boxId" readonly autocomplete="off" />
</el-form-item>
- <el-form-item :label="$t('Box No')">
- <el-input v-model="form4.boxId" readonly autocomplete="off" />
- </el-form-item>
- <el-form-item :label="$t('Box No')">
+ <!-- <el-form-item :label="$t('Box No')">
<el-input v-model="form3.boxId" readonly autocomplete="off" />
- </el-form-item>
+ </el-form-item> -->
<el-form-item :label="$t('Box No')">
<el-input v-model="form5.boxId" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('Box No')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
+ <el-input v-model="form6.boxnumber" readonly autocomplete="off" />
</el-form-item>
</div>
<div style="display: flex;justify-content: space-around;">
<el-form-item :label="$t('Length')">
<el-input v-model="form2.glasswidthmm" readonly autocomplete="off" />
</el-form-item>
- <el-form-item :label="$t('Length')">
- <el-input v-model="form4.glasswidthmm" readonly autocomplete="off" />
- </el-form-item>
- <el-form-item :label="$t('Length')">
+ <!-- <el-form-item :label="$t('Length')">
<el-input v-model="form3.glasswidthmm" readonly autocomplete="off" />
- </el-form-item>
+ </el-form-item> -->
<el-form-item :label="$t('Length')">
<el-input v-model="form5.glasswidthmm" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('Length')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
+ <el-input v-model="form6.glasslength" readonly autocomplete="off" />
</el-form-item>
</div>
<div style="display: flex;justify-content: space-around;">
<el-form-item :label="$t('Width')">
<el-input v-model="form2.glassheightmm" readonly autocomplete="off" />
</el-form-item>
- <el-form-item :label="$t('Width')">
- <el-input v-model="form4.glassheightmm" readonly autocomplete="off" />
- </el-form-item>
- <el-form-item :label="$t('Width')">
+ <!-- <el-form-item :label="$t('Width')">
<el-input v-model="form3.glassheightmm" readonly autocomplete="off" />
- </el-form-item>
+ </el-form-item> -->
<el-form-item :label="$t('Width')">
<el-input v-model="form5.glassheightmm" readonly autocomplete="off" />
</el-form-item>
+ <el-form-item :label="$t('Width')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
+ <el-input v-model="form6.glassheight" readonly autocomplete="off" />
+ </el-form-item>
</div>
<div style="display: flex;justify-content: right;">
- <el-button @click="InsertQueueGlass(1)" style="margin-right: 100px;" type="primary"
+ <el-button @click="InsertQueueGlass(1)" style="margin-right: 28%;" type="primary"
:disabled="disabled1">
{{ $t('Confirm') }}</el-button>
+ <span style="margin-right: 12%;">
+ {{ $t('Remaining width:') }}
+ {{ (108.27 - (Object.keys(this.form6).length === 0 ? 0 : (form6.glassheight > form6.glasslength ?
+ form6.glassheight : form6.glasslength))).toFixed(2) }}
+
+ </span>
</div>
</el-form>
</el-dialog>
@@ -790,18 +798,18 @@
<el-table-column :min-width="70" prop="orderId" :label="$t('Order No')"></el-table-column>
<el-table-column :min-width="70" prop="listId" :label="$t('List No')"></el-table-column>
<el-table-column :min-width="70" prop="boxId" :label="$t('Box No')"></el-table-column>
+ <el-table-column :min-width="70" prop="cell" :label="$t('Slot No')"></el-table-column>
<el-table-column :min-width="100" prop="glasswidthmm" :label="$t('Length')"></el-table-column>
<el-table-column :min-width="100" prop="glassheightmm" :label="$t('Width')"></el-table-column>
<el-table-column :min-width="90" prop="state" :label="$t('Glass State')">
<template slot-scope='scope'>
- {{ scope.row.state == 0 ? $t('Waiting') : scope.row.state == 1 ? $t('Outing') :
- scope.row.state
- == 2
- ? $t('Outed') : scope.row.state == 3 ? $t('Absent') : $t('Completed') }}
+ {{ scope.row.state == 0 ? $t('Waiting') : scope.row.state == 1 ?
+ $t('Outing') : scope.row.state == 2 ? $t('Outed') : scope.row.state == 3 ? $t('Absent')
+ : $t('Completed') }}
</template>
</el-table-column>
<el-table-column prop="sequence" :label="$t('Sequence')"></el-table-column>
- <el-table-column :min-width="90" prop="barcode" :label="$t('Complete')">
+ <!-- <el-table-column :min-width="90" prop="barcode" :label="$t('Complete')">
<template slot-scope='scope' style="height:100px;height:100px;">
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
:disabled="!(!isAllowQueue && scope.row.state != 1 && scope.row.state != 2)"
@@ -809,7 +817,7 @@
$t('Complete')
}}</el-button>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column :width="100" :label="$t('Operate')">
<template slot-scope='scope'>
@@ -904,6 +912,7 @@
import LanguageMixin from '../../lang/LanguageMixin'
let socket;
+let timer;
export default {
name: "Home",
data() {
@@ -935,6 +944,7 @@
form3: {},
form4: {},
form5: {},
+ form6: {},
alarm: [],
tableData: [],
cagelist1: [],
@@ -987,7 +997,7 @@
ClearGlassID: true,
StopTask: true,
SoftEmergencyStopState: true,
- CountDowns: "0",
+ CountDowns: "",
D01RequestState: false,
EmergencyStop: false,
PromptSize: 250,
@@ -998,9 +1008,12 @@
GlassIdList: [],
Scanningmethod: true,
CurrrentGlassId: "",
- feedglassid:"",
- count1:0,
- count2:1
+ feedglassid: "",
+ count1: 0,
+ count2: 1,
+ loadname: "",
+ form6state:0,
+ StateColor:"green"
};
},
created() {
@@ -1039,7 +1052,7 @@
};
// 娴忚鍣ㄧ鏀舵秷鎭紝鑾峰緱浠庢湇鍔$鍙戦�佽繃鏉ョ殑鏂囨湰娑堟伅
socket.onmessage = function (msg) {
- this.count2=this.count2+1;
+ this.count2 = this.count2 + 1;
//console.log("鏀跺埌鏁版嵁====" + msg.data);
let obj = JSON.parse(msg.data);
if (obj.params != null) {
@@ -1083,7 +1096,7 @@
}
//鑾峰彇寰呯‘璁ょ殑閾濇鐜荤拑淇℃伅
if (obj.AluminumFrame != null) {
-
+
this.AluminumFrame = obj.AluminumFrame[0];
if (this.dialogFormVisible6 == true) {
this.dialogFormVisible7 = true;
@@ -1097,8 +1110,8 @@
}
}
- if(obj.feedglassid!=null){
- this.feedglassid=obj.feedglassid[0];
+ if (obj.feedglassid != null) {
+ this.feedglassid = obj.feedglassid[0];
}
// if (obj.alarmmg[0].length > 0) {
@@ -1112,28 +1125,47 @@
// this.dialogFormVisible2 = true;
// }
// }
- // //鏄惁鎬ュ仠
- // if (obj.emergencystop != null) {
- // this.EmergencyStop = obj.emergencystop[0];
- // }
+ //鏄惁鎬ュ仠
+ if (obj.emergencystop != null) {
+ this.EmergencyStop = obj.emergencystop[0];
+ }
+ //澶嶄綅鍊掕鏃�
+ if (obj.countdown != null) {
+ if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
+ this.CountDown();
+ }
+ }
- // //澶嶄綅鍊掕鏃�
- // if (obj.countdown != null) {
- // if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
- // this.CountDown();
- // }
- // }
-
- // //澶嶄綅瀹屾垚淇″彿
- // if (obj.reset != null) {
- // this.reset = obj.reset[0];
- // }
+ //澶嶄綅瀹屾垚淇″彿
+ if (obj.reset != null) {
+ this.reset = obj.reset[0];
+ }
//鏄惁鏈夎繘鐗囪姹�
if (obj.D01RequestState != null) {
this.D01RequestState = obj.D01RequestState[0];
}
// this.D01RequestState=true;
+
+ if (obj.zhi != null) {
+ if (obj.zhi[0] != 0) {
+ if (obj.zhi[0] == 200) {
+ this.form5 = {};
+ this.$message.success(this.$t('Operation successful'));
+ }
+ else if (obj.zhi[0] == 300) {
+ this.$message.error(this.$t('There is no such glass'));
+ }
+ else if (obj.zhi[0] == 400) {
+ this.$message.error(this.$t('There is no such slot'));
+ } else if(obj.zhi[0] == 500) {
+ this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
+ } else if(obj.zhi[0] == 600) {
+ this.$message.error(this.$t('The glass size is not within the range'));
+ }
+ }
+
+ }
//鏄惁鍏佽鍑虹墖
this.isAllowQueue = obj.isAllowQueue[0];
@@ -1173,8 +1205,9 @@
if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 0) {
this.loadglassheight1 = 70;
if (this.form5.glassId != obj.form3[0].glassId && this.ManuallyInfeedGlass == false) {
- this.showform3();
-
+ if (this.loadname == "Buffer") {
+ this.showform3();
+ }
}
this.form5 = obj.form3[0];
this.glassid1 = "";
@@ -1187,6 +1220,17 @@
if (this.glassid1 == "") {
this.DeleteBarcodeGlass();
}
+ }
+ if (obj.form6 != null) {
+ this.form6state=1;
+ this.form6 = obj.form6[0];
+ if(this.form6.glassheight=="0"){
+ this.form6.glassheight="";
+ this.form6.glasslength="";
+ }
+ } else {
+ this.form6 = {};
+ this.form6state=0;
}
//鏁版嵁搴撹繛鎺ユ槸鍚︽甯�
if (obj.dbconnected == "false") {
@@ -1218,6 +1262,7 @@
load() {
//鍔犺浇鐢ㄦ埛鏉冮檺
currentUsername().then(res => {
+ this.loadname = res.data;
SelectPermissionByUserName(res.data).then(res => {
res.data.permission.forEach(item => {
if (item.permissionId == "32" && item.state == 1) {
@@ -1306,14 +1351,14 @@
//鎵嬪姩涓婄墖
sbumitglassid() {
if (this.form.order != "") {
- let width=0;
- let height=0;
- if(this.form.glassheight<this.form.glasswidth){
- width=this.form.glasswidth;
- height=this.form.glassheight;
- }else{
- height=this.form.glasswidth;
- width=this.form.glassheight;
+ let width = 0;
+ let height = 0;
+ if (this.form.glassheight < this.form.glasswidth) {
+ width = this.form.glasswidth;
+ height = this.form.glassheight;
+ } else {
+ height = this.form.glasswidth;
+ width = this.form.glassheight;
}
if (height < 380 || width < 380 || height > 1810 || width > 2760) {
this.$message.error(this.$t('The glass size is not within the range'));
@@ -1674,9 +1719,12 @@
this.form5 = {};
this.$message.success(this.$t('Operation successful'));
}
+ else if (res.data.message == 300) {
+ this.$message.error(this.$t('There is no such glass'));
+ }
else if (res.data.message == 400) {
this.$message.error(this.$t('There is no such slot'));
- } else {
+ }else if (res.data.message == 500) {
this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
}
});
@@ -1948,14 +1996,14 @@
Sizerange(Glass, position) {
console.log(position);
if (this.ManuallyInfeedGlass == false) {
- let width=0;
- let height=0;
- if(Glass.glassheight<Glass.glasswidth){
- width=Glass.glasswidth;
- height=Glass.glassheight;
- }else{
- height=Glass.glasswidth;
- width=Glass.glassheight;
+ let width = 0;
+ let height = 0;
+ if (Glass.glassheight < Glass.glasswidth) {
+ width = Glass.glasswidth;
+ height = Glass.glassheight;
+ } else {
+ height = Glass.glasswidth;
+ width = Glass.glassheight;
}
if (height < 380 || width < 380 || height > 1810 || width > 2760) {
this.$alert(this.$t('The glass size is not within the range'), this.$t('confirm'), {
@@ -2001,34 +2049,34 @@
},
//60绉掑浣嶅�掓暟璁℃椂
CountDown() {
+ clearInterval(timer);
let count = 60;
- let timer = setInterval(
+ timer = setInterval(
() => {
if (this.EmergencyStop == true) {
- this.dialogFormCountDown = false;
clearInterval(timer);
- this.CountDowns = "0";
+ this.StateColor="red";
+ this.CountDowns = "";
} else {
if (count > 0) {
- this.PromptSize = 500;
- count--;
- this.CountDowns = count;
- this.dialogFormCountDown = true;
+ this.StateColor="yellow";
+ this.PromptSize = 500;
+ this.CountDowns = count;
+ count--;
}
else {
- this.PromptSize = 200;
- this.CountDowns = "Waiting for reset";
- if (this.reset == true) {
- clearInterval(timer);
- this.dialogFormCountDown = false;
- }
+ this.PromptSize = 200;
+ this.CountDowns = "";
+ this.StateColor="green";
+ if (this.reset == true) {
+ clearInterval(timer);
+ }
}
}
},
1000
);
-
- },
+ },
//鏇存崲褰撳墠閾濇
FrameStateUpdate(frameno) {
FrameStateUpdate(frameno).then(res => {
@@ -2099,28 +2147,28 @@
if (this.ClearGlassID == false) {
console.log(this.DeviceList, num);
if (this.DeviceList[num] == 0) {
- if (this.GlassIdList[num].length <= 14) {
- this.$confirm(this.$t('Are you sure to clear this barcode ?'), this.$t('confirm'), {
- confirmButtonText: this.$t('Yes'),
- cancelButtonText: this.$t('No'),
- type: 'warning'
- }).then(() => {
- ClearGlassId(position, this.GlassIdList[num]).then(res => {
- if (res.data.message == 200) {
- this.$message.success(this.$t('Operation successful'));
- } else {
- this.$message.success(this.$t('operation failed'));
- }
- });
- }).catch(() => {
- this.$message({
- type: 'info',
- message: this.$t('Operation canceled')
- });
+ // if (this.GlassIdList[num].length <= 14) {
+ this.$confirm(this.$t('Are you sure to clear this barcode ?'), this.$t('confirm'), {
+ confirmButtonText: this.$t('Yes'),
+ cancelButtonText: this.$t('No'),
+ type: 'warning'
+ }).then(() => {
+ ClearGlassId(position, this.GlassIdList[num]).then(res => {
+ if (res.data.message == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ } else {
+ this.$message.success(this.$t('operation failed'));
+ }
});
- } else {
- this.$message.error(this.$t('There is no glass ID here'));
- }
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: this.$t('Operation canceled')
+ });
+ });
+ // } else {
+ // this.$message.error(this.$t('There is no glass ID here'));
+ // }
} else {
//鑷姩鐘舵�佷笉鑳芥竻闄ょ幓鐠僫d
this.$message.error(this.$t('Unable to clear glass ID in automatic mode'));
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSetting.java b/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSetting.java
index b01cc8a..1c7c551 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSetting.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSetting.java
@@ -2,6 +2,8 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+
import org.apache.commons.io.FileUtils;
import java.io.*;
@@ -9,6 +11,7 @@
import java.util.Arrays;
import java.util.List;
+@Slf4j
public class PLCAutomaticParameterSetting extends Thread {
// 鐢ㄤ簬瀛樺偍搴旂敤绋嬪簭鐨勯厤缃俊鎭�
@@ -70,11 +73,12 @@
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("AutomaticParameterSetting");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
+
// WebSocketServer webSocketServer =
// WebSocketServer.sessionMap.get("AutomaticParameterSetting");
- if (webserver != null) {
+ if (webserver != null&&webserver.session.isOpen()) {
+ webserver.sendMessage(jsonObject.toString());
List<String> messages = webserver.getMessages();
String addressList1 = "DB100.120";
String addressList2 = "DB100.18";
@@ -156,7 +160,9 @@
}
}
}
-
+ else{
+ log.info("AutomaticParameterSetting is closed");
+ }
}
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PLCManualJog.java b/springboot-vue3/src/main/java/com/example/springboot/component/PLCManualJog.java
index a3b24e4..4c030db 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PLCManualJog.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PLCManualJog.java
@@ -2,13 +2,15 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+
import org.apache.commons.io.FileUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-
+@Slf4j
public class PLCManualJog extends Thread {
@@ -51,12 +53,12 @@
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("ManualJog");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
+
// WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("ManualJog");
- if (webserver != null) {
-
+ if (webserver != null&&webserver.session.isOpen()) {
+ webserver.sendMessage(jsonObject.toString());
List<String> messages = webserver.getMessages();
if (!messages.isEmpty()) {
@@ -101,6 +103,8 @@
webserver.clearMessages();
}
+ }else{
+ log.info("ManualJog is closed");
}
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
index 763907d..7e7d35b 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -36,8 +36,9 @@
// 鏍规嵁鐜荤拑id鑾峰彇璁㈠崟鍙�,鍗曠嫭鏁版嵁婧�
// try {
- // spianService.selectAll(jdbcConnections.SelectGlassByGlassIdOrderIdFrameId("X12345610102GV","",""));
-
+ // //spianService.selectAll(jdbcConnections.SelectGlassByGlassIdOrderIdFrameId("X12345610102GV","",""));
+ // north_glass_buffer1 aa=jdbcConnections.SelectGlassByGlassIdOrderIdFrameId("X12345610102GV","","");
+ // spianMapper.UpdataAddCage2("123", "123", aa, 5, 1, 9, 2,2000.00);
// } catch (SQLException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
@@ -204,7 +205,7 @@
}
}
- System.out.println(spianService.result);
+ // System.out.println(spianService.result);
// 鏌ヨ鏁版嵁搴�
// 鎺ㄩ�佸埌鍓嶇
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java
index d39565b..48d123c 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java
@@ -2,12 +2,13 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-
+@Slf4j
public class PlcInteractionState extends Thread {
private Configuration config;
@@ -89,7 +90,12 @@
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("InteractionState");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
+ if(webserver!=null&&webserver.session.isOpen()){
+ webserver.sendMessage(jsonObject.toString());
+ }else{
+ log.info("InteractionState is closed");
+ }
+
}
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcLayout.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcLayout.java
index d95370c..e1ce830 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcLayout.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcLayout.java
@@ -2,6 +2,7 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.sql.SQLException;
@@ -20,6 +21,7 @@
import com.example.springboot.mapper.HomeMapper;
import com.example.springboot.mapper.SpianMapper;
+@Slf4j
public class PlcLayout extends Thread {
@Autowired
@@ -89,17 +91,18 @@
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Layout");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
+
- if (webserver != null) {
-
+ if (webserver != null&& webserver.session.isOpen()) {
+ webserver.sendMessage(jsonObject.toString());
List<String> messages = webserver.getMessages();
if (!messages.isEmpty()) {
// // 灏嗘渶鍚庝竴涓秷鎭浆鎹负鏁存暟绫诲瀷鐨勫垪琛�
webserver.clearMessages();
}
-
+ }else{
+ log.info("Layout is closed");
}
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition.java
index f7f6910..1047d50 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition.java
@@ -2,13 +2,15 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+
import org.apache.commons.io.FileUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-
+@Slf4j
public class PlcManualonePosition extends Thread {
private Configuration config;
@@ -184,10 +186,11 @@
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("ManualonePosition");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
+
// WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("ManualonePosition");
- if (webserver != null) {
+ if (webserver != null&&webserver.session.isOpen()) {
+ webserver.sendMessage(jsonObject.toString());
List<String> messages = webserver.getMessages();
@@ -238,6 +241,8 @@
// 娓呯┖娑堟伅鍒楄〃
webserver.clearMessages();
}
+ }else{
+ log.info("ManualonePosition is closed");
}
}
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition2.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition2.java
index d2a6a67..99de30e 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition2.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition2.java
@@ -2,13 +2,15 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+
import org.apache.commons.io.FileUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-
+@Slf4j
public class PlcManualonePosition2 extends Thread {
private Configuration config;
@@ -165,10 +167,11 @@
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("ManualonePosition2");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
+
// WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("ManualonePosition2");
- if (webserver != null) {
+ if (webserver != null&&webserver.session.isOpen()) {
+ webserver.sendMessage(jsonObject.toString());
List<String> messages = webserver.getMessages();
List<String> waddresses1 = new ArrayList<>();
waddresses1.add("DB100.116");
@@ -208,6 +211,8 @@
// 娓呯┖娑堟伅鍒楄〃
webserver.clearMessages();
}
+ }else{
+ log.info("ManualonePosition2 is closed");
}
}
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
index e5877fc..61f8c6c 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
@@ -2,6 +2,8 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+
import com.example.springboot.controller.HomeController;
import com.example.springboot.mapper.HomeMapper;
import org.apache.commons.io.FileUtils;
@@ -14,6 +16,7 @@
import java.util.Collections;
import java.util.List;
+@Slf4j
public class PlcParameter2 extends Thread {
@Autowired
StorageCageService storageCageService;
@@ -115,10 +118,10 @@
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
+
- if (webserver != null) {
-
+ if (webserver != null&&webserver.session.isOpen()) {
+ webserver.sendMessage(jsonObject.toString());
List<String> messages = webserver.getMessages();
if (!messages.isEmpty()) {
@@ -269,6 +272,8 @@
// 娓呯┖娑堟伅鍒楄〃
webserver.clearMessages();
}
+ }else{
+ log.info("Parameter2 is closed");
}
}
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcPositioning1.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcPositioning1.java
index 82a5217..523bc43 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcPositioning1.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcPositioning1.java
@@ -2,6 +2,7 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.List;
@@ -15,6 +16,8 @@
import java.io.UnsupportedEncodingException;
import org.apache.commons.io.FileUtils;
+
+@Slf4j
public class PlcPositioning1 extends Thread {
@@ -65,9 +68,10 @@
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Positioning1");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
+
- if (webserver != null) {
+ if (webserver != null&&webserver.session.isOpen()) {
+ webserver.sendMessage(jsonObject.toString());
List<String> messages = webserver.getMessages();
// 瀛樼墖鏍� 鍑虹墖鏍煎湴鍧�
@@ -106,6 +110,8 @@
// 娓呯┖娑堟伅鍒楄〃
webserver.clearMessages();
}
+ }else{
+ log.info("Positioning1 is closed");
}
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java
index facf708..a7545da 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java
@@ -2,6 +2,8 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+
import com.google.common.primitives.Bytes;
import org.apache.commons.io.FileUtils;
@@ -9,7 +11,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-
+@Slf4j
public class PlcServoManualone extends Thread {
// 鐢ㄤ簬瀛樺偍搴旂敤绋嬪簭鐨勯厤缃俊鎭�
@@ -230,9 +232,10 @@
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("ServoManualone");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
+
- if (webserver != null) {
+ if (webserver != null&&webserver.session.isOpen()) {
+ webserver.sendMessage(jsonObject.toString());
List<String> messages = webserver.getMessages();
if (!messages.isEmpty()) {
@@ -270,6 +273,8 @@
// 娓呯┖娑堟伅鍒楄〃
webserver.clearMessages();
}
+ }else{
+ log.info("ServoManualone is closed");
}
}
}
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 ddfdf88..99f639c 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
@@ -2,6 +2,7 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
import java.io.BufferedReader;
import java.io.FileInputStream;
@@ -15,6 +16,7 @@
import com.example.springboot.mapper.AlarmMapper;
+@Slf4j
public class Plcalarm extends Thread {
private AlarmMapper alarmMapper;
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 f294138..2528a72 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
@@ -1,31 +1,25 @@
package com.example.springboot.component;
-import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
-import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import com.example.springboot.service.*;
-import org.apache.ibatis.annotations.Result;
import org.springframework.beans.factory.annotation.Autowired;
-import com.example.springboot.entity.Glass;
import com.example.springboot.entity.Out_slice;
import com.example.springboot.entity.Queue;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.alarmmg;
import com.example.springboot.entity.north_glass_buffer1;
-import com.example.springboot.entity.device.PlcParameterObject;
import com.example.springboot.mapper.HomeMapper;
import com.example.springboot.mapper.SpianMapper;
+@Slf4j
public class Plchome extends Thread {
@Autowired
@@ -39,11 +33,11 @@
public static Boolean isAllowQueue = true;
public static Boolean isAllowReordering = true;
// 鍑虹墖闃熷垪璀﹀憡
- public static Boolean isQueueWarning = true;
+ public static Boolean isQueueWarning = false;
// 閾濇id
public static String FrameNo = "";
// 鏄惁闇�瑕佹墜鍔ㄧ‘璁ょ幓鐠�
- public static Boolean isConfirm = false;
+ public static Boolean isConfirm = true;
// 寰呯‘璁ょ殑鍑虹墖闃熷垪
public static List<north_glass_buffer1> AluminumFrame;
@@ -64,6 +58,7 @@
@Override
public void run() {
while (this != null) {
+ Short zhi = 0;
JSONObject jsonObject = new JSONObject();
jsonObject.append("feedglassid", feedglassid);
try {
@@ -77,6 +72,41 @@
.getBean(North_Glass_Buffer1Service.class);
storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class);
dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
+
+ boolean dbconnected = false;
+ try {
+ dbserve.getConn();
+ dbconnected = true;
+ } catch (Exception e) {
+ e.printStackTrace();
+ dbconnected = false;
+ }
+ log.info("dbconnected:"+dbconnected);
+ jsonObject.append("dbconnected", dbconnected);
+ // // 鑾峰彇褰撳墠鎵爜鏋幓鐠僫d
+ // String CurrrentGlassId = "X22595911002GV";
+ // if (CurrrentGlassId.toString() != "" && CurrrentGlassId.toString() != null) {
+ // north_glass_buffer1 form6 =
+ // dbserve.SelectGlassByGlassIdOrderIdFrameIdouts(CurrrentGlassId, "",
+ // "");
+ // if (form6.getbarcode() != null) {
+ // jsonObject.append("form6", form6);
+ // double width = 0;
+ // double height = 0;
+ // if (form6.getglassheightmm() < form6.getglasslengthmm()) {
+ // height = form6.getglassheightmm();
+ // width = form6.getglasslengthmm();
+ // } else {
+ // height = form6.getglasslengthmm();
+ // width = form6.getglassheightmm();
+ // }
+ // if (height < 380 || width < 380 || height > 1810 || width > 2760) {
+ // zhi = 600;
+ // } else {
+ // zhi = spianService.selectAlls(form6);
+ // }
+ // }
+ // }
// 绗煎瓙浣跨敤鎯呭喌
List<StorageCage> tableData = homeMapper.selectAll();
@@ -134,16 +164,18 @@
if (S7control.getinstance().CheckConnected() == true) {
// 閾濇绾夸氦浜�
- if (S7controlLK.getinstance().CheckConnected() == true) {
- if (CurrentFrame != null) {
+ // if (S7controlLK.getinstance().CheckConnected() == true) {
+ // E02鐜荤拑id
+ String E02id = S7controlLK.getinstance().readStrings("DB17.40");
+ // log.info("E02id"+E02id);
+ outSliceServive.FrameStateUpdate(E02id);
+ if (CurrentFrame.getBarCode() != null) {
S7controlLK.getinstance().writeStrings(CurrentFrame.getBarCode(), "DB17.0");
}
- String E01id = S7controlLK.getinstance().readStrings("DB17.0");
String J01id = S7controlLK.getinstance().readStrings("DB17.22");
-
- List<Short> liststates = S7controlLK.getinstance().ReadWord("DB17.38", 1);
List<Short> liststate = S7controlLK.getinstance().ReadWord("DB17.20", 1);
Short framerequest = liststate.get(0);
+ // log.info("liststate:" + liststate);
if (framerequest == 1) {
// 閾濇id
String position;
@@ -156,13 +188,25 @@
}
Short send;
if (position.equals("0")) {
- send = 0;
+ send = 2;
} else {
send = 1;
}
+ if (J01id != null) {
+ int barcodeState = spianMapper.SelectOverState(J01id);// 鑾峰彇璇ラ摑妗嗙殑鐘舵��
+ if (barcodeState == 0) {// 褰撹閾濇鎵�鏈夌殑鐜荤拑閮芥槸瀹屾垚鐘舵�佹椂鍒犻櫎鍦ㄥ嚭鐗囬槦鍒楃殑鏁版嵁
+ spianMapper.DeleteQueue(J01id);
+ // log.info("deleteoutslice:" + J01id);
+ }
+ }
S7controlLK.getinstance().WriteWord("DB17.38", (short) send);
}
- }
+
+ String E01id = S7controlLK.getinstance().readStrings("DB17.0");
+ // log.info("frameno:" + E01id);
+ List<Short> liststates = S7controlLK.getinstance().ReadWord("DB17.38", 1);
+ // log.info("frameflip:" + liststates);
+ // }
// 鑾峰彇褰撳墠鎵爜鏂瑰紡
List<Boolean> Scanningmethods = S7control.getinstance().ReadBits("DB101.11.4", 1);
@@ -173,6 +217,28 @@
}
// 鑾峰彇褰撳墠鎵爜鏋幓鐠僫d
String CurrrentGlassId = spianService.queGlassid("DB103.256", 14).toString();
+ if (CurrrentGlassId.toString() != "" && CurrrentGlassId.toString() != null) {
+ north_glass_buffer1 form6 = dbserve.SelectGlassByGlassIdOrderIdFrameIdouts(CurrrentGlassId, "",
+ "");
+ if (form6.getbarcode() != null) {
+ jsonObject.append("form6", form6);
+ double width = 0;
+ double height = 0;
+ if (form6.getglassheightmm() < form6.getglasslengthmm()) {
+ height = form6.getglassheightmm();
+ width = form6.getglasslengthmm();
+ } else {
+ height = form6.getglasslengthmm();
+ width = form6.getglassheightmm();
+ }
+ if (height < 380 || width < 380 || height > 1810 || width > 2760) {
+ zhi = 600;
+ } else {
+ zhi = spianService.selectAlls(form6);
+ }
+ }
+ }
+
jsonObject.append("CurrrentGlassId", CurrrentGlassId);
// 鑾峰彇D01-D06,A01,A02,B01,B02鐘舵��
@@ -287,42 +353,30 @@
width = form3.getglassheight();
}
if (height < 380 || width < 380 || height > 1810 || width > 2760) {
- FeedState = true;
- jsonObject.append("FeedState", FeedState);
- FeedState = false;
+ zhi = 600;
} else {
if (D01RequestState == true && D01ResponseState != true) {
- storageCageService.InsertQueueGlassId((short) 1, form3);
+ zhi = storageCageService.InsertQueueGlassIds((short) 1, form3);
}
}
}
}
- boolean dbconnected = false;
- try {
- dbserve.getConn();
- dbconnected = true;
- } catch (Exception e) {
- // TODO: handle exception
- dbconnected = false;
- }
- jsonObject.append("dbconnected", dbconnected);
+ jsonObject.append("zhi", zhi);
+
// 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) {
-
+ if (webserver != null && webserver.session.isOpen()) {
+ webserver.sendMessage(jsonObject.toString());
List<String> messages = webserver.getMessages();
-
if (!messages.isEmpty()) {
// // 灏嗘渶鍚庝竴涓秷鎭浆鎹负鏁存暟绫诲瀷鐨勫垪琛�
webserver.clearMessages();
}
-
+ } else {
+ log.info("Home is closed");
}
-
}
}
} catch (InterruptedException | SQLException e) {
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 d436dbd..4e3cd54 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
@@ -2,6 +2,7 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
import java.io.BufferedReader;
import java.io.FileInputStream;
@@ -13,6 +14,7 @@
import java.util.List;
import java.util.Arrays;
+@Slf4j
public class Plcsign extends Thread {
String name = "";
Integer count = 0;
@@ -100,7 +102,12 @@
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Sign");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
+ if (webserver != null && webserver.session.isOpen()) {
+ webserver.sendMessage(jsonObject.toString());
+ }else{
+ log.info("Sign is closed");
+ }
+
}
}
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plcstate.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plcstate.java
index b5aafb4..1059b31 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plcstate.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plcstate.java
@@ -2,6 +2,7 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import lombok.extern.slf4j.Slf4j;
import java.io.BufferedReader;
import java.io.FileInputStream;
@@ -13,6 +14,7 @@
import java.util.List;
import java.util.Arrays;
+@Slf4j
public class Plcstate extends Thread {
String name = "";
Integer count = 0;
@@ -87,7 +89,11 @@
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("State");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
- webserver.sendMessage(jsonObject.toString());
+ if (webserver != null && webserver.session.isOpen()) {
+ webserver.sendMessage(jsonObject.toString());
+ }else{
+ log.info("State杩炴帴宸插叧闂�");
+ }
}
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
index d15d033..6633f12 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -31,5 +31,6 @@
new PlcServoManualone().start();
new PLCManualJog().start();
new PlcInteractionState().start();
+
}
}
\ No newline at end of file
diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
index 8dbb53f..6b21734 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -178,7 +178,7 @@
Map<String, Object> map = new HashMap<>();
Out_slice result = homeMapper.SelectQueueByglassid(glassid);
if (result == null) {
- north_glass_buffer1 north_glass_buffer1 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(glassid, "", "");
+ north_glass_buffer1 north_glass_buffer1 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameIdout(glassid, "", "");
String flip = jdbcConnections.SelectFlipByFrameBarcode(north_glass_buffer1.getFrameBarcode());
if (flip != null&&flip != "") {
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java b/springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java
index 4fb2421..68949b5 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java
@@ -20,6 +20,7 @@
private int framestate;//閾濇鐘舵��
private double framewidthmm;
private double frameheightmm;
+ private String cell;//鏍煎瓙鍙�
public String getPosition() {
return position;
@@ -197,4 +198,12 @@
this.frameheightmm = frameheightmm;
}
+ public String getCell() {
+ return cell;
+ }
+
+ public void setCell(String cell) {
+ this.cell = cell;
+ }
+
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
index f85627b..683bcf0 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -139,7 +139,7 @@
north_glass_buffer1 SelectBoxNo(String glassid);
//鏌ヨ鍑虹墖闃熷垪淇℃伅
- @Select("select * from out_slice order by sequence")
+ @Select("select a.*,b.cell from out_slice a left join storage_cage b on a.glassId=b.glass_id order by sequence")
List<Out_slice> SelectProductionqueue();
//鏍规嵁鐜荤拑id鏌ヨ绗煎唴鐜荤拑淇℃伅
diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
index b72ecf4..de7f2b9 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -55,7 +55,7 @@
// desc,tier desc,cell desc LIMIT 1")
// StorageCage selectOut(String orderId);
// 鎸夌幓鐠僆D鍑虹墖浠诲姟鏌ヨ
- @Select("select cage,cell,tier,glasswidth,ROUND(id/2)as prcId,id from storage_cage as a where a.glass_id=#{glassid} and state=1 and disabled=0 order by cage desc,tier desc,cell desc LIMIT 1")
+ @Select("select cage,cell,tier,glasswidth,glassheight,ROUND(id/2)as prcId,id from storage_cage as a where a.glass_id=#{glassid} and state=1 and disabled=0 order by cage desc,tier desc,cell desc LIMIT 1")
StorageCage selectOut2(String glassid);
// 鍒ゆ柇鍑虹墖涓�1鏃讹紝鏄惁鍙洿鎺ュ嚭鐗�
@@ -78,7 +78,7 @@
@Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=#{width} where id=#{id};")
void UpdataAddCage(String orderid, String glassid, double width, int cage, int cell, int id, int state);
- @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{glass.ordernumber},glasswidth=#{glass.glasslengthmm},glassheight=#{glass.glassheightmm},glasswidthmm=#{glass.glasslength},glassheightmm=#{glass.glassheight},listid=#{glass.listnumber},boxid=#{glass.boxnumber},FrameBarcode=#{glass.frameBarcode} where id=#{id};")
+ @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{glass.ordernumber},glasswidth=#{widths},glassheight=#{glass.glassheightmm},glasswidthmm=#{glass.glasslength},glassheightmm=#{glass.glassheight},listid=#{glass.listnumber},boxid=#{glass.boxnumber},FrameBarcode=#{glass.frameBarcode} where id=#{id};")
void UpdataAddCage2(String orderid, String glassid, north_glass_buffer1 glass, int cage, int cell, int id,int state,Double widths);
// 淇敼绗煎瓙淇℃伅(澶氱墖杩涚墖)
@@ -216,7 +216,7 @@
String SelectBarcode(String glassId);
// 鑾峰彇鍑虹墖闃熷垪鐨勯摑妗嗘槸鍚﹀叏閮ㄥ畬鎴�
- @Select("select count(*) from out_slice where barcode=#{barcode} and (state=1 or state=0 or state=3);")
+ @Select("select count(*) from out_slice where barcode=#{barcode} and (state=1 or state=0);")
int SelectOverState(String barcode);
// 鍒犻櫎鍑虹墖闃熷垪璇ラ摑妗嗙殑id
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 ff51d9e..2c1455f 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://localhost:3306/canadames";
private static final String USERNAME = "root";
private static final String PASSWORD = "beibo.123/";
@@ -42,6 +42,64 @@
}
public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameId(String glassid,String orderid,String frameid) throws SQLException {
+ Connection conn = getConn();
+ north_glass_buffer1 north_glass_buffer1s=new north_glass_buffer1();
+ String sql = "select * from north_glass_buffer1 where barcode=? or ordernumber=? or FrameBarcode=?";
+ ps = conn.prepareStatement(sql);
+ ps.setString(1, glassid);
+ ps.setString(2, orderid);
+ ps.setString(3, frameid);
+ ResultSet rs= ps.executeQuery();
+ while (rs.next()) {
+ north_glass_buffer1s.setId(rs.getInt("Id"));
+ north_glass_buffer1s.setordernumber(rs.getString("ordernumber"));
+ north_glass_buffer1s.setlistnumber(rs.getString("listnumber"));
+ north_glass_buffer1s.setboxnumber(rs.getString("boxnumber"));
+ north_glass_buffer1s.setbarcode(rs.getString("barcode"));
+ north_glass_buffer1s.setglasslength(rs.getDouble("glasslength"));
+ north_glass_buffer1s.setglassheight(rs.getDouble("glassheight"));
+ north_glass_buffer1s.setglasslengthmm(rs.getDouble("glasslength_mm"));
+ north_glass_buffer1s.setglassheightmm(rs.getDouble("glassheight_mm"));
+ north_glass_buffer1s.setitemtype(rs.getString("itemtype"));
+ north_glass_buffer1s.setslotnumber(rs.getString("slotnumber"));
+ north_glass_buffer1s.setdatemodified(rs.getString("datemodified"));
+ north_glass_buffer1s.setdatecreated(rs.getString("datecreated"));
+ north_glass_buffer1s.setFrameBarcode(rs.getString("FrameBarcode"));
+ }
+ conn.close();
+ return north_glass_buffer1s;
+ }
+
+ public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameIdout(String glassid,String orderid,String frameid) throws SQLException {
+ Connection conn = getConn();
+ north_glass_buffer1 north_glass_buffer1s=new north_glass_buffer1();
+ String sql = "select * from north_glass_buffer1 where barcode=? or ordernumber=? or FrameBarcode=?";
+ ps = conn.prepareStatement(sql);
+ ps.setString(1, glassid);
+ ps.setString(2, orderid);
+ ps.setString(3, frameid);
+ ResultSet rs= ps.executeQuery();
+ while (rs.next()) {
+ north_glass_buffer1s.setId(rs.getInt("Id"));
+ north_glass_buffer1s.setordernumber(rs.getString("ordernumber"));
+ north_glass_buffer1s.setlistnumber(rs.getString("listnumber"));
+ north_glass_buffer1s.setboxnumber(rs.getString("boxnumber"));
+ north_glass_buffer1s.setbarcode(rs.getString("barcode"));
+ north_glass_buffer1s.setglasslength(rs.getDouble("glasslength"));
+ north_glass_buffer1s.setglassheight(rs.getDouble("glassheight"));
+ north_glass_buffer1s.setglasslengthmm(rs.getDouble("glasslength_mm"));
+ north_glass_buffer1s.setglassheightmm(rs.getDouble("glassheight_mm"));
+ north_glass_buffer1s.setitemtype(rs.getString("itemtype"));
+ north_glass_buffer1s.setslotnumber(rs.getString("slotnumber"));
+ north_glass_buffer1s.setdatemodified(rs.getString("datemodified"));
+ north_glass_buffer1s.setdatecreated(rs.getString("datecreated"));
+ north_glass_buffer1s.setFrameBarcode(rs.getString("FrameBarcode"));
+ }
+ conn.close();
+ return north_glass_buffer1s;
+ }
+
+ public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameIdouts(String glassid,String orderid,String frameid) throws SQLException {
Connection conn = getConn();
north_glass_buffer1 north_glass_buffer1s=new north_glass_buffer1();
String sql = "select * from north_glass_buffer1 where barcode=? or ordernumber=? or FrameBarcode=?";
@@ -286,8 +344,8 @@
*/
public static Connection getConn() throws SQLException {
Connection conn = null;
- conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/canadames?serverTimezone=GMT%2B8&characterEncoding=utf-8", "root", "beibo.123/");
- // conn = DriverManager.getConnection("jdbc:mysql://192.168.102.9:3306/production?serverTimezone=GMT%2B8&characterEncoding=utf-8", "northglass", "n0rthgla55");
+ // conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/canadames?serverTimezone=GMT%2B8&characterEncoding=utf-8", "root", "beibo.123/");
+ conn = DriverManager.getConnection("jdbc:mysql://192.168.102.9:3306/production?serverTimezone=GMT%2B8&characterEncoding=utf-8&usessl=false", "northglass", "n0rthgla55");
return conn;
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
index 2fb7429..3edac09 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
@@ -15,6 +15,7 @@
import com.example.springboot.component.S7control;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.north_glass_buffer1;
+import com.example.springboot.mapper.HomeMapper;
import com.example.springboot.mapper.SpianMapper;
import com.google.common.primitives.Bytes;
@@ -22,6 +23,8 @@
public class SpianService {
@Autowired
private SpianMapper spianMapper;
+ @Autowired
+ private HomeMapper homeMapper;
public static List<String> result=new ArrayList<String>();
// @GetMapping("/all")
public Short selectAll(north_glass_buffer1 glasslist) {
@@ -195,7 +198,7 @@
int cages;
int cells;
double glasswidth = cageout.getGlassWidth();
-
+
// 鍒ゆ柇鐜荤拑鍐呭鐗�
if (tier == 2) {
int state = spianMapper.selectGlassState(cage, cell);// 鑾峰彇鏍煎瓙鏁伴噺
@@ -411,13 +414,94 @@
spianMapper.UpdateCageadd(glassid.toString(), 1);// 鏇存敼绗煎瓙琛ㄨ繘鐗囩姸鎬�
String barcode = spianMapper.SelectBarcode(glassid.toString());// 鑾峰彇璇ョ幓鐠冪殑閾濇id
spianMapper.UpdateAddQueue(glassid.toString());// 鎶婅繘鐗囩殑鐜荤拑鏇存柊鍒板嚭鐗囬槦鍒椾腑
- // if (barcode != null) {
- // int barcodeState = spianMapper.SelectOverState(barcode);// 鑾峰彇璇ラ摑妗嗙殑鐘舵��
- // if (barcodeState == 0) {// 褰撹閾濇鎵�鏈夌殑鐜荤拑閮芥槸瀹屾垚鐘舵�佹椂鍒犻櫎鍦ㄥ嚭鐗囬槦鍒楃殑鏁版嵁
- // spianMapper.DeleteQueue(barcode);
- // }
- // }
+
}
+
+ public Short selectAlls(north_glass_buffer1 glasslist) {
+ try {
+
+ int cage1 = 0;
+ int cells;
+ int ids;
+ int prcid;
+ int tiers;
+ int prctier;
+ double width;
+ double minwidth = 0;
+ double widths;
+ // north_glass_buffer1 glasslist = spianMapper.selectGlass(glassid); // 鑾峰彇鐜荤拑鍙傛暟
+ // 濡傛灉娌℃湁姝d鏃�
+ if (glasslist == null) {
+ return (300);
+ }
+ //鍒ゆ柇鏄惁瀛樺湪绗煎瓙閲�
+ short result = homeMapper.SelectStorageByGlassId(glasslist.getbarcode());
+ if (result > 0) {
+ return (500);
+ }
+
+
+ if(glasslist.getglasslengthmm()>glasslist.getglassheightmm()) {
+ widths= glasslist.getglasslengthmm();
+ }else{
+ widths= glasslist.getglassheightmm();
+ }
+ // Map result=new HashMap();
+
+
+ String orderids = glasslist.getordernumber();
+ String FrameBarcode = glasslist.getFrameBarcode();
+ String glassid = glasslist.getbarcode();
+
+
+ // String orderid="A001";
+ // 鑾峰彇閾濇鐩稿叧搴︽渶楂樼殑绗煎瓙鎺掑簭
+ List<StorageCage> storageCage = spianMapper.selectAllFbarcode(FrameBarcode, widths, 400);
+ // 鍒ゆ柇閾濇鎸囧畾绌烘牸鏄惁闇�瑕侀棿闅旂┖闂�
+
+ if (storageCage.size() == 0) {
+ storageCage = spianMapper.selectAll(orderids, FrameBarcode);
+ }
+
+ if (storageCage == null) {
+ return (400);
+ }
+ for (StorageCage storageCage2 : storageCage) {
+ // 淇濆瓨璁㈠崟浼樺厛椤哄簭绗煎瓙鍙�
+ cage1 = storageCage2.getCage();
+ // 鍒ゆ柇璇ョ瀛愬彿鐩搁偦鏈�澶х殑绌烘牸鏁�
+ StorageCage cages = spianMapper.selectCage(cage1);
+
+ // 濡傛灉鐩搁偦绗煎瓙娌℃湁绌烘牸,鎴栬�呮湁姝e湪鎵ц鐨勫嚭鐗囦换鍔℃椂杩斿洖400
+ if (cages == null) {
+ return (400);
+ }
+ StorageCage cages1;
+ // 鍒ゆ柇鏄惁鏄浜岀墖闇�瑕佸姞闂撮殧鐗�
+ prctier = spianMapper.selectsum(cage1, storageCage2.getCell());// 浼犵粰prc鐨勬牸瀛愬唴鐜荤拑鏁�
+ if (prctier > 0) {
+ cages1 = spianMapper.selectCage1(cage1, storageCage2.getCell(), widths + 400);
+ } else {
+ cages1 = spianMapper.selectCage1(cage1, storageCage2.getCell(), widths);
+ }
+ // 鍒ゆ柇閫変腑绗煎瓙鏄惁鏈夊悎閫傚搴︾┖鏍�
+ // 鏈夊悎閫傜┖鏍兼椂杩涚墖
+ if (cages1 != null && cages.getCell() >= 1 && storageCage2.getDisabled() == 0) {
+
+ return (0);
+
+ }
+
+ }
+ return (400);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return (500);
+ // TODO: handle exception
+ }
+
+ }
+
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java b/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
index d007afd..8cc5317 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
@@ -18,6 +18,8 @@
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.mapper.HomeMapper;
+import lombok.extern.slf4j.Slf4j;
+@Slf4j
@Service
public class StorageCageService {
@Autowired
@@ -57,6 +59,7 @@
ClearGlassId("DB101.10.3");
outSliceServive.StopTask(storageTask.getGlassId(), types);
}
+ log.info("stopfeedid:"+storageTask.getGlassId()+"D02id:"+D02glassid+"devicestate:"+DeviceList.get(1));
if (storageTask.getGlassId().equals(D02glassid) && DeviceList.get(1) == 0) {
ClearGlassId("DB101.9.3");
outSliceServive.StopTask(storageTask.getGlassId(), types);
@@ -195,7 +198,7 @@
Short zhi = 200;
short result = homeMapper.SelectStorageByGlassId(queue.getglassId());
if (result > 0) {
- map.put("message", "300");
+ map.put("message", "500");
} else {
if (id == 1) {
// 璋冪敤浼嶅瓨鍌ㄨ繃绋�
@@ -213,4 +216,29 @@
return Result.success(map);
}
+ public Short InsertQueueGlassIds(Short id, Queue queue) throws SQLException {
+ Map<String, Object> map = new HashMap<>();
+
+ Short zhi = 0;
+ short result = homeMapper.SelectStorageByGlassId(queue.getglassId());
+ if (result > 0) {
+ zhi=500;
+ map.put("message", "500");
+ } else {
+ if (id == 1) {
+ // 璋冪敤浼嶅瓨鍌ㄨ繃绋�
+ north_glass_buffer1 north_glass_buffer1 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(queue.getglassId(), "", "");
+ zhi = spianService.selectAll(north_glass_buffer1);
+ if (zhi == 200) {
+ homeMapper.InsertQueueGlassId(queue, id);
+ }
+ }
+ map.put("message", zhi);
+ }
+ if (zhi != 200) {
+ Plchome.FeedState = true;
+ }
+ return zhi;
+ }
+
}
--
Gitblit v1.8.0