| | |
| | | .setMemo(map.getMemo()); |
| | | |
| | | if (map.getType().equals(Constants.TASK_TYPE_OUT_STOCK_EMPTY)) {//空容器出库 |
| | | boolean available = SpringUtils.getBean(WarehouseLocationRetrievalUtil.class).queryPathIsItAvailableOutArea(loc.getAreaId().toString(), siteNo, loc.getBarcode(),TaskType.TASK_TYPE_EMPTY_OUT.type.toString()); |
| | | boolean available = new WarehouseLocationRetrievalUtil().queryPathIsItAvailableOutArea(loc.getAreaId().toString(), siteNo, loc.getBarcode(),TaskType.TASK_TYPE_EMPTY_OUT.type.toString()); |
| | | if (!available) { |
| | | throw new CoolException("站点不支持空容器出库!!"); |
| | | } |
| | |
| | | || map.getType().equals(Constants.TASK_TYPE_WAVE_OUT_STOCK)) { |
| | | if (orgQty.compareTo(outQty) > 0) { |
| | | //拣料出库 -- 盘点出库 |
| | | boolean available = SpringUtils.getBean(WarehouseLocationRetrievalUtil.class).queryPathIsItAvailableOutArea(loc.getAreaId().toString(), siteNo, loc.getBarcode(),TaskType.TASK_TYPE_PICK_AGAIN_OUT.type); |
| | | boolean available = new WarehouseLocationRetrievalUtil().queryPathIsItAvailableOutArea(loc.getAreaId().toString(), siteNo, loc.getBarcode(),TaskType.TASK_TYPE_PICK_AGAIN_OUT.type); |
| | | if (!available) { |
| | | throw new CoolException("站点不支持此容器拣选出库!!"); |
| | | } |
| | |
| | | } else { |
| | | if (resouce.equals(TaskResouceType.TASK_RESOUCE_STOCK_NOT_OUT.val)){ |
| | | //全板出库 |
| | | boolean available = SpringUtils.getBean(WarehouseLocationRetrievalUtil.class).queryPathIsItAvailableOutArea(loc.getAreaId().toString(), siteNo, loc.getBarcode(),TaskType.TASK_TYPE_CROSS_DOCKING_OUT.type); |
| | | boolean available = new WarehouseLocationRetrievalUtil().queryPathIsItAvailableOutArea(loc.getAreaId().toString(), siteNo, loc.getBarcode(),TaskType.TASK_TYPE_CROSS_DOCKING_OUT.type); |
| | | if (!available) { |
| | | throw new CoolException("站点不支持越库!!"); |
| | | } |
| | |
| | | task.setTaskType(TaskType.TASK_TYPE_CROSS_DOCKING_OUT.type).setWarehType(warehouseAreas.getType());//越库 |
| | | } else { |
| | | //全板出库 |
| | | boolean available = SpringUtils.getBean(WarehouseLocationRetrievalUtil.class).queryPathIsItAvailableOutArea(loc.getAreaId().toString(), siteNo, loc.getBarcode(),TaskType.TASK_TYPE_OUT.type); |
| | | boolean available = new WarehouseLocationRetrievalUtil().queryPathIsItAvailableOutArea(loc.getAreaId().toString(), siteNo, loc.getBarcode(),TaskType.TASK_TYPE_OUT.type); |
| | | if (!available) { |
| | | throw new CoolException("站点不支持全板出库!!"); |
| | | } |
| | |
| | | } |
| | | } else if (map.getType().equals(Constants.TASK_TYPE_OUT_CHECK)) { |
| | | //盘点出库 |
| | | boolean available = SpringUtils.getBean(WarehouseLocationRetrievalUtil.class).queryPathIsItAvailableOutArea(loc.getAreaId().toString(), siteNo, loc.getBarcode(),TaskType.TASK_TYPE_CHECK_OUT.type); |
| | | boolean available = new WarehouseLocationRetrievalUtil().queryPathIsItAvailableOutArea(loc.getAreaId().toString(), siteNo, loc.getBarcode(),TaskType.TASK_TYPE_CHECK_OUT.type); |
| | | if (!available) { |
| | | throw new CoolException("当前站点不支持盘点出库!!"); |
| | | } |
| | |
| | | if (Objects.isNull(map.getTarLoc()) || StringUtils.isBlank(map.getTarLoc())) { |
| | | //目标库位为空,自动获取新库位 |
| | | |
| | | List<String> outWarehouseAreasByReservoirAreaAndContainer = SpringUtils.getBean(WarehouseLocationRetrievalUtil.class).getOutWarehouseAreasByReservoirAreaAndContainer(orgLoc.getAreaId(), orgLoc.getBarcode(), TaskType.TASK_TYPE_LOC_MOVE.type); |
| | | List<String> outWarehouseAreasByReservoirAreaAndContainer = new WarehouseLocationRetrievalUtil().getOutWarehouseAreasByReservoirAreaAndContainer(orgLoc.getAreaId(), orgLoc.getBarcode(), TaskType.TASK_TYPE_LOC_MOVE.type); |
| | | if (!Cools.isEmpty(outWarehouseAreasByReservoirAreaAndContainer) || outWarehouseAreasByReservoirAreaAndContainer.isEmpty()) { |
| | | throw new CoolException("未找到可用目标库区!!!源库区:"+orgLoc.getAreaId()); |
| | | } |
| | |
| | | List<LocItem> locItems = this.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocCode, orgLoc.getCode())); |
| | | boolean sign = false; |
| | | for (LocItem locItem : locItems) { |
| | | if (!SpringUtils.getBean(WarehouseLocationRetrievalUtil.class).retrieveMatnrIsItAvailable(areaId, locItem.getMatnrId())){ |
| | | if (!new WarehouseLocationRetrievalUtil().retrieveMatnrIsItAvailable(areaId, locItem.getMatnrId())){ |
| | | sign = true; |
| | | break; |
| | | } |