| | |
| | | if (wrkMast.getWrkSts() == 17) { |
| | | //查找库位 |
| | | boolean flag = false; |
| | | String[] deeplocs = Utils.getDeepLocs(wrkMast.getSourceLocNo()); |
| | | // append |
| | | Integer row = Utils.getGroupRow(wrkMast.getSourceLocNo()); |
| | | Integer bay = Utils.getBay(wrkMast.getSourceLocNo()); |
| | | Integer lev = Utils.getLev(wrkMast.getSourceLocNo()); |
| | | |
| | | String locNo = Utils.append(row, bay, lev); |
| | | String[] deeplocs = Utils.getDeepLocs(locNo); |
| | | if(!Cools.isEmpty(deeplocs)){ |
| | | for(String deepLocNo : deeplocs) { |
| | | LocMast deepLoc = locMastService.selectById(deepLocNo); |
| | |
| | | wrkMast.setIoPri((double)9999); |
| | | wrkMast.setWrkSts(2L); |
| | | wrkMast.setLocNo(deepLocNo); |
| | | wrkMast.setSteNo(null); |
| | | wrkMast.setSteNo(0); |
| | | wrkMast.setModiTime(new Date()); |
| | | if (wrkMastMapper.updateById(wrkMast) == 0) { |
| | | log.error("修改工作档状态 17.移库完成 => 2.移库再入库中 失败!!,工作号={}", wrkMast.getWrkNo()); |
| | |
| | | // 有小车 |
| | | if (steNo != null) { |
| | | // 小车行走到堆垛机待搬移点 |
| | | if (wrkMast.getWrkSts() == 2L && wrkMast.getSteNo() == null) { |
| | | if (wrkMast.getWrkSts() == 2L && (wrkMast.getSteNo() == null || wrkMast.getSteNo() == 0)) { |
| | | // 没有其他任务 |
| | | if (null == wrkMastMapper.selectPakin(slave.getId(), steNo)) { |
| | | this.letCarBeWaiting(wrkMast, steNo, wrkMast.getLocNo()); |
| | |
| | | } |
| | | // 没有小车 |
| | | } else { |
| | | if (wrkMast.getWrkSts() == 2L && wrkMast.getSteNo() == null) { |
| | | if (wrkMast.getWrkSts() == 2L && (wrkMast.getSteNo() == null || wrkMast.getSteNo() == 0)) { |
| | | // 寻找当前堆垛机对应的小车 |
| | | SteThread steThread = queryIdleCar(wrkMast); |
| | | if (steThread != null) { |
| | |
| | | // } |
| | | if (locMastService.isOutMost(wrkMast.getLocNo())) { |
| | | wrkMast.setWrkSts(17L); |
| | | wrkMast.setSteNo(0); |
| | | // 默认目标库位是空板 |
| | | String locSts = "D"; |
| | | String locSts = ""; |
| | | // 库位移转判断是否为空板移转 |
| | | if (wrkMast.getEmptyMk().equals("N")) { |
| | | locSts = "F"; |
| | |
| | | continue; |
| | | } |
| | | } |
| | | if(Cools.isEmpty(locSts)){ |
| | | log.error("库位移转 ===>> 库存状态为空;[源库位={}],[目标库位={}]", wrkMast.getSourceLocNo(), wrkMast.getLocNo()); |
| | | continue; |
| | | } |
| | | |
| | | // 修改源库位状态 ==> O |
| | | LocMast sourceLoc = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | if (null != sourceLoc) { |