| | |
| | | } else { |
| | | this.inPut(crn, crnProtocol, mark); |
| | | } |
| | | } else { |
| | | log.error("" + mark + " - 1" + " - 有物料无工作档 ===》异常"); |
| | | } |
| | | } else if (crnProtocol.getLoaded() == 1 && crnProtocol.getLoadedTwo() == 0) { |
| | | // 堆垛机工位1有物料 |
| | |
| | | this.inPut(crn, crnProtocol, mark); |
| | | } |
| | | } |
| | | } else { |
| | | log.error("" + mark + " - 1" + " - 有物料无工作档 ===》异常"); |
| | | } |
| | | } else if (crnProtocol.getLoaded() == 0 && crnProtocol.getLoadedTwo() == 1) { |
| | | // 堆垛机工位2有物料 |
| | |
| | | this.inPut(crn, crnProtocol, mark); |
| | | } |
| | | } |
| | | } else { |
| | | log.error("" + mark + " - 1" + " - 有物料无工作档 ===》异常"); |
| | | } |
| | | } |
| | | } |
| | |
| | | crnCommand.setPltType(crnStation); |
| | | crnCommand.setTaskNo(wrkMast.getWrkNo().shortValue()); // 工作号 |
| | | // crnCommand.setAckFinish((short) 0); // 任务完成确认位 |
| | | crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE); // 任务模式: 库位移转 |
| | | crnCommand.setTaskMode(CrnTaskModeType.TAKE); // 任务模式: 库位移转 |
| | | crnCommand.setSourcePosX((short) (sourceSta.getRow1() + slave.getOffset())); // 源库位排 |
| | | crnCommand.setSourcePosY((short) (sourceSta.getBay1() + slave.getOffset())); // 源库位列 |
| | | crnCommand.setSourcePosZ((short) (sourceSta.getLev1() + slave.getOffset())); // 源库位层 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 出库取货 |
| | | * 出库放货 |
| | | */ |
| | | public synchronized void outPut(CrnSlave slave, CrnProtocol crnProtocol, Integer mark) { |
| | | News.warnNoLog("" + mark + " - 2" + " - 0" + " - 堆垛机入出库作业下发:执行出库"); |
| | |
| | | } |
| | | } |
| | | |
| | | if (wrkMastMapper.selectByPltType(slave.getId(), wrkMast.getPltType()) == null) { |
| | | News.error("" + mark + " - 1" + " - 9" + " - 堆垛机改工位存在工作档,工位={}", wrkMast.getPltType()); |
| | | } |
| | | |
| | | |
| | | // 已经存在吊车执行任务时,则过滤 |
| | | if (wrkMastMapper.selectWorking(slave.getId()) != null) { |
| | | break; |
| | |
| | | crnCommand.setCrnNo(slave.getId()); // 堆垛机编号 |
| | | crnCommand.setTaskNo(wrkMast.getWrkNo().shortValue()); // 工作号 |
| | | // crnCommand.setAckFinish((short) 0); // 任务完成确认位 |
| | | crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE); // 任务模式: 库位移转 |
| | | crnCommand.setTaskMode(CrnTaskModeType.PUT); // 任务模式: 库位移转 |
| | | // crnCommand.setSourcePosX((short) (sourceSta.getRow1() + slave.getOffset())); // 源库位排 |
| | | // crnCommand.setSourcePosY((short) (sourceSta.getBay1() + slave.getOffset())); // 源库位列 |
| | | // crnCommand.setSourcePosZ((short) (sourceSta.getLev1() + slave.getOffset())); // 源库位层 |
| | |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | CrnCommand crnCommand = new CrnCommand(); |
| | | crnCommand.setPltType(getCrnStation(wrkMast.getSourceLocNo())); |
| | | crnCommand.setCrnNo(slave.getId()); // 堆垛机编号 |
| | | crnCommand.setTaskNo(wrkMast.getWrkNo().shortValue()); // 工作号 |
| | | crnCommand.setAckFinish((short) 0); // 任务完成确认位 |
| | |
| | | LocMast loc = null; |
| | | for (Integer row : rows) { |
| | | if (Utils.isDeepLoc(slaveProperties, row)) { |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1()); |
| | | if (shallowLoc.getBay1() == 1) { |
| | | loc = locMastService.queryFreeLocMast2(row, shallowLoc.getLocType1(), 1); |
| | | } else if (shallowLoc.getRow1() == 29) { |
| | | loc = locMastService.queryFreeLocMast2(row, shallowLoc.getLocType1(), 29); |
| | | } else { |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1()); |
| | | } |
| | | |
| | | |
| | | if (loc != null) { |
| | | if (Utils.isDeepLoc(slaveProperties, loc.getLocNo())) { |
| | |
| | | if (null == loc) { |
| | | for (Integer row : rows) { |
| | | if (Utils.isShallowLoc(slaveProperties, row)) { |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1()); |
| | | if (shallowLoc.getBay1() == 1) { |
| | | loc = locMastService.queryFreeLocMast2(row, shallowLoc.getLocType1(), 1); |
| | | } else if (shallowLoc.getRow1() == 29) { |
| | | loc = locMastService.queryFreeLocMast2(row, shallowLoc.getLocType1(), 29); |
| | | } else { |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1()); |
| | | } |
| | | |
| | | |
| | | if (null != loc) {//对应深库位非在库状态,不能移库 |
| | | String deepLoc = Utils.getDeepLoc(slaveProperties, loc.getLocNo()); |