wuyouming666
2024-05-17 6ba80f38f18375403bb7f92d8f38d2d8a7f69583
Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
6个文件已修改
612 ■■■■■ 已修改文件
CanadaMes-ui/src/lang/locales/en-US.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/zh-CN.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/home/index.vue 366 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/en-US.json
@@ -2,6 +2,10 @@
  "Clear":"Clear",
  "ip":"192.168.10.21",
  "Abort":"Abort",
  "Current scan":"Current scan",
  "Interior Out Bypass: Right":"Exterior Out Bypass: Right",
  "Exterior Out Bypass: Left":"Interior Out Bypass: Left",
  "Remove Frame":"Remove Frame",
  "Mes Connection failed":"Mes Connection failed",
  "Plc1 Connection failed":"Plc1 Connection failed",
  "Plc2 Connection failed":"Plc2 Connection failed",
@@ -353,7 +357,7 @@
  "Sorting State":"Sorting State",
  "Confirm State":"Confirm State",
  "Next":"Next",
  "Current Frame":"Current Frame",
  "Current Frame on Belt":"Current Frame on Belt",
  "Outside":"Outside",
  "Inside":"Inside",
  "Cancel":"Cancel",
CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -1,7 +1,11 @@
{
  "Clear":"清除",
  "ip":"192.168.10.21",
  "Current scan":"当前扫码",
  "Abort":"中止",
  "Interior Out Bypass: Right":"内部-外部旁路:右侧",
  "Exterior Out Bypass: Left":"内部-外部旁路:左侧",
  "Remove Frame":"移除铝框",
  "Mes Connection failed":"Mes连接失败",
  "Plc1 Connection failed":"Plc1连接失败",
  "Plc2 Connection failed":"Plc2连接失败",
@@ -350,7 +354,7 @@
  "Sorting State":"排序状态",
  "Confirm State":"确认状态",
  "Next":"下一个",
  "Current Frame":"当前铝框",
  "Current Frame on Belt":"当前铝框",
  "Outside":"外侧",
  "Inside":"内侧",
  "Cancel":"取消",
CanadaMes-ui/src/views/home/index.vue
@@ -235,7 +235,6 @@
    height: 15px;
    position: absolute;
}
</style>
<template>
    <el-container>
@@ -244,7 +243,7 @@
            <div class="box" @click="dialogFormVisible2 = true">
                <div class="text">
                    <!-- Alarm: -->
                    {{ this.text }}{{this.plc1}}{{this.plc2}}
                    {{ this.text }}{{ this.plc1 }}{{ this.plc2 }}
                    <label v-for="item in this.alarm" :key="item['id']">
                        {{ item['content'] }}
                    </label>
@@ -345,7 +344,8 @@
        </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%;'">
                <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;">
@@ -598,20 +598,20 @@
                <el-table-column :min-width="250" :label="$t('Operate')">
                    <template slot-scope='scope'>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="(scope.row.state == 1&&loadname=='admin') ? false : true"
                            :disabled="(scope.row.state == 1 && (loadname == 'admin' || loadname == 'northglass')) ? false : true"
                            @click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('Delete') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="(scope.row.state == 1&&(loadname=='admin'||loadname=='Transfer')) ? false : true"
                            :disabled="(scope.row.state == 1 && (loadname == 'admin' || loadname == 'Transfer' || loadname == 'northglass' )) ? false : true"
                            @click="outglass(scope.row.glassId, scope.row.state)">{{ $t('Outfeed') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="(loadname=='admin') ? false : true"
                            :disabled="(loadname == 'admin' || loadname == 'northglass') ? false : true"
                            @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)">
                            {{ scope.row.disabled == 0 ? $t('Disable') : $t('Enable') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="(scope.row.glassId == null&&loadname=='admin') ? false : true"
                            :disabled="(scope.row.glassId == null && (loadname == 'admin' || loadname == 'northglass')) ? false : true"
                            @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('Add')
                            }}</el-button>
                    </template>
@@ -684,7 +684,7 @@
                </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')">
@@ -693,8 +693,9 @@
                    <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 :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;">
@@ -707,7 +708,8 @@
                    <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-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>
@@ -721,7 +723,8 @@
                    <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-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>
@@ -735,7 +738,8 @@
                    <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-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>
@@ -749,7 +753,8 @@
                    <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-form-item :label="$t('Length')"
                        :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'">
                        <el-input v-model="form6.glasslength" readonly autocomplete="off" />
                    </el-form-item>
                </div>
@@ -763,7 +768,8 @@
                    <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-form-item :label="$t('Width')"
                        :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'">
                        <el-input v-model="form6.glassheight" readonly autocomplete="off" />
                    </el-form-item>
                </div>
@@ -773,7 +779,8 @@
                        {{ $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 ?
                        {{ (108.27 - (Object.keys(this.form6).length === 0 ? 0 : (form6.glassheight > form6.glasslength
                ?
                form6.glassheight : form6.glasslength))).toFixed(2) }}
                    </span>
@@ -834,25 +841,48 @@
                    </el-table>
                </div>
                <div style="width:30%;" v-for="(item) in CurrentFrame" :key="item['barcode']">
                    <div style="background-color: yellow;">
                        <h1 style="font-size: 40px;text-align: center;">{{ $t('Current scan') }}:</h1>
                        <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ frameInfo.listnumber }}
                        </h1>
                        <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ frameInfo.boxnumber }}
                        </h1>
                    </div>
                    <el-button style="margin-left: 42%;" type="primary" @click="FrameStateUpdate(item['barcode'])">{{
                $t('Next') }}</el-button>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame') }}:</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame on Belt') }}:</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listId'] }}</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxId'] }}</h1>
                    <h1 style="font-size: 30px;text-align: center;">
                        {{ item['flip'] == 1 ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT')
                : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }}
                    </h1>
                    <h1 style="font-size: 30px;text-align: center;">{{ item['framewidthmm'] }}*{{ item['frameheightmm']
                        }}
                    </h1>
                    <div>
                        <div v-if="item['flip'] == 1"
                            style="width:40px;height:150px;border:1px solid black;float: left;">
                    <div class="frame" :style="'background-color: green;margin-top:30px;margin:0 auto;width: ' +
                FrameWidthHeight('before', item['framewidthmm'], item['frameheightmm'], item['position']) + 'px;height:' +
                FrameWidthHeight('after', item['framewidthmm'], item['frameheightmm'], item['position']) + 'px;'
                ">
                        </div>
                        <div class="frame"
                            :style="'background-color: ' + Colorchange(1) + ';margin-top:30px;margin:0 auto;width: 370px;height:150px;float: left;'">
                            <h1 style="font-size: 54px;text-align: center;color:white;margin-top: 0px;">
                                {{ framecolor1 == "green" ? $t('Interior Out Bypass: Right')
                : framecolor1 == "blue" ? $t('Exterior Out Bypass: Left')
                    : $t('Remove Frame') }}
                            </h1>
                        </div>
                        <div v-if="item['flip'] == 2"
                            style="width:40px;height:150px;border:1px solid black;float: left;">
                        </div>
                    </div>
                    <h1 style="font-size: 30px;text-align: center;margin-top: 50px;">{{
                (item['framewidthmm'] * 1) > (item['frameheightmm'] * 1) ? item['frameheightmm'] :
                    item['framewidthmm']
            }}
                    </h1>
                    <div>
                        <h1 style="font-size: 30px;text-align: center;margin-top: 65px;">
                            {{ (item['frameheightmm'] * 1) > (item['framewidthmm'] * 1) ? item['frameheightmm'] :
                item['framewidthmm'] }}</h1>
                    </div>
                </div>
            </div>
@@ -860,7 +890,7 @@
        <el-dialog :visible.sync="dialogFormVisible7" :title="$t('Glass information corresponding to aluminum frame')"
            top="5vh">
            <el-input style="width:15%;" :placeholder="$t('Enter the Frame No')" v-model="framebarcode"></el-input>
            <el-button type="primary" @click="showform7()">{{ $t('Query') }}</el-button>
            <el-button type="primary" @click="AddOutSliceS()" :disabled="framestate">{{ $t('Outfeed') }}</el-button>
@@ -877,7 +907,8 @@
                <el-table-column prop="storageCage.cell" :label="$t('Slot No')">
                    <template slot-scope='scope'>
                        {{
                scope.row.storageCage == null ? "" : (scope.row.storageCage.cage-1)*21+scope.row.storageCage.cell
                scope.row.storageCage == null ? "" :
                    (scope.row.storageCage.cage - 1) * 21 + scope.row.storageCage.cell
            }}
                    </template>
                </el-table-column>
@@ -903,26 +934,58 @@
                </el-table-column>
            </el-table>
            <div style="width:30%;" v-for="(item) in AluminumFrameInfo" :key="item['barcode']">
                    <!-- <el-button style="margin-left: 42%;" type="primary" @click="FrameStateUpdate(item['barcode'])">{{
                $t('Next') }}</el-button> -->
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame') }}:</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listnumber'] }}</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxnumber'] }}</h1>
                    <h1 style="font-size: 30px;text-align: center;">
                        {{ item['flip'] == 1 ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT')
                : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }}
                    </h1>
                    <h1 style="font-size: 30px;text-align: center;">{{ item['framelength'] }}*{{ item['frameheight']
                        }}
                    </h1>
                <el-button style="margin-left: 42%;" type="primary" @click="FrameStateUpdate(item['barcode'])">{{
                $t('Next') }}</el-button>
                <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame on Belt') }}:</h1>
                <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1>
                <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listnumber'] }}</h1>
                <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxnumber'] }}</h1>
                <div>
                    <div v-if="item['flip'] == 1" style="width:40px;height:150px;border:1px solid black;float: left;">
                    </div>
                    <div class="frame"
                        :style="'background-color: ' + Colorchange(0) + ';margin-top:30px;margin:0 auto;width: 370px;height:150px;float: left;'">
                        <h1 style="font-size: 54px;text-align: center;color:white;margin-top: 0px;">
                            {{ framecolor == "green" ? $t('Interior Out Bypass: Right')
                : framecolor == "blue" ? $t('Exterior Out Bypass: Left')
                    : $t('Remove Frame') }}
                        </h1>
                    </div>
                    <div v-if="item['flip'] == 2" style="width:40px;height:150px;border:1px solid black;float: left;">
                    <div class="frame" :style="'background-color: '+ framecolor +';margin-top:30px;margin:0 auto;width: ' +
                FrameWidthHeight('before', item['framelengthmm'], item['frameheightmm'], item['flip']) + 'px;height:' +
                FrameWidthHeight('after', item['framelengthmm'], item['frameheightmm'], item['flip']) + 'px;'
                ">
                    </div>
                </div>
                <h1 style="font-size: 30px;text-align: center;margin-top: 50px;">{{
                (item['framelength'] * 1) > (item['frameheight'] * 1) ? item['frameheight'] :
                    item['framelength']
            }}
                </h1>
                <div>
                    <h1 style="font-size: 30px;text-align: center;margin-top: 65px;">
                        {{ (item['frameheight'] * 1) > (item['framelength'] * 1) ? item['frameheight'] :
                        item['framelength']}}</h1>
                </div>
            </div>
            <!-- <div style="width:30%;" v-for="(item) in AluminumFrameInfo" :key="item['barcode']">
                <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame on Belt') }}:</h1>
                <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1>
                <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listnumber'] }}</h1>
                <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxnumber'] }}</h1>
                <h1 style="font-size: 30px;text-align: center;">
                    {{ item['flip'] == 1 ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT')
                : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }}
                </h1>
                <h1 style="font-size: 30px;text-align: center;">{{ item['framelength'] }}*{{ item['frameheight']
                    }}
                </h1>
                <div class="frame"
                    :style="'background-color: ' + framecolor +';margin-top:30px;margin:0 auto;width:400px;height:150px;' ">
                </div>
            </div> -->
        </el-dialog>
        <el-dialog :visible.sync="dialogFormCountDown" :title="$t('Approximately resettable time')" top="5vh">
            <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'">
@@ -1044,23 +1107,25 @@
            count1: 0,
            count2: 1,
            loadname: "",
            form6state:0,
            StateColor:"green",
            plc1:"",
            plc2:"",
            AluminumFrameInfo:{},
            framestate:false,
            framecolor:"green"
            form6state: 0,
            StateColor: "green",
            plc1: "",
            plc2: "",
            AluminumFrameInfo: {},
            framestate: false,
            framecolor: "green",
            framecolor1: "green",
            frameInfo: {}
        };
    },
    created() {
        this.load();
        setInterval(() => {
            if(this.count1<this.count2){
                this.count1=this.count2;
            }else{
            if (this.count1 < this.count2) {
                this.count1 = this.count2;
            } else {
                const now = new Date();
                console.log(this.$t('Mes Connection failed')+now);
                console.log(this.$t('Mes Connection failed') + now);
            }
        }, 60000);
    },
@@ -1069,6 +1134,13 @@
    }
    ,
    methods: {
        Colorchange(i) {
            if (i == 0) {
                return this.framecolor;
            } else {
                return this.framecolor1;
            }
        },
        init() {
            let viewname = "Home";
            if (typeof (WebSocket) == "undefined") {
@@ -1100,17 +1172,17 @@
                        // this.car2 = 300 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100;
                    }
                    if (obj.Plc1 != null) {
                        if(obj.Plc1[0]==true){
                            this.plc1="";
                        }else{
                            this.plc1=this.$t('Plc1 Connection failed');
                        if (obj.Plc1[0] == true) {
                            this.plc1 = "";
                        } else {
                            this.plc1 = this.$t('Plc1 Connection failed');
                        }
                    }
                    if (obj.Plc2 != null) {
                        if(obj.Plc2[0]==true){
                            this.plc2="";
                        }else{
                            this.plc2=this.$t('Plc2 Connection failed');
                        if (obj.Plc2[0] == true) {
                            this.plc2 = "";
                        } else {
                            this.plc2 = this.$t('Plc2 Connection failed');
                        }
                    }
@@ -1135,6 +1207,30 @@
                    //查询当前铝框信息
                    this.CurrentFrame = obj.CurrentFrame;
                    if (obj.CurrentFrame.length!=0) {
                        if (this.CurrentFrame[0].frameheightmm > this.CurrentFrame[0].framewidthmm) {
                            if (this.CurrentFrame[0].frameheightmm < 23.62205 || this.CurrentFrame[0].framewidthmm < 15.748) {
                                this.framecolor1 = "red";
                            } else {
                                if (this.CurrentFrame[0].flip == 2) {
                                    this.framecolor1 = "green";
                                } else {
                                    this.framecolor1 = "blue";
                                }
                            }
                        } else {
                            if (this.CurrentFrame[0].frameheightmm < 15.748 || this.CurrentFrame[0].framewidthmm < 23.62205) {
                                this.framecolor1 = "red";
                            } else {
                                if (this.CurrentFrame[0].flip == 2) {
                                    this.framecolor1 = "green";
                                } else {
                                    this.framecolor1 = "blue";
                                }
                            }
                        }
                    }
                    // 获取设备状态
                    if (obj.DeviceList != null) {
@@ -1148,31 +1244,47 @@
                    if (obj.AluminumFrame != null) {
                        this.AluminumFrame = obj.AluminumFrame[0];
                        if (this.dialogFormVisible6 == true) {
                            this.dialogFormVisible7 = true;
                        }
                    }
                    if (obj.frameInfo != null) {
                        this.frameInfo = obj.frameInfo[0];
                    }
                    if (obj.AluminumFrameInfo != null) {
                        this.AluminumFrameInfo = obj.AluminumFrameInfo;
                        if(this.AluminumFrameInfo[0].frameheightmm>this.AluminumFrameInfo[0].framelengthmm){
                            if(this.AluminumFrameInfo[0].frameheightmm<600||this.AluminumFrameInfo[0].framelengthmm<400){
                                this.framestate=true;
                                this.framecolor="red";
                            }else{
                                this.framestate=false;
                                this.framecolor="green";
                        if (this.AluminumFrameInfo[0].frameheightmm > this.AluminumFrameInfo[0].framelengthmm) {
                            if (this.AluminumFrameInfo[0].frameheightmm < 600 || this.AluminumFrameInfo[0].framelengthmm < 400) {
                                this.framestate = true;
                                this.framecolor = "red";
                            } else {
                                this.framestate = false;
                                if (this.AluminumFrameInfo[0].flip == 2) {
                                    this.framecolor = "green";
                                } else {
                                    this.framecolor = "blue";
                                }
                            }
                        }else{
                            if(this.AluminumFrameInfo[0].frameheightmm<400||this.AluminumFrameInfo[0].framelengthmm<600){
                                this.framestate=true;
                                this.framecolor="red";
                            }else{
                                this.framestate=false;
                                this.framecolor="green";
                        } else {
                            if (this.AluminumFrameInfo[0].frameheightmm < 400 || this.AluminumFrameInfo[0].framelengthmm < 600) {
                                this.framestate = true;
                                this.framecolor = "red";
                            } else {
                                this.framestate = false;
                                if (this.AluminumFrameInfo[0].flip == 2) {
                                    this.framecolor = "green";
                                } else {
                                    this.framecolor = "blue";
                                }
                            }
                        }
                    }else{
                        this.AluminumFrameInfo={};
                    } else {
                        this.AluminumFrameInfo = {};
                    }
                    //根据进片状态出发进片任务
@@ -1230,9 +1342,9 @@
                            }
                            else if (obj.zhi[0] == 400) {
                                this.$message.error(this.$t('There is no such slot'));
                            } else if(obj.zhi[0] == 500) {
                            } 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) {
                            } else if (obj.zhi[0] == 600) {
                                this.$message.error(this.$t('The glass size is not within the range'));
                            }
                        }
@@ -1294,15 +1406,15 @@
                        }
                    }
                    if (obj.form6 != null) {
                        this.form6state=1;
                        this.form6state = 1;
                        this.form6 = obj.form6[0];
                        if(this.form6.glassheight=="0"){
                            this.form6.glassheight="";
                            this.form6.glasslength="";
                        if (this.form6.glassheight == "0") {
                            this.form6.glassheight = "";
                            this.form6.glasslength = "";
                        }
                    } else {
                        this.form6 = {};
                        this.form6state=0;
                        this.form6state = 0;
                    }
                    //数据库连接是否正常
                    if (obj.dbconnected == "false") {
@@ -1556,9 +1668,9 @@
        },
        //结束进/出片任务
        endtask(type, glassid, cell) {
            this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
                inputType: 'password',
                inputPlaceholder: this.$t('Please enter the password'),
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('confirm'), {
                // inputType: 'password',
                // inputPlaceholder: this.$t('Please enter the password'),
                confirmButtonText: this.$t('Yes'),
                cancelButtonText: this.$t('No'),
                type: 'warning'
@@ -1595,9 +1707,9 @@
        },
        //删除理片笼玻璃
        deleteglass(glassid, state) {
            this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
                inputType: 'password',
                inputPlaceholder: this.$t('Please enter the password'),
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('confirm'), {
                // inputType: 'password',
                // inputPlaceholder: this.$t('Please enter the password'),
                confirmButtonText: this.$t('Yes'),
                cancelButtonText: this.$t('No'),
                type: 'warning'
@@ -1625,7 +1737,7 @@
        },
        //手动出片
        outglass(glassid, state) {
            this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('confirm'), {
                inputType: 'password',
                inputPlaceholder: this.$t('Please enter the password'),
                confirmButtonText: this.$t('Yes'),
@@ -1663,7 +1775,7 @@
        },
        //手动往理片笼添加玻璃
        insertglass(cage, cell, tier) {
            this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('confirm'), {
                inputType: 'password',
                inputPlaceholder: this.$t('Please enter the password'),
                confirmButtonText: this.$t('Yes'),
@@ -1715,7 +1827,7 @@
        },
        //启用//理片笼禁用
        UpdateDisabled(cage, cell, disabled) {
            this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('confirm'), {
                inputType: 'password',
                inputPlaceholder: this.$t('Please enter the password'),
                confirmButtonText: this.$t('Yes'),
@@ -1739,22 +1851,22 @@
        },
        //删除出片队列玻璃
        deleteproductionqueueglass(id) {
            this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
                inputType: 'password',
                inputPlaceholder: this.$t('Please enter the password'),
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('confirm'), {
                // inputType: 'password',
                // inputPlaceholder: this.$t('Please enter the password'),
                confirmButtonText: this.$t('Yes'),
                cancelButtonText: this.$t('No'),
                type: 'warning'
            }).then(({ value }) => {
                if (this.password == value) {
                    DeleteProductionQueueGlass(id).then(res => {
                        if (res.data.message == 200) {
                            this.$message.success(this.$t('Operation successful'));
                        } else {
                            this.$message.error(this.$t('This frame has glass that is currently outing'));
                        }
                    });
                }
            }).then(() => {
                // if (this.password == value) {
                DeleteProductionQueueGlass(id).then(res => {
                    if (res.data.message == 200) {
                        this.$message.success(this.$t('Operation successful'));
                    } else {
                        this.$message.error(this.$t('This frame has glass that is currently outing'));
                    }
                });
                // }
            }).catch(() => {
                this.$message({
                    type: 'info',
@@ -1797,7 +1909,7 @@
                            }
                            else if (res.data.message == 400) {
                                this.$message.error(this.$t('There is no such slot'));
                            }else if (res.data.message == 500) {
                            } else if (res.data.message == 500) {
                                this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
                            }
                        });
@@ -1857,6 +1969,10 @@
            if (this.AluminumFrame != null) {
                AddOutSliceS(this.AluminumFrame[0].frameBarcode).then(res => {
                    if (res.data.message == 200) {
                        this.AluminumFrame = null;
                        this.AluminumFrameInfo = null;
                        this.dialogFormVisible7 = false;
                        this.framebarcode = "";
                        this.$message.success(this.$t('Operation successful'));
                    }
                });
@@ -1870,7 +1986,7 @@
                        this.AluminumFrame = null;
                        this.AluminumFrameInfo = null;
                        this.dialogFormVisible7 = false;
                        this.framebarcode="";
                        this.framebarcode = "";
                        this.$message.success(this.$t('Operation successful'));
                    }
                });
@@ -2129,28 +2245,28 @@
                () => {
                    if (this.EmergencyStop == true) {
                        clearInterval(timer);
                        this.StateColor="red";
                        this.StateColor = "red";
                        this.CountDowns = "";
                    } else {
                        if (count > 0) {
                        this.StateColor="yellow";
                        this.PromptSize = 500;
                        this.CountDowns = count;
                        count--;
                            this.StateColor = "yellow";
                            this.PromptSize = 500;
                            this.CountDowns = count;
                            count--;
                        }
                        else {
                        this.PromptSize = 200;
                        this.CountDowns = "";
                        this.StateColor="green";
                        if (this.reset == true) {
                            clearInterval(timer);
                        }
                            this.PromptSize = 200;
                            this.CountDowns = "";
                            this.StateColor = "green";
                            if (this.reset == true) {
                                clearInterval(timer);
                            }
                        }
                    }
                },
                1000
            );
            },
        },
        //更换当前铝框
        FrameStateUpdate(frameno) {
            FrameStateUpdate(frameno).then(res => {
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -72,7 +72,7 @@
            jsonObject.append("feedglassid", feedglassid);
            
            try {
                Thread.sleep(1000);
                Thread.sleep(500);
                // 注入mapper
                homeMapper = WebSocketServer.applicationContext.getBean(HomeMapper.class);
                spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
@@ -83,7 +83,9 @@
                storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class);
                dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
                // boolean dbconnected = false;
                try {
                    dbserve.getConn();
                    dbconnected = true;
@@ -93,67 +95,7 @@
                    log.info("dbconnected:" + dbconnected);
                }
                jsonObject.append("dbconnected", dbconnected);
                // // 获取当前扫码枪玻璃id
                // 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);
                // }
                // }
                // }
                // String frameno ="X226422133V";
                //     if (!frameno.equals(Plchome.FrameNo)) {
                //         Plchome.FrameNo = frameno;
                //         try {
                //             Short num = 0;
                //             List<north_glass_buffer1> north_glass_buffer1s = north_Glass_Buffer1Service
                //                     .SelectAluminumFrameInfoById(Plchome.FrameNo);
                //             for (north_glass_buffer1 north_glass_buffer1 : north_glass_buffer1s) {
                //                 if (north_glass_buffer1.getstorageCage() == null) {
                //                     break;
                //                 }
                //                 num++;
                //             }
                //             if(num==0){
                //                 Plchome.AluminumFrameInfo=dbserve.SelectFrameBarcode(Plchome.FrameNo);
                //                 if(Plchome.AluminumFrameInfo.getbarcode()!=null){
                //                     int sequence = homeMapper.SelectMaxSquence();
                //                     homeMapper.AddOutSliceS("", AluminumFrameInfo.getflip().toString(), Plchome.FrameNo, "0", "0", sequence,  "0", (short)0,  AluminumFrameInfo.getordernumber(),AluminumFrameInfo.getlistnumber() , AluminumFrameInfo.getboxnumber(), "0", "0", AluminumFrameInfo.getframelength().toString(), AluminumFrameInfo.getframeheight().toString());
                //                     Plchome.AluminumFrameInfo=new north_frame_buffer1_frames();
                //                     // void AddOutSliceS(String glassid, String flip, String FrameNo, String glasslengthMm, String glassheightMm,
                //                     //  int sequence, String position, Short state,
                //                     //  String orderid, String listid, String boxid, String glasswidth, String glassheight,String framewidthmm,String frameheightmm);
                //                 }
                //             }else{
                //                 if (num == north_glass_buffer1s.size()) {
                //                     north_Glass_Buffer1Service.AddOutSliceS(Plchome.FrameNo);
                //                 } else {
                //                     Plchome.AluminumFrame = north_glass_buffer1s;
                //                     Plchome.AluminumFrameInfo=dbserve.SelectFrameBarcode(Plchome.FrameNo);
                //                 }
                //             }
                //         } catch (SQLException e) {
                //             // TODO Auto-generated catch block
                //             e.printStackTrace();
                //         }
                //     }
                // 笼子使用情况
                List<StorageCage> tableData = homeMapper.selectAll();
@@ -204,9 +146,8 @@
                // 查询当前铝框信息
                Out_slice CurrentFrame = outSliceServive.SelectCurrentFrame();
                jsonObject.append("CurrentFrame", CurrentFrame);
                // String E01id = new String( S7controlLK.getinstance().ReadByte("DB17.0",16));
                // String J01id = new String( S7controlLK.getinstance().ReadByte("DB17.22",14));
                try {
                    // 铝框线交互
                    // if (S7controlLK.getinstance().CheckConnected() == true) {
@@ -230,6 +171,9 @@
                    if (CurrentFrame != null) {
                        S7controlLK.getinstance().writeStrings(CurrentFrame.getBarCode(), "DB17.0");
                    }
                    // else{
                    //     S7controlLK.getinstance().writeStrings("", "DB17.0");
                    // }
                    String J01id = S7controlLK.getinstance().readStrings("DB17.22");
                    List<Short> liststate = S7controlLK.getinstance().ReadWord("DB17.20", 1);
                    Short framerequest = liststate.get(0);
@@ -259,15 +203,6 @@
                        }
                        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);
                    // }else{
                    // log.info("Plc2"+S7controlLK.getinstance().CheckConnected());
                    // jsonObject.append("Plc2", false);
                    // }
                } catch (Exception e) {
                    e.printStackTrace();
                }
@@ -284,25 +219,34 @@
                    // 获取当前扫码枪玻璃id
                    String CurrrentGlassId = spianService.queGlassid("DB103.256", 14).toString();
                    if (CurrrentGlassId.toString() != "" && CurrrentGlassId.toString() != null) {
                        north_glass_buffer1 form6 = dbserve.SelectGlassByGlassIdOrderIdFrameIdouts(CurrrentGlassId, "",
                        north_glass_buffer1 form6=new north_glass_buffer1();
                        try {
                            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 < 225 || width < 380 || height > 1810 || width > 2760) {
                                zhi = 600;
                            } else {
                                zhi = spianService.selectAlls(form6);
                        } catch (Exception e) {
                            // TODO: handle exception
                            e.printStackTrace();
                        }
                        if(form6!=null){
                            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 < 225 || width < 380 || height > 1810 || width > 2760) {
                                    zhi = 600;
                                } else {
                                    zhi = spianService.selectAlls(form6);
                                }
                            }
                        }
                    }
                    jsonObject.append("CurrrentGlassId", CurrrentGlassId);
@@ -336,63 +280,62 @@
                    if (paramlist != null) {
                        jsonObject.append("params", paramlist);
                    }
                    // // 获取进片车状态
                    // List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8",
                    // 1);// 获取进片车状态
                    // if (datas1ListState != null) {
                    // boolean exist1 = datas1ListState.contains((short) 0);
                    // jsonObject.append("zhuangtai", exist1);
                    // }
                    // // 获取进片玻璃信息
                    // List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1);
                    // if (inglassInfo != null) {
                    // if (inglassInfo.size() > 0) {
                    // jsonObject.append("loadglassheight", inglassInfo.get(0) * 70);
                    // }
                    // }
                    // // 获取铝框idDB106.DBW64,添加到出片队列
                    // String frameno="X21763329601FB";
                    
                    String frameno = spianService.queGlassid("DB103.270", 11).toString();
                    north_frame_buffer1_frames frameInfo=dbserve.SelectFrameBarcode(frameno);
                    if(frameInfo!=null){
                        jsonObject.append("frameInfo", frameInfo);
                    }
                    if (!frameno.equals(Plchome.FrameNo)) {
                        Plchome.FrameNo = frameno;
                        try {
                            Short num = 0;
                            List<north_glass_buffer1> north_glass_buffer1s = north_Glass_Buffer1Service
                                    .SelectAluminumFrameInfoById(Plchome.FrameNo);
                            for (north_glass_buffer1 north_glass_buffer1 : north_glass_buffer1s) {
                                if (north_glass_buffer1.getstorageCage() == null) {
                                    break;
                            double framewidth=0;
                            double frameheight=0;
                            if(frameInfo!=null){
                                if(frameInfo.getframelengthmm()>frameInfo.getframeheightmm()){
                                    framewidth=frameInfo.getframelengthmm();
                                    frameheight=frameInfo.getframeheightmm();
                                }else{
                                    framewidth=frameInfo.getframeheightmm();
                                    frameheight=frameInfo.getframelengthmm();
                                }
                                num++;
                            }
                            if(num==0){
                                Plchome.AluminumFrameInfo=dbserve.SelectFrameBarcode(Plchome.FrameNo);
                                if(Plchome.AluminumFrameInfo.getbarcode()!=null){
                                    int count=homeMapper.SelectCountFrame(AluminumFrameInfo.getbarcode());
                                    if(count==0){
                                        int sequence = homeMapper.SelectMaxSquence();
                                        homeMapper.AddOutSliceS("", AluminumFrameInfo.getflip().toString(), Plchome.FrameNo, "0", "0", sequence,  "0", (short)3,  AluminumFrameInfo.getordernumber(),AluminumFrameInfo.getlistnumber() , AluminumFrameInfo.getboxnumber(), "0", "0", AluminumFrameInfo.getframelength().toString(), AluminumFrameInfo.getframeheight().toString());
                                        log.info("NoGlass"+AluminumFrameInfo.getbarcode());
                                        Plchome.AluminumFrameInfo=new north_frame_buffer1_frames();
                                if(framewidth<600||frameheight<400){
                                    Plchome.AluminumFrame = north_glass_buffer1s;
                                    Plchome.AluminumFrameInfo=frameInfo;
                                }else{
                                    for (north_glass_buffer1 north_glass_buffer1 : north_glass_buffer1s) {
                                        if (north_glass_buffer1.getstorageCage() == null) {
                                            break;
                                        }
                                        num++;
                                    }
                                    
                                    // void AddOutSliceS(String glassid, String flip, String FrameNo, String glasslengthMm, String glassheightMm,
                                    //  int sequence, String position, Short state,
                                    //  String orderid, String listid, String boxid, String glasswidth, String glassheight,String framewidthmm,String frameheightmm);
                                }
                            }else{
                                if (num == north_glass_buffer1s.size()) {
                                    north_Glass_Buffer1Service.AddOutSliceS(Plchome.FrameNo);
                                } else {
                                    Plchome.AluminumFrame = north_glass_buffer1s;
                                    Plchome.AluminumFrameInfo=dbserve.SelectFrameBarcode(Plchome.FrameNo);
                                    if(num==0&&north_glass_buffer1s.size()==0){
                                        Plchome.AluminumFrameInfo=dbserve.SelectFrameBarcode(Plchome.FrameNo);
                                        if(Plchome.AluminumFrameInfo.getbarcode()!=null){
                                            int count=homeMapper.SelectCountFrame(AluminumFrameInfo.getbarcode());
                                            if(count==0){
                                                int sequence = homeMapper.SelectMaxSquence();
                                                homeMapper.AddOutSliceS("", AluminumFrameInfo.getflip().toString(), Plchome.FrameNo, "0", "0", sequence,  "0", (short)3,  AluminumFrameInfo.getordernumber(),AluminumFrameInfo.getlistnumber() , AluminumFrameInfo.getboxnumber(), "0", "0", AluminumFrameInfo.getframelength().toString(), AluminumFrameInfo.getframeheight().toString());
                                                log.info("NoGlass"+AluminumFrameInfo.getbarcode());
                                                Plchome.AluminumFrameInfo=new north_frame_buffer1_frames();
                                            }
                                        }
                                    }else{
                                        if (num == north_glass_buffer1s.size()) {
                                            north_Glass_Buffer1Service.AddOutSliceS(Plchome.FrameNo);
                                        } else {
                                            Plchome.AluminumFrame = north_glass_buffer1s;
                                            Plchome.AluminumFrameInfo=dbserve.SelectFrameBarcode(Plchome.FrameNo);
                                        }
                                    }
                                }
                            }
                        } catch (SQLException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -20,17 +20,17 @@
        new PlcHold().start();
        new Plchome().start();
        new PlcLayout().start();
         new Plcalarm().start();
         new Plcsign().start();
         new Plcstate().start();
         new PlcPositioning1().start();
         new PlcParameter2().start();
         new PLCAutomaticParameterSetting().start();
         new PlcManualonePosition().start();
         new PlcManualonePosition2().start();
         new PlcServoManualone().start();
         new PLCManualJog().start();
         new PlcInteractionState().start();
        new Plcalarm().start();
        new Plcsign().start();
        new Plcstate().start();
        new PlcPositioning1().start();
        new PlcParameter2().start();
        new PLCAutomaticParameterSetting().start();
        new PlcManualonePosition().start();
        new PlcManualonePosition2().start();
        new PlcServoManualone().start();
        new PLCManualJog().start();
        new PlcInteractionState().start();
         
    }
}
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -332,6 +332,7 @@
    // SQLException {
    north_Glass_Buffer1Service.AddOutSliceS(FrameNo);
    Plchome.AluminumFrame = null;
    Plchome.AluminumFrameInfo = new north_frame_buffer1_frames();
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
    return Result.success(map);