From 4059504425b970f1dc458e4048578984ad9a60c7 Mon Sep 17 00:00:00 2001 From: psh Date: Fri, 29 Dec 2023 17:46:36 +0800 Subject: [PATCH] fix --- .../task_manage/task/tasks/ghs/GHSQHTask.java | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 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 2de8c86..563e159 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 @@ -230,6 +230,9 @@ public class GHSQHTask extends AbstractTask { throw new BadRequestException("该任务已取消!"); } String startPoint = taskObj.getPoint_code1(); // 获取起点 + if(startPoint.endsWith("0101")||startPoint.endsWith("0601")){ + startPoint=startPoint.substring(0,startPoint.length()-2); + } String endPoint = taskObj.getPoint_code2(); // 获取终点 SchBasePoint startPointObj = pointService.getById(startPoint); SchBasePoint endPointObj = pointService.getById(endPoint); @@ -260,18 +263,18 @@ public class GHSQHTask extends AbstractTask { .eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode) .eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status, GroupBindMaterialStatusEnum.BOUND.getValue())); - if (ObjectUtil.isEmpty(one)) { - throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到"); + if (ObjectUtil.isNotEmpty(one)) { + one.setTask_code(taskObj.getTask_code()); + one.setPoint_code(endPointObj.getPoint_code().substring(0, endPointObj.getPoint_code().length() - 1) + (i + 1)); // 当前位置 + one.setPoint_name(endPointObj.getPoint_name().substring(0, endPointObj.getPoint_name().length() - 1) + (i + 1)); + one.setMove_way(one.getMove_way() == null ? "" : (one.getMove_way() + " -> ") + endPointObj.getPoint_code().substring(0, endPointObj.getPoint_code().length() - 1) + (i + 1)); + one.setUpdate_id(GeneralDefinition.ACS_ID); + one.setUpdate_name(GeneralDefinition.ACS_NAME); + one.setUpdate_time(DateUtil.now()); + vehiclematerialgroupService.updateById(one); + group_id.append(one.getGroup_id()).append(','); } - one.setTask_code(taskObj.getTask_code()); - one.setPoint_code(endPointObj.getPoint_code().substring(0,endPointObj.getPoint_code().length()-1)+(i+1)); // 当前位置 - one.setPoint_name(endPointObj.getPoint_name().substring(0,endPointObj.getPoint_name().length()-1)+(i+1)); - one.setMove_way(one.getMove_way() == null ? "" : (one.getMove_way() + " -> ") + endPointObj.getPoint_code().substring(0,endPointObj.getPoint_code().length()-1)+(i+1)); - one.setUpdate_id(GeneralDefinition.ACS_ID); - one.setUpdate_name(GeneralDefinition.ACS_NAME); - one.setUpdate_time(DateUtil.now()); - vehiclematerialgroupService.updateById(one); - group_id.append(one.getGroup_id()).append(','); + } // 起点清空 if (ObjectUtil.isNotEmpty(startPointObj)) {