| | |
| | | Integer code = jsonObject.getInteger("code"); |
| | | if (code.equals(200)) { |
| | | StartupDto dto = jsonObject.getObject("data", StartupDto.class); |
| | | // // plc 处理 |
| | | // barcodeThread.setBarcode(""); |
| | | // plc 处理 |
| | | barcodeThread.setBarcode(""); |
| | | // staProtocol.setWorkNo(dto.getWorkNo().shortValue()); |
| | | // staProtocol.setStaNo(dto.getStaNo().shortValue()); |
| | | // devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | |
| | | } |
| | | |
| | | //调度小车避让 |
| | | boolean result = Utils.searchEmptyGroupToMoveShuttle(Utils.getLev(wrkMast.getLocNo()), wrkMast.getShuttleNo(), shuttleThread); |
| | | boolean result = Utils.searchEmptyGroupToMoveShuttle(Utils.getLev(wrkMast.getSourceLocNo()), wrkMast.getShuttleNo(), shuttleThread); |
| | | if (!result) { |
| | | return false; |
| | | } |
| | |
| | | //释放提升机令牌 |
| | | liftProtocol.setToken(0); |
| | | } |
| | | |
| | | if (wrkMast.getMk() == null || !wrkMast.getMk().equals("Y")) { |
| | | //不需要用到机械臂,直接转29.出库完成 |
| | | wrkMast.setWrkSts(29L); |
| | | } |
| | | |
| | | break; |
| | | case 106://106.提升机搬运中 ==> 107.提升机搬运完成 |
| | | wrkMast.setWrkSts(107L); |
| | |
| | | Integer code = jsonObject.getInteger("code"); |
| | | if (code.equals(200)) { |
| | | StartupDto dto = jsonObject.getObject("data", StartupDto.class); |
| | | |
| | | barcodeThread.setBarcode(""); |
| | | // // 更新站点信息 且 下发plc命令 |
| | | // staProtocol.setWorkNo(dto.getWorkNo().shortValue()); |
| | | // staProtocol.setStaNo(dto.getStaNo().shortValue()); |
| | |
| | | |
| | | targetSta = (short) 317; |
| | | |
| | | //覆盖工作档目标站 |
| | | wrkMast.setStaNo(targetSta.intValue()); |
| | | if (wrkMastMapper.updateById(wrkMast) > 0) { |
| | | //向300站写入目标站 |
| | | staProtocol = staProtocol.clone(); |
| | | staProtocol.setStaNo(targetSta);//移动到目标站 |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | try { |
| | | Thread.sleep(500); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | if (wrkMast.getStaNo() != 303 && wrkMast.getStaNo() != 317) { |
| | | //覆盖工作档目标站 |
| | | wrkMast.setStaNo(targetSta.intValue()); |
| | | if (wrkMastMapper.updateById(wrkMast) > 0) { |
| | | //向300站写入目标站 |
| | | staProtocol = staProtocol.clone(); |
| | | staProtocol.setStaNo(targetSta);//移动到目标站 |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | try { |
| | | Thread.sleep(500); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | continue; |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | } |