no message

main
HUOJIN\92525 2026-01-14 23:06:31 +08:00
parent ca22218b8a
commit fdf940aaf6
2 changed files with 14 additions and 10 deletions

View File

@ -193,23 +193,23 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
for (Task task : list) {
task.setAgvTaskId(agvTask.getId());
updateToTaskList.add(task);
if (TaskTypeEnum.PICK.getValue().equals(task.getTaskType())) {
Inventory inventory = inventoryMap.get(task.getInventoryId());
if (inventory != null) {
Integer status = TaskTypeEnum.PICK.getValue().equals(task.getTaskType()) ? InventoryStatusEnum.OUTBOUND.getValue() : InventoryStatusEnum.MOVE.getValue();
inventory.setStatus(status);
inventory.setStatus(InventoryStatusEnum.OUTBOUND.getValue());
if (!inventoryList.contains(inventory)) {
inventoryList.add(inventory);
}
}
}
}
}
if (CollectionUtils.isNotEmpty(updateToTaskList)) {
batchUtils.updateBatchTask(updateToTaskList);
}
if (CollectionUtils.isNotEmpty(inventoryList)) {
Map<Long, Inventory> distinctInventoryMap = inventoryList.stream()
.collect(Collectors.toMap(Inventory::getId,
Function.identity(), (existing, replacement) -> existing));
batchUtils.updateBatchInventory(new ArrayList<>(distinctInventoryMap.values()));
batchUtils.updateBatchInventory(inventoryList);
}
}

View File

@ -981,11 +981,15 @@ public class AllocateProcessor {
Task moveTask = taskService.bulidTask(taskNo, TaskTypeEnum.MOVE.getValue(), moveItem, fromPoint, toPoint, stock, null, null, inv.getItemKeyId(), inv.getId(), inv.getQuantity(), 0);
moveList.add(moveTask);
pointService.bindPoint(toPoint);
inv.setStatus(InventoryStatusEnum.MOVE.getValue());
log.info("生成移位任务:{}- 容器:{} - 库位:{} - 库存数量:{}", taskNo, stock.getStockCode(), fromPoint.getPointCode(), inv.getQuantity());
} catch (Exception e) {
throw e;
}
}
if (CollectionUtils.isNotEmpty(moveInventoryList)){
inventoryMapper.updateById(moveInventoryList);
}
return moveList;
}