From 118a5cecc5ae8ea0989c56fe7dd231fa35259b0a Mon Sep 17 00:00:00 2001 From: zhouz <> Date: Mon, 27 Oct 2025 15:46:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=87=BA=E7=A9=BA=E6=9C=A8=E7=AE=B1?= =?UTF-8?q?=E6=B5=85=E8=B4=A7=E4=BD=8D=E6=9C=89=E9=AA=8C=E7=AE=B1=E9=94=81?= =?UTF-8?q?=E4=B9=9F=E4=B8=8D=E8=BF=9B=E8=A1=8C=E5=87=BA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PdmBiSubpackagerelationServiceImpl.java | 1 - .../org/nl/b_lms/sch/tasks/TwoOutBoxTask.java | 14 +----- .../auto/AutoIssueOutEmptyTask.java | 46 ++----------------- 3 files changed, 5 insertions(+), 56 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java index 76e4ce6fe..d533d4dd4 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java @@ -491,7 +491,6 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl list = ischBaseTaskService.list(new QueryWrapper() - .eq("is_delete", "0") - .eq("point_code1", 浅Attr.getString("struct_code")) - .lt("task_status", TaskStatusEnum.FINISHED.getCode())); - if (!CollectionUtils.isEmpty(list)) { - json.put("remark", "当前仓位对应的浅货位【" + 浅Attr.getString("struct_code") + "有正在执行中的任务,任务完成后才能下发!】"); - WQLObject.getWQLObject("SCH_BASE_Task").update(json); - continue; - } else { - outBoxManageService.createBoxMove(浅Attr); - } } else { + json.put("remark", "当前仓位对应的浅货位【" + 浅Attr.getString("struct_code") + "被锁定!】"); + WQLObject.getWQLObject("SCH_BASE_Task").update(json); continue; } } diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/first_floor_area/auto/AutoIssueOutEmptyTask.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/first_floor_area/auto/AutoIssueOutEmptyTask.java index 89d910cb2..085e02f4d 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/first_floor_area/auto/AutoIssueOutEmptyTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/first_floor_area/auto/AutoIssueOutEmptyTask.java @@ -4,35 +4,25 @@ import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt; -import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService; import org.nl.b_lms.sch.task.dao.SchBaseTask; import org.nl.b_lms.sch.task.service.IschBaseTaskService; import org.nl.b_lms.sch.tasks.TwoOutBoxTask; -import org.nl.b_lms.sch.tasks.first_floor_area.ShiftingTask; import org.nl.b_lms.storage_manage.ios.enums.IOSEnum; import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.OutBoxManageService; -import org.nl.common.enums.PackageInfoIvtEnum; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.wms.sch.AcsTaskDto; import org.nl.wms.sch.AcsUtil; import org.nl.wms.sch.manage.TaskStatusEnum; -import org.redisson.api.RLock; -import org.redisson.api.RedissonClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.TimeUnit; import static org.nl.wms.util.TaskUtil.getRoutePlanCode; @@ -59,26 +49,6 @@ public class AutoIssueOutEmptyTask { } } - /** - * Executes a task that processes ACS (Automation Control System) tasks. - * - * This method checks the number of active tasks and ensures the limit is not exceeded. - * If tasks are eligible for further processing, it retrieves task data from the - * database, evaluates conditions based on their attributes, and issues new tasks - * to the ACS system. The method also handles specific locking and task dependency - * scenarios, ensuring that all conditions for task issuance are met. - * - * Key logic includes: - * - Querying database tables to fetch and analyze task details. - * - Ensuring task limits are respected to prevent excessive task submissions. - * - Checking and managing task statuses and related storage attributes, such as - * lock states and box specifications. - * - Notifying the ACS system with the correctly formatted task data. - * - Handling errors and updating task remarks in case of exceptions or conflicting conditions. - * - * This method operates with various modules such as task management, box handling services, - * and ACS system notification utilities. - */ @SneakyThrows public void execute() { /* @@ -117,22 +87,12 @@ public class AutoIssueOutEmptyTask { if (浅Attr.getString("lock_type").equals(IOSEnum.LOCK_TYPE.code("未锁定"))) { // 判断浅货位木箱和深货位木箱是否相同规格 outBoxManageService.createBoxMove(浅Attr); - } else if (浅Attr.getString("lock_type").equals(IOSEnum.LOCK_TYPE.code("验箱出库锁"))) { - List list = ischBaseTaskService.list(new QueryWrapper() - .eq("is_delete", "0") - .eq("point_code1", 浅Attr.getString("struct_code")) - .lt("task_status", TaskStatusEnum.FINISHED.getCode())); - if (!CollectionUtils.isEmpty(list)) { - json.put("remark", "当前仓位对应的浅货位【" + 浅Attr.getString("struct_code") + "有正在执行中的任务,任务完成后才能下发!】"); - WQLObject.getWQLObject("SCH_BASE_Task").update(json); - continue; - } else { - outBoxManageService.createBoxMove(浅Attr); - } } else { + json.put("remark", "当前仓位对应的浅货位【" + 浅Attr.getString("struct_code") + "有正在执行中的任务,任务完成后才能下发!】"); + WQLObject.getWQLObject("SCH_BASE_Task").update(json); continue; } - }catch (Exception e){ + } catch (Exception e) { json.put("remark", e.getMessage()); WQLObject.getWQLObject("SCH_BASE_Task").update(json); continue;