| | |
| | | <el-table-column :width="100" prop="state" :label="$t('State')">
|
| | | <template slot-scope='scope'>
|
| | | {{
|
| | | scope.row.state == 1 ? $t('Normal') : scope.row.state == 2 ? $t('Entering') : scope.row.state == 3 ? $t('Outing') : ""
|
| | | scope.row.state == 1 ? $t('Normal') : scope.row.state == 2 ? $t('Entering') : scope.row.state == 3 ?
|
| | | $t('Outing') : ""
|
| | | }}
|
| | | </template>
|
| | | </el-table-column>
|
| | |
| | | if (this.form5.glassheight < 380 || this.form5.glasswidth < 390 || this.form5.glassheight > 1810 || this.form5.glasswidth > 2760) {
|
| | | if (this.disabled1 == false) {
|
| | | this.disabled1 = true;
|
| | | this.$confirm(this.$t('The glass size is not within the range'), this.$t('confirm'), {
|
| | | // inputType: 'password',
|
| | | // inputPlaceholder: this.$t('Please enter the password'),
|
| | | |
| | | confirmwidth:7000,
|
| | | height:8000,
|
| | | confirmButtonText: this.$t('Yes'),
|
| | | cancelButtonText: this.$t('No'),
|
| | | type: 'warning'
|
| | | }).then(() => {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }).catch(() => {
|
| | | this.$message({
|
| | | type: 'info',
|
| | | message: this.$t('Operation canceled')
|
| | | });
|
| | | });
|
| | | this.$message.error(this.$t('The glass size is not within the range'));
|
| | | }
|
| | |
|
| | | } else {
|
| | | this.disabled1 = false;
|
| | | }
|
| | |
| | | SelectAluminumFrameInfoById(this.framebarcode).then(res => {
|
| | | this.AluminumFrame = res.data.listAluminumFrame;
|
| | | this.AluminumFrame.sort(function (x, y) {
|
| | | if(x['storageCage']!=null&&y['storageCage']!=null){
|
| | | if (x['storageCage'] != null && y['storageCage'] != null) {
|
| | | return y['storageCage']['tier'] - x['storageCage']['tier'];
|
| | | }
|
| | | });
|
| | |
| | | // // TODO Auto-generated catch block |
| | | // e.printStackTrace(); |
| | | // } |
| | | |
| | | //spianService.selectout2("250"); |
| | | 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.16", 1);// 获取进片车任务是否启动 |
| | |
| | | spianMapper.Updatetask(1, 0);// 更改进片任务状态为1 |
| | | spianMapper.UpdatetaskOut(B01glassid.toString()); // 完成上一次出片或者进片任务 |
| | | spianMapper.OverOutSlice(B01glassid.toString(), 2);// 完成出片队列任务 |
| | | spianMapper.UpdataGlassCage(B01glassid.toString(),0);// 清除出片格子玻璃信息 |
| | | S7control.getinstance().WriteWord("DB106.60", (short) 0);// 恢复B01小车应答改为0 |
| | | System.out.println("汇报时B01|" + B01glassid); |
| | | |
| | |
| | | spianMapper.UpdateCageOver(B02glassid.toString(), 0);// 更改笼子表出片状态 |
| | | spianMapper.UpdatetaskOut(B02glassid.toString()); // 完成上一次出片或者进片任务 |
| | | spianMapper.OverOutSlice(B02glassid.toString(), 2);// 完成出片队列任务 |
| | | spianMapper.UpdataGlassCage(B01glassid.toString(),0);// 清除出片格子玻璃信息 |
| | | S7control.getinstance().WriteWord("DB106.62", (short) 0);// 恢复B02小车应答改为0 |
| | | // S7control.getinstance().WriteWord("DB105.50", (short) 1);//汇报B02小车收到 |
| | | System.out.println("汇报时B02|" + B02glassid); |
| | |
| | | // |
| | | System.out.println("启动完成"); |
| | | |
| | | new PlcHold().start(); |
| | | // new PlcHold().start(); |
| | | |
| | | // |
| | | new Plchome().start(); |
| | |
| | | |
| | | public class Glass { |
| | | private Integer id; |
| | | private String orderId; |
| | | private double width; |
| | | private double height; |
| | | private String glassId; |
| | | private String orderId;//订单id |
| | | private double width;//宽度 |
| | | private double height;//高度 |
| | | private String glassId;//玻璃id |
| | | |
| | | public Integer id() { |
| | | return id; |
| | |
| | | |
| | | public class OrderOut { |
| | | private Integer id; |
| | | private String orderid; |
| | | private Integer state; |
| | | private String orderid;//订单id |
| | | private Integer state;//状态 |
| | | private Date modtime; |
| | | |
| | | public Integer id() { |
| | |
| | | |
| | | 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 String glassId;//玻璃id |
| | | private String barcode;//铝框id |
| | | private double glasswidth;//玻璃宽 |
| | | private double glassheight;//玻璃高 |
| | | private int state;//状态 |
| | | private String time;//时间 |
| | | |
| | | private north_glass_buffer1 north_glass_buffer1s; |
| | | |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | public class StorageCage { |
| | | private Integer id; |
| | | private Integer prcId; |
| | | private String glassId; |
| | | private Integer cage; |
| | | private Integer cell; |
| | | private Double width; |
| | | private Double glasswidth; |
| | | private Double glassheight; |
| | | private Double glasswidthmm; |
| | | private Double glassheightmm; |
| | | private String state; |
| | | private Integer tier; |
| | | private String orderId; |
| | | private Integer disabled; |
| | | private String listId; |
| | | private String boxId; |
| | | private Integer id; //自序id |
| | | private Integer prcId;//plcid |
| | | private String glassId;//玻璃id |
| | | private Integer cage;//笼子号 |
| | | private Integer cell;//格子号 |
| | | private Double width;//格子宽 |
| | | private Double glasswidth;//玻璃宽 |
| | | private Double glassheight;//玻璃高 |
| | | private Double glasswidthmm;//英寸玻璃宽 |
| | | private Double glassheightmm;//英寸玻璃高 |
| | | private String state;//状态 |
| | | private Integer tier;//内外片 |
| | | private String orderId;//订单id |
| | | private Integer disabled;//停用 |
| | | private String listId;//集合id |
| | | private String boxId;//箱子id |
| | | |
| | | private north_glass_buffer1 north_glass_buffer1s; |
| | | |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | public class StorageTask{ |
| | | private Integer id; |
| | | private String taskType; |
| | | private String glassId; |
| | | private Integer id;//自序 |
| | | private String taskType;//类型 |
| | | private String glassId;//玻璃id |
| | | private String cataskStatege; |
| | | private String shelfRack; |
| | | private String loadrack; |
| | | private String shelfRack;//起始位 |
| | | private String loadrack;//目标位 |
| | | |
| | | |
| | | public Integer id() { |
| | |
| | | StorageCage selectGlassCage(int cage,double width,int cage1,int cage2); |
| | | |
| | | //删除笼子信息(出片) |
| | | @Update("update storage_cage as a set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=0 where cage=#{cage} and cell=#{cell} and tier=#{tier};") |
| | | void UpdataGlassCage(String orderid,String glassid,double width,int cage,int cell,int tier,int state); |
| | | @Update("update storage_cage as a set state=#{state},glass_id=null,order_id=null,glasswidth=0,a.glassheight=null,a.glasswidthmm=null,a.glassheightmm=null,a.listid=null,a.boxid=null where glassid=#{glassid};") |
| | | void UpdataGlassCage(String glassid,int state); |
| | | //改变玻璃状态为出片中 |
| | | @Update("update storage_cage as a set state=#{state} where glass_id=#{glassid};") |
| | | void UpdataGlassCageState(String glassid,int state); |
| | | |
| | | //修改笼子信息(进片) |
| | | @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=#{width} where id=#{id};") |
| | |
| | | datas.add((short) 1); |
| | | |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, tier, 3);// 清除格子玻璃信息 |
| | | spianMapper.UpdataGlassCageState(glassid,3);//更改笼子表的玻璃状态 |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, orderid);// 新增任务 |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | outmesid(glassid,"DB105.34");// 派发出片ID |
| | |
| | | datas.add((short) 1); |
| | | spianMapper.Inserttask(1, 0,prcid, 1000, orderid);// 新增任务 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, tier, 0);// 清除格子玻璃信息 |
| | | spianMapper.UpdataGlassCageState(glassid,3);//更改笼子表的玻璃状态 |
| | | //S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | //outmesid(glassid);// 派发出片ID |
| | | if (pd != null) { |
| | |
| | | spianMapper.UpdateDBCage(ids, cage, cell,2);// 将原格子数据更新到新格子里 |
| | | spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 3);// 清除被调拨格子数据 |
| | | spianMapper.UpdataGlassCageState(glassid,3);//更改笼子表的玻璃状态 |
| | | spianMapper.Inserttask(2, 0, cageout.getId(), ids, orderid);// 新增调度任务 |
| | | // 传输mes数据,坐标,数据 |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | |
| | | spianMapper.Inserttask(2, 0, cageout.getId(), ids, orderid);// 新增调度任务 |
| | | spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 3);// 清除被调拨格子数据 |
| | | spianMapper.UpdataGlassCageState(glassid,3);//更改笼子表的玻璃状态 |
| | | // 传输mes数据,坐标,数据 |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | |
| | |
| | | datas.add((short) 1); |
| | | spianMapper.OverOutSlice(glassid, 1);//更新出片队列任务状态为进行中 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, tier, 3);// 清除格子玻璃信息 |
| | | spianMapper.UpdataGlassCageState(glassid,3);//更改笼子表的玻璃状态 |
| | | |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 新增任务 |
| | | // int state = spianMapper.selectGlassState(cage, cell);//获取格子数量 |
| | | if (state == 2) { |
| | |
| | | datas.add((short) 1000); |
| | | datas.add((short) 1); |
| | | datas.add((short) 1); |
| | | outmesid(glassid,"DB105.34");// 派发出片ID |
| | | spianMapper.OverOutSlice(glassid, 1);//更新出片队列任务状态为进行中 |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 新增任务 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, tier, 3);// 清除格子玻璃信息 |
| | | spianMapper.UpdataGlassCageState(glassid,3);//更改笼子表的玻璃状态 |
| | | spianMapper.OverOutSlice(glassid,2);//完成出片队列任务 |
| | | outmesid(glassid,"DB105.34");// 派发出片ID |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | |
| | | return (200);// 结束 |
| | |
| | | spianMapper.UpdateDBCage(ids, cage, cell,2);// 将原格子数据更新到新格子里 |
| | | spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 3);// 清除被调拨格子数据 |
| | | spianMapper.UpdataGlassCageState(glassids,3);//更改笼子表的玻璃状态 |
| | | spianMapper.Inserttask(2, 0, cageout.getId(), ids, glassid);// 新增调度任务 |
| | | //spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 新增出片任务 |
| | | // 传输mes数据,坐标,数据 |
| | |
| | | spianMapper.UpdateDBCage(ids, cage, cell,2);// 将原格子数据更新到新格子里 |
| | | spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 3);// 清除被调拨格子数据 |
| | | spianMapper.UpdataGlassCageState(glassids,3);//更改笼子表的玻璃状态 |
| | | // 传输mes数据,坐标,数据 |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | |