| | |
| | | if (Cools.isEmpty(basStation)) { |
| | | throw new CoolException("未找到站点信息"); |
| | | } |
| | | if (!basStation.getUseStatus().equals("O")) { |
| | | if (!basStation.getUseStatus().equals("O") && !basStation.getUseStatus().equals("D") && !basStation.getUseStatus().equals("F")) { |
| | | throw new CoolException("站点状态不为空闲"); |
| | | } |
| | | if (!Cools.isEmpty(basStation.getContainerType())) { |
| | |
| | | // } |
| | | BasStation station = basStationService.getOne(new LambdaQueryWrapper<BasStation>() |
| | | .eq(BasStation::getStationName, param.getTransferStationNo())); |
| | | if (Objects.isNull(station) || (!station.getUseStatus().equals(LocStsType.LOC_STS_TYPE_O.type) && !station.getUseStatus().equals(LocStsType.LOC_STS_TYPE_D.type)) ) { |
| | | if (Objects.isNull(station) || (!station.getUseStatus().equals(LocStsType.LOC_STS_TYPE_O.type) && !station.getUseStatus().equals(LocStsType.LOC_STS_TYPE_F.type) && !station.getUseStatus().equals(LocStsType.LOC_STS_TYPE_D.type)) ) { |
| | | throw new CoolException("站点不存在或站点不处于空库、空板状态!!"); |
| | | } |
| | | station.setBarcode(""); |
| | | basStationService.updateById(station); |
| | | StringBuilder errorBuilder = new StringBuilder(); |
| | | List<Long> areaTypeList = LocUtils.getAreaTypeList(station.getStationName()); |
| | | if (areaTypeList.isEmpty()) { |
| | |
| | | if (!taskService.save(task)) { |
| | | throw new CoolException("任务保存失败!!"); |
| | | } |
| | | station.setUseStatus(LocStsType.LOC_STS_TYPE_R.type); |
| | | |
| | | if (!station.getType().equals(0)){ |
| | | station.setUseStatus(LocStsType.LOC_STS_TYPE_R.type); |
| | | } |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("站点状态更新失败!!"); |
| | | } |
| | |
| | | .setTaskCode(ruleCode) |
| | | .setOrgLoc(loc.getCode()) |
| | | .setTargSite(station.getStationName()) |
| | | .setResource(TaskResouceType.TASK_RESOUCE_CHECK_TYPE.val) |
| | | .setTaskType(TaskType.TASK_TYPE_CHECK_OUT.type) |
| | | .setResource(TaskResouceType.TASK_RESOUCE_STOCK_TYPE.val) |
| | | .setTaskType(TaskType.TASK_TYPE_OUT.type) |
| | | .setTaskStatus(TaskStsType.MISSION_INITIAL.id) |
| | | .setWarehType(WarehType.WAREHOUSE_TYPE_AGV.val) |
| | | .setBarcode(param.getContainerNo()) |
| | | .setBarcode(loc.getBarcode()) |
| | | .setCreateTime(new Date()) |
| | | .setUpdateBy(loginUserId) |
| | | .setUpdateTime(new Date()) |
| | |
| | | .setSplrBatch(item.getBatch()) |
| | | .setPlatWorkCode(item.getPlatWorkCode()) |
| | | .setPlatItemId(item.getPlatItemId()) |
| | | .setOrderType(OrderType.ORDER_IN.type) |
| | | .setOrderType(OrderType.ORDER_OUT.type) |
| | | .setWkType(Short.parseShort(OrderWorkType.ORDER_WORK_TYPE_OTHER_IN.type)); |
| | | taskItems.add(taskItem); |
| | | } |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | } |