From ba8110eb7ca28fcc4948cba9b28ec4af0082fc49 Mon Sep 17 00:00:00 2001 From: psh Date: Wed, 19 Jun 2024 15:43:55 +0800 Subject: [PATCH] fix --- .../wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java index c2de953..8c0fd5d 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java @@ -95,7 +95,7 @@ public class GHSQHTask extends AbstractTask { log.info("未找到当前符合允许取货的固化室点位,暂不生成任务"); return; } - SchBasePoint nextPoint = this.findNextPoint(schBasePoint); + SchBasePoint nextPoint = this.findNextPoint(schBasePoint,new SchBaseTask()); if (ObjectUtil.isEmpty(nextPoint)) { // 消息通知 log.info("未找到当前符合允许放货的缓存点,暂不生成任务Vehicle_type:{}", schBasePoint.getVehicle_type()); @@ -174,7 +174,7 @@ public class GHSQHTask extends AbstractTask { * 3.将当前点位设置为目标点 * 4.如果没有符合条件的点位,跳过执行暂时等待 */ - private SchBasePoint findNextPoint(SchBasePoint startPoint) { + private SchBasePoint findNextPoint(SchBasePoint startPoint,SchBaseTask task) { String regionCode = null; String materialType = startPoint.getVehicle_type(); if ("1".equals(startPoint.getVehicle_type())) { @@ -192,6 +192,10 @@ public class GHSQHTask extends AbstractTask { for (int i = schBasePointList.size() - 1; i >= 0; i--) { SchBasePoint schBasePoint = schBasePointList.get(i); SchBasePoint temp = null; + if(ObjectUtil.isNotEmpty(task) &&task.getTask_code().equals(schBasePoint.getIng_task_code())){ + log.info("点位"+schBasePoint.getPoint_code()+"已被当前任务锁定直接反馈"); + return schBasePoint; + } if (schBasePoint.getVehicle_qty() == 0 && ObjectUtil.isEmpty(schBasePoint.getIng_task_code()) //放货三拖一起放,只能到01位置 @@ -335,7 +339,7 @@ public class GHSQHTask extends AbstractTask { } SchBasePoint startPoint = pointService.getOne(new LambdaQueryWrapper() .eq(SchBasePoint::getPoint_code, schBasePoint)); - SchBasePoint nextPoint = this.findNextPoint(startPoint); + SchBasePoint nextPoint = this.findNextPoint(startPoint,schBaseTask); if (ObjectUtil.isEmpty(nextPoint)) { throw new Exception("当前起点" + schBaseTask.getPoint_code1() + "未找到合适的放货点位"); }