| | |
| | | if (Cools.isEmpty(sourceLoc)) { |
| | | throw new CoolException("未找到库位"); |
| | | } |
| | | |
| | | if (Utils.isDeepLoc(slaveProperties, sourceLocNo)) { |
| | | String shallowLoc = Utils.getShallowLoc(slaveProperties, sourceLocNo); |
| | | LocMast locMast = locMastService.selectById(shallowLoc); |
| | | if (locMast == null) { |
| | | throw new CoolException(shallowLoc + "浅库位不存在"); |
| | | } |
| | | |
| | | if(!locMast.getLocSts().equals("O")) { |
| | | throw new CoolException(shallowLoc + "浅库位状态不为空"); |
| | | } |
| | | } |
| | | |
| | | LocMast loc = locMastService.selectById(locNo); |
| | | if (Cools.isEmpty(loc)) { |
| | | throw new CoolException("未找到库位"); |
| | | } |
| | | |
| | | if (Utils.isDeepLoc(slaveProperties, locNo)) { |
| | | String shallowLoc = Utils.getShallowLoc(slaveProperties, locNo); |
| | | LocMast locMast = locMastService.selectById(shallowLoc); |
| | | if (locMast == null) { |
| | | throw new CoolException(shallowLoc + "浅库位不存在"); |
| | | } |
| | | |
| | | if(!locMast.getLocSts().equals("O")) { |
| | | throw new CoolException(shallowLoc + "浅库位有货,无法移转"); |
| | | } |
| | | } |
| | | |
| | | // 判断库位是否冻结 |
| | | String sourceLocFrozen = locMastMapper.findFirstFrozenLocNo(Arrays.asList(sourceLoc.getLocNo(), loc.getLocNo())); |
| | | if (sourceLocFrozen != null) { |
| | |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setMemo("人工手动移库"); |
| | | boolean res = wrkMastService.insert(wrkMast); |
| | | if (!res) { |
| | | throw new CoolException("保存工作档失败"); |