diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java index 1895d08..46bd0ce 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java @@ -388,7 +388,14 @@ public class TaskHeaderController extends HuahengBaseController { Result result = null; Integer[] idList = ConvertUtils.toIntArray(ids); for (int taskId : idList) { - result = handleMultiProcess("cancelTask", new MultiProcessListener() { + TaskHeader taskHeader = taskHeaderService.getById(taskId); + if (taskHeader == null) { + return Result.error("取消任务失败,没有找到任务" + taskId); + } + String warehouseCode = taskHeader.getWarehouseCode(); + String zoneCode = taskHeader.getZoneCode(); + String lockKey = warehouseCode + "_" + zoneCode; + result = handleMultiProcess("sendTaskToWcs", lockKey, new MultiProcessListener() { @Override public Result<?> doProcess() { return taskHeaderService.cancelTask(taskId);