Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
| | |
| | | // #{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,count) VALUES (#{tasktype},#{taskstate},#{shelfrack},#{loadrack},now(),#{glassid},#{count});") |
| | | void Inserttask(int tasktype, int taskstate, int shelfrack, int loadrack, String glassid, int count); |
| | | @Insert("INSERT INTO `canadames`.`storage_task`(`task_type`, `task_state`, `shelf_rack`, `load_rack`,start_time,glass_id,count,finsh_time) VALUES (#{tasktype},#{taskstate},#{shelfrack},#{loadrack},now(),#{glassid},#{count},#{qidong});") |
| | | void Inserttask(int tasktype, int taskstate, int shelfrack, int loadrack, String glassid, int count,int qidong); |
| | | |
| | | // 修改任务表 |
| | | @Update("update storage_task set task_state=#{state} where task_type=#{type} and task_state=0;") |
| | |
| | | // 将外片玻璃的数据更新到内片 |
| | | spianMapper.UpdateDBCage(ids, cage1, cells, 1); |
| | | // 将新入的玻璃存入外片 |
| | | |
| | | |
| | | spianMapper.UpdataAddCage2(orderids, glassid, glasslist, cage1, cells, ids - 1, 2); |
| | | spianMapper.UpdataAddCage1(widths, cage1, cells);// 减少格子宽度 |
| | | spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(), prctier);// 新增任务 |
| | | S7control.getinstance().WriteWord(adddresslist, datas); |
| | | |
| | | S7control.getinstance().WriteWord(adddresslist, datas); |
| | | boolean qidong = listbool("DB105.16"); |
| | | int qidong2 = 0; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(), prctier,qidong2);// 新增任务 |
| | | System.out.println("进片任务|" + datas); |
| | | |
| | | } else { |
| | | // 数据库修改笼子表新增一条玻璃 |
| | | |
| | | |
| | | spianMapper.UpdataAddCage2(orderids, glassid, glasslist, cage1, cells, ids, 2); |
| | | spianMapper.UpdataAddCage1(widths, cage1, cells);// 减少格子宽度 |
| | | spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(), prctier);// 新增任务 |
| | | |
| | | S7control.getinstance().WriteWord(adddresslist, datas); |
| | | boolean qidong = listbool("DB105.16"); |
| | | int qidong2 = 0; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(), prctier,qidong2);// 新增任务 |
| | | System.out.println("进片任务|" + datas); |
| | | |
| | | |
| | | } |
| | | outmesid(glassid, "DB105.20"); |
| | | return (200); |
| | |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCageState(glassid.toString(), 3);// 更改笼子表的玻璃状态 |
| | | |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, state);// 新增任务 |
| | | // int state = spianMapper.selectGlassState(cage, cell);//获取格子数量 |
| | | // if (state == 2) { |
| | | // spianMapper.UpdateDBCage1(cage, cell);// 将内片数据更新到外片里 |
| | | // spianMapper.UpdateDBCage2(cage, cell);// 清除内片数据 |
| | | // } |
| | | System.out.println("出片任务|" + datas); |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1 |
| | | boolean qidong = listbool("DB105.18"); |
| | | int qidong2 = 0; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, state, qidong2);// 新增任务 |
| | | outmesid(glassid, "DB105.34");// 派发出片ID |
| | | |
| | | return (200);// 结束 |
| | |
| | | datas.add((short) 1); |
| | | datas.add((short) 1); |
| | | spianMapper.OverOutSlice(glassid.toString(), 1, 0);// 更新出片队列任务状态为进行中 |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, 1);// 新增任务 |
| | | |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCageState(glassid, 3);// 更改笼子表的玻璃状态 |
| | | |
| | |
| | | outmesid(glassid, "DB105.34");// 派发出片ID |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1 |
| | | |
| | | boolean qidong = listbool("DB105.18"); |
| | | int qidong2 = 0; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, 1, qidong2);// 新增任务 |
| | | return (200);// 结束 |
| | | |
| | | } else { |
| | |
| | | spianMapper.UpdateDBCage(ids, cage, cell, 2);// 将原格子数据更新到新格子里 |
| | | spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.Inserttask(2, 0, cageout.getId(), ids, glassids, 2);// 新增调度任务 |
| | | // 传输mes数据,坐标,数据 |
| | | System.out.println("出片任务|" + datas); |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1 |
| | | outmesid(glassids, "DB105.34");// 派发调拨玻璃ID |
| | | |
| | | boolean qidong = listbool("DB105.18"); |
| | | int qidong2 = 0; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(2, 0, cageout.getId(), ids, glassids, 2, qidong2);// 新增调度任务 |
| | | |
| | | return (200); // 结束 |
| | | |
| | | } else {// 笼子号大于5时 |
| | |
| | | datas.add((short) 2); |
| | | datas.add((short) 1); |
| | | String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id |
| | | spianMapper.UpdataGlassCageState(glassids, 3);// 更改笼子表的玻璃状态 |
| | | spianMapper.Inserttask(2, 0, cageout.getId() + 1, ids, glassids, 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);// 增加原格子宽度 |
| | | // 传输mes数据,坐标,数据 |
| | | System.out.println("出片任务|" + datas); |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1 |
| | | |
| | | outmesid(glassids, "DB105.34");// 派发调拨玻璃ID |
| | | spianMapper.UpdataGlassCageState(glassids, 3);// 更改笼子表的玻璃状态 |
| | | boolean qidong = listbool("DB105.18"); |
| | | int qidong2 = 2; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(2, 0, cageout.getId() + 1, ids, glassids, 2, qidong2);// 新增调度任务 |
| | | spianMapper.UpdateDBCage(ids, cage, cell, 2);// 将原格子数据更新到新格子里 |
| | | spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | |
| | | return (200);// 结束 |
| | | |
| | | } |
| | |
| | | // } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |