| | |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | 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()); |