| | |
| | | |
| | | // 目标堆垛机号 |
| | | int crnNo = whsType; |
| | | if (!basCrnpService.checkSiteError(crnNo, true)){ |
| | | throw new CoolException("没有可用的堆垛机"); |
| | | } |
| | | // if (!basCrnpService.checkSiteError(crnNo, true)){ |
| | | // throw new CoolException("没有可用的堆垛机"); |
| | | // } |
| | | |
| | | StartupDto startupDto = new StartupDto(); |
| | | |
| | |
| | | } |
| | | } |
| | | if (Cools.isEmpty(locMast)) { |
| | | locMast = locMastService.queryFreeLocMast(curRow, locTypeDto.getLocType1()); |
| | | // 因库位移转、需预留空库位 |
| | | if (!locMastService.checkEmptyCount(locMast)) { |
| | | locMast = null; |
| | | } |
| | | // 目标库位 ===>> 浅库位, 则校验其深库位是否为 F D X |
| | | if (null != locMast && Utils.isShallowLoc(slaveProperties, locMast.getLocNo())) { |
| | | LocMast deepLoc = locMastService.selectById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo())); |
| | | if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) { |
| | | locMast = null; |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", curRow) |
| | | .eq("loc_sts", "O") |
| | | .eq("loc_type1", locTypeDto.getLocType1()) |
| | | .orderBy("lev1",true).orderBy("bay1",true)); |
| | | for (LocMast locMast1 : locMasts) { |
| | | // 因库位移转、需预留空库位 |
| | | if (!locMastService.checkEmptyCount(locMast1)) { |
| | | locMast1 = null; |
| | | } |
| | | } |
| | | // 目标库位 ===>> 深库位, 则校验其浅库位是否为 O |
| | | if (null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) { |
| | | LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo())); |
| | | if (!shallowLoc.getLocSts().equals("O")) { |
| | | locMast = null; |
| | | // 目标库位 ===>> 浅库位, 则校验其深库位是否为 F D X |
| | | if (null != locMast1 && Utils.isShallowLoc(slaveProperties, locMast1.getLocNo())) { |
| | | LocMast deepLoc = locMastService.selectById(Utils.getDeepLoc(slaveProperties, locMast1.getLocNo())); |
| | | if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) { |
| | | locMast1 = null; |
| | | } |
| | | } |
| | | // 目标库位 ===>> 深库位, 则校验其浅库位是否为 O |
| | | if (null != locMast1 && Utils.isDeepLoc(slaveProperties, locMast1.getLocNo())) { |
| | | LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast1.getLocNo())); |
| | | if (!shallowLoc.getLocSts().equals("O")) { |
| | | locMast1 = null; |
| | | } |
| | | } |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } |
| | | } |
| | | } |