| | |
| | | },
|
| | | created() {
|
| | | this.load();
|
| | |
|
| | | this.init();
|
| | | }
|
| | | ,
|
| | |
| | | }
|
| | | //是否急停
|
| | | this.EmergencyStop = obj.emergencystop[0];
|
| | | console.log(this.EmergencyStop);
|
| | |
|
| | | //复位倒计时
|
| | | if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
|
| | | this.CountDown();
|
| | | }
|
| | | //是否有进片请求
|
| | | console.log(obj.D01RequestState[0]);
|
| | | this.D01RequestState = obj.D01RequestState[0];
|
| | |
|
| | | //是否允许出片
|
| | |
| | | this.cageinfo = res.data.cageinfo;
|
| | | });
|
| | | }
|
| | |
|
| | |
|
| | | this.$forceUpdate();
|
| | |
|
| | | }.bind(this);
|
| | |
| | | });
|
| | |
|
| | | });
|
| | | //加载小车位置信息
|
| | | Loadcarlist().then(res => {
|
| | | this.carlist = res.data.carlist;
|
| | | });
|
| | | //加载笼子使用情况数据
|
| | | home().then(res => {
|
| | | this.tableData = res.data.list;
|
| | |
| | | SelectAlarmmgInfo().then(res => {
|
| | | this.alarm = res.data.alarmmg;
|
| | | });
|
| | | //加载小车位置信息
|
| | | Loadcarlist().then(res => {
|
| | | this.carlist = res.data.carlist;
|
| | | });
|
| | | |
| | | //加载确认密码
|
| | | SelectPassword().then(res => {
|
| | | this.password = res.data.password;
|
| | |
| | | private JdbcConnections jdbcConnections; |
| | | private SpianMapper spianMapper; |
| | | private SpianService spianService; |
| | | |
| | | int aaa; |
| | | @Override |
| | | public void run() { |
| | | boolean inglassbegin = false; |
| | |
| | | boolean B02backs = spianService.listbool("DB106.62");// b02汇报 |
| | | StringBuilder B01glassid = spianService.queGlassid("DB103.184", 14);// BO1的玻璃id |
| | | StringBuilder B02glassid = spianService.queGlassid("DB103.212", 14);// B02的玻璃id |
| | | int aaa=1; |
| | | |
| | | // 当进片小车完成任务时 |
| | | if (B01backs == true) { |
| | | // 当B01小车汇报完成时更改玻璃状态 为1 |
| | |
| | | // S7control.getinstance().WriteWord("DB105.16", (short) 0); |
| | | } else { |
| | | spianMapper.UpdataOutCage1(glass.getGlassWidth(), glass.getCage(), glass.getCell()); |
| | | homeMapper.UpdateCageTask2(glassid); |
| | | homeMapper.DeleteByGlassID(glassid); |
| | | // S7control.getinstance().WriteWord("DB105.18", (short) 0); |
| | | } |
| | | map.put("message3", "200"); |
| | |
| | | @Update("update storage_cage set state=1 where glass_id=#{glassid} and state=2") |
| | | void UpdateCageTask1(@Param("glassid") String glassid); |
| | | |
| | | // 手动完成出片任务修改笼子数据 |
| | | @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null where glass_id=#{glassid} and state=3") |
| | | void UpdateCageTask2(@Param("glassid") String glassid); |
| | | |
| | | //获取报警信息 |
| | | @Select("select id,content,timeon as timeons,endTime from alarmmg where endTime is null") |
| | | List<alarmmg> SelectAlarmmgInfo(); |
| | |
| | | @Select("select * from storage_cage where position(#{cage} in ifnull(glass_id,\"\"))") |
| | | List<StorageCage> SelectCageInfo(String cage); |
| | | |
| | | // 手动完成出片任务修改笼子数据 |
| | | @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,listid=null,boxid=null where glass_id=#{glassid}") |
| | | void DeleteByGlassID(String glassid); |
| | | |
| | |
| | | if(storageCage!=null){ |
| | | spianMapper.UpdataOutCage1(storageCage.getGlassWidth(), storageCage.getCage(), storageCage.getCell()); |
| | | } |
| | | homeMapper.UpdateCageTask2(glassid); |
| | | homeMapper.DeleteByGlassID(glassid); |
| | | S7control.getinstance().WriteWord("DB105.12", (short) 0); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, 1);// 新增任务 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCageState(glassid, 3);// 更改笼子表的玻璃状态 |
| | | spianMapper.OverOutSlice(glassid, 2);// 完成出片队列任务 |
| | | spianMapper.OverOutSlice(glassid, 1);// 更新出片队列任务 |
| | | System.out.println("出片任务|" + datas); |
| | | outmesid(glassid, "DB105.34");// 派发出片ID |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | |
| | | datas.add((short) 2); |
| | | datas.add((short) 1); |
| | | // 更换玻璃的笼子 |
| | | spianMapper.UpdataGlassCageState(glassid, 3);// 更改笼子表的玻璃状态 |
| | | String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id |
| | | spianMapper.UpdateDBCage(ids, cage, cell, 2);// 将原格子数据更新到新格子里 |
| | | spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度 |
| | |
| | | datas.add((short) 2); |
| | | datas.add((short) 1); |
| | | String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id |
| | | spianMapper.UpdataGlassCageState(glassid, 3);// 更改笼子表的玻璃状态 |
| | | spianMapper.Inserttask(2, 0, cageout.getId() + 1, ids, glassid, 2);// 新增调度任务 |
| | | // spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 新增出片任务 |
| | | spianMapper.UpdateDBCage(ids, cage, cell, 2);// 将原格子数据更新到新格子里 |
| | | spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | //spianMapper.UpdataGlassCageState(glassids, 3);// 更改笼子表的玻璃状态 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | // 传输mes数据,坐标,数据 |
| | | System.out.println("出片任务|" + datas); |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | |
| | | |
| | | // 根据玻璃id完成在进行中的任务 |
| | | public void overtask(String glassid) { |
| | | spianMapper.UpdateCageOver(glassid, 0);// 更改笼子表出片状态 |
| | | |
| | | spianMapper.UpdatetaskOut(glassid); // 完成上一次出片或者进片任务 |
| | | spianMapper.OverOutSlice(glassid, 2);// 完成出片队列任务 |
| | | spianMapper.UpdataGlassCage(glassid, 0);// 清除出片格子玻璃信息 |
| | | spianMapper.UpdateCageOver(glassid, 0);// 更改笼子表出片状态 |
| | | spianMapper.UpdateCageadd(glassid,1); |
| | | String barcode = spianMapper.SelectBarcode(glassid);// 获取该玻璃的铝框id |
| | | spianMapper.UpdateAddQueue(glassid);// 把进片的玻璃更新到出片队列中 |