wuyouming666
2023-11-27 d75d7d7d76fe16e133f793cc31bfaea17a10cd24
Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
15个文件已修改
5个文件已添加
2021 ■■■■■ 已修改文件
.vscode/launch.json 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vscode/settings.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/api/home.js 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/en-US.json 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/zh-CN.json 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/home/index.vue 564 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java 238 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/north_glass_buffer1.java 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/out_slice.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java 294 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/security/config/ShiroConfig.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/OutSlice.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vscode/launch.json
New file
@@ -0,0 +1,28 @@
{
    // 使用 IntelliSense 了解相关属性。
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "java",
            "name": "Current File",
            "request": "launch",
            "mainClass": "${file}"
        },
        {
            "type": "java",
            "name": "MyGenerator",
            "request": "launch",
            "mainClass": "MyGenerator",
            "projectName": "springboot-vue3"
        },
        {
            "type": "java",
            "name": "AuthorityApplication",
            "request": "launch",
            "mainClass": "com.example.springboot.AuthorityApplication",
            "projectName": "springboot-vue3"
        }
    ]
}
.vscode/settings.json
New file
@@ -0,0 +1,3 @@
{
    "java.configuration.updateBuildConfiguration": "interactive"
}
CanadaMes-ui/src/api/home.js
@@ -154,4 +154,44 @@
        method: 'post',
        data: ""
    })
}
}
export function SelectGlassNo(orderid) {
    return request({
        url: '/home/SelectGlassNo?orderid=' + orderid,
        method: 'post',
        data: ""
    })
}
export function SelectAluminumFrameInfoById(FrameBarcode) {
    return request({
        url: '/home/SelectAluminumFrameInfoById?FrameBarcode=' + FrameBarcode,
        method: 'post',
        data: ""
    })
}
export function SelectProductionqueue() {
    return request({
        url: '/home/SelectProductionqueue',
        method: 'post',
        data: ""
    })
}
export function DeleteProductionQueueGlass(id) {
    return request({
        url: '/home/DeleteProductionQueueGlass?id='+id,
        method: 'post',
        data: ""
    })
}
export function AddOutSliceS(data) {
    return request({
        url: '/home/AddOutSliceS',
        method: 'post',
        data
    })
}
CanadaMes-ui/src/lang/locales/en-US.json
@@ -227,8 +227,8 @@
"deleteCancelledMessage": "Deletion cancelled",
  "Enter the glass lD":"Enter the glass lD",
  "Infeed barcodid":"Infeed barcodid",
  "Enter the glass barcode":"Enter the glass barcode",
  "Manually Infeed Glass":"Manually Infeed Glass",
  "Enter the order number":"Enter the order number",
  "Exit the glass by order number":"Exit the glass by order number",
  "Please confirm the glass information":"Please confirm the glass information",
@@ -236,33 +236,30 @@
  "Alarm Information":"Alarm Information",
  "Cage Details":"Cage Details",
  "order":"order",
  "length":"length",
  "width":"width",
  "Length":"Length",
  "Width":"Width",
  "Operate":"Operate",
  "end task":"end task",
  "Terminate Task":"Terminate Task",
  "cancel":"cancel",
  "confirm":"confirm",
  "number":"number",
  "Outfeed Barcodid":"Outfeed Barcodid",
  "Infeed Barcodid":"Infeed Barcodid",
  "The Cage number being used":"The Cage Number being used",
  "The Slot number being used":"The Slot Number being used",
  "Order Nmuber":"Order Nmuber",
  "Length and Width":"Length and Width",
  "Number":"Number",
  "Outfeed glass barcode":"Outfeed glass barcode",
  "Infeed glass barcode":"Infeed glass barcode",
  "Cage No":"Cage No",
  "Slot No":"Slot No",
  "Dim":"Dim",
  "id":"id",
  "content":"content",
  "timeon":"timeon",
  "endTime":"endTime",
  "The Cage number":"The Cage number",
  "The Side":"The Side",
  "The Slot Number":"The Slot Number",
  "Barcodid":"Barcodid",
  "Order Number":"Order Number",
  "List Number":"List Number",
  "Box Number":"Box Number",
  "delete":"delete",
  "out":"out",
  "barcode":"barcode",
  "Order No":"Order No",
  "List No":"List No",
  "Box No":"Box No",
  "Delete":"Delete",
  "Out":"Out",
  "Operation successful":"Operation successful",
  "Operation canceled":"Operation canceled",
@@ -273,7 +270,6 @@
  "No delete allowed":"No delete allowed",
  "No out allowed":"No out allowed",
  "Are you sure to perform this operation ?":"Are you sure to perform this operation ?",
  "prompt":"prompt",
  "Yes":"Yes",
  
@@ -283,13 +279,13 @@
  "DataBase Connection failed":"DataBase Connection failed",
  "Distribute parameters":"Distribute parameters",
  "The glass size is not within the range":"The glass size is not within the range",
  "increase":"increase",
  "Increase":"Increase",
  "Enable":"Enable",
  "Disable":"Disable",
  "Usage":"Usage",
  "Space (Pieces)":"Space (Pieces)",
  "This glass is already in the cage":"This glass is already in the cage",
  "Enter the Order lD":"Enter the Order lD",
  "Enter the Order No":"Enter the Order No",
  "OrderInfo":"OrderInfo",
  "Query":"Query",
  "permission update":"permission update",
@@ -302,6 +298,13 @@
  "Clear Current":"Clear Current",
  "Confirm Modification":"Confirm modification",
  "The glass ID already exists in the loading queue":"The glass ID already exists in the loading queue",
  "This glass ID already exists in the sorting cage":"This glass ID already exists in the sorting cage"
  "This glass ID already exists in the sorting cage":"This glass ID already exists in the sorting cage",
  "Production queue":"Production queue",
  "Enter the Frame No":"Enter the Frame No",
  "Frame No":"Frame No",
  "Glass information corresponding to aluminum frame":"Glass information corresponding to aluminum frame",
  "In the cage":"In the cage",
  "Flip":"Flip",
  "In the queue":"In the queue"
}
CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -215,8 +215,8 @@
  "cancelButtonText": "取消",
  "deleteSuccessMessage": "删除成功",
  "deleteCancelledMessage": "已取消删除操作",
  "Enter the glass lD": "输入玻璃id",
  "Infeed barcodid": "手动上片",
  "Enter the glass barcode": "输入玻璃id",
  "Infeed Barcodeid": "手动上片",
  "Enter the order number": "输入订单号",
  "Exit the glass by order number": "按订单出片",
  "Please confirm the glass information": "请确认玻璃信息",
@@ -224,32 +224,28 @@
  "Alarm Information": "报警信息",
  "Cage Details": "理片笼详情",
  "order": "订单",
  "length": "长",
  "width": "宽",
  "Length": "长",
  "Width": "宽",
  "Operate": "操作",
  "Terminate Task":"结束任务",
  "end task": "完成任务",
  "cancel": "取消",
  "confirm": "确认",
  "number": "数量",
  "Outfeed Barcodid": "出片玻璃id",
  "Infeed Barcodid": "进片玻璃id",
  "The Cage number being used": "笼子",
  "The Slot number being used": "格子",
  "Order Nmuber": "订单编号",
  "List Number": "列表编号",
  "Box Number": "箱子编号",
  "Length and Width": "尺寸",
  "Number": "数量",
  "Outfeed glass barcode": "出片玻璃id",
  "Infeed glass barcode": "进片玻璃id",
  "Order No": "订单编号",
  "List No": "列表编号",
  "Box No": "箱子编号",
  "Dim": "尺寸",
  "id": "id",
  "content": "内容",
  "timeon": "报警时间",
  "endTime": "结束时间",
  "The Cage number": "笼子",
  "Cage No": "笼子",
  "The Side": "内外侧",
  "The Slot Number": "格子",
  "Barcodid": "玻璃id",
  "Order Number": "订单",
  "delete": "删除",
  "out": "出片",
  "Slot No": "格子",
  "Barcode": "玻璃id",
  "Delete": "删除",
  "Out": "出片",
  "Operation successful": "操作成功",
  "Operation canceled": "操作取消",
  "There is no such order": "没有此订单的玻璃",
@@ -276,13 +272,13 @@
  "DataBase Connection failed": "数据库连接失败",
  "Distribute parameters": "下发参数",
  "The glass size is not within the range": "玻璃尺寸不在范围内",
  "increase": "添加",
  "Increase": "添加",
  "Enable": "启用",
  "Disable": "禁用",
  "Usage": "使用率",
  "Space (Pieces)": "空间(片数)",
  "This glass is already in the cage": "笼子里已有此玻璃",
  "Enter the Order lD": "请输入订单id",
  "Enter the Order No": "请输入订单id",
  "OrderInfo": "订单信息",
  "Query": "查询",
  "permission update": "权限编辑",
@@ -296,6 +292,15 @@
  "Confirm Modification": "确认修改",
  "The glass ID already exists in the loading queue": "上片队列已存在此玻璃id",
  "This glass ID already exists in the sorting cage": "理片笼内已存在此玻璃id",
  "Production queue":"上片队列",
  "Enter the Aluminum Frame No":"请输入铝框id",
  "Frame No":"铝框id",
  "Glass information corresponding to aluminum frame":"铝框对应的玻璃信息",
  "In the cage":"在笼内",
  "Flip":"翻转",
  "In the queue":"在队列",
  "Enter the Frame No":"请输入铝框id",
  "Manually Infeed Glass":"手动进片",
  "langparameter": {
    "conveyor Velocity(Auto FAST)": "皮带输送自动快速",
    "conveyor Velocity(Auto SLOW)": "皮带输送自动慢速",
CanadaMes-ui/src/views/home/index.vue
@@ -111,9 +111,15 @@
    top: 366px; */
}
.orderbutton {
.orderbutton1 {
    position: absolute;
    left: 1070px;
    top: 70px;
}
.orderbutton2 {
    position: absolute;
    left: 1170px;
    top: 70px;
}
@@ -194,39 +200,46 @@
                </div>
            </div>
            <div style="display:flex;justify-content: space-around;width: 95%;margin: 0 auto;">
                <el-input style="width:15%;" :placeholder="$t('Enter the glass lD')" v-model="glassid1"></el-input>
                <el-button type="primary" @click="SelectGlassByGlassIDs(2)">{{ $t('Infeed barcodid') }}</el-button>
                <el-input style="width:15%;" :placeholder="$t('Enter the order number')" v-model="order"></el-input>
                <el-input style="width:15%;" :placeholder="$t('Enter the glass barcode')" v-model="glassid1"></el-input>
                <el-button type="primary" @click="SelectGlassByGlassIDs(2)">{{ $t('Manually Infeed Glass') }}</el-button>
                <el-input style="width:15%;" :placeholder="$t('Enter the Order No')" v-model="order"></el-input>
                <el-button type="warning" @click="showform1();">{{ $t('Exit the glass by order number') }}</el-button>
            </div>
            <div>
                <el-table :data="this.tasklist1" border style="width: 100%">
                    <el-table-column :width="130" prop="cage" :label="$t('The Cage number being used')"></el-table-column>
                    <el-table-column :width="130" prop="cell" :label="$t('The Slot number being used')"></el-table-column>
                    <el-table-column :width="150" prop="glassId" :label="$t('Outfeed Barcodid')"></el-table-column>
                    <el-table-column :width="130" prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
                    <el-table-column prop="list" :label="$t('List Number')"></el-table-column>
                    <el-table-column prop="box" :label="$t('Box Number')"></el-table-column>
                    <el-table-column :width="230" prop="lengthWidth" :label="$t('Length(inch) and Width(inch)')"></el-table-column>
                    <el-table-column :label="$t('Operate')">
                    <el-table-column :width="130" prop="cage" :label="$t('Cage No')"></el-table-column>
                    <el-table-column :width="130" prop="cell" :label="$t('Slot No')"></el-table-column>
                    <el-table-column :width="150" prop="glassId" :label="$t('Outfeed glass barcode')"></el-table-column>
                    <el-table-column :width="130" prop="north_glass_buffer1s.ordernumber" :label="$t('Order No')"></el-table-column>
                    <el-table-column prop="north_glass_buffer1s.listnumber" :label="$t('List No')"></el-table-column>
                    <el-table-column prop="north_glass_buffer1s.boxnumber" :label="$t('Box No')"></el-table-column>
                    <el-table-column prop="lengthWidth" :label="$t('Dim')"></el-table-column>
                    <el-table-column :label="$t('Terminate Task')">
                        <template slot-scope='scope'>
                            <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                @click="endtask(1, scope.row.glassId, scope.row.cell)">{{ $t('end task') }}</el-button>
                                @click="endtask(1, scope.row.glassId, scope.row.cell)">{{ $t('Terminate Task')
                                }}</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <el-table :data="this.tasklist2" border style="width: 100%">
                    <el-table-column :width="130" prop="cage" :label="$t('The Cage number being used')"></el-table-column>
                    <el-table-column :width="130" prop="cell" :label="$t('The Slot number being used')"></el-table-column>
                    <el-table-column :width="150" prop="glassId" :label="$t('Infeed Barcodid')"></el-table-column>
                    <el-table-column :width="130" prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
                    <el-table-column prop="list" :label="$t('List Number')"></el-table-column>
                    <el-table-column prop="box" :label="$t('Box Number')"></el-table-column>
                    <el-table-column :width="230"  prop="lengthWidth" :label="$t('Length(inch) and Width(inch)')"></el-table-column>
                    <el-table-column :label="$t('Operate')">
                    <el-table-column :width="130" prop="cage" :label="$t('Cage No')"></el-table-column>
                    <el-table-column :width="130" prop="cell" :label="$t('Slot No')"></el-table-column>
                    <el-table-column :width="150" prop="glassId" :labelf="$t('Infeed glass barcode')"></el-table-column>
                    <el-table-column :width="130" prop="north_glass_buffer1s.ordernumber" :label="$t('Order No')"></el-table-column>
                    <el-table-column prop="north_glass_buffer1s.listnumber" :label="$t('List No')"></el-table-column>
                    <el-table-column prop="north_glass_buffer1s.boxnumber" :label="$t('Box No')"></el-table-column>
                    <el-table-column prop="lengthWidth" :label="$t('Dim')">
                        <template slot-scope='scope'>
                            {{ scope.row.north_glass_buffer1s.glasslength }}*{{ scope.row.north_glass_buffer1s.glassheight }}
                        </template>
                    </el-table-column>
                    <el-table-column :label="$t('Terminate Task')">
                        <template slot-scope='scope'>
                            <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('end task') }}</el-button>
                                @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('Terminate Task')
                                }}</el-button>
                        </template>
                    </el-table-column>
                </el-table>
@@ -274,7 +287,8 @@
                <div class="blocks-img" :style="{ left: car2 + 'px', top: '175px' }"></div>
                <div class="blocks-img2"></div>
                <div class="blocks-img3"></div>
                <el-button class="orderbutton" type="primary" @click="showform2()">{{ $t('OrderInfo') }}</el-button>
                <el-button class="orderbutton1" type="primary" @click="showform2()">{{ $t('OrderInfo') }}</el-button>
                <el-button class="orderbutton2" type="primary" @click="showform6()">{{ $t('Production queue') }}</el-button>
                <!-- <div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:328px;">
                    <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist1" :key="item['date']"
@@ -304,22 +318,35 @@
        </el-footer>
        <el-dialog :visible.sync="dialogFormVisible" :title="$t('Please confirm the glass information')">
            <el-form :model="form" label-width="100px" style="padding-right: 30px">
                <el-form-item :label="$t('Barcodid')">
                    <el-input style="width:15%;" :placeholder="$t('Enter the glass lD')" v-model="glassid"></el-input>
                <el-form-item :label="$t('Barcode')">
                    <el-input style="width:15%;" :placeholder="$t('Enter the glass barcode')" v-model="glassid"></el-input>
                    <el-button type="primary" @click="showform(3)">{{ $t('Query') }}</el-button>
                </el-form-item>
                <el-form-item :label="$t('order')">
                    <el-input v-model="form.orderId" readonly autocomplete="off" />
                <el-form-item :label="$t('Barcode')">
                    <el-input v-model="form.barcode" readonly autocomplete="off" />
                </el-form-item>
                <el-form-item :label="$t('length(inch)')">
                    <el-input v-model="form.height" readonly autocomplete="off" />
                <el-form-item :label="$t('Order No')">
                    <el-input v-model="form.ordernumber" readonly autocomplete="off" />
                </el-form-item>
                <el-form-item :label="$t('width(inch)')">
                    <el-input v-model="form.width" readonly autocomplete="off" />
                <el-form-item :label="$t('List No')">
                    <el-input v-model="form.listnumber" readonly autocomplete="off" />
                </el-form-item>
                <el-form-item :label="$t('Barcodid')">
                    <el-input v-model="form.glassId" readonly autocomplete="off" />
                <el-form-item :label="$t('Box No')">
                    <el-input v-model="form.boxnumber" readonly autocomplete="off" />
                </el-form-item>
                <el-form-item :label="$t('Length')">
                    <el-input v-model="form.glasslength" readonly autocomplete="off" />
                </el-form-item>
                <el-form-item :label="$t('Width')">
                    <el-input v-model="form.glassheight" readonly autocomplete="off" />
                </el-form-item>
                <el-form-item :label="$t('Length')">
                    <el-input v-model="form.glasslengthMm" readonly autocomplete="off" />
                </el-form-item>
                <el-form-item :label="$t('Width')">
                    <el-input v-model="form.glassheightMm" readonly autocomplete="off" />
                </el-form-item>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
@@ -334,6 +361,79 @@
            </template>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible1" :title="$t('Please confirm the Ordering Information')">
            <el-form :model="form1" label-width="100px" style="padding-right: 30px">
                <el-form-item :label="$t('Order No')">
                    <el-input v-model="form1.order" autocomplete="off" />
                </el-form-item>
                <el-form-item :label="$t('Number')">
                    <el-input v-model="form1.number" autocomplete="off" />
                </el-form-item>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                    <el-button @click="getOrder();" type="primary">{{ $t('confirm') }}</el-button>
                    <el-button @click="cancel1()">{{ $t('cancel') }}</el-button>
                </span>
            </template>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible2" :title="$t('Alarm Information')">
            <el-table :data="this.alarm" border style="width: 100%;">
                <el-table-column prop="id" :label="$t('id')"></el-table-column>
                <el-table-column prop="content" :label="$t('content')"></el-table-column>
                <el-table-column prop="timeons" :label="$t('timeon')"></el-table-column>
                <el-table-column prop="endTime" :label="$t('endTime')"></el-table-column>
            </el-table>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible3" :title="$t('Cage Details')" top="5vh">
            <el-table :data="this.cageinfo" :height="700" border style="width: 100%;overflow: auto;">
                <el-table-column :width="90" prop="cage" :label="$t('Cage No')"></el-table-column>
                <el-table-column :width="90" prop="cell" :label="$t('Slot No')"></el-table-column>
                <el-table-column :width="55" prop="tier" :label="$t('The Side')"></el-table-column>
                <el-table-column :width="100" prop="glassId" :label="$t('Barcode')"></el-table-column>
                <el-table-column :width="100" prop="orderId" :label="$t('Order No')"></el-table-column>
                <el-table-column :width="100" prop="north_glass_buffer1s.listnumber"
                    :label="$t('List No')"></el-table-column>
                <el-table-column :width="100" prop="north_glass_buffer1s.boxnumber" :label="$t('Box No')"></el-table-column>
                <el-table-column :width="170" prop="lengthWidth" :label="$t('Dim')"></el-table-column>
                <el-table-column :width="280" :label="$t('Operate')">
                    <template slot-scope='scope'>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('Delete') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="outglass(scope.row.glassId, scope.row.state)">{{ $t('Out') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)">
                            {{ scope.row.disabled == 0 ? $t('Enable') : $t('Disable') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('Increase')
                            }}</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible4" :title="$t('OrderInfo')" top="5vh">
            <el-input style="width:15%;" :placeholder="$t('Enter the Order No')" v-model="orderid"></el-input>
            <el-button type="primary" @click="selectglassinfo()">{{ $t('Query') }}</el-button>
            <el-table :data="GlassInfo.slice((currentPage - 1) * pagesize, currentPage * pagesize)
                " :height="700" border style="width: 100%;overflow: auto;">
                <el-table-column prop="barcode" :label="$t('Barcode')"></el-table-column>
                <el-table-column prop="ordernumber" :label="$t('Order No')"></el-table-column>
                <el-table-column prop="listnumber" :label="$t('List No')"></el-table-column>
                <el-table-column prop="boxnumber" :label="$t('Box No')"></el-table-column>
                <el-table-column prop="glasslength" :label="$t('Length')"></el-table-column>
                <el-table-column prop="glassheight" :label="$t('Width')"></el-table-column>
            </el-table>
            <el-pagination :style="'margin-top:-2px'" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :pager-count="7" :current-page="currentPage" :page-sizes="[5, 10, 15, 20]" :page-size="pagesize"
                layout="total, sizes, prev, pager, next, jumper" :total="GlassInfo.length > 0 ? GlassInfo.length : null"
                background style="float: right; margin-top: 20px">
            </el-pagination>
        </el-dialog>
        <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: space-around;">
@@ -350,72 +450,100 @@
                </div>
                <div style="display: flex;justify-content: space-around;">
                    <el-form-item>
                        <el-input style="width:50%;margin-left: 20%;" :placeholder="$t('Enter the glass lD')"
                        <el-input style="width:50%;margin-left: 20%;" :placeholder="$t('Enter the glass barcode')"
                            v-model="glassid2"></el-input>
                        <el-button type="primary" @click="SelectGlassByGlassIDs(1)" :disabled="disabled">{{ $t('Query')
                        }}</el-button>
                    </el-form-item>
                    <el-form-item>
                        <el-input style="width:50%;margin-left: 20%;" :placeholder="$t('Enter the glass lD')"
                        <el-input style="width:50%;margin-left: 20%;" :placeholder="$t('Enter the glass barcode')"
                            v-model="glassid1"></el-input>
                        <el-button type="primary" @click="SelectGlassByGlassIDs(2)" :disabled="disabled">{{ $t('Query')
                        }}</el-button>
                    </el-form-item>
                </div>
                <div style="display: flex;justify-content: space-around;">
                    <el-form-item :label="$t('Barcodid')">
                        <el-input v-model="form2.glassId" readonly autocomplete="off" />
                    <el-form-item :label="$t('Barcode')">
                        <el-input v-model="form2.barcode" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Barcodid')">
                        <el-input v-model="form4.glassId" readonly autocomplete="off" />
                    <el-form-item :label="$t('Barcode')">
                        <el-input v-model="form4.barcode" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Barcodid')">
                        <el-input v-model="form3.glassId" readonly autocomplete="off" />
                    <el-form-item :label="$t('Barcode')">
                        <el-input v-model="form3.barcode" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Barcodid')">
                        <el-input v-model="form5.glassId" readonly autocomplete="off" />
                    <el-form-item :label="$t('Barcode')">
                        <el-input v-model="form5.barcode" readonly autocomplete="off" />
                    </el-form-item>
                </div>
                <div style="display: flex;justify-content: space-around;">
                    <el-form-item :label="$t('order')">
                        <el-input v-model="form2.orderId" readonly autocomplete="off" />
                    <el-form-item :label="$t('Order No')">
                        <el-input v-model="form2.ordernumber" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('order')">
                        <el-input v-model="form4.orderId" readonly autocomplete="off" />
                    <el-form-item :label="$t('Order No')">
                        <el-input v-model="form4.ordernumber" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('order')">
                        <el-input v-model="form3.orderId" readonly autocomplete="off" />
                    <el-form-item :label="$t('Order No')">
                        <el-input v-model="form3.ordernumber" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('order')">
                        <el-input v-model="form5.orderId" readonly autocomplete="off" />
                    <el-form-item :label="$t('Order No')">
                        <el-input v-model="form5.ordernumber" 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.height" readonly autocomplete="off" />
                    <el-form-item :label="$t('List No')">
                        <el-input v-model="form2.listnumber" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('length')">
                        <el-input v-model="form4.height" readonly autocomplete="off" />
                    <el-form-item :label="$t('List No')">
                        <el-input v-model="form4.listnumber" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('length')">
                        <el-input v-model="form3.height" readonly autocomplete="off" />
                    <el-form-item :label="$t('List No')">
                        <el-input v-model="form3.listnumber" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('length')">
                        <el-input v-model="form5.height" readonly autocomplete="off" />
                    <el-form-item :label="$t('List No')">
                        <el-input v-model="form5.listnumber" 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.width" readonly autocomplete="off" />
                    <el-form-item :label="$t('Box No')">
                        <el-input v-model="form2.boxnumber" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('width')">
                        <el-input v-model="form4.width" readonly autocomplete="off" />
                    <el-form-item :label="$t('Box No')">
                        <el-input v-model="form4.boxnumber" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('width')">
                        <el-input v-model="form3.width" readonly autocomplete="off" />
                    <el-form-item :label="$t('Box No')">
                        <el-input v-model="form3.boxnumber" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('width')">
                        <el-input v-model="form5.width" readonly autocomplete="off" />
                    <el-form-item :label="$t('Box No')">
                        <el-input v-model="form5.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.glasslength" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Length')">
                        <el-input v-model="form4.glasslength" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Length')">
                        <el-input v-model="form3.glasslength" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Length')">
                        <el-input v-model="form5.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.glassheight" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Width')">
                        <el-input v-model="form4.glassheight" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Width')">
                        <el-input v-model="form3.glassheight" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Width')">
                        <el-input v-model="form5.glassheight" readonly autocomplete="off" />
                    </el-form-item>
                </div>
                <div style="display: flex;justify-content: space-around;">
@@ -431,105 +559,76 @@
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                    <el-button @click="cancel3()">{{ $t('cancel') }}</el-button>
                </span>
            </template>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible1" :title="$t('Please confirm the Ordering Information')">
            <el-form :model="form1" label-width="100px" style="padding-right: 30px">
                <el-form-item :label="$t('order')">
                    <el-input v-model="form1.order" autocomplete="off" />
                </el-form-item>
                <el-form-item :label="$t('number')">
                    <el-input v-model="form1.number" autocomplete="off" />
                </el-form-item>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                    <el-button @click="getOrder();" type="primary">{{ $t('confirm') }}</el-button>
                    <el-button @click="cancel1()">{{ $t('cancel') }}</el-button>
                </span>
            </template>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible2" :title="$t('Alarm Information')">
            <el-table :data="this.alarm" border style="width: 100%;">
                <el-table-column prop="id" :label="$t('id')"></el-table-column>
                <el-table-column prop="content" :label="$t('content')"></el-table-column>
                <el-table-column prop="timeons" :label="$t('timeon')"></el-table-column>
                <el-table-column prop="endTime" :label="$t('endTime')"></el-table-column>
            </el-table>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible3" :title="$t('Cage Details')" top="5vh">
            <el-table :data="this.cageinfo" :height="700" border style="width: 100%;overflow: auto;">
                <el-table-column :width="90" prop="cage" :label="$t('The Cage number')"></el-table-column>
                <el-table-column :width="90" prop="cell" :label="$t('The Slot Number')"></el-table-column>
                <el-table-column :width="55" prop="tier" :label="$t('The Side')"></el-table-column>
                <el-table-column :width="100" prop="glassId" :label="$t('Barcodid')"></el-table-column>
                <el-table-column :width="100" prop="orderId" :label="$t('Order Number')"></el-table-column>
                <el-table-column :width="100" prop="list" :label="$t('List Number')"></el-table-column>
                <el-table-column :width="100" prop="box" :label="$t('Box Number')"></el-table-column>
                <el-table-column :width="170" prop="lengthWidth" :label="$t('Length(inch) and Width(inch)')"></el-table-column>
        <el-dialog :visible.sync="dialogFormVisible6" :title="$t('Production queue')" top="5vh">
            <el-button type="primary" @click="showform7()">{{ $t('Increase') }}</el-button>
            <el-table :data="this.OutSlice" :height="700" border style="width: 100%;overflow: auto;">
                <el-table-column prop="glassId" :label="$t('Barcode')"></el-table-column>
                <el-table-column prop="north_glass_buffer1s.ordernumber" :label="$t('Order No')"></el-table-column>
                <el-table-column prop="north_glass_buffer1s.listnumber" :label="$t('List No')"></el-table-column>
                <el-table-column prop="north_glass_buffer1s.boxnumber" :label="$t('Box No')"></el-table-column>
                <el-table-column prop="barCode" :label="$t('Frame No')"></el-table-column>
                <el-table-column prop="north_glass_buffer1s.glasslength" :label="$t('Length')"></el-table-column>
                <el-table-column prop="north_glass_buffer1s.glassheight" :label="$t('Width')"></el-table-column>
                <el-table-column :width="280" :label="$t('Operate')">
                    <template slot-scope='scope'>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('delete') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="outglass(scope.row.glassId, scope.row.state)">{{ $t('out') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)">
                            {{ scope.row.disabled == 0 ? $t('Enable') : $t('Disable') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('increase')
                            }}</el-button>
                            @click="deleteproductionqueueglass(scope.row.id)">{{ $t('Delete') }}</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible4" :title="$t('OrderInfo')" top="5vh">
            <el-input style="width:15%;" :placeholder="$t('Enter the Order lD')" v-model="orderid"></el-input>
            <el-button type="primary" @click="selectglassinfo()">{{ $t('Query') }}</el-button>
            <el-table :data="GlassInfo.slice((currentPage - 1) * pagesize, currentPage * pagesize)
                " :height="700" border style="width: 100%;overflow: auto;">
                <el-table-column prop="glassId" :label="$t('Barcodid')"></el-table-column>
                <el-table-column prop="orderId" :label="$t('Order Number')"></el-table-column>
                <el-table-column prop="width" :label="$t('length')"></el-table-column>
                <el-table-column prop="height" :label="$t('width')"></el-table-column>
            </el-table>
        <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="addoutslice()">{{ $t('Increase') }}</el-button>
            <el-table :data="this.AluminumFrame" :height="700" border style="width: 100%;overflow: auto;">
            <!-- <el-table :data="tableDatas.slice((currentPage - 1) * pagesize, currentPage * pagesize)
                " style="width: 100%">
                <el-table-column label="Date" prop="date"> </el-table-column>
                <el-table-column label="Name" prop="name"> </el-table-column>
                <el-table-column label="操作">
                    <template slot-scope="scope">
                        <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">Edit</el-button>
                        <el-button size="mini" type="danger"
                            @click="handleDelete(scope.$index, scope.row)">Delete</el-button>
                <el-table-column prop="barcode" :label="$t('Barcode')"></el-table-column>
                <el-table-column prop="ordernumber" :label="$t('Order No')"></el-table-column>
                <el-table-column prop="listnumber" :label="$t('List No')"></el-table-column>
                <el-table-column prop="boxnumber" :label="$t('Box No')"></el-table-column>
                <el-table-column prop="glasslength" :label="$t('Length')"></el-table-column>
                <el-table-column prop="glassheight" :label="$t('Width')"></el-table-column>
                <el-table-column prop="storageCage.cage" :label="$t('Cage No')"></el-table-column>
                <el-table-column prop="storageCage.cell" :label="$t('Slot No')"></el-table-column>
                <el-table-column prop="storageCage.tier" :label="$t('The Side')"></el-table-column>
                <el-table-column prop="FrameNo" :label="$t('Frame No')"></el-table-column>
                <el-table-column prop="Flip" :label="$t('Flip')"></el-table-column>
                <el-table-column prop="out_slice.state" :label="$t('In the queue')">
                    <template slot-scope='scope'>
                        {{ scope.row.out_slice != null ? $t('Yes') : $t('No') }}
                    </template>
                </el-table-column>
            </el-table> -->
            <!-- 表格分页 -->
            <!-- pager-count pager-count属性可以设置最大页码按钮数,超出折叠,默认为7-->
            <!-- 注意:若数据是后端接口返回的则此时:total="pageCount"-->
            <el-pagination :style="'margin-top:-2px'" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :pager-count="7" :current-page="currentPage" :page-sizes="[5, 10, 15, 20]" :page-size="pagesize"
                layout="total, sizes, prev, pager, next, jumper" :total="GlassInfo.length > 0 ? GlassInfo.length : null"
                background style="float: right; margin-top: 20px">
            </el-pagination>
                <el-table-column prop="storageCage.tier" :label="$t('In the cage')">
                    <template slot-scope='scope'>
                        {{ scope.row.storageCage != null ? $t('Yes') : $t('No') }}
                    </template>
                </el-table-column>
                <el-table-column :width="80" :label="$t('Operate')">
                    <template slot-scope='scope'>
                        <el-checkbox label="" :disabled="!(scope.row.storageCage != null&&scope.row.out_slice == null)" :checked="scope.row.isCheck"  @change="CheckBoxchange(scope.row.barcode,$event)"></el-checkbox>
                    </template>
                </el-table-column>
            </el-table>
        </el-dialog>
    </el-container>
</template>
<script>
//:disabled="scope.row.glassId > 0 || scope.row.disabled == 1 ? true : false"
import {
    home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist,
    SelectPassword, SelectGlassByGlassID, Disabled, Inglassid, SelectGlass, InsertQueueGlassId, UpdateQueueState, DeleteQueueGlass
    SelectPassword, SelectGlassByGlassID, Disabled, Inglassid, SelectGlass, InsertQueueGlassId, UpdateQueueState, DeleteQueueGlass, SelectGlassNo,
    SelectAluminumFrameInfoById, SelectProductionqueue, DeleteProductionQueueGlass, AddOutSliceS
} from "../../api/home";
@@ -552,40 +651,19 @@
            dialogFormVisible3: false,
            dialogFormVisible4: false,
            dialogFormVisible5: false,
            dialogFormVisible6: false,
            dialogFormVisible7: false,
            form: {
                orderId: "",
                glassId: "",
                height: "",
                width: ""
            },
            form1: {
                order: "NG2210210",
                number: 800,
            },
            form2: {
                orderId: "",
                glassId: "",
                height: "",
                width: ""
            },
            form3: {
                orderId: "",
                glassId: "",
                height: "",
                width: ""
            },
            form4: {
                orderId: "",
                glassId: "",
                height: "",
                width: ""
            },
            form5: {
                orderId: "",
                glassId: "",
                height: "",
                width: ""
            },
            form1: {},
            form2: {},
            form3: {},
            form4: {},
            form5: {},
            alarm: [],
            tableData: [],
            cagelist1: [],
@@ -618,7 +696,10 @@
            disabled1: false,
            currentPage: 1,  //默认初始页
            pagesize: 15,    //每页默认显示的数据
            pageCount: 0
            pageCount: 0,
            OutSlice: [],
            AluminumFrame: [],
            framebarcode: ""
        };
    },
    created() {
@@ -666,7 +747,9 @@
                    if (obj.zhuangtai != null) {
                        this.zhuangtai = obj.zhuangtai[0];
                    }
                    if(this.dialogFormVisible7==true){
                        this.showform7();
                    }
                    // this.glassid1 = obj.queid[0];
                    // if (obj.queid[0] != "" && obj.queid[0] != null && obj.state[0] == 0) {
                    //     this.state = false;
@@ -686,23 +769,14 @@
                    if (obj.form2 != null && obj.form2 != "") {
                        this.form2 = obj.form2[0];
                    } else {
                        this.form2 = {
                            orderId: "",
                            glassId: "",
                            height: "",
                            width: ""
                        };
                        this.form2 = {};
                    }
                    if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 1) {
                        this.form3 = obj.form3[0];
                    } else {
                        this.form3 = {
                            orderId: "",
                            glassId: "",
                            height: "",
                            width: ""
                        };
                        this.form3 = {};
                    }
                    if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 0) {
                        this.form5 = obj.form3[0];
@@ -844,11 +918,10 @@
        //显示订单信息页面
        showform1() {
            if (this.order != "") {
                this.form1 =
                {
                    order: "NG2210210",
                    number: 800,
                };
                SelectGlassNo(this.order).then(res => {
                    this.form1.order = this.order;
                    this.form1.number = res.data.count;
                });
                this.dialogFormVisible1 = true;
            }
        },
@@ -898,6 +971,7 @@
        },
        selectglassinfo() {
            SelectGlass(this.orderid).then(res => {
                this.currentPage = 1;
                this.GlassInfo = res.data.glass;
            });
        },
@@ -906,6 +980,27 @@
                this.GlassInfo = res.data.glass;
            });
            this.dialogFormVisible4 = true;
        },
        showform6() {
            SelectProductionqueue().then(res => {
                this.OutSlice = res.data.listoutslice;
            });
            this.dialogFormVisible6 = true;
        },
        showform7() {
            SelectAluminumFrameInfoById(this.framebarcode).then(res => {
                this.AluminumFrame = res.data.listAluminumFrame;
                this.AluminumFrame.forEach(item => {
                    if(item.storageCage!=null&&item.out_slice==null){
                        item.isCheck = true;
                    }else{
                        item.isCheck = false;
                    }
                    item.Flip=res.data.flip;
                    item.FrameNo=this.framebarcode;
                });
            });
            this.dialogFormVisible7 = true;
        },
        //取消操作时关闭页面
        cancel() {
@@ -956,6 +1051,7 @@
            this.cage = cage;
            SelectCageInfo(cage).then(res => {
                this.cageinfo = res.data.cageinfo;
                console.log(this.cageinfo)
                this.dialogFormVisible3 = true;
            });
        },
@@ -1051,7 +1147,7 @@
        //手动上片
        FeedInglassid() {
            Inglassid(this.insertcage, this.insertcell, this.inserttier, this.form).then(res => {
                if (this.form.glassId != "") {
                if (this.form.barcode != "") {
                    if (res.data.message == 200) {
                        this.$message.success(this.$t('Operation successful'));
                        this.dialogFormVisible = false;
@@ -1072,7 +1168,29 @@
                }
            });
        },
        handleEdit(index, row) {
        //删除出片队列玻璃
        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'),
                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'));
                        }
                    });
                }
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: this.$t('Operation canceled')
                });
            });
        }, handleEdit(index, row) {
            console.log(index, row);
        },
        //表格删除
@@ -1089,36 +1207,26 @@
        },
        //手动添加扫码位玻璃
        InsertQueueGlass(parameter) {
            if (parameter == 1 && this.form5.glassId != "") {
                if (this.form5.glassId != this.form2.glassId) {
                    InsertQueueGlassId(this.form5.glassId, 1).then(res => {
            if (parameter == 1 && this.form5.barcode != "") {
                if (this.form5.barcode != this.form2.barcode) {
                    InsertQueueGlassId(this.form5.barcode, 1).then(res => {
                        if (res.data.message == 200) {
                            this.form5 = {
                                orderId: "",
                                glassId: "",
                                height: "",
                                width: ""
                            };
                            this.form5 = {};
                            this.$message.success(this.$t('Operation successful'));
                        }else{
                        } else {
                            this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
                        }
                    });
                } else {
                    this.$message.error(this.$t('The glass ID already exists in the loading queue'));
                }
            } else if (parameter == 2 && this.form4.glassId != "") {
                if (this.form4.glassId != this.form3.glassId) {
                    InsertQueueGlassId(this.form4.glassId, 2).then(res => {
            } else if (parameter == 2 && this.form4.barcode != "") {
                if (this.form4.barcode != this.form3.barcode) {
                    InsertQueueGlassId(this.form4.barcode, 2).then(res => {
                        if (res.data.message == 200) {
                            this.form4 = {
                                orderId: "",
                                glassId: "",
                                height: "",
                                width: ""
                            };
                            this.form4 = {};
                            this.$message.success(this.$t('Operation successful'));
                        }else{
                        } else {
                            this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
                        }
                    });
@@ -1152,6 +1260,36 @@
                    this.$message.success(this.$t('Operation successful'));
                }
            });
        },
        CheckBoxchange(glassid,isChecked){
            this.AluminumFrame.forEach(item=>{item.barcode=glassid;item.isCheck=isChecked})
            console.log(this.AluminumFrame);
        },
        addoutslice(){
            // var AluminumFrames1=this.AluminumFrame.map(item=>{return item.barcode});
            // var AluminumFrames2=this.AluminumFrame.map(item=>{return item.isCheck});
            // var AluminumFrames3=this.AluminumFrame.map(item=>{return item.Flip});
            var dats_=new Array();
            this.AluminumFrame.forEach(item => {
                var dats2_=new Array();
                dats2_[0]=item.barcode;
                dats2_[1]=item.isCheck;
                dats2_[2]=item.Flip;
                dats2_[3]=item.FrameNo;
                dats2_[4]=item.glasslengthMm;
                dats2_[5]=item.glassheightMm;
                dats_[dats_.length]=dats2_;
            });
            console.log(dats_);
            //var AluminumFrames=this.AluminumFrame.map((item)=>({barcode,isCheck,Flip}) );
            // console.log(AluminumFrames1);
            // console.log(AluminumFrames2);
            // console.log(AluminumFrames3);
            AddOutSliceS(dats_).then(res=>{
                if (res.data.message == 200) {
                    this.$message.success(this.$t('Operation successful'));
                }
            });
        }
    }
}
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -10,6 +10,7 @@
import com.example.springboot.service.JdbcConnections;
import com.example.springboot.service.SpianService;
import com.example.springboot.entity.Glass;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.mapper.AlarmMapper;
import com.example.springboot.mapper.SpianMapper;
@@ -24,8 +25,8 @@
  @Override
  public void run() {
    boolean inglassbegin=false;
    boolean outglassbegin=false;
    boolean inglassbegin = false;
    boolean outglassbegin = false;
    while (this != null) {
      try {
@@ -38,35 +39,33 @@
      spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
      jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
      spianService.selectout("1145");
      //spianService.selectAll2();
      //增加队列表数据
      //spianMapper.insertqueue("1",1,1500);
      String str = "Hello";
      char[] charArray = new char[str.length()];
      for (int i = 0; i < str.length(); i++) {
        charArray[i] = str.charAt(i);
      }
      System.out.println(charArray);
      // spianService.selectout("1145");
      // spianService.selectAll("11");
      // spianService.selectAll2();
      // 增加队列表数据
      // spianMapper.insertqueue("1",1,1500);
      // 根据玻璃id获取订单号,单独数据源
      // try {
      //   Glass glass = jdbcConnections.selectGlass(112);
      // north_glass_buffer1 glass = jdbcConnections.selectGlass(112);
      //   // System.out.println(glass.getOrderId());
      // // System.out.println(glass.getOrderId());
      // } catch (SQLException e) {
      //   // TODO Auto-generated catch block
      //   e.printStackTrace();
      // // TODO Auto-generated catch block
      // e.printStackTrace();
      // }
      //判断进片请求
      // 判断进片请求
      List<Short> datas1List = S7control.getinstance().ReadWord("DB106.24", 1);// 获取prc进片请求数据
      List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", 1);// 获取进片车状态
      List<Short> datas1ListState2 = S7control.getinstance().ReadWord("DB105.12", 1);// 获取进片车任务是否启动
      //测试启动自定义prc值
      // List<Short> datas1List=new ArrayList<>();
      // datas1List.add((short)1);
      // List<Short> datas1ListState=new ArrayList<>();
      // datas1List.add((short)0);
      // List<Short> datas1ListState2=new ArrayList<>();
      // datas1List.add((short)0);
      if (datas1List != null && datas1ListState != null) {
@@ -74,127 +73,144 @@
        boolean exist = datas1List.contains((short) 1);
        // 获取进片车状态
        boolean exist1 = datas1ListState.contains((short) 0);
        //判断进片车任务是否启动
        // 判断进片车任务是否启动
        boolean exist2 = datas1ListState2.contains((short) 1);
        String glassid="";
        StringBuilder strId=new StringBuilder();
         StringBuilder writedstrId=new StringBuilder();
       if(!inglassbegin&!exist1)//当进片车不空闲时
       {
         inglassbegin=true;
       }
       if(inglassbegin&exist1)//当进片车空闲时
       {
        inglassbegin=false;
        spianMapper.Updatetask(1, 0);//立即结束数据库表中的上片任务
        spianMapper.UpdataAddCageState(1,2);
       }
        String glassid = "";
        StringBuilder strId = new StringBuilder();
        StringBuilder writedstrId = new StringBuilder();
        if (!inglassbegin & !exist1)// 当进片车不空闲时
        {
          inglassbegin = true;
        }
        if (inglassbegin & exist1)// 当进片车空闲时
        {
          inglassbegin = false;
          spianMapper.Updatetask(1, 0);// 立即结束数据库表中的上片任务
          spianMapper.UpdataAddCageState(1, 2);
        }
        // 进片请求为1时
        if (exist == true) {
          // 当进片车空闲时
          if (exist1 == true) {
            //获取已下发的进片id 与plc请求的id作比较
              byte[] writedglassidbytes = S7control.getinstance().ReadByte("DB105.16", 1);
            // 获取已下发的进片id 与plc请求的id作比较
            byte[] writedglassidbytes = S7control.getinstance().ReadByte("DB105.16", 13);
            if (writedglassidbytes != null) { //
              // 获取玻璃id
              for (byte iditem : writedglassidbytes) {
              for (byte iditem : writedglassidbytes) {
                writedstrId.append(iditem);
              }
            }
            // 获取进片id
            byte[] datas1ListID = S7control.getinstance().ReadByte("DB106.26", 1);
            byte[] datas1ListID = S7control.getinstance().ReadByte("DB106.26", 13);
            if (datas1ListID != null) {
              // 获取玻璃id
              for (byte list1 : datas1ListID) {
              for (byte list1 : datas1ListID) {
                strId.append(list1);
              }
              if(!writedstrId.toString().equals(strId.toString())) //已经下发的id与plc请求的id不一样时,认为不是重复的任务,才执行下发任务指令
              if (!writedstrId.toString().equals(strId.toString())) // 已经下发的id与plc请求的id不一样时,认为不是重复的任务,才执行下发任务指令
              {
                 int glasslimit=1;//判断是否是多片上片
                 if(glasslimit==1){
                int glasslimit = 1;// 判断是否是多片上片
                if (glasslimit == 1) {
                  spianService.selectAll(strId.toString());
                 }else{
                } else {
                  spianService.selectAll(strId.toString());
                 }
                  S7control.getinstance().WriteByte("DB105.16",datas1ListID);//派发进片id
                }
                S7control.getinstance().WriteByte("DB105.16", datas1ListID);// 派发进片id
              }
              //spianService.selectAll(Short.parseShort(strId.toString()));
              // spianService.selectAll(Short.parseShort(strId.toString()));
            }
          }
          // System.out.println(exist);
        }
//下发任务后将任务启动改为0
           if(exist1==false){  //进片车忙碌时
          if(exist2==true) {   //任务已启动时
          S7control.getinstance().WriteWord("DB105.12",(short)0);//进片任务启动改为0
          }
        // 下发任务后将任务启动改为0
        if (exist1 == false) { // 进片车忙碌时
          if (exist2 == true) { // 任务已启动时
            S7control.getinstance().WriteWord("DB105.12", (short) 0);// 进片任务启动改为0
          }
        }
      }
      //spianService.selectAll((short) 111);
      List<Short> outlist = S7control.getinstance().ReadWord("DB106.20", 1); // 出片车状态
      List<Short> outlist1 = S7control.getinstance().ReadWord("DB105.14", 1); // 出片任务是否启动
      StringBuilder writedstrIdOut=new StringBuilder();
       //获取已下发的出片id
              byte[] writedglassidbytesOut = S7control.getinstance().ReadByte("DB105.30", 1);
            if (writedglassidbytesOut != null) {
              // 获取玻璃id
              for (byte iditem : writedglassidbytesOut) {
                writedstrIdOut.append(iditem);
              }
            }
      boolean outstate=false;//出片车空闲判断
      boolean outstate1=false;//出片车任务是否启动
       if (outlist != null&&outlist1!=null) {
        // 判断按订单出片
         outstate = outlist.contains((short) 0);//出片车空闲判断
         outstate1 = outlist1.contains((short) 1);//出片车任务是否启动
          Glass glass=spianMapper.SelectDBOut();//判断是否有调拨后的出片任务未完成
          if(!outglassbegin&!outstate)//当任务还未开始,且出片车不空闲时,任务状态改为开始
       {
         outglassbegin=true;
       }
       if(outglassbegin&outstate)//当任务开始且出片车空闲时
       {
        outglassbegin=false;
        spianMapper.UpdatetaskOut(); //完成上一次出片或者调度任务
        spianMapper.UpdataAddCageState(0,3);
       }
         if(outstate== true &glass.getGlassId()!=null){ //当出片车空闲且有出片任务待完成时
          if(glass.getId()==2&!writedstrIdOut.toString().equals(glass.getGlassId().toString())){
           spianService.selectout2(glass.getGlassId().toString());
            }
        }
        if(outstate==false){//下发任务后将任务启动改为0//出片车空闲判断
          if(outstate1==true){
            S7control.getinstance().WriteWord("DB105.14",(short)0);//出片任务启动改为0
          }
         }
      StringBuilder writedstrIdOut = new StringBuilder();
      // 获取已下发的出片id
      byte[] writedglassidbytesOut = S7control.getinstance().ReadByte("DB105.30", 13);
      if (writedglassidbytesOut != null) {
        // 获取玻璃id
        for (byte iditem : writedglassidbytesOut) {
          writedstrIdOut.append((char) iditem);
        }
      }
        if (outstate == true) { // 出片车状态空闲时
            Integer state=spianMapper.Selectoutstate();
            String orderid = spianMapper.SelectOrderout();
            if (orderid != null &&state==0) {
              spianService.selectout(orderid);
            }
      // 获取BO1数据
      StringBuilder queueid1 = spianService.queGlassid("DB103.DBB32");
      // 获取BO2数据
      StringBuilder queueid2 = spianService.queGlassid("DB103.DBB46");
      if (queueid1 != null) {
        // 写入B01的数据到上片队列表
        spianMapper.insertqueue(queueid1.toString(), 1, 0);
      }
      if (queueid2 != null) {
        // 写入B02的数据到上片队列表
        spianMapper.insertqueue(queueid2.toString(), 2, 0);
      }
      // 出片任务////////////////////////////////
      boolean outstate = false;// 出片车空闲判断
      boolean outstate1 = false;// 出片车任务是否启动
      if (outlist != null && outlist1 != null) {
        // 判断按订单出片
        outstate = outlist.contains((short) 0);// 出片车空闲判断
        outstate1 = outlist1.contains((short) 1);// 出片车任务是否启动
        north_glass_buffer1 glass = spianMapper.SelectDBOut();// 判断是否有调拨后的出片任务未完成
        if (!outglassbegin & !outstate)// 当任务还未开始,且出片车不空闲时,任务状态改为开始
        {
          outglassbegin = true;
        }
        if (outglassbegin & outstate)// 当任务开始且出片车空闲时
        {
          outglassbegin = false;
          spianMapper.UpdatetaskOut(); // 完成上一次出片或者调度任务
          spianMapper.UpdataAddCageState(0, 3);// 将出片中的格子状态改成0
        }
        if (outstate == true & glass.getbarcode() != null) { // 当出片车空闲且有出片任务待完成时
          // 判断有两个出片或调拨任务时并且出片id和未完成的出片任务id不一样时执行出片
          if (glass.getId() == 2 & !writedstrIdOut.toString().equals(glass.getbarcode().toString())) {
            spianService.selectout2(glass.getbarcode().toString());
          }
        }
        // 判断当前是否有未执行的任务
        int outnum = spianMapper.SelectOutSliceshu();
        if (outnum == 0) {
          // 判断铝框出片队列表是否有待出片的玻璃
          String outglassid = spianMapper.SelectOutSlice();
          if (outglassid != null) {
            spianService.selectout2(outglassid);
          }
        }
        if (outstate == false) {// 下发任务后将任务启动改为0//出片车空闲判断
          if (outstate1 == true) {
            S7control.getinstance().WriteWord("DB105.14", (short) 0);// 出片任务启动改为0
          }
        }
      }
      if (outstate == true) { // 出片车状态空闲时
        Integer state = spianMapper.Selectoutstate();
        String orderid = spianMapper.SelectOrderout();
        if (orderid != null && state == 0) {
          spianService.selectout(orderid);
        }
      }
      // 查询数据库
      // 推送到前端
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -1,18 +1,10 @@
package com.example.springboot.component;
import cn.hutool.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.web.bind.annotation.PostMapping;
import com.example.springboot.common.Result;
import com.example.springboot.entity.Glass;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.alarmmg;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.mapper.HomeMapper;
import com.example.springboot.mapper.SpianMapper;
import com.example.springboot.service.JdbcConnections;
@@ -45,12 +37,18 @@
            List<StorageCage> cagelist3 = homeMapper.selectRack3();
            List<StorageCage> cagelist4 = homeMapper.selectRack4();
            jsonObject.append("cagelist1", cagelist1);
            jsonObject.append("cagelist2", (Object) cagelist2);
            jsonObject.append("cagelist2", cagelist2);
            jsonObject.append("cagelist3", cagelist3);
            jsonObject.append("cagelist4", cagelist4);
            // 进出片任务
            List<StorageCage> tasklist1 = homeMapper.selectinout(3);
            List<StorageCage> tasklist2 = homeMapper.selectinout(2);
            for (StorageCage storageCage : tasklist1) {
                storageCage.setnorth_glass_buffer1s(homeMapper.SelectBoxNo(storageCage.getGlassId()));
            }
            for (StorageCage storageCage : tasklist2) {
                storageCage.setnorth_glass_buffer1s(homeMapper.SelectBoxNo(storageCage.getGlassId()));
              }
            jsonObject.append("tasklist1", tasklist1);
            jsonObject.append("tasklist2", tasklist2);
            // 查询报警信息
@@ -62,17 +60,18 @@
            // addressList.add("DB106.0");
            // List<Short> paramlist = S7control.getinstance().ReadWord(addressList);
            // if (paramlist != null) {
            //     jsonObject.append("params", paramlist);
            // jsonObject.append("params", paramlist);
            // }
            // // 获取进片车状态
            // List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", 1);// 获取进片车状态
            // List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8",
            // 1);// 获取进片车状态
            // 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);
            // if (inglassInfo.size() > 0)
            // jsonObject.append("loadglassheight", inglassInfo.get(0) * 70);
            // }
            // 伍 获取进是否有待确认的玻璃id
            String queid = spianMapper.Selectqueueid();
@@ -80,8 +79,10 @@
            jsonObject.append("queid", queid);
            jsonObject.append("state", state);
            // 获取扫码位与上片位玻璃信息
            Glass form2 = homeMapper.GetQueueInfo(2);
            Glass form3 = homeMapper.GetQueueInfo(1);
            String queueglassid2 = homeMapper.GetQueueInfo(2);
            String queueglassid1 = homeMapper.GetQueueInfo(1);
            north_glass_buffer1 form2 = homeMapper.SelectGlassByGlassID(queueglassid2);
            north_glass_buffer1 form3 = homeMapper.SelectGlassByGlassID(queueglassid1);
            jsonObject.append("form2", form2);
            jsonObject.append("form3", form3);
            // List<Short> paramlists = new ArrayList<Short>();
@@ -91,7 +92,6 @@
            // paramlists.add(para2);
            // System.out.println(paramlists);
            dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
            boolean dbconnected = false;
            try {
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -30,7 +30,7 @@
    //
    System.out.println("启动完成");
    // new PlcHold().start();
    new PlcHold().start();
//  new Plcaction().start();
//
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -1,23 +1,30 @@
package com.example.springboot.controller;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.logging.log4j.util.PropertySource.Comparator;
import org.springframework.beans.factory.annotation.Autowired;
import com.example.springboot.mapper.HomeMapper;
import com.example.springboot.mapper.SpianMapper;
import com.example.springboot.service.HomeService;
import com.example.springboot.service.MultiFieldComparator;
import com.example.springboot.service.SpianService;
import com.example.springboot.common.Result;
import com.example.springboot.component.S7control;
import com.example.springboot.entity.CarPosition;
import com.example.springboot.entity.Glass;
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.Out_slice;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/home")
@@ -62,6 +69,9 @@
  @GetMapping("/loadinout")
  public Result selectinout(Integer types) {
    List<StorageCage> storageCageinout = homeMapper.selectinout(types);
    for (StorageCage storageCage : storageCageinout) {
      storageCage.setnorth_glass_buffer1s(homeMapper.SelectBoxNo(storageCage.getGlassId()));
    }
    Map<String, Object> map = new HashMap<>();
    map.put("list", storageCageinout);
    return Result.success(map);
@@ -110,11 +120,9 @@
    homeMapper.UpdateTask(types);
    StorageCage glass = homeMapper.SelectGlassInfo(glassid);
    if (types == 0) {
      // spianMapper.UpdataAddCage1(glass.getGlassWidth(),glass.getCage(),glass.getCell());
      homeMapper.UpdateCageTask1(glassid);
      S7control.getinstance().WriteWord("DB105.14", (short) 0);
    } else {
      spianMapper.UpdataOutCage1(glass.getGlassWidth(), glass.getCage(), glass.getCell());
      homeMapper.UpdateCageTask2(glassid);
      S7control.getinstance().WriteWord("DB105.12", (short) 0);
@@ -136,6 +144,9 @@
  @GetMapping("/SelectCageInfo")
  public Result SelectCageInfo(short cage) {
    List<StorageCage> cageinfo = homeMapper.SelectCageInfo(cage);
    for (StorageCage storageCage : cageinfo) {
      storageCage.setnorth_glass_buffer1s(homeMapper.SelectBoxNo(storageCage.getGlassId()));
    }
    Map<String, Object> map = new HashMap<>();
    map.put("cageinfo", cageinfo);
    return Result.success(map);
@@ -193,9 +204,9 @@
  // 根据玻璃id查询玻璃信息
  @GetMapping("/SelectGlassByGlassID")
  public Result SelectGlassByGlassID(String glassid) {
    Glass Glass = homeMapper.SelectGlassByGlassID(glassid);
    north_glass_buffer1 north_glass_buffer1s = homeMapper.SelectGlassByGlassID(glassid);
    Map<String, Object> map = new HashMap<>();
    map.put("form", Glass);
    map.put("form", north_glass_buffer1s);
    return Result.success(map);
  }
@@ -210,14 +221,14 @@
  // 手动往理片笼添加玻璃
  @PostMapping("/Inglassid")
  public Result Inglassid(short cage, short cell, short tier, @RequestBody Glass glass) {
  public Result Inglassid(short cage, short cell, short tier, @RequestBody north_glass_buffer1 north_glass_buffer1s) {
    Map<String, Object> map = new HashMap<>();
    short result = homeMapper.SelectStorageByGlassId(glass.getGlassId());
    short result = homeMapper.SelectStorageByGlassId(north_glass_buffer1s.getbarcode());
    if (result > 0) {
      map.put("message", "300");
    } else {
      homeMapper.Inglassid(glass, cage, cell, tier);
      spianMapper.UpdataAddCage1(glass.getwidth(), cage, cell);
      homeMapper.Inglassid(north_glass_buffer1s, cage, cell, tier);
      spianMapper.UpdataAddCage1(north_glass_buffer1s.getglasslengthMm(), cage, cell);
    }
    return Result.success(map);
  }
@@ -226,7 +237,7 @@
  @PostMapping("/SelectGlass")
  public Result SelectGlass(String orderid) {
    Map<String, Object> map = new HashMap<>();
    List<Glass> glass = homeMapper.SelectGlass(orderid);
    List<north_glass_buffer1> glass = homeMapper.SelectGlass(orderid);
    map.put("glass", glass);
    return Result.success(map);
  }
@@ -240,6 +251,8 @@
      map.put("message", "300");
    } else {
      homeMapper.InsertQueueGlassId(glassid, id);
    //调用伍存储过程
    spianMapper.selectAll(glassid);
      map.put("message", "200");
    }
    return Result.success(map);
@@ -263,4 +276,100 @@
    return Result.success(map);
  }
  // 查询此订单在理片笼里的玻璃数
  @PostMapping("/SelectGlassNo")
  public Result SelectGlassNo(String orderid) {
    Short count = homeMapper.SelectGlassNo(orderid);
    Map<String, Object> map = new HashMap<>();
    map.put("count", count);
    return Result.success(map);
  }
  // 根据铝框id获取对应玻璃信息
  @PostMapping("/SelectAluminumFrameInfoById")
  public Result SelectAluminumFrameInfoById(String FrameBarcode) {
    List<north_glass_buffer1> listAluminumFrame = homeMapper.SelectAluminumFrameInfoById(FrameBarcode);
    String flip=homeMapper.SelectFlipByFrameBarcode(FrameBarcode);
    for (north_glass_buffer1 north_glass_buffer1 : listAluminumFrame) {
      north_glass_buffer1.setstorageCage(homeMapper.SelectStorageGlassById(north_glass_buffer1.getbarcode()));
      north_glass_buffer1.setOut_slice(homeMapper.SelectQueueByglassid(north_glass_buffer1.getbarcode()));
    }
    Map<String, Object> map = new HashMap<>();
    map.put("listAluminumFrame", listAluminumFrame);
    map.put("flip", flip);
    return Result.success(map);
  }
  // 查询出片队列数据
  @PostMapping("/SelectProductionqueue")
  public Result SelectProductionqueue() {
    List<Out_slice> listoutslice = homeMapper.SelectProductionqueue();
    for (Out_slice out_slice : listoutslice) {
      out_slice.setnorth_glass_buffer1s(homeMapper.SelectBoxNo(out_slice.getGlassId()));
      out_slice.setstorageCage(homeMapper.SelectStorageGlassById(out_slice.getGlassId()));
    }
    //HashMap<String,List<Out_slice>> map=new HashMap<String,List<Out_slice>>();
    // HashMap map=new HashMap<>();
    // for (Out_slice out_slice : listoutslice) {
    //   String key_=out_slice.getState()+"-";
    //   if (map.get(key_)==null) {
    //     List<Out_slice> lists=new ArrayList<Out_slice>();
    //     lists.add(out_slice);
    //     map.put(key_, lists);
    //   }else{
    //     List<Out_slice> lists=(List<Out_slice>)map.get(key_);
    //     lists.add(out_slice);
    //     map.put(key_,lists);
    //   }
    // }
    // System.out.println(map);
    // List<Out_slice> listskey=(List<Out_slice>)map.get("1-");
    // List<Out_slice> list=new ArrayList<Out_slice>();
    // for (Out_slice out_slice : listskey) {
    //   if (list.isEmpty()) {
    //     list.add(out_slice);
    //   }else{
    //     for (int i=0;i<list.size();i++) {
    //       Out_slice out_slice2=list.get(i);
    //       if(out_slice.getID()>out_slice2.getID()){
    //         continue;
    //       }else{
    //         list.add(i,out_slice2);
    //       }
    //     }
    //   }
    // }
    //Collections.sort(listoutslice,new MultiFieldComparator());
    Map<String, Object> maps = new HashMap<>();
    maps.put("listoutslice", listoutslice);
    return Result.success(maps);
  }
  // 根据玻璃id删除出片队列玻璃
  @PostMapping("/DeleteProductionQueueGlass")
  public Result DeleteProductionQueueGlass(Short id) {
    homeMapper.DeleteProductionQueueGlass(id);
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
    return Result.success(map);
  }
  //
  @PostMapping("/AddOutSliceS")
  public Result AddOutSliceS(@RequestBody String[][] AluminumFrames ) {
    for (String[] item : AluminumFrames) {
      if(item[1]=="true"){
        homeMapper.AddOutSliceS(item[0],item[2],item[3],item[4],item[5]);
      }
    }
    System.out.println(AluminumFrames);
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
    return Result.success(map);
  }
}
springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java
New file
@@ -0,0 +1,101 @@
package com.example.springboot.entity;
public class Out_slice {
    private int id;
    private String glassId;
    private String barcode;
    private double glasswidth;
    private double glassheight;
    private int state;
    private String time;
    private north_glass_buffer1 north_glass_buffer1s;
    public void setnorth_glass_buffer1s(north_glass_buffer1 north_glass_buffer1s) {
        this.north_glass_buffer1s = north_glass_buffer1s;
    }
    public north_glass_buffer1 getnorth_glass_buffer1s() {
        return north_glass_buffer1s;
    }
    private StorageCage storageCage;
    public void setstorageCage(StorageCage storageCage) {
        this.storageCage = storageCage;
    }
    public StorageCage getstorageCage() {
        return storageCage;
    }
    public Out_slice() {
    }
    public Out_slice(int ID, String glassId, String barCode, double glasswidth, double glassheight, int state, String time) {
        this.id = ID;
        this.glassId = glassId;
        this.barcode = barCode;
        this.glasswidth = glasswidth;
        this.glassheight = glassheight;
        this.state = state;
        this.time = time;
    }
    public int getID() {
        return id;
    }
    public String getGlassId() {
        return glassId;
    }
    public String getBarCode() {
        return barcode;
    }
    public double getGlasswidth() {
        return glasswidth;
    }
    public double getGlassheight() {
        return glassheight;
    }
    public int getState() {
        return state;
    }
    public String getTime() {
        return time;
    }
    public void setID(int ID) {
        this.id = ID;
    }
    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }
public void setBarCode(String barCode) {
        barcode = barCode;
    }
    public void setGlasswidth(double glasswidth) {
        this.glasswidth = glasswidth;
    }
    public void setGlassheight(double glassheight) {
        this.glassheight = glassheight;
    }
    public void setState(int state) {
        this.state = state;
    }
    public void setTime(String time) {
        this.time = time;
    }
}
springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java
@@ -1,5 +1,7 @@
package com.example.springboot.entity;
public class StorageCage {
    private Integer id;
    private Integer prcId;
@@ -14,6 +16,28 @@
    private String orderId;
    private Integer disabled;
    private String lengthWidth;
    private String listno;
    private String boxno;
    private north_glass_buffer1 north_glass_buffer1s;
    public void setnorth_glass_buffer1s(north_glass_buffer1 north_glass_buffer1s) {
        this.north_glass_buffer1s = north_glass_buffer1s;
    }
    public north_glass_buffer1 getnorth_glass_buffer1s() {
        return north_glass_buffer1s;
    }
    private Out_slice outSlice;
    public void setout_slice(Out_slice outSlice) {
        this.outSlice = outSlice;
    }
    public Out_slice getout_slice() {
        return outSlice;
    }
    public Integer id() {
        return id;
@@ -122,4 +146,22 @@
    public void setLengthWidth(String lengthWidth) {
        this.lengthWidth = lengthWidth;
    }
    public String getListno() {
        return listno;
    }
    public void setListno(String listno) {
        this.listno = listno;
    }
    public String getBoxno() {
        return boxno;
    }
    public void setBoxno(String boxno) {
        this.boxno = boxno;
    }
}
springboot-vue3/src/main/java/com/example/springboot/entity/north_glass_buffer1.java
@@ -8,8 +8,17 @@
    private String barcode;//玻璃id
    private double glasslength;//玻璃宽
    private double glassheight;//玻璃高
    private double glasslength_mm;//玻璃宽mm
    private double glassheight_mm;//玻璃高mm
    private double glasslengthmm;//玻璃宽mm
    private double glassheightmm;//玻璃高mm
    private String glassoutside;//
    private String glassinside;//
    private String glassbetween;//
    private String itemtype;//
    private String slotnumber;//
    private String datemodified;//
    private String datecreated;//
    private String FrameBarcode;//
    public Integer id() {
        return id;
@@ -65,20 +74,50 @@
        this.glassheight = glassheight;
    }
    public Double getglasslength_mm() {
        return glasslength_mm;
    public Double getglasslengthmm() {
        return glasslengthmm;
    }
    public void setglasslength_mm(Double glasslength_mm) {
        this.glasslength_mm = glasslength_mm;
    public void setglasslengthmm(Double glasslengthmm) {
        this.glasslengthmm = glasslengthmm;
    }
    public Double glassheight_mm() {
        return glassheight_mm;
    public Double glassheightmm() {
        return glassheightmm;
    }
    public void setglassheight_mm(Double glassheight_mm) {
        this.glassheight_mm = glassheight_mm;
    public void setglassheightmm(Double glassheightmm) {
        this.glassheightmm = glassheightmm;
    }
    public String getitemtype() {
        return itemtype;
    }
    public void setitemtype(String itemtype) {
        this.itemtype = itemtype;
    }
    public String getslotnumber() {
        return slotnumber;
    }
    public void setslotnumber(String slotnumber) {
        this.slotnumber = slotnumber;
    }
    public String getdatemodified() {
        return datemodified;
    }
    public void setdatemodified(String datemodified) {
        this.datemodified = datemodified;
    }
    public String getdatecreated() {
        return datecreated;
    }
    public void setdatecreated(String datecreated) {
        this.datecreated = datecreated;
    }
    public String getFrameBarcode() {
        return FrameBarcode;
    }
    public void setFrameBarcode(String FrameBarcode) {
        this.FrameBarcode = FrameBarcode;
    }
   
}
springboot-vue3/src/main/java/com/example/springboot/entity/out_slice.java
New file
@@ -0,0 +1,101 @@
package com.example.springboot.entity;
public class Out_slice {
    private int id;
    private String glassId;
    private String barcode;
    private double glasswidth;
    private double glassheight;
    private int state;
    private String time;
    private north_glass_buffer1 north_glass_buffer1s;
    public void setnorth_glass_buffer1s(north_glass_buffer1 north_glass_buffer1s) {
        this.north_glass_buffer1s = north_glass_buffer1s;
    }
    public north_glass_buffer1 getnorth_glass_buffer1s() {
        return north_glass_buffer1s;
    }
    private StorageCage storageCage;
    public void setstorageCage(StorageCage storageCage) {
        this.storageCage = storageCage;
    }
    public StorageCage getstorageCage() {
        return storageCage;
    }
    public Out_slice() {
    }
    public Out_slice(int ID, String glassId, String barCode, double glasswidth, double glassheight, int state, String time) {
        this.id = ID;
        this.glassId = glassId;
        this.barcode = barCode;
        this.glasswidth = glasswidth;
        this.glassheight = glassheight;
        this.state = state;
        this.time = time;
    }
    public int getID() {
        return id;
    }
    public String getGlassId() {
        return glassId;
    }
    public String getBarCode() {
        return barcode;
    }
    public double getGlasswidth() {
        return glasswidth;
    }
    public double getGlassheight() {
        return glassheight;
    }
    public int getState() {
        return state;
    }
    public String getTime() {
        return time;
    }
    public void setID(int ID) {
        this.id = ID;
    }
    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }
public void setBarCode(String barCode) {
        barcode = barCode;
    }
    public void setGlasswidth(double glasswidth) {
        this.glasswidth = glasswidth;
    }
    public void setGlassheight(double glassheight) {
        this.glassheight = glassheight;
    }
    public void setState(int state) {
        this.state = state;
    }
    public void setTime(String time) {
        this.time = time;
    }
}
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -6,6 +6,9 @@
import com.example.springboot.entity.Glass;
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.north_glass_buffer1_frames;
import com.example.springboot.entity.Out_slice;
import java.util.List;
@@ -32,7 +35,7 @@
  List<StorageCage> selectRack4();
  // 根据任务类型查询当前正在出片,进片的玻璃信息
  @Select("select a.*,concat(round(a.glasswidth*b.conversionrate,2),' x ',round(a.glassheight*b.conversionrate,2)) as lengthwidth from storage_cage as a,conver as b where a.state=#{task_type} limit 1")
  @Select("select *,concat(glasswidth,' x ',glassheight) as lengthwidth from storage_cage where state=#{task_type}")
  List<StorageCage> selectinout(@Param("task_type") Integer task_type);
  // 查询是否存在此订单
@@ -68,7 +71,7 @@
  List<alarmmg> SelectAlarmmgInfo();
  //获取理片笼内玻璃信息
  @Select("select *,concat(round(a.glasswidth*b.conversionrate,2),' x ',round(a.glassheight*b.conversionrate,2)) as lengthwidth from storage_cage  as a,conver as b  ")
  @Select("select *,concat(round(a.glasswidth),' x ',round(a.glassheight)) as lengthwidth from storage_cage as a")
  List<StorageCage> SelectCageInfo(short cage);
  @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null where glass_id=#{glassid}")
@@ -87,28 +90,29 @@
  StorageCage SelectGlassInfo(String glassid);
  //查询玻璃信息
 @Select("select * from glass where glassid=#{glassid}")
  Glass SelectGlassByGlassID(String glassid);
//  @Select("select * from glass where glassid=#{glassid}")
  @Select("SELECT ordernumber,listnumber,boxnumber,barcode,glasslength,glassheight,glasslength_mm,glassheight_mm FROM north_glass_buffer1 where barcode=#{barcode}")
  north_glass_buffer1 SelectGlassByGlassID(String barcode);
  //启用/禁用理片笼格子
  @Update("update storage_cage set disabled=#{disabled} where cage=#{cage} and cell=#{cell}")
  void Disabled(short cage, short cell, short disabled);
  //理片笼新增玻璃
  @Update("update storage_cage set state=1,glass_id=#{glass.glassId},order_id=#{glass.orderId},glasswidth=#{glass.width},glassheight=#{glass.height} where cage=#{cage} and cell=#{cell} and tier=#{tier}")
  void Inglassid(Glass glass, short cage, short cell, short tier);
  @Update("update storage_cage set state=1,glass_id=#{glass.barcode},order_id=#{glass.ordernumber},glasswidth=#{glass.glasslengthMm},glassheight=#{glass.glassheightMm} where cage=#{cage} and cell=#{cell} and tier=#{tier}")
  void Inglassid(north_glass_buffer1 glass, short cage, short cell, short tier);
  //查询理片笼中是否有此玻璃
  @Select("select count(*) from storage_cage where glass_id=#{glassId}")
  short SelectStorageByGlassId(String glassId);
  //根据订单查询玻璃信息
  @Select("select * from glass where position(#{orderid} in orderid)")
  List<Glass> SelectGlass(String orderid);
  @Select("select * from north_glass_buffer1 where position(#{orderid} in ordernumber)")
  List<north_glass_buffer1> SelectGlass(String orderid);
  //获取上片队列信息
  @Select("select gl.* from queue qe inner join glass gl on qe.glassid=gl.glassid where qe.id=#{id}")
  Glass GetQueueInfo(int id);
  @Select("select glassid from queue where id=#{id}")
  String GetQueueInfo(int id);
  //手动添加扫码位玻璃
  @Select("update queue set glassid=#{glassid},state=1 where id=#{id}")
@@ -119,8 +123,48 @@
  void UpdateQueueState();
  //手动添加扫码位玻璃
  @Select("update queue set glassid='' where id=#{id}")
  @Select("update queue set glassid='',state=0 where id=#{id}")
  void DeleteQueueGlass(String id);
  //查询此订单在理片笼里的玻璃数
  @Select("select count(*) from storage_cage where order_id=#{orderid}")
  Short SelectGlassNo(String orderid);
  //根据玻璃id从客户表查询数据
  @Select("select * from north_glass_buffer1 where barcode=#{glassid}")
  north_glass_buffer1 SelectBoxNo(String glassid);
  //查询出片队列信息
  @Select("select * from out_slice where state=0 or state=1")
  List<Out_slice> SelectProductionqueue();
  //根据玻璃id查询笼内玻璃信息
  @Select("select * from storage_cage where glass_id=#{glassid}")
  StorageCage SelectStorageGlassById(String glassid);
  //根据玻璃id删除出片队列玻璃
  @Select("update out_slice set state=3 where id=#{id}")
  void DeleteProductionQueueGlass(Short id);
  //根据铝框id查询对应玻璃信息
  @Select("select * from north_glass_buffer1 where FrameBarcode=#{FrameBarcode}")
  List<north_glass_buffer1> SelectAluminumFrameInfoById(String FrameBarcode);
  //查询根据id查询
  @Select("select b.* from storage_cage a inner join out_slice b on a.glass_id=b.glassId where b.glassId=#{glassId}")
  List<Out_slice> SelectOutSliceById(String glassId);
  //查询玻璃id是否
  @Select("select Flip from north_glass_buffer1_frames where Barcode=#{frameBarcode} limit 1")
  String SelectFlipByFrameBarcode(String frameBarcode);
  //查询玻璃是否已存在于出片队列
  @Select("select * from out_slice where glassid=#{getbarcode} and (state=0 or state=1)")
  Out_slice SelectQueueByglassid(String getbarcode);
  //查询玻璃是否已存在于出片队列
  @Select("INSERT INTO out_slice( `glassId`, `barcode`, `glasswidth`, `glassheight`, `state`, `flip`) VALUES ( #{glassid}, #{FrameNo}, #{glasslengthMm}, #{glassheightMm}, 0, #{flip});")
  void AddOutSliceS(String glassid, String flip, String FrameNo, String glasslengthMm, String glassheightMm);
}
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -1,10 +1,11 @@
package com.example.springboot.mapper;
import org.apache.ibatis.annotations.*;
import com.example.springboot.entity.Glass;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.StorageTask;
import com.example.springboot.entity.north_glass_buffer1;
import java.util.List;
@@ -13,170 +14,139 @@
@Mapper
public interface SpianMapper {
  // 判断相邻笼子是否有空格
  @Select("select COUNT(if(a.state1=0,cell,null))as cell,ROUND(id/2)as id from (select *,max(state)as state1 from storage_cage a  GROUP BY cage,cell)as a where (a.cage=#{cage1}-1 or a.cage=#{cage1}+1)and if(a.cage<6,a.cage>0 and a.cage<6,a.cage>5) GROUP BY cage ORDER BY cell desc LIMIT 1")
  int selectCage(int cage1);
    //判断相邻笼子是否有空格
    @Select("select COUNT(if(a.state1=0,cell,null))as cell,ROUND(id/2)as id from (select *,max(state)as state1 from storage_cage a  GROUP BY cage,cell)as a where (a.cage=#{cage1}-1 or a.cage=#{cage1}+1)and if(a.cage<6,a.cage>0 and a.cage<6,a.cage>5) GROUP BY cage ORDER BY cell desc LIMIT 1")
     int selectCage(int  cage1);
     //@Select("(select*from storage_cage as a  where a.state=0 and cage%2=0 ORDER BY id LIMIT 1)union (select a.* from storage_cage a inner join  (select cage,if(shu2=1,shu3,shu5) as gezi from ( select  cage, count(case when state1=1 and state2=0 then cell else null end)as shu1,  count(case when state1=0 then cell else null end) as shu2, min(case when state1=1 and state2=0 then cell else null end) as shu3, min(case when state1=0 then cell else null end) as shu4, min(case when state1=0 or state2=0 then cell else null end) as shu5 from  (select *,max(state) as state1,min(state) as state2 from storage_cage group by cage,cell) as a where  cage%2!=0  GROUP BY cage HAVING shu2>1 or (shu2=1 and shu1>0)  ) as sss limit 1)as b on a.cage=b.cage and a.cell=b.gezi and a.state=0 order by tier limit 1) ORDER BY id LIMIT 1;")
    //获取订单号排序的空订单笼子
     @Select("select a.cage,COUNT(if(a.order_id=#{orderids},a.order_id,null))as orderid,b.shu,c.shu2,a.cell,min(a.state)as state1 from storage_cage a left join (select COUNT(*)shu,cage from storage_cage  where order_id=#{orderids} GROUP BY cage)as b on a.cage=b.cage left join(select cage ,COUNT(glass_id)as shu2 from storage_cage GROUP BY cage)c  on a.cage=c.cage where (order_id=#{orderids} or ''='') GROUP BY cage,cell HAVING state1=0 ORDER BY shu desc,shu2,cage asc; ")
     List<StorageCage> selectAll(String orderids);
    //获取判断该格子是否需要把外片推入内片位置
     @Select("select state from storage_cage where  cage=#{cage} and cell=#{cell} and tier=1;")
     int selectcell(int cage,int cell);
     //判断该笼子是否有合适宽度空格
     @Select("select cage,cell,tier,id,ROUND(id/2)as prcId,width from storage_cage where cage=#{cage1} and cell=#{cell} and state=0 and width>=#{width} ORDER BY cell asc,tier asc LIMIT 1")
     StorageCage selectCage1(int  cage1,int cell,double width);
     //判断笼子内玻璃数
     @Select("select COUNT(tier)as tier from storage_cage where  cage=#{cage} and cell=#{cell} and state=1;")
     int selectsum(int cage,int cell);
  // @Select("(select*from storage_cage as a where a.state=0 and cage%2=0 ORDER BY
  // id LIMIT 1)union (select a.* from storage_cage a inner join (select
  // cage,if(shu2=1,shu3,shu5) as gezi from ( select cage, count(case when
  // state1=1 and state2=0 then cell else null end)as shu1, count(case when
  // state1=0 then cell else null end) as shu2, min(case when state1=1 and
  // state2=0 then cell else null end) as shu3, min(case when state1=0 then cell
  // else null end) as shu4, min(case when state1=0 or state2=0 then cell else
  // null end) as shu5 from (select *,max(state) as state1,min(state) as state2
  // from storage_cage group by cage,cell) as a where cage%2!=0 GROUP BY cage
  // HAVING shu2>1 or (shu2=1 and shu1>0) ) as sss limit 1)as b on a.cage=b.cage
  // and a.cell=b.gezi and a.state=0 order by tier limit 1) ORDER BY id LIMIT 1;")
  // 获取订单号排序的空订单笼子
  @Select("select a.cage,COUNT(if(a.order_id=#{orderids},a.order_id,null))as orderid,b.shu,c.shu2,a.cell,min(a.state)as state1 from storage_cage a left join (select COUNT(*)shu,cage from storage_cage  where order_id=#{orderids} GROUP BY cage)as b on a.cage=b.cage left join(select cage ,COUNT(glass_id)as shu2 from storage_cage GROUP BY cage)c  on a.cage=c.cage where (order_id=#{orderids} or ''='') GROUP BY cage,cell HAVING state1=0 ORDER BY shu desc,shu2,cage asc; ")
  List<StorageCage> selectAll(String orderids);
    //@Update("update longzi set glass_id = #{glass_id}, width = #{width}, state = #{state} where cell = #{cell}")
    @Update("update longzi set glass_id =123, width =1600, state =1 where cell =24")
     void  update();
     //获取玻璃信息
     @Select("select orderid as ordernumber,width as glasslengthmm from glass where glassid=#{glassid}")
     north_glass_buffer1 selectGlass(String glassid);
    @Insert("insert into storage_task(task_type,task_state,shelf_rack,load_rack)values(#{storage_task},#{task_state},#{shelf_rack},#{load_rack})")
     void insert(StorageTask storageTask);
    //出片任务查询
    @Select("select COUNT(order_id)order_id,cage,cell,glasswidth,tier,ROUND(id/2)as prcId,glass_id from storage_cage a where a.order_id=#{orderId} GROUP BY cage,cell ORDER BY cage desc,order_id desc,cell desc,glasswidth desc limit 1")
     StorageCage selectOut(String  orderId);
    // @Select("select cage,cell,tier,glasswidth,ROUND(id/2)as prcId,id,glass_id from storage_cage as a where a.order_id=#{orderId} and state=1 order by cage desc,tier desc,cell desc LIMIT 1")
    //  StorageCage selectOut(String  orderId);
    //按玻璃ID出片任务查询
    @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 order by cage desc,tier desc,cell desc LIMIT 1")
     StorageCage selectOut2(String  glassid);
  // 判断该笼子是否有合适宽度空格
  @Select("select cage,cell,tier,id,ROUND(id/2)as prcId,width from storage_cage where cage=#{cage1} and cell=#{cell} and state=0 and width>=#{width} ORDER BY cell asc,tier desc LIMIT 1")
  StorageCage selectCage1(int cage1, int cell, double width);
    //判断出片为1时,是否可直接出片
    @Select("select COUNT(state) from storage_cage where cage=#{cage} and cell=#{cell}")
     int selectGlassState(int  cage,int cell);
  // 判断笼子内玻璃数
  @Select("select COUNT(tier)as tier from storage_cage where  cage=#{cage} and cell=#{cell} and state=1;")
  int selectsum(int cage, int cell);
     //判断该调拨的笼子
     @Select("select glass_id,cage,cell,max(state)as shu,ROUND(id/2)as prcid,id from storage_cage where width>=#{width} and cage>#{cage1} and cage<#{cage2} GROUP BY cage,cell HAVING shu=0 order by abs(#{cage} - cage) limit 1;")
     StorageCage selectGlassCage(int cage,double width,int cage1,int cage2);
  // @Update("update longzi set glass_id = #{glass_id}, width = #{width}, state =
  // #{state} where cell = #{cell}")
  @Update("update longzi set glass_id =123, width =1600, state =1 where cell =24")
  void update();
    //删除笼子信息(出片)
    @Update("update storage_cage as a set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=0 where cage=#{cage} and cell=#{cell} and tier=#{tier};")
    void UpdataGlassCage(String orderid,String glassid,double width,int cage,int cell,int tier,int state);
  // 获取玻璃信息
  @Select("select orderid,width from glass where glassid=#{glassid}")
  Glass selectGlass(String glassid);
    //修改笼子信息(进片)
    @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=#{orderid},glasswidth=#{width} where cage=#{cage} and cell=#{cell} and tier=#{tier};")
    void UpdataAddqueCage(String orderid,String glassid,double width,int cage,int cell,int tier,int state);
    //修改同笼子格子宽度
     @Update("update storage_cage set width=width-#{width} where   cage=#{cage} and cell=#{cell};")
    void UpdataAddCage1(double width,int cage,int cell);
    //修改同笼子格子宽度
  @Insert("insert into storage_task(task_type,task_state,shelf_rack,load_rack)values(#{storage_task},#{task_state},#{shelf_rack},#{load_rack})")
  void insert(StorageTask storageTask);
  // 出片任务查询
  @Select("select COUNT(order_id)order_id,cage,cell,glasswidth,tier,ROUND(id/2)as prcId,glass_id from storage_cage a where a.order_id=#{orderId} GROUP BY cage,cell ORDER BY cage desc,order_id desc,cell desc,glasswidth desc limit 1")
  StorageCage selectOut(String orderId);
  // @Select("select cage,cell,tier,glasswidth,ROUND(id/2)as prcId,id,glass_id
  // from storage_cage as a where a.order_id=#{orderId} and state=1 order by cage
  // desc,tier desc,cell desc LIMIT 1")
  // StorageCage selectOut(String orderId);
  // 按玻璃ID出片任务查询
  @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 order by cage desc,tier desc,cell desc LIMIT 1")
  StorageCage selectOut2(String glassid);
  // 判断出片为1时,是否可直接出片
  @Select("select COUNT(state) from storage_cage where cage=#{cage} and cell=#{cell}")
  int selectGlassState(int cage, int cell);
  // 判断该调拨的笼子
  @Select("select glass_id,cage,cell,max(state)as shu,ROUND(id/2)as prcid,id from storage_cage where width>=#{width} and cage>#{cage1} and cage<#{cage2} GROUP BY cage,cell HAVING shu=0 order by abs(#{cage} - cage) limit 1;")
  StorageCage selectGlassCage(int cage, double width, int cage1, int cage2);
  // 删除笼子信息(出片)
  @Update("update storage_cage as a set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=0 where cage=#{cage} and cell=#{cell} and tier=#{tier};")
  void UpdataGlassCage(String orderid, String glassid, double width, int cage, int cell, int tier, int state);
  // 修改笼子信息(进片)
  @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=#{orderid},glasswidth=#{width} where cage=#{cage} and cell=#{cell} and tier=#{tier};")
  void UpdataAddqueCage(String orderid, String glassid, double width, int cage, int cell, int tier, int state);
  // 修改同笼子格子宽度
  @Update("update storage_cage set width=width-#{width} where   cage=#{cage} and cell=#{cell};")
  void UpdataAddCage1(double width, int cage, int cell);
  // 修改同笼子格子宽度
  @Update("update storage_cage set state=#{state} where   state=#{oldstate};")
  void UpdataAddCageState(int state, int oldstate);
  // 修改同笼子格子宽度(出片)
  @Update("update storage_cage set width=width+#{width} where   cage=#{cage} and cell=#{cell};")
  void UpdataOutCage1(double width, int cage, int cell);
  // 调拨更换笼子信息
  @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=2)as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth where a.id=#{id1}")
  void UpdateDBCage(int id1, int cage, int cell);
  // @Insert("insert into user(name, date, address, user_no) values (#{name},
  // #{date}, #{address}, #{userNo})")
  // void insert (Spian spian);
  // 新增任务表
  @Insert("INSERT INTO `canadames`.`storage_task`(`task_type`, `task_state`, `shelf_rack`, `load_rack`,start_time,glass_id) VALUES (#{tasktype},#{taskstate},#{shelfrack},#{loadrack},now(),#{glassid});")
  void Inserttask(int tasktype, int taskstate, int shelfrack, int loadrack, String glassid);
  // 修改任务表
  @Update("update storage_task set task_state=#{state} where task_type=#{type} and task_state=0;")
  void Updatetask(int state, int type);
  // 修改任务表
  @Update("update storage_task set task_state=1 where (task_type=1 or task_type=2) and task_state=0;")
  void UpdatetaskOut();
  // 查询按订单出片
  @Select("select order_id state from order_out where state=0")
  String SelectOrderout();
  // 内外片调换
  @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=2)as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth where a.cage=#{cage} and a.cell=#{cell} and a.tier=1")
  void UpdateDBCage1(int cage, int cell);
  // 清除内片数据
  @Update("update storage_cage set glass_id='',order_id='',state=0,glasswidth=0 where a.cage=#{cage} and a.cell=#{cell} and a.tier=1;")
  void UpdateDBCage2(int cage, int cell);
  // 判断是否有调拨完后出片的任务
  @Select("select COUNT(*)as id,glass_id from storage_task where (task_type=1 or task_type=2) and task_state=0;")
  Glass SelectDBOut();
  // 根据笼子格子层数获取玻璃id
  @Select("select glass_id from storage_cage where cage=#{cage} and cell=#{cell} and tier=2;")
  String SelectGlassid(int cage, int cell);
  // 根据笼子格子层数获取玻璃id
  @Select("SELECT COUNT(*) FROM `storage_cage` where state=3;")
  Integer Selectoutstate();
  // 添加任务序列
  // 获取进片队列id
  @Insert("INSERT INTO `canadames`.`queue`(`glassid`, `type`, `state`,width) VALUES (#{glassid},#{type},0,#{width});")
  void insertqueue(String glassid, int type, double width);
  // 获取任务序列
  @Select("select glassid,orderid,width,type from queue where state=#{state}")
  StorageCage SelectQueue(int state);
  // 获取序列表的玻璃宽
  @Select("select sum(width)+400 as width,orderid from queue where state=0 limit 1")
  StorageCage SelectQueueWidth();
  // 判断该笼子是否有合适完整空格
  @Select("select cage,cell,tier,id,ROUND(id/2)as prcId,width,max(state)state1 from storage_cage where cage=#{cage1} and cell=#{cell} and state=0 and width>=#{width} HAVING state1=0 ORDER BY cell asc,tier desc LIMIT 1")
  StorageCage selectqueCage1(int cage1, int cell, double width);
  // 获取序列表的玻璃
  @Select("select glassid,orderid,width from queue where state=0 and type=#{type}")
  Glass SelectQueueGlass(int type);
  // 多片出库清除一整个空格
  @Update("update storage_cage set glass_id='',order_id='',glasswidth=0,width=2750,state=0 where cage=#{cage} and cell=#{cell}")
  void UpdatequeOut(int cage, int cell);
  // 判断序列表里的玻璃是否是同一订单
  @Select("select  COUNT(distinct orderid) from queue ")
  int SelectQueOrder();
  // 寻找可以多片出片的玻璃
  @Select("select cage,cell,ROUND(id/2)as prcId,width,count(glass_id)shu from storage_cage where order_id=#{orderid} and (cage!=#{cage} or cell!=#{cell}) GROUP BY cage,cell HAVING shu=1 ORDER BY cage desc,cell desc limit 1")
  StorageCage SelectQueout(String orderid, int cage, int cell);
  // 获取进片队列id
  @Select("select glassid from queue where type=1")
  String Selectqueueid();
  // 获取进片队列id
  @Select("select state from queue where type=1")
  String Selectqueuestate();
}
     @Update("update storage_cage set state=#{state} where   state=#{oldstate};")
    void UpdataAddCageState(int state,int oldstate);
    //修改同笼子格子宽度(出片)
     @Update("update storage_cage set width=width+#{width} where   cage=#{cage} and cell=#{cell};")
    void UpdataOutCage1(double width,int cage,int cell);
    //调拨更换笼子信息
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=#{tier})as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth where a.id=#{id1}")
    void UpdateDBCage(int id1,int cage,int cell,int tier);
    // @Insert("insert into user(name, date, address, user_no) values (#{name}, #{date}, #{address}, #{userNo})")
    // void insert (Spian spian);
    //新增任务表
    @Insert("INSERT INTO `canadames`.`storage_task`(`task_type`, `task_state`, `shelf_rack`, `load_rack`,start_time,glass_id) VALUES (#{tasktype},#{taskstate},#{shelfrack},#{loadrack},now(),#{glassid});")
    void Inserttask(int tasktype,int taskstate,int shelfrack,int loadrack,String glassid);
    //修改任务表
    @Update("update storage_task set task_state=#{state} where task_type=#{type} and task_state=0;")
    void Updatetask(int state,int type);
    //修改任务表
    @Update("update storage_task set task_state=1 where (task_type=1 or task_type=2) and task_state=0;")
    void UpdatetaskOut();
    //查询按订单出片
    @Select("select order_id state from order_out where state=0")
    String  SelectOrderout();
    //内外片调换
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=2)as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth where a.cage=#{cage} and a.cell=#{cell} and a.tier=1")
    void UpdateDBCage1(int cage,int cell);
    //清除内片数据
    @Update("update storage_cage set glass_id='',order_id='',state=0,glasswidth=0 where a.cage=#{cage} and a.cell=#{cell} and a.tier=1;")
    void UpdateDBCage2(int cage,int cell);
    //判断是否有调拨完后出片的任务
    @Select("select COUNT(*)as id,glass_id as barcode from storage_task where (task_type=1 or task_type=2) and task_state=0;")
    north_glass_buffer1 SelectDBOut();
    //根据笼子格子层数获取玻璃id
     @Select("select glass_id from storage_cage where cage=#{cage} and cell=#{cell} and tier=2;")
     String SelectGlassid(int cage,int cell);
     //根据笼子格子层数获取玻璃id
     @Select("SELECT COUNT(*) FROM `storage_cage` where state=3;")
     Integer Selectoutstate();
     //添加任务序列
     //获取进片队列id
     @Insert("INSERT INTO `canadames`.`queue`(`glassid`, `type`, `state`,width) VALUES (#{glassid},#{type},0,#{width});")
     void insertqueue(String glassid,int type,double width);
     //获取任务序列
     @Select("select glassid,orderid,width,type from queue where state=#{state}")
     StorageCage SelectQueue(int state);
     //获取序列表的玻璃宽
     @Select("select sum(width)+400 as width,orderid from queue where state=0 limit 1")
     StorageCage SelectQueueWidth();
    //判断该笼子是否有合适完整空格
     @Select("select cage,cell,tier,id,ROUND(id/2)as prcId,width,max(state)state1 from storage_cage where cage=#{cage1} and cell=#{cell} and state=0 and width>=#{width} HAVING state1=0 ORDER BY cell asc,tier desc LIMIT 1")
     StorageCage selectqueCage1(int  cage1,int cell,double width);
     //获取序列表的玻璃
     @Select("select glassid as barcode,orderid as ordernumber,width as glasslengthmm from queue where state=0 and type=#{type}")
     north_glass_buffer1 SelectQueueGlass(int type);
     //多片出库清除一整个空格
     @Update("update storage_cage set glass_id='',order_id='',glasswidth=0,width=2750,state=0 where cage=#{cage} and cell=#{cell}")
     void UpdatequeOut(int cage,int cell);
     //判断序列表里的玻璃是否是同一订单
     @Select("select  COUNT(distinct orderid) from queue ")
     int SelectQueOrder();
     //寻找可以多片出片的玻璃
     @Select("select cage,cell,ROUND(id/2)as prcId,width,count(glass_id)shu from storage_cage where order_id=#{orderid} and (cage!=#{cage} or cell!=#{cell}) GROUP BY cage,cell HAVING shu=1 ORDER BY cage desc,cell desc limit 1")
     StorageCage SelectQueout(String orderid,int cage,int cell);
     //获取进片队列id
     @Select("select glassid from queue where type=1")
     String Selectqueueid();
     //获取进片队列id
     @Select("select state from queue where type=1")
     String Selectqueuestate();
     //判断铝框出片表是否有玻璃需要出
     @Select("SELECT * FROM `out_slice` where state=0 or state=0 order by id limit 1;")
     String SelectOutSlice();
     //判断铝框出片表是否有玻璃正在出片中
     @Select("SELECT count(*) FROM `out_slice` where state=1 or state=0 order by id limit 1;")
     int SelectOutSliceshu();
}
springboot-vue3/src/main/java/com/example/springboot/security/config/ShiroConfig.java
@@ -1,5 +1,5 @@
package com.example.springboot.security.config;
import com.example.springboot.security.JWTRealm;
import com.example.springboot.security.NoSessionFilter;
import com.example.springboot.security.StatelessDefaultSubjectFactory;
@@ -18,17 +18,17 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import javax.servlet.Filter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
@Configuration
public class ShiroConfig {
    /**
     * Shiro生命周期处理器
     *
@@ -38,7 +38,7 @@
    public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
        return new LifecycleBeanPostProcessor();
    }
    /**
     * 开启Shiro的注解(如@RequiresRoles,@RequiresPermissions),需借助SpringAOP扫描使用Shiro注解的类,并在必要时进行安全逻辑验证
     * DefaultAdvisorAutoProxyCreator的顺序必须在shiroFilterFactoryBean之前,不然SecurityUtils.getSubject().getPrincipal()获取不到参数
@@ -52,24 +52,24 @@
        advisorAutoProxyCreator.setProxyTargetClass(true);
        return advisorAutoProxyCreator;
    }
    @Bean
    public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor() {
        AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor();
        authorizationAttributeSourceAdvisor.setSecurityManager(defaultSecurityManager());
        return authorizationAttributeSourceAdvisor;
    }
    @Bean(name = "shiroFilterFactoryBean")
    public ShiroFilterFactoryBean shiroFilterFactoryBean() {
        ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
        shiroFilterFactoryBean.setSecurityManager(defaultSecurityManager());
        // 过滤规则
        Map<String, String> linkedHashMap = new LinkedHashMap<>();
        // 无状态登录情况下关闭了shiro中的session,导致所有需要加上authc接口请求时候都会报错,
        // 所以使用@RequiresRoles,@RequiresPermissions注解,aop方式实现接口的权限校验
        /* 添加shiro的内置过滤器,自定义url规则
         * Shiro自带拦截器配置规则
         * rest:比如/admins/user/**=rest[user],根据请求的方法,相当于/admins/user/**=perms[user:method] ,其中method为post,get,delete等
@@ -110,7 +110,7 @@
//        // 授权的权限
//        linkedHashMap.put("/api/rolePermission/saveOrUpdate", "perms[rolePermission:add]");
//        linkedHashMap.put("/api/rolePermission/removeByIds", "perms[rolePermission:delete]");
        // 自定义过滤器
        HashMap<String, Filter> filterHashMap = new HashMap<>();
        filterHashMap.put("jwt", new NoSessionFilter());
@@ -120,7 +120,7 @@
        shiroFilterFactoryBean.setFilterChainDefinitionMap(linkedHashMap);
        return shiroFilterFactoryBean;
    }
    @Bean
    public DefaultWebSecurityManager defaultSecurityManager() {
        DefaultWebSecurityManager defaultWebSecurityManager = new DefaultWebSecurityManager();
@@ -134,7 +134,7 @@
        defaultWebSecurityManager.setSubjectFactory(subjectFactory());
        return defaultWebSecurityManager;
    }
    /**
     * 登录的认证和授权
     *
@@ -146,7 +146,7 @@
        userRealm.setCredentialsMatcher(hashedCredentialsMatcher());
        return userRealm;
    }
    /**
     * token的认证和授权
     *
@@ -156,12 +156,12 @@
    public JWTRealm jwtRealm() {
        return new JWTRealm();
    }
    @Bean
    public StatelessDefaultSubjectFactory subjectFactory() {
        return new StatelessDefaultSubjectFactory();
    }
    /*
     * 凭证匹配器 由于我们的密码校验交给Shiro的SimpleAuthenticationInfo进行处理了
     */
@@ -172,7 +172,7 @@
        hashedCredentialsMatcher.setHashIterations(1024);// 散列的次数,比如散列两次,相当于MD5(MD5(""));
        return hashedCredentialsMatcher;
    }
    @Bean
    public CookieRememberMeManager cookieRememberMeManager() {
        CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager();
springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java
@@ -9,6 +9,7 @@
import org.springframework.stereotype.Component;
import com.example.springboot.entity.Glass;
import com.example.springboot.entity.north_glass_buffer1;
@Component
public class JdbcConnections {
    /**
@@ -24,15 +25,15 @@
    private static PreparedStatement ps = null;
    private static ResultSet rs = null;
    
    public  Glass selectGlass(int glassid) throws SQLException {
    public  north_glass_buffer1 selectGlass(int glassid) throws SQLException {
        conn = getConn();
        Glass glass=new Glass();
        String sql = "select orderid from glass where glassid=?";
        north_glass_buffer1 glass=new north_glass_buffer1();
        String sql = "select ordernumber from north_glass_buffer1 where glassid=?";
         ps = conn.prepareStatement(sql);
         ps.setInt(1, glassid);
         rs= ps.executeQuery();
         while (rs.next()) {
            glass.setOrderId(rs.getString("orderid"));
            glass.setordernumber(rs.getString("ordernumber"));
         }
         conn.close();
         return glass;
springboot-vue3/src/main/java/com/example/springboot/service/OutSlice.java
New file
@@ -0,0 +1,66 @@
package com.example.springboot.service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import com.example.springboot.entity.Out_slice;
public class OutSlice {
    // public static List<Out_slice> Groupbyresult(List<Out_slice> out_slices) {
    //     // 传入一个集合 进行分组条件分组
    //     List<Out_slice> resultlist = new ArrayList<Out_slice>();
    //     HashMap map = new HashMap<>();
    //     // HashMap<String,List<Out_slice>> map=new HashMap<String,List<Out_slice>>();
    //     for (Out_slice out_slice : out_slices) {
    //         String key_ = out_slice.getState() + "-";
    //         if (map.get(key_) == null) {
    //             List<Out_slice> lists = new ArrayList<Out_slice>();
    //             lists.add(out_slice);
    //             map.put(key_, lists);
    //         } else {
    //             List<Out_slice> lists = (List<Out_slice>) map.get(key_);
    //             lists.add(out_slice);
    //             map.put(key_, lists);
    //         }
    //     }
    //     return resultlist;
    // }
    // public static List<Out_slice> Orderbyresult(List<Out_slice> out_slices, int orders) {
    //     // orders 排序模式
    //     List<Out_slice> list = new ArrayList<Out_slice>();
    //     for (Out_slice out_slice : out_slices) {
    //         if (list.isEmpty()) {
    //             list.add(out_slice);
    //         } else {
    //             for (int i = 0; i < list.size(); i++) {
    //                 Out_slice out_slice2 = list.get(i);
    //                 if (out_slice.getID() > out_slice2.getID()) {
    //                     continue;
    //                 } else {
    //                     list.add(i, out_slice2);
    //                 }
    //             }
    //         }
    //     }
    // }
    // public static void f() {
    //     HashMap map = new HashMap<>();
    //     for (Out_slice out_slice : listoutslice) {
    //         String key_ = out_slice.getState() + "-";
    //         if (map.get(key_) == null) {
    //             List<Out_slice> lists = new ArrayList<Out_slice>();
    //             lists.add(out_slice);
    //             map.put(key_, lists);
    //         } else {
    //             List<Out_slice> lists = (List<Out_slice>) map.get(key_);
    //             lists.add(out_slice);
    //             map.put(key_, lists);
    //         }
    //     }
    // }
}
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
@@ -1,6 +1,7 @@
package com.example.springboot.service;
import java.lang.reflect.Array;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
@@ -11,6 +12,7 @@
import com.example.springboot.component.S7control;
import com.example.springboot.entity.Glass;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.mapper.SpianMapper;
import com.google.common.primitives.Bytes;
@@ -33,12 +35,12 @@
        double width;
        double minwidth = 0;
        Glass glasslist = spianMapper.selectGlass(glassid); // 获取玻璃参数
        north_glass_buffer1 glasslist = spianMapper.selectGlass(glassid); // 获取玻璃参数
        if (glasslist == null) {
            return (300);
        }
        double widths = glasslist.getwidth();
        String orderids = glasslist.getOrderId();
        double widths = glasslist.getglasslengthmm();
        String orderids = glasslist.getordernumber();
        List<String> adddresslist = new ArrayList<>();
        adddresslist.add("DB105.0");// 进片车起始位置
@@ -74,20 +76,33 @@
                cells = cages1.getCell();// 格子号
                prcid = cages1.getPrcId();// 传给prc的目标地id
                width = cages1.getWidth();// 格子剩余宽度
                widths = glasslist.getwidth();
                widths = glasslist.getglasslengthmm();
                // 执行进片
                datas.add((short) 1000);
                datas.add((short) prcid);
                datas.add((short) prctier);
                datas.add((short) 1);
                // 数据库修改笼子表新增一条玻璃
                datas.add((short) 1);
                //获取该格子内是否有玻璃
                int cellint=spianMapper.selectcell(cage1,cells);
                if(cellint==1){
                    //将外片玻璃的数据更新到内片
                    spianMapper.UpdateDBCage(ids, cage1, cells,1);
                    //将新入的玻璃存入外片
                    spianMapper.UpdataAddCage(orderids.toString(), glassid, widths, cage1, cells, ids-1, 2);
                    spianMapper.UpdataAddCage1(widths, cage1, cells);// 减少格子宽度
                    spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString());// 新增任务
                    S7control.getinstance().WriteWord(adddresslist, datas);
                }else{
                 // 数据库修改笼子表新增一条玻璃
                spianMapper.UpdataAddCage(orderids.toString(), glassid, widths, cage1, cells, ids, 2);
                spianMapper.UpdataAddCage1(widths, cage1, cells);// 减少格子宽度
                spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString());// 新增任务
                S7control.getinstance().WriteWord(adddresslist, datas);
                // S7control.getinstance().WriteByte("DB105.16",glassid);
                }
                return (200);
            }
@@ -118,7 +133,6 @@
        double widths = queGlass.getWidth();
        String orderids = queGlass.getOrderId();
        int num = spianMapper.SelectQueOrder();
        if (num == 1) {
            // 获取订单相关度最高的笼子排序
@@ -142,12 +156,12 @@
                    prcid = cages1.getPrcId();// 传给prc的目标地id
                    // 数据库修改笼子表新增一条玻璃
                    for (int i = 2; i > 0; i--) {
                        Glass qglass = spianMapper.SelectQueueGlass(i);
                        width = qglass.getwidth();// 格子剩余宽度
                        spianMapper.UpdataAddqueCage(qglass.getOrderId(), qglass.getGlassId(), width, cage1, cells, i,
                        north_glass_buffer1 qglass = spianMapper.SelectQueueGlass(i);
                        width = qglass.getglasslengthmm();// 格子剩余宽度
                        spianMapper.UpdataAddqueCage(qglass.getordernumber(), qglass.getbarcode(), width, cage1, cells, i,
                                1);
                        spianMapper.UpdataAddCage1(width, cage1, cells);// 减少格子宽度
                        spianMapper.Inserttask(0, 0, 1000, ids, qglass.getGlassId().toString());// 新增任务
                        spianMapper.Inserttask(0, 0, 1000, ids, qglass.getbarcode().toString());// 新增任务
                    }
                    // 执行进片
                    datas.add((short) 1000);
@@ -163,10 +177,10 @@
        } else {
            for (int i = 2; i > 0; i--) {
                Glass qglass = spianMapper.SelectQueueGlass(i);
                String orderid = qglass.getOrderId().toString();
                String glassid = qglass.getGlassId();
                widths = qglass.getwidth();
                north_glass_buffer1 qglass = spianMapper.SelectQueueGlass(i);
                String orderid = qglass.getordernumber().toString();
                String glassid = qglass.getbarcode();
                widths = qglass.getglasslengthmm();
                List<StorageCage> storageCage = spianMapper.selectAll(orderid);
                if (storageCage == null) {
                    return (400);
@@ -192,7 +206,7 @@
                        cells = cages1.getCell();// 格子号
                        prcid = cages1.getPrcId();// 传给prc的目标地id
                        width = cages1.getWidth();// 格子剩余宽度
                        widths = qglass.getwidth();
                        widths = qglass.getglasslengthmm();
                        // 执行进片
                        datas.add((short) 1000);
@@ -327,7 +341,7 @@
                        datas.add((short) 1);
                        // 更换玻璃的笼子
                        String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id
                        spianMapper.UpdateDBCage(ids, cage, cell);// 将原格子数据更新到新格子里
                        spianMapper.UpdateDBCage(ids, cage, cell,2);// 将原格子数据更新到新格子里
                        spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度
                        spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
                        spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 3);// 清除被调拨格子数据
@@ -354,7 +368,7 @@
                        datas.add((short) 2);
                        datas.add((short) 1);
                        String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id
                        spianMapper.UpdateDBCage(ids, cage, cell);// 将原格子数据更新到新格子里
                        spianMapper.UpdateDBCage(ids, cage, cell,2);// 将原格子数据更新到新格子里
                        spianMapper.Inserttask(2, 0, cageout.getId(), ids, orderid);// 新增调度任务
                        spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度
                        spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
@@ -373,7 +387,7 @@
    }
    // @GetMapping("/all2")
    public Short selectout2(String glassid) {
        // spianMapper.UpdatetaskOut(); //完成上一次出片或者调度任务,改到plchold里,出片或调度任务完成立即改变结束任务;
        // 定义PRC数据传送数组
@@ -417,7 +431,7 @@
                spianMapper.UpdateDBCage2(cage, cell);// 清除内片数据
            }
            S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务
            //outmesid(glassid);// 派发出片ID
            outmesid(glassid);// 派发出片ID
            return (200);// 结束
        } else {
@@ -433,7 +447,7 @@
                spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 新增任务
                spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
                spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, tier, 3);// 清除格子玻璃信息
                //outmesid(glassid);// 派发出片ID
                outmesid(glassid);// 派发出片ID
                S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务
                return (200);// 结束
@@ -458,7 +472,7 @@
                    datas.add((short) 1);
                    // 更换玻璃的笼子
                    String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id
                    spianMapper.UpdateDBCage(ids, cage, cell);// 将原格子数据更新到新格子里
                    spianMapper.UpdateDBCage(ids, cage, cell,2);// 将原格子数据更新到新格子里
                    spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度
                    spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
                    spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 3);// 清除被调拨格子数据
@@ -488,7 +502,7 @@
                    String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id
                    spianMapper.Inserttask(2, 0, cageout.getId() + 1, ids, glassid);// 新增调度任务
                    spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 新增出片任务
                    spianMapper.UpdateDBCage(ids, cage, cell);// 将原格子数据更新到新格子里
                    spianMapper.UpdateDBCage(ids, cage, cell,2);// 将原格子数据更新到新格子里
                    spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度
                    spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
                    spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 3);// 清除被调拨格子数据
@@ -503,7 +517,7 @@
        }
    }
    //派发调拨任务玻璃id
    public void outmesid(String glassid) {
        System.out.println("outmesid:" + glassid);
        List<Byte> glassidlist = new ArrayList();
@@ -514,23 +528,26 @@
        System.out.println("outmesidbytes:" + bytes.length);
        S7control.getinstance().WriteByte("DB105.30", bytes);// 派发出片id
    }
    /*** 修改用户* @throws SQLException */
    // public static int updateUser(Glass user) throws SQLException {conn =
    // getConn();
    // String sql = "update t_user set name=?,gender=?,age=?,score=?"+ " where
    // id=?";ps = conn.prepareStatement(sql);
    // ps.setString(1, user.getName());ps.setString(2, user.getGender());
    // ps.setInt(3, user.getAge());ps.setDouble(4, user.getScore());ps.setInt(5,
    // user.getId());return ps.executeUpdate();}
    // /*** 增加用户* @throws SQLException */
    // public static int insertUser(User user) throws SQLException {
    // conn = getConn();
    // String sql = "insert into t_user(name,gender,age,score)"+ " values(?,?,?,?)";
    // ps = conn.prepareStatement(sql);ps.setString(1,
    // user.getName());ps.setString(2, user.getGender());
    // ps.setInt(3, user.getAge());ps.setDouble(4, user.getScore());return
    // ps.executeUpdate();
    // }
    //获取地址内的玻璃id转字符串
    public StringBuilder queGlassid(String address) {
        StringBuilder writedstrIdOut = new StringBuilder();
        byte[] writedglassidbytesOut = S7control.getinstance().ReadByte(address, 13);
      if (writedglassidbytesOut != null) {
        // 获取玻璃id
        for (byte iditem : writedglassidbytesOut) {
          writedstrIdOut.append((char) iditem);
        }
      }
        return writedstrIdOut;
    }
    //char数组转化成bit数组
       public static byte[] toBytes(char[] chars) {
        String s = new String(chars);
        return s.getBytes(StandardCharsets.UTF_8);
    }
    //bit数组转化成char数组
    public static char[] toChars(byte[] bytes) {
        String s = new String(bytes, StandardCharsets.UTF_8);
        return s.toCharArray();
    }
}