From e59b2e7f7118253763a8a81d81503a5baadf33dd Mon Sep 17 00:00:00 2001 From: psh Date: Wed, 29 Nov 2023 18:54:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=B5=8B=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task_manage/task/tasks/KGHJRKTask.java | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java index 9b24457..8b534bb 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java @@ -104,24 +104,31 @@ public class KGHJRKTask extends AbstractTask { */ private SchBasePoint findNextPoint(SchBasePoint startPoint) { String regionCode = null; - if (startPoint.getRegion_code().endsWith("1")) { - //1找A区 - regionCode = "KGHJ1"; + if ("A1".equals(startPoint.getWorkshop_code())) { + //A1空架到HCQ3 + regionCode = "HCQ3"; - } else if (startPoint.getRegion_code().endsWith("2")) { - //2找B区 + } else if ("A2".equals(startPoint.getWorkshop_code())) { + //A1空架到KGHJ2 regionCode = "KGHJ2"; } - List schBasePointList = pointMapper.findPointByRegion(regionCode,null); + List schBasePointList = pointMapper.findPointByRegion(regionCode,"1"); + //从前往后判断,直到发现点位有货,取前一个 + SchBasePoint schBasePoint=null; for(int i=schBasePointList.size()-1;i>=0;i--) { - SchBasePoint schBasePoint = schBasePointList.get(i); - if(schBasePoint.getVehicle_qty()<3&& - ObjectUtil.isEmpty(schBasePoint.getIng_task_code())){ - log.info("空固化架放货找到当前符合条件的点位{}",schBasePoint.getPoint_code()); - return schBasePoint; + SchBasePoint temp = schBasePointList.get(i); + if(temp.getVehicle_qty()==1&& + ObjectUtil.isEmpty(temp.getIng_task_code())){ + if(schBasePoint!=null) { + log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code()); + }else{ + log.info("当前区域:{}所有点位均已放满,暂时跳过",regionCode); + } + break; } + schBasePoint=temp; } - return null; + return schBasePoint; } @Override