| | |
| | | TaskType.TASK_TYPE_EMPITY_OUT.type, TaskType.TASK_TYPE_MERGE_OUT.type); |
| | | List<Task> tasks = this.list(new LambdaQueryWrapper<Task>() |
| | | .in(Task::getTaskType, list) |
| | | .in(Task::getId, ids).in(Task::getTaskStatus, longs)); |
| | | .in(Task::getId, ids) |
| | | .in(Task::getTaskStatus, longs)); |
| | | if (tasks.isEmpty()) { |
| | | throw new CoolException("任务已处执行状态不可取消!!"); |
| | | } |
| | |
| | | throw new CoolException("任务信息修改失败!!"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | if (!Objects.isNull(task.getWarehType()) && task.getWarehType().equals(WarehType.WAREHOUSE_TYPE_AGV.val)) { |
| | |
| | | if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type) || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_IN.type)) { |
| | | basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>() |
| | | .eq(BasStation::getStationName, task.getOrgSite()) |
| | | .eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_R.type) |
| | | ); |
| | | .eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_R.type)); |
| | | } else if (task.getTaskType().equals(TaskType.TASK_TYPE_OUT.type) |
| | | || task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type) |
| | | || task.getTaskType().equals(TaskType.TASK_TYPE_MERGE_OUT.type) |
| | |
| | | if (Objects.isNull(loc)) { |
| | | throw new CoolException("数据错误:库位信息不存在!!"); |
| | | } |
| | | |
| | | loc.setUseStatus(LocStsType.LOC_STS_TYPE_F.type).setBarcode(task.getBarcode()).setUpdateBy(loginUserId).setUpdateTime(new Date()); |
| | | if (!locService.updateById(loc)) { |
| | | throw new CoolException("库位信息修改失败!!"); |
| | | } |
| | | |
| | | //出库 |
| | | if (item.getWkType().equals(Short.parseShort(OrderWorkType.ORDER_WORK_TYPE_STOCK_OUT.type))) { |
| | | //库存出库 |
| | | } else if (task.getResource().equals(TaskResouceType.TASK_RESOUCE_WAVE_TYPE.val)) { |
| | | WaveItem waveItem = waveItemService.getById(item.getSource()); |
| | | if (Objects.isNull(waveItem)) { |
| | | throw new CoolException("波次明细不存在!!"); |
| | | } |
| | | Double workQty = Math.round((waveItem.getWorkQty() - item.getAnfme()) * 10000) / 10000.0; |
| | | waveItem.setWorkQty(workQty).setExceStatus(WaveItemExceStatus.WAVE_ITEM_EXCE_STATUS_UN.val); |
| | | if (!waveItemService.updateById(waveItem)) { |
| | | throw new CoolException("波次明细更新失败!!"); |
| | | } |
| | | |
| | | Wave wave = waveService.getOne(new LambdaQueryWrapper<Wave>().eq(Wave::getId, waveItem.getWaveId())); |
| | | if (Objects.isNull(wave)) { |
| | | throw new CoolException("波次信息不存在!!"); |
| | | } |
| | | wave.setExceStatus(WaveExceStatus.WAVE_EXCE_STATUS_INIT.val).setWorkQty(0.0).setQty(0.0); |
| | | if (!waveService.updateById(wave)) { |
| | | throw new CoolException("波次更新失败!!"); |
| | | } |
| | | |
| | | } else if (item.getWkType().equals(Short.parseShort(OrderWorkType.ORDER_WORK_TYPE_OTHER.type))) { |
| | | //其它出库 |
| | | |
| | | } else { |
| | | //出库单出库 |
| | | AsnOrder asnOrder = outStockService.getById(item.getSourceId()); |