| | |
| | | continue; |
| | | } |
| | | |
| | | // 入库深库位是否有非F、D库位进行校验 |
| | | // 入库深库位是否有非F、D、X库位进行校验 |
| | | if (wrkMastMapper.selectShallowLoc(Integer.parseInt(wrkMast.getLocNo().substring(0, 2)),Integer.parseInt(wrkMast.getLocNo().substring(2, 5)),Integer.parseInt(wrkMast.getLocNo().substring(5, 7)))!=null){ |
| | | continue; |
| | | } |
| | |
| | | * 出库 ===>> 库位到堆垛机站 |
| | | */ |
| | | public synchronized boolean locToCrnStn(CrnSlave slave, CrnProtocol crnProtocol){ |
| | | Collections.shuffle(slave.getCrnOutStn()); |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnOutStn()) { |
| | | // 获取工作状态为11(生成出库ID)的出库工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectPakOutStep111215(slave.getId(), crnStn.getStaNo()); |
| | |
| | | for (String shallowLocNo : shallowLocs) { |
| | | LocMast shallowLoc = locMastService.selectById(shallowLocNo); |
| | | WrkMast waitWrkMast = wrkMastMapper.selectByLocNo(shallowLocNo); |
| | | if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) { |
| | | if (shallowLoc.getLocSts().equals("P") || shallowLoc.getLocSts().equals("R")) { |
| | | if (Cools.isEmpty(waitWrkMast)){ |
| | | News.error("库位异常"); |
| | | }else { |
| | | if (waitWrkMast.getIoType() != 11 || waitWrkMast.getWrkSts() != 17){ |
| | | waitWrkMast.setIoPri((double)9999); |
| | | if (wrkMastMapper.updateById(waitWrkMast)==0){ |
| | | News.error("调整优先级失败"); |
| | | }else if (waitWrkMast.getWrkSts() != 17){ |
| | | flag = true; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | }else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) { |
| | | if (null == waitWrkMast) { |
| | | // 生成一笔移库任务工作档、改变浅库位的源库/目标库 库位状态 |
| | | // 没有作业中的出库任务时,才能生成移库任务 |
| | |
| | | || Utils.getBay(one.getLocNo()) != Utils.getBay(shallowLoc.getLocNo()) |
| | | || Utils.getLev(one.getLocNo()) != Utils.getLev(shallowLoc.getLocNo())){ |
| | | |
| | | Integer steNo = this.hasCarOfIdle(one.getLocNo()); |
| | | if (steNo != null) { |
| | | //有小车 |
| | | continue; |
| | | } |
| | | |
| | | //检测当前库位内侧其他库位是否为D、F、X |
| | | if (Utils.checkInsideLocIsDFX(one.getLocNo())) { |
| | | //内侧其他库位不是D、F、X。不能选取该库位 |
| | | continue; |
| | | } |
| | | |
| | | loc = one; |
| | | break; |
| | | } |