From 4275b365e5cbd1f98701bf2faa15b212df91f2bf Mon Sep 17 00:00:00 2001 From: psh Date: Wed, 20 Dec 2023 17:35:05 +0800 Subject: [PATCH] fix --- .../task_manage/task/tasks/KGHJRKTask.java | 4 ++-- .../task_manage/task/tasks/TBXBKJTask.java | 23 +++++++++++-------- .../sch/task_manage/task/tasks/XSCKTask.java | 4 ++-- .../task_manage/task/tasks/ghs/GHSQHTask.java | 6 ++--- 4 files changed, 21 insertions(+), 16 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 3524407..58a66c9 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 @@ -107,8 +107,8 @@ public class KGHJRKTask extends AbstractTask { private SchBasePoint findNextPoint(SchBasePoint startPoint) { String regionCode = null; if ("A1".equals(startPoint.getWorkshop_code())) { - //A1空架到HCQ3 - regionCode = "HCQ3"; + //A1空架到HCQ1 + regionCode = "HCQ1"; } else if ("A2".equals(startPoint.getWorkshop_code())) { //A1空架到KGHJ2 diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java index 8acddc6..74abcea 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java @@ -110,20 +110,25 @@ public class TBXBKJTask extends AbstractTask { String regionCode = null; if ("TBX1".equals(startPoint.getRegion_code())) { //TBX1找A区 - regionCode = "HCQ3"; + regionCode = "HCQ1"; } else if ("TBX2".equals(startPoint.getRegion_code())) { //TBX2找B区 regionCode = "HCQ5"; } - List schBasePointList = pointMapper.findPointByRegion(regionCode,"1"); + SchBasePoint temp = null; + List schBasePointList = pointMapper.findPointByRegion(regionCode, "1"); for (SchBasePoint schBasePoint : schBasePointList) { - if (schBasePoint.getVehicle_qty() > 0&&ObjectUtil.isEmpty(schBasePoint.getIng_task_code())) { - log.info("涂板线补空架找到当前符合条件的点位{}",schBasePoint.getPoint_code()); - return schBasePoint; + if (schBasePoint.getVehicle_qty() > 0 && ObjectUtil.isEmpty(schBasePoint.getIng_task_code())) { + if (temp == null || + schBasePoint.getPoint_code().startsWith(temp.getPoint_code().substring(0, temp.getPoint_code().length() - 2)) + &&schBasePoint.getPoint_code().compareTo(temp.getPoint_code())>0){ + temp=schBasePoint; + log.info("涂板线补空架找到当前符合条件的点位{}", schBasePoint.getPoint_code()); + } } } - return null; + return temp; } @Override @@ -150,8 +155,8 @@ public class TBXBKJTask extends AbstractTask { if (status.equals(TaskStatus.FINISHED)) { // 完成 // 起点解锁,库存减少 startPointObj.setIng_task_code(""); - startPointObj.setVehicle_qty(startPointObj.getVehicle_qty()-1); - pointService.update(endPointObj); + startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() - 1); + pointService.update(startPointObj); // 任务完成 taskObj.setTask_status(TaskStatus.FINISHED.getCode()); @@ -185,7 +190,7 @@ public class TBXBKJTask extends AbstractTask { } @Override - protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) { + protected void feedbackTaskState(JSONObject param, SchBaseTask schBaseTask, BaseResponse result) { //todo 重算最优点 SchBasePoint startPoint = pointService.getOne(new LambdaQueryWrapper() .eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code2())); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/XSCKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/XSCKTask.java index 02dcf7f..f38e894 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/XSCKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/XSCKTask.java @@ -120,9 +120,9 @@ public class XSCKTask extends AbstractTask { String regionCode = null; String materialType = extGroupData.getString("material_type"); if ("XSQ1".equals(nextPoint.getRegion_code())) { - //XSQ1找A区 边负极板HCQ01 负极板HCQ02 + //XSQ1找A区 边负极板HCQ03 负极板HCQ02 if("3".equals(materialType)) { - regionCode = "HCQ1"; + regionCode = "HCQ3"; }else if("2".equals(materialType)){ regionCode = "HCQ2"; } 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 e0c4d51..7e02edd 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 @@ -162,7 +162,7 @@ public class GHSQHTask extends AbstractTask { /** * 1.根据当前固化室所处区域,判断到哪个区的缓存位 - * 正极板到HCQ4,负极板到HCQ2,边负极板到HCQ1 + * 正极板到HCQ4,负极板到HCQ2,边负极板到HCQ3 * 2.从1010列到0101列倒叙判断当前列物料类型是否与起点一致且存在空位 * 3.将当前点位设置为目标点 * 4.如果没有符合条件的点位,跳过执行暂时等待 @@ -178,8 +178,8 @@ public class GHSQHTask extends AbstractTask { //负极板到缓存区2 regionCode = "HCQ2"; } else if ("3".equals(startPoint.getVehicle_type())) { - //边负极板到缓存区1 - regionCode = "HCQ1"; + //边负极板到缓存区3 + regionCode = "HCQ3"; } List schBasePointList = pointMapper.findPointByRegion(regionCode, "1"); for (int i = schBasePointList.size() - 1; i >= 0; i--) {