Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
# Conflicts:
# CanadaMes-ui/src/lang/locales/zh-CN.json
# springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
调整主界面
New file |
| | |
| | | { |
| | | // 使用 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" |
| | | } |
| | | ] |
| | | } |
New file |
| | |
| | | { |
| | | "java.debug.settings.onBuildFailureProceed": true |
| | | } |
| | |
| | | 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
|
| | | })
|
| | | }
|
New file |
| | |
| | | { |
| | | "action": [ |
| | | { |
| | | "name": "D01 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "D02 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "D03 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "D04 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "D05 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "D06 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "A01 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "A02 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "B01 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "B02 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TURN JOG+" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TURN JOG-" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TRAVEL JOG+" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TRAVEL JOG-" |
| | | }, |
| | | { |
| | | "name": "B01 SERVE TRAVEL JOG+" |
| | | }, |
| | | { |
| | | "name": "B02 SERVE TRAVEL JOG-" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TURN POS" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TURN POS" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TRAVEL POS" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TRAVEL POS" |
| | | }, |
| | | { |
| | | "name": "B01 SERVE TRAVEL POS" |
| | | }, |
| | | { |
| | | "name": "B02 SERVE TRAVEL POS" |
| | | }, |
| | | { |
| | | "name": "B01 YV TURN" |
| | | }, |
| | | { |
| | | "name": "B01 YV UP DOWN" |
| | | }, |
| | | { |
| | | "name": "B02 YV TURN" |
| | | }, |
| | | { |
| | | "name": "B02 YV UP DOWN" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB2.0.0", |
| | | "count": 26 |
| | | } |
| | | ] |
| | | } |
New file |
| | |
| | | { |
| | | "para": [ |
| | | { |
| | | "name": "conveyor Velocity(Auto FAST)", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "unit": "m/min" |
| | | }, |
| | | { |
| | | "name": "conveyor Velocity(Auto SLOW)", |
| | | "read": 11, |
| | | "sending": 0, |
| | | "unit": "m/min" |
| | | }, |
| | | { |
| | | "name": "conveyor Velocity(Manual)", |
| | | "read": 22, |
| | | "sending": 0, |
| | | "unit": "m/min" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TURN JOG Velocity", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TRAVEL JOG Velocity", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "B01 B02 TRAVEL JOG Velocity", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TURN POS Velocity AUTO", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TURN POS Velocity manual", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TRAVEL POS Velocity AUTO", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TRAVEL POS Velocity manual", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "B01 B02 TRAVEL POS Velocity AUTO", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "B01 B02 TRAVEL POS Velocity manual", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB100.0", |
| | | "count": 12 |
| | | }, |
| | | { |
| | | "name": "DB100.0", |
| | | "count": 12 |
| | | } |
| | | ] |
| | | } |
New file |
| | |
| | | { |
| | | "sign": [ |
| | | { |
| | | "name": "D01.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D01.SR in pos", |
| | | "value": "0", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D02.SR dec", |
| | | "value": "0", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D02.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D03.SR into", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D03.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D03.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D04.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D04.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D05.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D05.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D06.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D06.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR in dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR in in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR turn on", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR turn off", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR up", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR down", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR out dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR out in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR in dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR in in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR turn on", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR turn off", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR up", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR down", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR in safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR out safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.start(+)", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.stop(1)", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.reset", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.auto/manul", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.pause", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.emg", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D01.SB.start", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D06.SB.start", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR in safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.requset", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.confirm", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.reset", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "LED.red", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "LED.green", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "LED.yellow", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D01.LED.green", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D06.LED.green", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.YV.turn", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.YV.up down", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.YV.gassing", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.YV.turn", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.YV.up down", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.YV.gassing", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.led", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.open", |
| | | "value": "1", |
| | | "state": "1" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB102.0.0", |
| | | "count": 58 |
| | | } |
| | | ] |
| | | } |
New file |
| | |
| | | { |
| | | "state": [ |
| | | { |
| | | "name": "D01.State" |
| | | }, |
| | | { |
| | | "name": "D02.State" |
| | | }, |
| | | { |
| | | "name": "B01.State" |
| | | }, |
| | | { |
| | | "name": "B02.State" |
| | | }, |
| | | { |
| | | "name": "A01.State" |
| | | }, |
| | | { |
| | | "name": "A02.State" |
| | | }, |
| | | { |
| | | "name": "D03.State" |
| | | }, |
| | | { |
| | | "name": "D04.State" |
| | | }, |
| | | { |
| | | "name": "D05.State" |
| | | }, |
| | | { |
| | | "name": "D06.State" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB103.0", |
| | | "count": 10 |
| | | } |
| | | ] |
| | | } |
| | |
| | | "Alarm Information":"Alarm Information",
|
| | | "Cage Details":"Cage Details",
|
| | | "order":"order",
|
| | | "length":"length",
|
| | | "width":"width",
|
| | | "Length":"Length",
|
| | | "Width":"Width",
|
| | | "Operate":"Operate",
|
| | | "Terminate Task":"Terminate Task",
|
| | | "cancel":"cancel",
|
| | | "confirm":"confirm",
|
| | | "number":"number",
|
| | | "Number":"Number",
|
| | | "Outfeed glass barcode":"Outfeed glass barcode",
|
| | | "Infeed glass barcode’":"Infeed glass barcode’",
|
| | | "Infeed glass barcode":"Infeed glass barcode",
|
| | | "Cage No":"Cage No",
|
| | | "Slot No":"Slot No",
|
| | | "Order Nmuber":"Order Nmuber",
|
| | | "Dim":"Dim",
|
| | | "id":"id",
|
| | | "content":"content",
|
| | |
| | | "endTime":"endTime",
|
| | |
|
| | | "The Side":"The Side",
|
| | | "Barcodid":"Barcodid",
|
| | | "barcode":"barcode",
|
| | | "Order No":"Order No",
|
| | | "List No":"List No",
|
| | | "Box No":"Box No",
|
| | | "delete":"delete",
|
| | | "out":"out",
|
| | | "Delete":"Delete",
|
| | | "Out":"Out",
|
| | |
|
| | | "Operation successful":"Operation successful",
|
| | | "Operation canceled":"Operation canceled",
|
| | |
| | | "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",
|
| | |
|
| | |
|
| | |
| | | "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",
|
| | |
| | | "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"
|
| | |
|
| | | } |
| | |
| | | "langResetButton": "重置",
|
| | | "langCancelButton": "取消",
|
| | | "langRegisterSuccessMessage": "注册成功",
|
| | |
|
| | | "添加用户成功":"添加用户成功",
|
| | | "confirmResetPassword": "确认重置密码为默认值吗?",
|
| | | |
| | | "confirm": "确定",
|
| | | "cancel": "取消",
|
| | | "passwordResetSuccess": "密码已重置为默认值",
|
| | |
| | | "editUserSuccess": "修改用户成功",
|
| | | "effective": "有效",
|
| | | "invalid": "无效",
|
| | |
|
| | | "addSuccessMessage": "添加成功",
|
| | | "deleteConfirmMessage": "确定要删除该权限吗?",
|
| | |
|
| | | "confirmButtonText": "确定",
|
| | | "cancelButtonText": "取消",
|
| | | "deleteSuccessMessage": "删除成功",
|
| | | "deleteCancelledMessage": "已取消删除操作",
|
| | |
|
| | |
|
| | |
|
| | | "Enter the glass barcode":"输入玻璃id",
|
| | | "Manually Infeed Glass":"手动上片",
|
| | | "Infeed Barcodeid": "手动上片",
|
| | | "Enter the order number": "输入订单号",
|
| | | "Exit the glass by order number":"按订单出片",
|
| | | "Please confirm the glass information":"请确认玻璃信息",
|
| | | "Please confirm the Ordering Information":"请确认订单信息",
|
| | | "Alarm Information":"报警信息",
|
| | | "Cage Details":"理片笼详情",
|
| | | "order":"订单",
|
| | | "length":"长",
|
| | | "width":"宽",
|
| | | "Length": "长",
|
| | | "Width": "宽",
|
| | | "Operate":"操作",
|
| | | "Terminate Task":"完成任务",
|
| | | "cancel":"取消",
|
| | | "confirm":"确认",
|
| | | "number":"数量",
|
| | | "Terminate Task":"结束任务",
|
| | | "end task": "完成任务",
|
| | | "Number": "数量",
|
| | | "Outfeed glass barcode":"出片玻璃id",
|
| | | "Cage No’":"进片玻璃id",
|
| | | "The Cage number being used":"笼子",
|
| | | "Slot No":"格子",
|
| | | "Infeed glass barcode": "进片玻璃id",
|
| | | "Order No":"订单编号",
|
| | | "List No":"列表编号",
|
| | | "Box No":"箱子编号",
|
| | |
| | | "content":"内容",
|
| | | "timeon":"报警时间",
|
| | | "endTime":"结束时间",
|
| | |
|
| | | "Cage No": "笼子",
|
| | | "The Side":"内外侧",
|
| | | "Barcodid":"玻璃id",
|
| | | "Order Number":"订单",
|
| | | "delete":"删除",
|
| | | "out":"出片",
|
| | |
|
| | | "Slot No": "格子",
|
| | | "Barcode": "玻璃id",
|
| | | "Delete": "删除",
|
| | | "Out": "出片",
|
| | | "Operation successful":"操作成功",
|
| | | "Operation canceled":"操作取消",
|
| | | "There is no such order":"没有此订单的玻璃",
|
| | |
| | | "alacontent": "报警内容",
|
| | | "time-on": "开始时间",
|
| | | "End-Time": "结束时间",
|
| | |
|
| | | "Please enter the password":"请输入密码",
|
| | | "Password error":"密码错误",
|
| | | "DataBase Connection failed":"数据库连接失败",
|
| | | "Distribute parameters":"下发参数",
|
| | | "The glass size is not within the range":"玻璃尺寸不在范围内",
|
| | | "increase":"添加",
|
| | | "Increase": "添加",
|
| | | "Enable":"启用",
|
| | | "Disable":"禁用",
|
| | | "Usage":"使用率",
|
| | |
| | | "Clear Current":"清除当前",
|
| | | "Confirm Modification":"确认修改",
|
| | | "The glass ID already exists in the loading queue":"上片队列已存在此玻璃id",
|
| | | "This glass ID already exists in the sorting cage":"理片笼内已存在此玻璃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)": "皮带输送自动慢速",
|
| | | "conveyor Velocity(Manual)": "皮带输送手动速度",
|
| | | "A01 A02 TURN JOG Velocity": "A01 A02 翻转点动速度",
|
| | | "A01 A02 TRAVEL JOG Velocity": "A01 A02 行走点动速度",
|
| | | "B01 B02 TRAVEL JOG Velocity": "B01 B02 行走点动速度",
|
| | | "A01 A02 TURN POS Velocity AUTO": "A01 A02 翻转自动定位速度",
|
| | | "A01 A02 TURN POS Velocity manual": "A01 A02 翻转手动定位速度",
|
| | | "A01 A02 TRAVEL POS Velocity AUTO": "A01 A02 行走自动定位速度",
|
| | | "A01 A02 TRAVEL POS Velocity manual": "A01 A02 行走手动定位速度",
|
| | | "B01 B02 TRAVEL POS Velocity AUTO": "B01 B02 行走自动定位速度",
|
| | | "B01 B02 TRAVEL POS Velocity manual": "B01 B02 行走手动定位速度"
|
| | | },
|
| | | "langActions": {
|
| | | "D01 VFD conveyor": "D01 输送变频",
|
| | | "D02 VFD conveyor": "D02 输送变频",
|
| | | "D03 VFD conveyor": "D03 输送变频",
|
| | | "D04 VFD conveyor": "D04 输送变频",
|
| | | "D05 VFD conveyor": "D05 输送变频",
|
| | | "D06 VFD conveyor": "D06 输送变频",
|
| | | "A01 VFD conveyor": "A01 输送变频",
|
| | | "A02 VFD conveyor": "A02 输送变频",
|
| | | "B01 VFD conveyor": "B01 输送变频",
|
| | | "B02 VFD conveyor": "B02 输送变频",
|
| | | "A01 SERVE TURN JOG+": "A01 翻转伺服点动",
|
| | | "A02 SERVE TURN JOG-": "A02 翻转伺服点动",
|
| | | "A01 SERVE TRAVEL JOG+": "A01 行走伺服点动",
|
| | | "A02 SERVE TRAVEL JOG-": "A02 行走伺服点动",
|
| | | "B01 SERVE TRAVEL JOG+": "B01 行走伺服点动",
|
| | | "B02 SERVE TRAVEL JOG-": "B02 行走伺服点动",
|
| | | "A01 SERVE TURN POS": "A01 翻转伺服定位",
|
| | | "A02 SERVE TURN POS": "A02 翻转伺服定位",
|
| | | "A01 SERVE TRAVEL POS": "A01 行走伺服定位",
|
| | | "A02 SERVE TRAVEL POS": "A02 行走伺服定位",
|
| | | "B01 SERVE TRAVEL POS": "B01 行走伺服定位",
|
| | | "B02 SERVE TRAVEL POS": "B02 行走伺服定位",
|
| | | "B01 YV TURN": "B01 抬起电磁阀",
|
| | | "B01 YV UP DOWN": "B01 上升下降电磁阀",
|
| | | "B02 YV TURN": "B02 抬起电磁阀",
|
| | | "B02 YV UP DOWN": "B02 上升下降电磁阀"
|
| | | },
|
| | | "Signlang": {
|
| | | "D01.SR dec": "D01.减速传感器",
|
| | | "D01.SR in pos": "D01.到位传感器",
|
| | | "D02.SR dec": "D02.减速传感器",
|
| | | "D02.SR in pos": "D02.到位传感器",
|
| | | "D03.SR into": "D03.进片传感器",
|
| | | "D03.SR dec": "D03.减速传感器",
|
| | | "D03.SR in pos": "D03.到位传感器",
|
| | | "D04.SR dec": "D04.减速传感器",
|
| | | "D04.SR in pos": "D04.到位传感器",
|
| | | "D05.SR dec": "D05.减速传感器",
|
| | | "D05.SR in pos": "D05.到位传感器",
|
| | | "D06.SR dec": "D06.减速传感器",
|
| | | "D06.SR in pos": "D06.到位传感器",
|
| | | "B01.SR out dec": "B01.出片减速传感器",
|
| | | "B01.SR out in pos": "B01.出片到位传感器",
|
| | | "B01.SR in dec": "B01.进片减速传感器",
|
| | | "B01.SR in in pos": "B01.进片到位传感器",
|
| | | "B01.SR turn on": "B01.翻转上到位传感器",
|
| | | "B01.SR turn off": "B01.翻转下到位传感器",
|
| | | "B01.SR up": "B01.上升到位传感器",
|
| | | "B01.SR down": "B01.下降到位传感器",
|
| | | "B02.SR out dec": "B02.出片减速传感器",
|
| | | "B02.SR out in pos": "B02.出片到位传感器",
|
| | | "B02.SR in dec": "B02.进片减速传感器",
|
| | | "B02.SR in in pos": "B02.进片到位传感器",
|
| | | "B02.SR turn on": "B02.翻转上到位传感器",
|
| | | "B02.SR turn off": "B02.翻转下到位传感器",
|
| | | "B02.SR up": "B02.上升到位传感器",
|
| | | "B02.SR down": "B02.下降到位传感器",
|
| | | "B01.SR out safety": "B01.出片安全传感器",
|
| | | "B01.SR in safety": "B01.进片安全传感器",
|
| | | "B02.SR out safety": "B02.出片安全传感器",
|
| | | "SB.start(+)": "SB.启动(+)按钮",
|
| | | "SB.stop(1)": "SB.停止(-)按钮",
|
| | | "SB.reset": "SB.复位按钮",
|
| | | "SB.auto/manul": "SB.手/自切换按钮",
|
| | | "SB.pause": "SB.暂停按钮",
|
| | | "SB.emg": "SB.急停按钮",
|
| | | "D01.SB.start": "D01.启动",
|
| | | "D06.SB.start": "D06.启动",
|
| | | "B02.SR in safety": "B02.进片安全传感器",
|
| | | "SAFETYDOOR.requset": "安全门请求进入",
|
| | | "SAFETYDOOR.confirm": "安全门确认",
|
| | | "SAFETYDOOR.reset": "安全门复位",
|
| | | "LED.red": "三色灯红",
|
| | | "LED.green": "三色灯绿",
|
| | | "LED.yellow": "三色灯黄",
|
| | | "D01.LED.green": "D01.绿灯",
|
| | | "D06.LED.green": "D06.绿灯",
|
| | | "B01.YV.turn": "B01.电磁阀翻转",
|
| | | "B01.YV.up down": "B01.电磁阀上升下降",
|
| | | "B01.YV.gassing": "B01.电磁阀吹气",
|
| | | "B02.YV.turn": "B02.电磁阀翻转",
|
| | | "B02.YV.up down": "B02.电磁阀上升下降",
|
| | | "B02.YV.gassing": "B02.电磁阀吹气",
|
| | | "SAFETYDOOR.led": "安全门状态灯",
|
| | | "SAFETYDOOR.open": "安全门打开"
|
| | | },
|
| | | "Statelang": {
|
| | | "D01.State": "D01.状态",
|
| | | "D02.State": "D02.状态",
|
| | | "B01.State": "B01.状态",
|
| | | "B02.State": "B02.状态",
|
| | | "A01.State": "A01.状态",
|
| | | "A02.State": "A02.状态",
|
| | | "D03.State": "D03.状态",
|
| | | "D04.State": "D04.状态",
|
| | | "D05.State": "D05.状态",
|
| | | "D06.State": "D06.状态"
|
| | | }
|
| | | } |
| | |
| | | <div class="app"> |
| | | <!--面包屑导航区域--> |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb"> |
| | | <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link> |
| | | <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link> |
| | | <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link> |
| | | <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') }}</router-link> |
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') }}</router-link> |
| | | <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') |
| | | }}</router-link> |
| | | </el-breadcrumb> |
| | | <div>Action</div> |
| | | <el-form label-width="100px" style="display: flex;flex-wrap: wrap;" :model="{ messagepack }"> |
| | |
| | | <el-input v-model="item.name" style="width: 240px;" class="in_mc" readonly></el-input> |
| | | <el-switch v-model="item.value" active-value="1" inactive-value="0" @change="send()"></el-switch> |
| | | </div> |
| | | |
| | | |
| | | </el-form> |
| | | |
| | | |
| | |
| | | |
| | | <script > |
| | | import LanguageMixin from '../../lang/LanguageMixin' |
| | | import data from '../../configuration/Action' |
| | | let socket; |
| | | export default { |
| | | name: "Action", |
| | | mixins: [LanguageMixin], |
| | | data () { |
| | | return { |
| | | jsonData: data, |
| | | activeButton: '', |
| | | record: { |
| | | params: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
| | |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | |
| | | setActiveButton(buttonName) { |
| | | this.activeButton = buttonName; |
| | | }, |
| | |
| | | }; |
| | | // 浏览器端收消息,获得从服务端发送过来的文本消息 |
| | | socket.onmessage = (msg) => { |
| | | //console.log("收到数据====" + msg.data); |
| | | if (!msg.data) { |
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑 |
| | | } |
| | | |
| | | let obj = JSON.parse(msg.data); |
| | | |
| | | if (obj.params ){ |
| | | this.record.params[0] = obj.params[0]; |
| | | |
| | | for (let a = 0; a <= this.record.params[0].length - 1; a++) { |
| | | if (!this.record.xyData[a]) { |
| | | this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a].toString() }; |
| | | } else { |
| | | this.record.xyData[a].name = this.jsonData.action[a].name; |
| | | this.record.xyData[a].value = this.record.params[0][a].toString(); |
| | | } |
| | | const language = this.$i18n.locale; |
| | | if (language === 'en-US') { |
| | | this.replaceChineseWithEnglish(); |
| | | } else { |
| | | this.localizedRoles = [...this.record.xyData]; |
| | | } |
| | | } |
| | | // console.log(this.record.xyData); |
| | | this.$forceUpdate(); |
| | | this.replaceChineseWithEnglish(); |
| | | }; |
| | | |
| | | //关闭事件 |
| | |
| | | this.messagepack.data = this.record.xyData.map(item => parseInt(item.value)); // 转换为整数数组 |
| | | //console.log(this.messagepack); |
| | | socket?.send(JSON.stringify(this.messagepack)); |
| | | } |
| | | }, |
| | | //语言转换 |
| | | replaceChineseWithEnglish () { |
| | | const translation = this.$t('langActions'); |
| | | this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value }; }); |
| | | console.log(translation); |
| | | }, |
| | | |
| | | } |
| | | |
| | |
| | | .el-input__inner { |
| | | border: none; |
| | | } |
| | | |
| | | .blue-button { |
| | | background-color: skyblue; |
| | | } |
| | |
| | | <div class="app">
|
| | | <!-- 面包屑导航区域 -->
|
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
| | | <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
|
| | | <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
|
| | | <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
|
| | | <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') }}</router-link>
|
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') }}</router-link>
|
| | | <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | |
|
| | | <div>Parameter</div>
|
| | |
|
| | | <el-form label-width="100px" style="display: flex; flex-wrap: wrap;" :model="messagepack.data">
|
| | | <div id="btn_div">
|
| | | <el-button type="primary" @click="send()" id="xiafa" :disabled="isButtonDisabled">{{ $t('Distribute parameters') }}</el-button>
|
| | | <el-button type="primary" @click="send()" id="xiafa" :disabled="isButtonDisabled">{{ $t('Distribute parameters')
|
| | | }}</el-button>
|
| | |
|
| | | </div>
|
| | | <div class="kuai_div" v-for="(item, index) in record.xyData" :key="index">
|
| | |
| | |
|
| | | <span style="margin-right: 5px; width: 50px;">{{ item.value }}</span>
|
| | | <span style="margin-right: 5px; font-size: 14px;color: red;">|</span>
|
| | | <input v-model="item.value2" type="number" style="width: 43px; margin-right: 5px; margin-top: 5px; font-size: 16px;">
|
| | | <input v-model="item.value2" type="number"
|
| | | style="width: 43px; margin-right: 5px; margin-top: 5px; font-size: 16px;">
|
| | | <span style="margin-right: 5px; width: 50px;">{{ item.unit }}</span>
|
| | |
|
| | | </div>
|
| | | </el-form>
|
| | |
| | |
|
| | | </div>
|
| | | </div>
|
| | |
|
| | |
|
| | | |
| | | </template>
|
| | |
|
| | | <script>
|
| | |
|
| | | let socket;
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/Parameter'
|
| | | export default {
|
| | | name: "Parameter",
|
| | | mixins: [LanguageMixin],
|
| | | data () {
|
| | | return {
|
| | | jsonData: data,
|
| | | dialogVisible: true,
|
| | | password: '',
|
| | | activeButton: '',
|
| | | record: {
|
| | | params: [100, 200, 10, 10, 10, 10],
|
| | | xyData: [
|
| | | { name: "conveyor Velocity(Auto FAST)", value: 0, value2: 0 },
|
| | | { name: "conveyor Velocity(Auto SLOW)", value: 0, value2: 0 },
|
| | | { name: "conveyor Velocity(Manual)", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TURN JOG Velocity", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TRAVEL JOG Velocity", value: 0, value2: 0 },
|
| | | { name: "B01 B02 TRAVEL JOG Velocity", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TURN POS Velocity AUTO", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TURN POS Velocity manual", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TRAVEL POS Velocity AUTO", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TRAVEL POS Velocity manual", value: 0, value2: 0 },
|
| | | { name: "B01 B02 TRAVEL POS Velocity AUTO", value: 0, value2: 0 },
|
| | | { name: "B01 B02 TRAVEL POS Velocity manual", value: 0, value2: 0 }
|
| | | { name: "conveyor Velocity(Auto FAST)", value: 0, value2: 0, unit: "m/min" },
|
| | | { name: "conveyor Velocity(Auto SLOW)", value: 0, value2: 0, unit: "m/min" },
|
| | | { name: "conveyor Velocity(Manual)", value: 0, value2: 0, unit: "m/min" },
|
| | | { name: "A01 A02 TURN JOG Velocity", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "A01 A02 TRAVEL JOG Velocity", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "B01 B02 TRAVEL JOG Velocity", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "A01 A02 TURN POS Velocity AUTO", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "A01 A02 TURN POS Velocity manual", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "A01 A02 TRAVEL POS Velocity AUTO", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "A01 A02 TRAVEL POS Velocity manual", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "B01 B02 TRAVEL POS Velocity AUTO", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "B01 B02 TRAVEL POS Velocity manual", value: 0, value2: 0, unit: "mm/S" }
|
| | | ],
|
| | | canshu: []
|
| | | },
|
| | |
| | | created () {
|
| | | this.initWebSocket();
|
| | | this.isButtonDisabled = true;
|
| | |
|
| | | },
|
| | | methods: {
|
| | | showdata () {
|
| | | console.log(1111);
|
| | | console.log(this.jsonData.para[0].name);
|
| | | // console.log(this.record.xyData);
|
| | |
|
| | | },
|
| | |
|
| | |
|
| | | setActiveButton(buttonName) {
|
| | |
| | | // 将判断结果保存到变量isButtonDisabled中
|
| | |
|
| | | for (let a = 0; a <= this.record.params[0].length - 1; a++) {
|
| | | if (!this.record.xyData[a]) {
|
| | | this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
|
| | | // this.record.xyData[a] =
|
| | | // {
|
| | | // name: this.jsonData.para[a].name,
|
| | | // value: this.jsonData.para[a].read,
|
| | | // value2: this.jsonData.para[a].sending,
|
| | | // unit: this.jsonData.para[a].unit
|
| | | // };
|
| | |
|
| | | // if (!this.xyData[a]) {
|
| | | this.record.xyData[a] =
|
| | | {
|
| | | name: this.jsonData.para[a].name,
|
| | | value: this.record.params[0][a],
|
| | | unit: this.jsonData.para[a].unit
|
| | | };
|
| | | }
|
| | | // else {
|
| | | // this.xyData[a].value = this.record.params[0][a];
|
| | | // }
|
| | | // }
|
| | | const language = this.$i18n.locale;
|
| | | if (language === 'en-US') {
|
| | | this.replaceChineseWithEnglish();
|
| | | } else {
|
| | | this.record.xyData[a].value = this.record.params[0][a];
|
| | | this.localizedRoles = [...this.record.xyData];
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | //console.log(this.record.xyData);
|
| | | this.$forceUpdate();
|
| | | this.replaceChineseWithEnglish();
|
| | | };
|
| | |
|
| | | // 关闭事件
|
| | |
| | | },
|
| | | handleChange (index, value) {
|
| | | this.record.xyData[index].value = value;
|
| | | }
|
| | | },
|
| | | //语言转换
|
| | | replaceChineseWithEnglish () {
|
| | | const translation = this.$t('langparameter');
|
| | | this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value, unit: item.unit }; });
|
| | | //console.log(translation);
|
| | | },
|
| | | }
|
| | | };
|
| | | </script>
|
| | |
| | | background-color: skyblue;
|
| | |
|
| | | }
|
| | |
|
| | | #btn_div {
|
| | | width: 100%;
|
| | | }
|
| | |
| | | <!--面包屑导航区域-->
|
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
| | |
|
| | | <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
|
| | | <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
|
| | | <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
|
| | | <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') }}</router-link>
|
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') }}</router-link>
|
| | | <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign')
|
| | | }}</router-link>
|
| | |
|
| | |
|
| | | </el-breadcrumb>
|
| | | <div>{{ $t('Sign') }}</div>
|
| | | <div style="padding-right: 30px;display: flex;flex-wrap: wrap;" class="neir">
|
| | | <div class="kuai_sb" v-for="item in record.xyData" :key="item.name">
|
| | | <el-col class="deng" :class="getStatusClass(item.value)">
|
| | | </el-col>
|
| | | <el-col class="deng" :class="getStatusClass(item.value)"></el-col>
|
| | | <el-input v-model="item.name" style="width: 280px;" class="in_mc"></el-input>
|
| | |
|
| | | </div>
|
| | |
| | |
|
| | | <script >
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/Sign'
|
| | | let socket;
|
| | | export default {
|
| | | name: "Sign",
|
| | | mixins: [LanguageMixin],
|
| | | data () {
|
| | | return {
|
| | | jsonData: data,
|
| | | activeButton: '',
|
| | | record: {
|
| | | //定义数组,并添加默认值
|
| | | params: [1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
|
| | | 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,],
|
| | | xyData: [
|
| | | { name: 'D01.SR dec', value: 1 },
|
| | | { name: "D01.SR in pos", value: 1 },
|
| | | { name: "D02.SR dec", value: 1 },
|
| | | { name: "D02.SR in pos", value: 1 },
|
| | | { name: "D03.SR into", value: 1 },
|
| | | { name: "D03.SR dec", value: 1 },
|
| | | { name: 'D03.SR in pos', value: 1 },
|
| | | { name: "D04.SR dec", value: 1 },
|
| | | { name: "D04.SR in pos", value: 1 },
|
| | | { name: "D05.SR dec", value: 1 },
|
| | | { name: "D05.SR in pos", value: 1 },
|
| | | { name: "D06.SR dec", value: 1 },
|
| | | { name: 'D06.SR in pos', value: 1 },
|
| | | { name: "B01.SR out dec", value: 1 },
|
| | | { name: "B01.SR out in pos", value: 1 },
|
| | | { name: "B01.SR in dec", value: 1 },
|
| | | { name: "B01.SR in in pos", value: 1 },
|
| | | { name: "B01.SR turn on", value: 1 },
|
| | | { name: 'B01.SR turn off', value: 1 },
|
| | | { name: "B01.SR up", value: 1 },
|
| | | { name: "B01.SR down", value: 1 },
|
| | | { name: "B02.SR out dec", value: 1 },
|
| | | { name: "B02.SR out in pos", value: 1 },
|
| | | { name: "B02.SR in dec", value: 1 },
|
| | | { name: 'B02.SR in in pos', value: 1 },
|
| | | { name: "B02.SR turn on", value: 1 },
|
| | | { name: "B02.SR turn off", value: 1 },
|
| | | { name: "B02.SR up", value: 1 },
|
| | | { name: "B02.SR down", value: 1 },
|
| | | { name: "B01.SR out safety", value: 1 },
|
| | | { name: "B01.SR in safety", value: 1 },
|
| | | { name: "B02.SR out safety", value: 1 },
|
| | | { name: "SB.start(+)", value: 1 },
|
| | | { name: "SB.stop(1)", value: 1 },
|
| | | { name: "SB.reset", value: 1 },
|
| | | { name: "SB.auto/manul", value: 1 },
|
| | | { name: "SB.pause", value: 1 },
|
| | | { name: "SB.emg", value: 1 },
|
| | | { name: "D01.SB.start", value: 1 },
|
| | | { name: "D06.SB.start", value: 1 },
|
| | | { name: "B02.SR in safety", value: 1 },
|
| | | { name: "SAFETYDOOR.requset", value: 1 },
|
| | | { name: "SAFETYDOOR.confirm", value: 1 },
|
| | | { name: "SAFETYDOOR.reset", value: 1 },
|
| | | { name: "LED.red", value: 1 },
|
| | | { name: "LED.green", value: 1 },
|
| | | { name: "LED.yellow", value: 1 },
|
| | | { name: "D01.LED.green", value: 1 },
|
| | | { name: "D06.LED.green", value: 1 },
|
| | | { name: "B01.YV.turn", value: 1 },
|
| | | { name: "B01.YV.up down", value: 1 },
|
| | | { name: "B01.YV.gassing", value: 1 },
|
| | | { name: "B02.YV.turn", value: 1 },
|
| | | { name: "B02.YV.up down", value: 1 },
|
| | | { name: "B02.YV.gassing", value: 1 },
|
| | | { name: "SAFETYDOOR.led", value: 1 },
|
| | | { name: "SAFETYDOOR.open", value: 1 },
|
| | |
|
| | | ],
|
| | | canshu: [
|
| | | 'D01.SR dec',
|
| | | 'D01.SR in pos',
|
| | | 'D02.SR dec',
|
| | | 'D02.SR in pos',
|
| | | 'D03.SR into',
|
| | | 'D03.SR dec',
|
| | | 'D03.SR in pos',
|
| | | 'D04.SR dec',
|
| | | 'D04.SR in pos',
|
| | | 'D05.SR dec',
|
| | | 'D05.SR in pos',
|
| | | 'D06.SR dec',
|
| | | 'D06.SR in pos',
|
| | | 'B01.SR out dec',
|
| | | 'B01.SR out in pos',
|
| | | 'B01.SR in dec',
|
| | | 'B01.SR in in pos',
|
| | | 'B01.SR turn on',
|
| | | 'B01.SR turn off',
|
| | | 'B01.SR up',
|
| | | 'B01.SR down',
|
| | | 'B02.SR out dec',
|
| | | 'B02.SR out in pos',
|
| | | 'B02.SR in dec',
|
| | | 'B02.SR in in pos',
|
| | | 'B02.SR turn on',
|
| | | 'B02.SR turn off',
|
| | | 'B02.SR up',
|
| | | 'B02.SR down',
|
| | | 'LED.red',
|
| | | 'LED.green',
|
| | | 'LED.yellow',
|
| | | ],
|
| | |
|
| | | //定义数组
|
| | | params: [],
|
| | | xyData: [],
|
| | | },
|
| | |
|
| | |
|
| | |
| | | },
|
| | | created () {
|
| | | this.init();
|
| | | //this.showdata();
|
| | | },
|
| | | methods: {
|
| | | showdata () {
|
| | | console.log(1111);
|
| | | console.log(this.jsonData.sign[0].name);
|
| | | // console.log(this.record.xyData);
|
| | |
|
| | | },
|
| | |
|
| | | onButtonClick () {
|
| | | this.isButtonClicked = true; // 将按钮颜色设置为蓝色
|
| | | setTimeout(() => {
|
| | |
| | | },
|
| | | //根据读取PLC的值,根据名称改变颜色
|
| | | getStatusClass (zhuangtai) {
|
| | | // console.log(this.record.xyData);
|
| | | if (zhuangtai === 0) {
|
| | | return "op";
|
| | | }
|
| | |
| | | //console.log("收到数据====" + msg.data);
|
| | | let obj = JSON.parse(msg.data);
|
| | | this.record.params[0] = obj.sig[0];
|
| | | for (let a = 0; a < this.record.params[0].length; a++) {
|
| | | if (!this.record.xyData[a]) {
|
| | | this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
|
| | |
|
| | | } else {
|
| | | this.record.xyData = this.jsonData.sign;
|
| | |
|
| | | for (let a = 0; a < this.record.xyData.length; a++) {
|
| | | this.record.xyData[a].value = this.record.params[0][a];
|
| | |
|
| | | }
|
| | |
|
| | | this.record.xyData = this.jsonData.sign.filter(item => {
|
| | | return item.state != 0;
|
| | | }
|
| | |
|
| | | );
|
| | |
|
| | |
|
| | | const language = this.$i18n.locale;
|
| | | if (language === 'en-US') {
|
| | | this.replaceChineseWithEnglish();
|
| | | } else {
|
| | | this.localizedRoles = [...this.record.xyData];
|
| | | }
|
| | | this.$forceUpdate();
|
| | | this.replaceChineseWithEnglish();
|
| | |
|
| | | }.bind(this);
|
| | | //关闭事件
|
| | |
| | | }
|
| | | }
|
| | | },
|
| | | //语言转换
|
| | | replaceChineseWithEnglish () {
|
| | | const translation = this.$t('Signlang');
|
| | |
|
| | | this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value }; });
|
| | | //console.log(translation);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | .blue-button {
|
| | | background-color: skyblue;
|
| | | }
|
| | |
|
| | | .dark-theme {
|
| | | display: none;
|
| | | }
|
| | | </style> |
| | |
| | |
|
| | | </el-breadcrumb>
|
| | | <div>{{ $t('State') }}</div>
|
| | |
|
| | |
|
| | | <el-form label-width="100px" style="display: flex;flex-wrap: wrap;" :model="messagepack.data">
|
| | |
|
| | | <div class="kuai_div" v-for="item in this.record.xyData" :key="item.name">
|
| | | <el-input style="width: 60%;" class="in_mc" v-model="item.name" readonly></el-input>
|
| | | <el-input v-model="item.value" readonly="readonly" style="width: 90px;"></el-input>
|
| | | </div>
|
| | |
|
| | |
|
| | |
|
| | | </el-form>
|
| | |
|
| | |
| | |
|
| | | <script >
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/State'
|
| | | let socket;
|
| | | export default {
|
| | | name: "State",
|
| | | mixins: [LanguageMixin],
|
| | | data () {
|
| | | return {
|
| | | jsonData: data,
|
| | | activeButton: '',
|
| | | record: {
|
| | | params: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],
|
| | |
| | | this.record.params[0] = obj.sta[0];
|
| | | //将读取到的PLC的数据,与定义的xyData,组合成新的数组
|
| | | for (let a = 0; a < this.record.params[0].length; a++) {
|
| | | if (!this.record.xyData[a]) {
|
| | | this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
|
| | | } else {
|
| | |
|
| | | this.record.xyData[a].name = this.jsonData.state[a].name;
|
| | | this.record.xyData[a].value = this.record.params[0][a];
|
| | | }
|
| | |
|
| | | }
|
| | | const language = this.$i18n.locale;
|
| | |
| | | } else {
|
| | | this.localizedRoles = [...this.record.xyData];
|
| | | }
|
| | | //console.log(this.localizedRoles);
|
| | | this.$forceUpdate();
|
| | | this.replaceChineseWithEnglish();
|
| | |
|
| | | }.bind(this);
|
| | | //关闭事件
|
| | |
| | | //语言转换
|
| | | replaceChineseWithEnglish () {
|
| | | const translation = this.$t('dvstate');
|
| | | this.record.xyData = this.record.xyData.map(item => { return { name: item.name, value: translation[item.value] || item.value }; });
|
| | | console.log(translation);
|
| | | const translation1 = this.$t('Statelang');
|
| | | this.record.xyData = this.record.xyData.map(item => { return { name: translation1[item.name] || item.name, value: translation[item.value] || item.value }; });
|
| | | //console.log(translation);
|
| | | },
|
| | |
|
| | |
|
| | |
| | | top: 366px; */
|
| | | }
|
| | |
|
| | | .orderbutton {
|
| | | .orderbutton1 {
|
| | | position: absolute;
|
| | | left: 1070px;
|
| | | top: 70px;
|
| | | }
|
| | |
|
| | | .orderbutton2 {
|
| | | position: absolute;
|
| | | left: 1170px;
|
| | | top: 70px;
|
| | | }
|
| | |
|
| | |
| | | <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="orderId" :label="$t('Order No')"></el-table-column>
|
| | | <el-table-column prop="list" :label="$t('List No')"></el-table-column>
|
| | | <el-table-column prop="box" :label="$t('Box No')"></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('Terminate 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('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('Infeed glass barcode’')"></el-table-column>
|
| | | <el-table-column :width="130" prop="orderId" :label="$t('Order No')"></el-table-column>
|
| | | <el-table-column prop="list" :label="$t('List No')"></el-table-column>
|
| | | <el-table-column prop="box" :label="$t('Box No')"></el-table-column>
|
| | | <el-table-column prop="lengthWidth" :label="$t('Dim')"></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('Terminate Task') }}</el-button>
|
| | | @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('Terminate Task')
|
| | | }}</el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | |
| | | <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']"
|
| | |
| | | </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-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')">
|
| | | <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')">
|
| | | <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">
|
| | |
| | | </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;">
|
| | |
| | | </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;">
|
| | |
| | | </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('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('Barcodid')"></el-table-column>
|
| | | <el-table-column :width="100" prop="orderId" :label="$t('Order No')"></el-table-column>
|
| | | <el-table-column :width="100" prop="list" :label="$t('List No')"></el-table-column>
|
| | | <el-table-column :width="100" prop="box" :label="$t('Box No')"></el-table-column>
|
| | | <el-table-column :width="170" prop="lengthWidth" :label="$t('Dim')"></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 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="glassId" :label="$t('Barcodid')"></el-table-column>
|
| | | <el-table-column prop="orderId" :label="$t('Order No')"></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";
|
| | |
|
| | |
|
| | |
| | | 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: [],
|
| | |
| | | disabled1: false,
|
| | | currentPage: 1, //默认初始页
|
| | | pagesize: 15, //每页默认显示的数据
|
| | | pageCount: 0
|
| | | pageCount: 0,
|
| | | OutSlice: [],
|
| | | AluminumFrame: [],
|
| | | framebarcode: ""
|
| | | };
|
| | | },
|
| | | created() {
|
| | |
| | | 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;
|
| | |
| | | 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];
|
| | |
| | | //显示订单信息页面
|
| | | 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;
|
| | | }
|
| | | },
|
| | |
| | | },
|
| | | selectglassinfo() {
|
| | | SelectGlass(this.orderid).then(res => {
|
| | | this.currentPage = 1;
|
| | | this.GlassInfo = res.data.glass;
|
| | | });
|
| | | },
|
| | |
| | | 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() {
|
| | |
| | | this.cage = cage;
|
| | | SelectCageInfo(cage).then(res => {
|
| | | this.cageinfo = res.data.cageinfo;
|
| | | console.log(this.cageinfo)
|
| | | this.dialogFormVisible3 = true;
|
| | | });
|
| | | },
|
| | |
| | | //手动上片
|
| | | 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;
|
| | |
| | | }
|
| | | });
|
| | | },
|
| | | 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);
|
| | | },
|
| | | //表格删除
|
| | |
| | | },
|
| | | //手动添加扫码位玻璃
|
| | | 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{
|
| | | 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{
|
| | | this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
|
| | |
| | | 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'));
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | </properties> |
| | | |
| | | <dependencies> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.google.code.gson</groupId> |
| | | <artifactId>gson</artifactId> |
| | | <version>2.8.7</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>commons-io</groupId> |
| | | <artifactId>commons-io</artifactId> |
| | | <version>2.10.0</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-web</artifactId> |
| | |
| | | spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class); |
| | | jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class); |
| | | |
| | | spianService.selectout("1145"); |
| | | //spianService.selectAll2(); |
| | | //增加队列表数据 |
| | | //spianMapper.insertqueue("1",1,1500); |
| | | |
| | | |
| | | // 根据玻璃id获取订单号,单独数据源 |
| | | // try { |
| | | |
| | |
| | | // // TODO Auto-generated catch block |
| | | // e.printStackTrace(); |
| | | // } |
| | | // spianService.selectAll((short)257); |
| | | |
| | | //判断进片请求 |
| | | 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) { |
| | | |
| | |
| | | StringBuilder strId=new StringBuilder(); |
| | | StringBuilder writedstrId=new StringBuilder(); |
| | | |
| | | if(!inglassbegin&!exist1) |
| | | if(!inglassbegin&!exist1)//当进片车不空闲时 |
| | | { |
| | | inglassbegin=true; |
| | | } |
| | | if(inglassbegin&exist1) |
| | | if(inglassbegin&exist1)//当进片车空闲时 |
| | | { |
| | | inglassbegin=false; |
| | | spianMapper.Updatetask(1, 0);//立即结束数据库表中的上片任务 |
| | |
| | | if (exist1 == true) { |
| | | //获取已下发的进片id 与plc请求的id作比较 |
| | | byte[] writedglassidbytes = S7control.getinstance().ReadByte("DB105.16", 1); |
| | | if (writedglassidbytes != null) { |
| | | if (writedglassidbytes != null) { // |
| | | // 获取玻璃id |
| | | for (byte iditem : writedglassidbytes) { |
| | | writedstrId.append(iditem); |
| | |
| | | } |
| | | if(!writedstrId.toString().equals(strId.toString())) //已经下发的id与plc请求的id不一样时,认为不是重复的任务,才执行下发任务指令 |
| | | { |
| | | |
| | | int glasslimit=1;//判断是否是多片上片 |
| | | if(glasslimit==1){ |
| | | spianService.selectAll(strId.toString()); |
| | | }else{ |
| | | spianService.selectAll(strId.toString()); |
| | | } |
| | | S7control.getinstance().WriteByte("DB105.16",datas1ListID);//派发进片id |
| | | |
| | | } |
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Arrays; |
| | | import java.io.BufferedReader; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.io.UnsupportedEncodingException; |
| | | |
| | | import org.apache.commons.io.FileUtils; |
| | | |
| | | public class PlcParameter extends Thread { |
| | | String name = ""; |
| | | Integer count = 0; |
| | | |
| | | public static String readFileToString(String filePath) throws IOException { |
| | | File file = new File(filePath); |
| | | return FileUtils.readFileToString(file, "UTF-8"); |
| | | } |
| | | |
| | | public void readValue() { |
| | | String str = ""; |
| | | BufferedReader bufferedReader = null; |
| | | FileInputStream fileInputStream; |
| | | try { |
| | | // 从文件中读取字节数据存入 fileInputStream |
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/Parameter.json"); |
| | | // 读取 fileInputStream 中字节并将其解码为字符 |
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8"); |
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader |
| | | bufferedReader = new BufferedReader(inputStreamReader); |
| | | String line = null; |
| | | // 将 bufferedReader 内容一行一行赋值给str |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | str += line; |
| | | } |
| | | |
| | | // 将str字符串格式转为json |
| | | JSONObject jsonObject = new JSONObject(str); |
| | | |
| | | // 获取json中的值 |
| | | JSONArray address = jsonObject.getJSONArray("address"); |
| | | for (int i = 0; i < address.size(); i++) { |
| | | JSONObject ress = (JSONObject) address.get(i); |
| | | |
| | | this.name = ress.getStr("name"); |
| | | this.count = ress.getInt("count"); |
| | | |
| | | } |
| | | |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(500); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | this.readValue(); |
| | | String PlcAddress = this.name; |
| | | Integer Plccount = this.count; |
| | | |
| | | List<Short> arraylist = S7control.getinstance().ReadWord("DB100.0", 12); |
| | | List<Short> state = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | // System.out.println(stt); |
| | | // List<Short> arraylist = S7control.getinstance().ReadWord("DB100.0", 12); |
| | | // List<Short> state = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | Short[] values1 = { 1, 1, 1, 1, 1, 1, 2, 33, 2, 3, 4, 5 }; |
| | | List<Short> arraylist = new ArrayList<>(Arrays.asList(values1)); |
| | | |
| | | Short[] values2 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| | | List<Short> state = new ArrayList<>(Arrays.asList(values2)); |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // new short[]{1,1, 1, 1, 1, 1, 2, 33, 2,3, 4, 5} |
| | | // new short[]{0,0, 0, 0, 0, 0, 0, 0, 0, 0} |
| | | |
| | | jsonObject.append("params", arraylist ); |
| | | jsonObject.append("state", state); |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter"); |
| | |
| | | package com.example.springboot.component;
|
| | |
|
| | | import cn.hutool.json.JSONArray;
|
| | | import cn.hutool.json.JSONObject;
|
| | |
|
| | | import java.io.BufferedReader;
|
| | | import java.io.FileInputStream;
|
| | | import java.io.FileNotFoundException;
|
| | | import java.io.IOException;
|
| | | import java.io.InputStreamReader;
|
| | | import java.io.UnsupportedEncodingException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.List;
|
| | |
|
| | | public class Plcaction extends Thread {
|
| | | String name = "";
|
| | | Integer count = 0;
|
| | |
|
| | | public void readValue() {
|
| | | String str = "";
|
| | | BufferedReader bufferedReader = null;
|
| | | FileInputStream fileInputStream;
|
| | | try {
|
| | | // 从文件中读取字节数据存入 fileInputStream
|
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/Action.json");
|
| | | // 读取 fileInputStream 中字节并将其解码为字符
|
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8");
|
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader
|
| | | bufferedReader = new BufferedReader(inputStreamReader);
|
| | | String line = null;
|
| | | // 将 bufferedReader 内容一行一行赋值给str
|
| | | while ((line = bufferedReader.readLine()) != null) {
|
| | | str += line;
|
| | | }
|
| | |
|
| | | // 将str字符串格式转为json
|
| | | JSONObject jsonObject = new JSONObject(str);
|
| | |
|
| | | // 获取json中的值
|
| | | JSONArray address = jsonObject.getJSONArray("address");
|
| | | for (int i = 0; i < address.size(); i++) {
|
| | | JSONObject ress = (JSONObject) address.get(i);
|
| | |
|
| | | this.name = ress.getStr("name");
|
| | | this.count = ress.getInt("count");
|
| | |
|
| | | }
|
| | |
|
| | | } catch (FileNotFoundException e) {
|
| | | e.printStackTrace();
|
| | | } catch (UnsupportedEncodingException e) {
|
| | | e.printStackTrace();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | while (this != null) {
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // List<Boolean> paramlist = S7control.getinstance().ReadBits("DB100.DBW", 12);
|
| | | ////
|
| | | // JSONObject jsonObject = new JSONObject();
|
| | | // jsonObject.append("params", new short[]{1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0});
|
| | | // 调用方法,进行赋值
|
| | | this.readValue();
|
| | | String PlcAddress = this.name;
|
| | | Integer Plccount = this.count;
|
| | | // System.out.println(PlcAddress);
|
| | |
|
| | | List<Boolean> paramlist = S7control.getinstance().ReadBits("DB2.0.0", 26);
|
| | | // Boolean[] values = {true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,false, true};
|
| | | // List<Boolean> paramlist = new ArrayList<>(Arrays.asList(values));
|
| | | if (paramlist == null) {
|
| | | // List<Boolean> paramlist = S7control.getinstance().ReadBits("DB2.0.0", 26);
|
| | | Boolean[] values = { false, true, true, true, true, true, true, true, true,
|
| | | true, true, true, true, true, true, true, true, true, true, true, true, true, true,
|
| | | true, false, true };
|
| | | List<Boolean> paramlist = new ArrayList<>(Arrays.asList(values));
|
| | |
|
| | | } else {
|
| | | if (paramlist != null) {
|
| | |
|
| | | short[] params = new short[paramlist.size()];
|
| | |
|
| | | for (int i = 0; i < paramlist.size(); i++) {
|
| | | boolean value = paramlist.get(i);
|
| | | params[i] = value ? (short) 1 : (short) 0;
|
| | | }
|
| | |
|
| | | JSONObject jsonObject = new JSONObject();
|
| | | jsonObject.append("params", params);
|
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("action");
|
| | |
| | | sendwServer.sendMessage(jsonObject.toString());
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("action");
|
| | | if (webSocketServer != null) {
|
| | |
| | | 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; |
| | |
| | | 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); |
| | | // 查询报警信息 |
| | |
| | | // 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); |
| | | //获取进片玻璃信息 |
| | |
| | | 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>(); |
| | |
| | | // paramlists.add(para1); |
| | | // paramlists.add(para2); |
| | | // System.out.println(paramlists); |
| | | |
| | | |
| | | dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class); |
| | | boolean dbconnected = false; |
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Arrays; |
| | | |
| | | public class Plcsign extends Thread { |
| | | String name = ""; |
| | | Integer count = 0; |
| | | |
| | | public void readValue() { |
| | | String str = ""; |
| | | BufferedReader bufferedReader = null; |
| | | FileInputStream fileInputStream; |
| | | try { |
| | | // 从文件中读取字节数据存入 fileInputStream |
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/Sign.json"); |
| | | // 读取 fileInputStream 中字节并将其解码为字符 |
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8"); |
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader |
| | | bufferedReader = new BufferedReader(inputStreamReader); |
| | | String line = null; |
| | | // 将 bufferedReader 内容一行一行赋值给str |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | str += line; |
| | | } |
| | | |
| | | // 将str字符串格式转为json |
| | | JSONObject jsonObject = new JSONObject(str); |
| | | |
| | | // 获取json中的值 |
| | | JSONArray address = jsonObject.getJSONArray("address"); |
| | | for (int i = 0; i < address.size(); i++) { |
| | | JSONObject ress = (JSONObject) address.get(i); |
| | | |
| | | this.name = ress.getStr("name"); |
| | | this.count = ress.getInt("count"); |
| | | |
| | | } |
| | | |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 44); |
| | | List<Boolean> plclist2 = S7control.getinstance().ReadBits("DB102.5.5", 13); |
| | | this.readValue(); |
| | | String PlcAddress = this.name; |
| | | Integer Plccount = this.count; |
| | | // System.out.println(PlcAddress); |
| | | |
| | | // Boolean[] values = { true, false, true, false, true, false, true, false, |
| | | // true, false, true, false, true, false, |
| | | // true, false, true, false, true, false, true, false, true, false, true, false, |
| | | // true, false, true, false, true, |
| | | // false, true, false, true, false, |
| | | // true, false, true, false, true, false, true, false, }; |
| | | // List<Boolean> plclist = new ArrayList<>(Arrays.asList(values)); |
| | | // List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 44); |
| | | // List<Boolean> plclist2 = S7control.getinstance().ReadBits("DB102.5.5", 13); |
| | | |
| | | // Boolean[] values2 = { true, false, |
| | | // true, false, true, false, true, false, |
| | | // true, false, true, false, true, }; |
| | | // List<Boolean> plclist2 = new ArrayList<>(Arrays.asList(values2)); |
| | | Boolean[] values = { true, true, true, true, true, false, true, false, |
| | | true, false, true, false, true, false, |
| | | true, false, true, false, true, false, true, false, true, false, true, false, |
| | | true, false, true, false, true, |
| | | false, true, false, true, false, |
| | | true, false, true, false, true, false, true, false, null, |
| | | true, false, |
| | | true, false, true, false, true, false, |
| | | true, false, true, false, true, }; |
| | | List<Boolean> plclist = new ArrayList<>(Arrays.asList(values)); |
| | | |
| | | // 将plclist2的元素添加到plclist中 |
| | | plclist.addAll(plclist2); |
| | | // System.out.println(plclist); |
| | | if (plclist != null) { |
| | | // 将获取的布尔类型转换为整数类型 |
| | | List<Integer> Intlist = new ArrayList<>(); |
| | | for (Boolean value : plclist) { |
| | | if (value != null) { |
| | | Intlist.add(value == true ? 0 : 1); |
| | | } |
| | | |
| | | } |
| | | JSONObject jsonObject = new JSONObject(); |
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Arrays; |
| | | |
| | | public class Plcstate extends Thread { |
| | | String name = ""; |
| | | Integer count = 0; |
| | | |
| | | public void readValue() { |
| | | String str = ""; |
| | | BufferedReader bufferedReader = null; |
| | | FileInputStream fileInputStream; |
| | | try { |
| | | // 从文件中读取字节数据存入 fileInputStream |
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/State.json"); |
| | | // 读取 fileInputStream 中字节并将其解码为字符 |
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8"); |
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader |
| | | bufferedReader = new BufferedReader(inputStreamReader); |
| | | String line = null; |
| | | // 将 bufferedReader 内容一行一行赋值给str |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | str += line; |
| | | } |
| | | |
| | | // 将str字符串格式转为json |
| | | JSONObject jsonObject = new JSONObject(str); |
| | | |
| | | // 获取json中的值 |
| | | JSONArray address = jsonObject.getJSONArray("address"); |
| | | for (int i = 0; i < address.size(); i++) { |
| | | JSONObject ress = (JSONObject) address.get(i); |
| | | |
| | | this.name = ress.getStr("name"); |
| | | this.count = ress.getInt("count"); |
| | | |
| | | } |
| | | |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | List<Short> plclist = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | // Short[] values = { 0, 1, 1, 0, 1, 0, 1, 0, |
| | | // 1, 0, }; |
| | | // List<Short> plclist = new ArrayList<>(Arrays.asList(values)); |
| | | this.readValue(); |
| | | String PlcAddress = this.name; |
| | | Integer Plccount = this.count; |
| | | // System.out.println(PlcAddress); |
| | | |
| | | // List<Short> plclist = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | Short[] values = { 0, 1, 1, 0, 1, 0, 1, 0, |
| | | 1, 0, }; |
| | | List<Short> plclist = new ArrayList<>(Arrays.asList(values)); |
| | | if (plclist != null) { |
| | | |
| | | List<String> Intlist = new ArrayList<>(); |
| | |
| | | |
| | | // new PlcHold().start(); |
| | | |
| | | new Plcaction().start(); |
| | | // new Plcaction().start(); |
| | | |
| | | new Plchome().start(); |
| | | |
| | | new PlcParameter().start(); |
| | | // new PlcParameter().start(); |
| | | |
| | | new Plcalarm().start(); |
| | | // new Plcalarm().start(); |
| | | |
| | | new Plcsign().start(); |
| | | // new Plcsign().start(); |
| | | |
| | | new Plcstate().start(); |
| | | // new Plcstate().start(); |
| | | } |
| | | } |
| | |
| | | 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") |
| | |
| | | map.put("list", storageCagelist); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //查询理片笼玻璃情况 |
| | | @GetMapping("/loads") |
| | | public Result selectRack() { |
| | |
| | | map.put("list4", storageCagelist4); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //查询进/出片任务 |
| | | @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); |
| | | } |
| | | |
| | | //按订单出片 |
| | | @GetMapping("/InsertOrder") |
| | | public Result InsertOrder(String orderid) { |
| | |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //根据玻璃id手动上片 |
| | | @GetMapping("/Addglassid") |
| | | public Result Addglassid(String glassid) { |
| | |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //手动完成进/出片任务 |
| | | @GetMapping("/UpdateTask") |
| | | public Result UpdateTask(Integer types, Integer shelfrack, String glassid) { |
| | |
| | | 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); |
| | |
| | | map.put("message3", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //查询报警信息 |
| | | @GetMapping("/SelectAlarmmgInfo") |
| | | public Result SelectAlarmmgInfo() { |
| | |
| | | map.put("alarmmg", alarmmg); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //查询理片笼详情 |
| | | @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); |
| | | } |
| | | |
| | | //手动删除理片笼玻璃 |
| | | @GetMapping("/DeleteByGlassID") |
| | | public Result DeleteByGlassID(String glassid) { |
| | |
| | | map.put("message3", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //根据玻璃id手动出片 |
| | | @GetMapping("/OutByGlassID") |
| | | public Result OutByGlassID(String glassid) { |
| | |
| | | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //加载小车位置 |
| | | @GetMapping("/Loadcarlist") |
| | | public Result Loadcarlist() { |
| | |
| | | map.put("carlist", carlist); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //查询确认密码 |
| | | @GetMapping("/SelectPassword") |
| | | public Result SelectPassword() { |
| | |
| | | map.put("password", pwdct); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //根据玻璃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); |
| | | } |
| | | |
| | | //启用/禁用理片笼格子 |
| | | @GetMapping("/Disabled") |
| | | public Result Disabled(short cage, short cell, short disabled) { |
| | |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //手动往理片笼添加玻璃 |
| | | @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); |
| | | } |
| | |
| | | @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); |
| | | } |
| | |
| | | map.put("message", "300"); |
| | | }else{ |
| | | homeMapper.InsertQueueGlassId(glassid,id); |
| | | //调用伍存储过程 |
| | | spianMapper.selectAll(glassid); |
| | | map.put("message", "200"); |
| | | } |
| | | return Result.success(map); |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | private double height; |
| | | private String glassId; |
| | | |
| | | |
| | | |
| | | public Integer id() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | |
| | | this.width = width; |
| | | } |
| | | |
| | | public void getWidth(double width) { |
| | | this.width = width; |
| | | } |
| | | |
| | | public String getGlassId() { |
| | | return glassId; |
| | | } |
| | |
| | | public void setGlassId(String glassId) { |
| | | this.glassId = glassId; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | |
| | | |
| | | public class StorageCage { |
| | | private Integer id; |
| | | private Integer prcId; |
| | |
| | | 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; |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.Date; |
| | | |
| | | |
| | | public class alarmmg { |
| | | private Integer id; |
| | | private String content; |
| | |
| | | |
| | | private String timeons; |
| | | |
| | | // 自增id |
| | | public void setid(Integer id) { |
| | | this.id = id; |
| | | } |
| | |
| | | return id; |
| | | } |
| | | |
| | | // 报警内容 |
| | | public void setontent(String content) { |
| | | this.content = content; |
| | | } |
| | |
| | | return content; |
| | | } |
| | | |
| | | // 报警开始时间 |
| | | public void settimeon(Date timeon) { |
| | | this.timeon = timeon; |
| | | } |
| | |
| | | return timeon; |
| | | } |
| | | |
| | | // 报警结束时间 |
| | | public void setendTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
New file |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | public class north_glass_buffer1 { |
| | | private Integer id; //自增id |
| | | private String ordernumber;//订单id |
| | | private String listnumber;//集合id |
| | | private String boxnumber;//箱子id |
| | | private String barcode;//玻璃id |
| | | private double glasslength;//玻璃宽 |
| | | private double glassheight;//玻璃高 |
| | | private double glasslengthMm;//玻璃宽mm |
| | | private double glassheightMm;//玻璃高mm |
| | | |
| | | private StorageCage storageCage; |
| | | |
| | | public void setstorageCage(StorageCage storageCage) { |
| | | this.storageCage = storageCage; |
| | | } |
| | | |
| | | public StorageCage getstorageCage() { |
| | | return storageCage; |
| | | } |
| | | |
| | | private Out_slice out_slice; |
| | | |
| | | public void setOut_slice(Out_slice out_slice) { |
| | | this.out_slice = out_slice; |
| | | } |
| | | |
| | | public Out_slice getOut_slice() { |
| | | return out_slice; |
| | | } |
| | | |
| | | public Integer id() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | public String getordernumber() { |
| | | return ordernumber; |
| | | } |
| | | public void setordernumber(String ordernumber) { |
| | | this.ordernumber = ordernumber; |
| | | } |
| | | public String getlistnumber() { |
| | | return listnumber; |
| | | } |
| | | public void setlistnumber(String listnumber) { |
| | | this.listnumber = listnumber; |
| | | } |
| | | |
| | | public String getboxnumber() { |
| | | return boxnumber; |
| | | } |
| | | public void setboxnumber(String boxnumber) { |
| | | this.boxnumber = boxnumber; |
| | | } |
| | | |
| | | |
| | | public String getbarcode() { |
| | | return barcode; |
| | | } |
| | | public void setbarcode(String barcode) { |
| | | this.barcode = barcode; |
| | | } |
| | | |
| | | |
| | | public Double getglasslength() { |
| | | return glasslength; |
| | | } |
| | | public void setglasslength(Double glasslength) { |
| | | this.glasslength = glasslength; |
| | | } |
| | | |
| | | public Double getglassheight() { |
| | | return glassheight; |
| | | } |
| | | public void setglassheight(Double glassheight) { |
| | | this.glassheight = glassheight; |
| | | } |
| | | |
| | | public Double getglasslengthMm() { |
| | | return glasslengthMm; |
| | | } |
| | | public void setglasslengthMm(Double glasslengthMm) { |
| | | this.glasslengthMm = glasslengthMm; |
| | | } |
| | | |
| | | public Double getglassheightMm() { |
| | | return glassheightMm; |
| | | } |
| | | public void setglassheight_mm(Double glassheightMm) { |
| | | this.glassheightMm = glassheightMm; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | List<StorageCage> selectRack4(); |
| | | |
| | | // 根据任务类型查询当前正在出片,进片的玻璃信息 |
| | | @Select("select *,concat(glasswidth,' x ',glassheight) as lengthwidth from storage_cage where 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); |
| | | |
| | | // 查询是否存在此订单 |
| | |
| | | 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,glass 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}") |
| | |
| | | |
| | | //查询玻璃信息 |
| | | // @Select("select * from glass where glassid=#{glassid}") |
| | | @Select("SELECT id,glassid,orderid,\n" + |
| | | " ROUND(width * Conversionrate, 2) AS width,\n" + |
| | | " ROUND(height * Conversionrate, 2) AS height\n" + |
| | | "FROM glass\n" + |
| | | "where glassid=#{glassid};") |
| | | Glass SelectGlassByGlassID(String 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}") |
| | |
| | | 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); |
| | | |
| | | } |
| | |
| | | package com.example.springboot.mapper; |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | import com.example.springboot.entity.Glass; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.StorageTask; |
| | | |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | @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*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 cage,COUNT(if(order_id=#{orderids},order_id,null))as orderid,cell,min(state)as state1 from storage_cage where (order_id=#{orderids} or ''='') GROUP BY cage,cell HAVING state1=0 ORDER BY orderid desc; ") |
| | | List<StorageCage> selectAll(Short orderids); |
| | | @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 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); |
| | | |
| | | //判断笼子内玻璃数 |
| | | @Select("select COUNT(tier)as tier from storage_cage where cage=#{cage} and cell=#{cell} and state=1;") |
| | | int selectsum(int cage,int cell); |
| | | |
| | | //@Update("update longzi set glass_id = #{glass_id}, width = #{width}, state = #{state} where cell = #{cell}") |
| | | // @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,width from glass where glassid=#{glassid}") |
| | | Glass selectGlass(String glassid); |
| | |
| | | void insert(StorageTask storageTask); |
| | | |
| | | //出片任务查询 |
| | | @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") |
| | | @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 state from storage_cage where cage=#{cage} and cell=#{cell} and tier=2;") |
| | | @Select("select COUNT(state) from storage_cage where cage=#{cage} and cell=#{cell}") |
| | | int selectGlassState(int cage,int cell); |
| | | |
| | | //判断该调拨的笼子 |
| | |
| | | |
| | | //修改笼子信息(进片) |
| | | @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=#{width} where id=#{id};") |
| | | void UpdataAddCage(Short orderid,String glassid,double width,int cage,int cell,int id,int state); |
| | | 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})") |
| | | |
| | | // @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(); |
| | | } |
| | | |
| | |
| | | ps.setInt(1, glassid); |
| | | rs= ps.executeQuery(); |
| | | while (rs.next()) { |
| | | glass.setOrderId(rs.getShort("orderid")); |
| | | glass.setOrderId(rs.getString("orderid")); |
| | | } |
| | | conn.close(); |
| | | return glass; |
New file |
| | |
| | | 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); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | } |
| | |
| | | @Autowired |
| | | private SpianMapper spianMapper; |
| | | |
| | | // @GetMapping("/all2") |
| | | // @GetMapping("/all") |
| | | // 进片任务,传订单id |
| | | // 按订单优先进片 |
| | | public Short selectAll(String glassid) { |
| | | |
| | | int cage1; |
| | | int cells; |
| | | int ids; |
| | | int prcid; |
| | | int tiers; |
| | | int prctier; |
| | | double width; |
| | | double minwidth = 0; |
| | | |
| | | Glass glasslist = spianMapper.selectGlass(glassid); // 获取玻璃参数 |
| | | if (glasslist == null) { |
| | | return (300); |
| | | } |
| | | double widths = glasslist.getwidth(); |
| | | String orderids = glasslist.getOrderId(); |
| | | |
| | | List<String> adddresslist = new ArrayList<>(); |
| | | adddresslist.add("DB105.0");// 进片车起始位置 |
| | | adddresslist.add("DB105.2");// 进片车目标位置 |
| | | adddresslist.add("DB105.4");// 进片笼玻璃数 |
| | | adddresslist.add("DB105.12");// 进片车启动 1为启动 |
| | | List<Short> datas = new ArrayList<>(); |
| | | |
| | | // String orderid="A001"; |
| | | // 获取订单相关度最高的笼子排序 |
| | | List<StorageCage> storageCage = spianMapper.selectAll(orderids.toString()); |
| | | if (storageCage == null) { |
| | | return (400); |
| | | } |
| | | for (StorageCage storageCage2 : storageCage) { |
| | | // 保存订单优先顺序笼子号 |
| | | cage1 = storageCage2.getCage(); |
| | | // 判断该笼子号相邻最大的空格数 |
| | | int cages = spianMapper.selectCage(cage1); |
| | | StorageCage cages1; |
| | | // 判断是否是第二片需要加间隔物 |
| | | prctier = spianMapper.selectsum(cage1, storageCage2.getCell());// 传给prc的格子内玻璃数 |
| | | if (prctier > 0) { |
| | | cages1 = spianMapper.selectCage1(cage1, storageCage2.getCell(), widths + 400); |
| | | } else { |
| | | cages1 = spianMapper.selectCage1(cage1, storageCage2.getCell(), widths); |
| | | } |
| | | // 判断选中笼子是否有合适宽度空格 |
| | | // 有合适空格时进片 |
| | | if (cages1 != null && cages >= 1) { |
| | | ids = cages1.getId();// 数据库ID |
| | | tiers = cages1.getTier();// 内外片 |
| | | cells = cages1.getCell();// 格子号 |
| | | prcid = cages1.getPrcId();// 传给prc的目标地id |
| | | width = cages1.getWidth();// 格子剩余宽度 |
| | | widths = glasslist.getwidth(); |
| | | |
| | | // 执行进片 |
| | | datas.add((short) 1000); |
| | | datas.add((short) prcid); |
| | | datas.add((short) prctier); |
| | | datas.add((short) 1); |
| | | // 数据库修改笼子表新增一条玻璃 |
| | | 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); |
| | | |
| | | } |
| | | |
| | | } |
| | | return (400); |
| | | |
| | | } |
| | | |
| | | public Short selectAll2() { // 多片上片 |
| | | int cage1; |
| | | int cells; |
| | | int ids; |
| | | int prcid; |
| | | int tiers; |
| | | int prctier; |
| | | double width; |
| | | double minwidth = 0; |
| | | List<String> adddresslist = new ArrayList<>(); |
| | | adddresslist.add("DB105.0");// 进片车起始位置 |
| | | adddresslist.add("DB105.2");// 进片车目标位置 |
| | | adddresslist.add("DB105.4");// 进片笼玻璃数 |
| | | adddresslist.add("DB105.12");// 进片车启动 1为启动 |
| | | List<Short> datas = new ArrayList<>(); |
| | | |
| | | // 获取多片序列玻璃宽度 |
| | | StorageCage queGlass = spianMapper.SelectQueueWidth(); |
| | | double widths = queGlass.getWidth(); |
| | | String orderids = queGlass.getOrderId(); |
| | | int num = spianMapper.SelectQueOrder(); |
| | | |
| | | if (num == 1) { |
| | | |
| | | // 获取订单相关度最高的笼子排序 |
| | | List<StorageCage> storageCage = spianMapper.selectAll(orderids); |
| | | if (storageCage == null) { |
| | | return (400); |
| | | } |
| | | for (StorageCage storageCage2 : storageCage) { |
| | | // 保存订单优先顺序笼子号 |
| | | cage1 = storageCage2.getCage(); |
| | | // 判断该笼子号相邻最大的空格数 |
| | | int cages = spianMapper.selectCage(cage1); |
| | | StorageCage cages1; |
| | | // 判断是否有合适完整空格 |
| | | cages1 = spianMapper.selectqueCage1(cage1, storageCage2.getCell(), widths); |
| | | // 判断选中笼子是否有合适宽度空格 |
| | | // 有合适空格时进片 |
| | | if (cages1 != null && cages >= 1) { |
| | | ids = cages1.getId();// 数据库ID |
| | | cells = cages1.getCell();// 格子号 |
| | | 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, |
| | | 1); |
| | | spianMapper.UpdataAddCage1(width, cage1, cells);// 减少格子宽度 |
| | | spianMapper.Inserttask(0, 0, 1000, ids, qglass.getGlassId().toString());// 新增任务 |
| | | } |
| | | // 执行进片 |
| | | datas.add((short) 1000); |
| | | datas.add((short) prcid); |
| | | datas.add((short) 0); |
| | | datas.add((short) 1); |
| | | S7control.getinstance().WriteWord(adddresslist, datas); |
| | | |
| | | return (200); |
| | | |
| | | } |
| | | } |
| | | |
| | | } 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(); |
| | | List<StorageCage> storageCage = spianMapper.selectAll(orderid); |
| | | if (storageCage == null) { |
| | | return (400); |
| | | } |
| | | for (StorageCage storageCage2 : storageCage) { |
| | | // 保存订单优先顺序笼子号 |
| | | cage1 = storageCage2.getCage(); |
| | | // 判断该笼子号相邻最大的空格数 |
| | | int cages = spianMapper.selectCage(cage1); |
| | | StorageCage cages1; |
| | | // 判断是否是第二片需要加间隔物 |
| | | prctier = spianMapper.selectsum(cage1, storageCage2.getCell());// 传给prc的格子内玻璃数 |
| | | if (prctier > 0) { |
| | | cages1 = spianMapper.selectCage1(cage1, storageCage2.getCell(), widths + 400); |
| | | } else { |
| | | cages1 = spianMapper.selectCage1(cage1, storageCage2.getCell(), widths); |
| | | } |
| | | // 判断选中笼子是否有合适宽度空格 |
| | | // 有合适空格时进片 |
| | | if (cages1 != null && cages >= 1) { |
| | | ids = cages1.getId();// 数据库ID |
| | | tiers = cages1.getTier();// 内外片 |
| | | cells = cages1.getCell();// 格子号 |
| | | prcid = cages1.getPrcId();// 传给prc的目标地id |
| | | width = cages1.getWidth();// 格子剩余宽度 |
| | | widths = qglass.getwidth(); |
| | | |
| | | // 执行进片 |
| | | datas.add((short) 1000); |
| | | datas.add((short) prcid); |
| | | datas.add((short) prctier); |
| | | datas.add((short) 1); |
| | | // 数据库修改笼子表新增一条玻璃 |
| | | spianMapper.UpdataAddCage(orderid, glassid, widths, cage1, cells, ids, 2); |
| | | spianMapper.UpdataAddCage1(widths, cage1, cells);// 减少格子宽度 |
| | | spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString());// 新增任务 |
| | | // S7control.getinstance().WriteWord(adddresslist, datas); |
| | | break; |
| | | // S7control.getinstance().WriteByte("DB105.16",glassid); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | return (400); |
| | | |
| | | } |
| | | |
| | | // 按订单出片 |
| | | public Result selectout(String orderid) { |
| | | |
| | | //spianMapper.UpdatetaskOut(); //完成上一次出片或者调度任务,改到plchold里,出片或调度任务完成立即改变结束任务; |
| | |
| | | if(cageout==null){ |
| | | return Result.success("200"); |
| | | } |
| | | // 判断是否同一格内都为同一订单 |
| | | |
| | | |
| | | |
| | | int orders = Integer.valueOf(cageout.getOrderId()).intValue(); |
| | | |
| | | int cage = cageout.getCage(); // 储存出片位置,笼子格子几号玻璃 |
| | | int cell = cageout.getCell();// 出片格号 |
| | |
| | | int cages; |
| | | int cells; |
| | | double glasswidth = cageout.getGlassWidth(); |
| | | // 当一格内都为同一订单时 |
| | | |
| | | if (orders == 2) { |
| | | datas.add((short) prcid); |
| | | datas.add((short) 1000); |
| | | datas.add((short) 2); |
| | | datas.add((short) 1); |
| | | spianMapper.UpdatequeOut(cage, cell); |
| | | return Result.success("200"); |
| | | } else { |
| | | // 判断是否除此格子内还有其他格子有单独的订单玻璃 |
| | | StorageCage pd = spianMapper.SelectQueout(orderid,cage, cell); |
| | | // 判断玻璃内外片 |
| | | if (tier == 2) { |
| | | |
| | | // 判断玻璃可直接出片时 |
| | | // 修改数据库笼子表(出片) |
| | | datas.add((short) prcid); |
| | |
| | | spianMapper.Inserttask(1, 0,cageout.getId(),1000,orderid);//新增任务 |
| | | S7control.getinstance().WriteWord(adddresslist, datas);//派发出片车任务 |
| | | outmesid(glassid);//派发出片ID |
| | | if (pd != null) { |
| | | cage = pd.getCage(); |
| | | cell = pd.getCage(); |
| | | // 清除本格数据出片 |
| | | spianMapper.UpdatequeOut(cage, cell); |
| | | return Result.success("200"); |
| | | } |
| | | return Result.success(datas);//结束 |
| | | } else { |
| | | // 获取格子的玻璃数量 |
| | | int state = spianMapper.selectGlassState(cage, cell); |
| | | // 判断内片是否需要调拨 |
| | | if (state == 0) { |
| | | if (state == 1) { |
| | | //spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, tier, 0); |
| | | datas.add((short) prcid); |
| | | datas.add((short) 1000); |
| | | datas.add((short) 1); |
| | | datas.add((short) 1); |
| | | spianMapper.Inserttask(1, 0,cageout.getId(),1000,orderid);//新增任务 |
| | | spianMapper.Inserttask(1, 0,prcid, 1000, orderid);// 新增任务 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);//增加原格子宽度 |
| | | spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, tier, 3);//清除格子玻璃信息 |
| | | S7control.getinstance().WriteWord(adddresslist, datas);//派发出片车任务 |
| | | outmesid(glassid);//派发出片ID |
| | | //spianMapper.Updatetask(1, 1);//完成任务 |
| | | spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, tier, 0);// 清除格子玻璃信息 |
| | | //S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | //outmesid(glassid);// 派发出片ID |
| | | if (pd != null) { |
| | | cage = pd.getCage(); |
| | | cell = pd.getCage(); |
| | | // 清除本格数据出片 |
| | | spianMapper.UpdatequeOut(cage, cell); |
| | | return Result.success("200"); |
| | | } |
| | | return Result.success(datas);//结束 |
| | | |
| | | } else { |
| | |
| | | return Result.success(cagecell); //结束 |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // @GetMapping("/all") |
| | | // 进片任务,传订单id |
| | | // 按订单优先进片 |
| | | public Short selectAll(String glassid) { |
| | | |
| | | int cage1; |
| | | int cells; |
| | | int ids; |
| | | int prcid; |
| | | int tiers; |
| | | int prctier; |
| | | double width; |
| | | double minwidth=0; |
| | | //spianMapper.Updatetask(1, 0);//完成任务,改到plchold里,出片或调度任务完成立即改变结束任务; |
| | | Glass glasslist = spianMapper.selectGlass(glassid); |
| | | if(glasslist==null){ |
| | | return (300); |
| | | } |
| | | double widths = glasslist.getWidth(); |
| | | Short orderids = glasslist.getOrderId(); |
| | | |
| | | List<String> adddresslist = new ArrayList<>(); |
| | | adddresslist.add("DB105.0");// 进片车起始位置 |
| | | adddresslist.add("DB105.2");// 进片车目标位置 |
| | | adddresslist.add("DB105.4");// 进片笼玻璃数 |
| | | adddresslist.add("DB105.12");// 进片车启动 1为启动 |
| | | List<Short> datas = new ArrayList<>(); |
| | | |
| | | // String orderid="A001"; |
| | | // 获取订单相关度最高的笼子排序 |
| | | List<StorageCage> storageCage = spianMapper.selectAll(orderids); |
| | | if (storageCage == null) { |
| | | return (400); |
| | | } |
| | | for (StorageCage storageCage2 : storageCage) { |
| | | // 保存订单优先顺序笼子号 |
| | | cage1 = storageCage2.getCage(); |
| | | // 判断该笼子号相邻最大的空格数 |
| | | int cages = spianMapper.selectCage(cage1); |
| | | StorageCage cages1 ; |
| | | //判断是否是第二片需要加间隔物 |
| | | prctier = spianMapper.selectsum(cage1, storageCage2.getCell());// 传给prc的格子内玻璃数 |
| | | if(prctier>0){ |
| | | cages1 = spianMapper.selectCage1(cage1,storageCage2.getCell(),widths+400); |
| | | }else{ |
| | | cages1 = spianMapper.selectCage1(cage1,storageCage2.getCell(),widths); |
| | | } |
| | | // 判断选中笼子是否有合适宽度空格 |
| | | // 有合适空格时进片 |
| | | if (cages1 != null&&cages>=1) { |
| | | ids = cages1.getId();// 数据库ID |
| | | tiers = cages1.getTier();// 内外片 |
| | | cells = cages1.getCell();// 格子号 |
| | | prcid = cages1.getPrcId();// 传给prc的目标地id |
| | | width=cages1.getWidth();//格子剩余宽度 |
| | | widths=glasslist.getWidth(); |
| | | |
| | | // 执行进片 |
| | | datas.add((short) 1000); |
| | | datas.add((short) prcid); |
| | | datas.add((short) prctier); |
| | | datas.add((short) 1); |
| | | // 数据库修改笼子表新增一条玻璃 |
| | | spianMapper.UpdataAddCage(orderids, 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); |
| | | |
| | | } |
| | | |
| | | } |
| | | return (400); |
| | | |
| | | } |
| | | |
| | |
| | | if(cageout==null){ |
| | | return (300); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | int cage = cageout.getCage(); // 储存出片位置,笼子格子几号玻璃 |
| | | int cell = cageout.getCell();// 出片格号 |
| | |
| | | spianMapper.UpdateDBCage2(cage, cell);// 清除内片数据 |
| | | } |
| | | S7control.getinstance().WriteWord(adddresslist, datas);//派发出片车任务 |
| | | outmesid(glassid);//派发出片ID |
| | | |
| | | //outmesid(glassid);// 派发出片ID |
| | | |
| | | return (200);//结束 |
| | | } else { |
| | |
| | | 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);//结束 |
| | | |
| | |
| | | ids = cagecell.getId();// 调拨目标位ID |
| | | cages=cagecell.getCage();//调拨目标位笼子 |
| | | cells=cagecell.getCell();//调拨目标位格子 |
| | | |
| | | |
| | | // 填入调拨数据 |
| | | datas.add((short) prcid);// 调拨外片起始位置 |
| | |
| | | // } |
| | | |
| | | } |
| | | |