diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java index ac5bc4a..4eefc1e 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java @@ -152,7 +152,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { try { abstractTask.updateTaskStatus(taskObj.getTask_id(), status); } catch (Exception e) { - log.error("任务状态更新失败: {}{}", e,e.getMessage()); + log.error("任务状态更新失败: {}", e.getMessage(),e); return BaseResponse.responseError(requestNo, "任务:[" + taskId + "]状态更新失败," + message); } return BaseResponse.responseOk(requestNo, "任务状态反馈成功!"); 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 4bc61ec..fcf0b79 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 @@ -116,7 +116,7 @@ public class KGHJRKTask extends AbstractTask { if ("A1".equals(startPoint.getWorkshop_code())) { //A1空架到HCQ1 regionCode = "HCQ7"; - regionCode2 ="HCQ1"; + regionCode2 = "HCQ1"; if ("1".equals(vehicleType)) { regionCode = "ZJBKGHJDJW"; } @@ -133,7 +133,9 @@ public class KGHJRKTask extends AbstractTask { for (int i = schBasePointList.size() - 1; i >= 0; i--) { SchBasePoint temp = schBasePointList.get(i); if (temp.getVehicle_qty() > 1 && - ObjectUtil.isEmpty(temp.getIng_task_code())) { + //放货三拖一起放,只能到01位置 + temp.getPoint_code().endsWith("01") + && ObjectUtil.isEmpty(temp.getIng_task_code())) { if (schBasePoint != null) { log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code()); } else { @@ -143,12 +145,12 @@ public class KGHJRKTask extends AbstractTask { } schBasePoint = temp; } - if(ObjectUtil.isEmpty(schBasePoint)){ + if (ObjectUtil.isEmpty(schBasePoint)) { schBasePointList = pointMapper.findPointByRegion(regionCode2, "1"); for (int i = schBasePointList.size() - 1; i >= 0; i--) { SchBasePoint temp = schBasePointList.get(i); //三拖一起放,如果不是01结尾直接跳过 - if(!temp.getPoint_code().endsWith("01")){ + if (!temp.getPoint_code().endsWith("01")) { continue; } if (temp.getVehicle_qty() == 1 && @@ -191,10 +193,13 @@ public class KGHJRKTask extends AbstractTask { } String startPoint = taskObj.getPoint_code1(); // 获取起点 + if (taskObj.getPoint_code2().startsWith("QHQ")) { + taskObj.setPoint_code2("HCQ" + taskObj.getPoint_code2().substring(3)); + } String endPoint = taskObj.getPoint_code2(); // 获取终点 SchBasePoint startPointObj = pointService.getById(startPoint); if (endPoint.startsWith("ZJBDJW")) { - endPoint=endPoint.substring(0,endPoint.length()-2); + endPoint = endPoint.substring(0, endPoint.length() - 2); } SchBasePoint endPointObj = pointService.getById(endPoint); // 根据传来的类型去对任务进行操作 @@ -207,16 +212,15 @@ public class KGHJRKTask extends AbstractTask { endPointObj.setIng_task_code(""); endPointObj.setVehicle_qty(1); pointService.update(endPointObj); - if("HCQ7".equals(endPointObj.getRegion_code())){ - endPointObj = pointService.getById(endPoint.substring(0,endPoint.length()-1)+"2"); - endPointObj.setIng_task_code(""); - endPointObj.setVehicle_qty(1); - pointService.update(endPointObj); - endPointObj = pointService.getById(endPoint.substring(0,endPoint.length()-1)+"3"); - endPointObj.setIng_task_code(""); - endPointObj.setVehicle_qty(1); - pointService.update(endPointObj); - } + endPointObj = pointService.getById(endPoint.substring(0, endPoint.length() - 1) + "2"); + endPointObj.setIng_task_code(""); + endPointObj.setVehicle_qty(1); + pointService.update(endPointObj); + endPointObj = pointService.getById(endPoint.substring(0, endPoint.length() - 1) + "3"); + endPointObj.setIng_task_code(""); + endPointObj.setVehicle_qty(1); + pointService.update(endPointObj); + // 任务完成 taskObj.setTask_status(TaskStatus.FINISHED.getCode()); @@ -255,7 +259,7 @@ public class KGHJRKTask extends AbstractTask { schBaseTask.setPoint_code2(point.getPoint_code() + "0" + (point.getVehicle_qty() + 1)); } else { //空架缓存区不需要该逻辑,左右都是同一套点位体系 - if(!"HCQ7".equals(point.getRegion_code())) { + if (!"HCQ7".equals(point.getRegion_code())) { schBaseTask.setPoint_code2(point.getPoint_code().replace("HCQ", "QHQ")); } if (ObjectUtil.isNotEmpty(point.getIng_task_code()) && !schBaseTask.getTask_code().equals(point.getIng_task_code())) { 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 393ba9a..c190db4 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 @@ -116,8 +116,8 @@ public class TBXBKJTask extends AbstractTask { String regionCode2 = null; if ("TBX1".equals(startPoint.getRegion_code())) { //TBX1找A区 - regionCode = "HCQ7"; - regionCode2 ="HCQ1"; + regionCode = "HCQ1"; + regionCode2 ="HCQ7"; } else if ("TBX2".equals(startPoint.getRegion_code())) { //TBX2找B区 diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/mapper/PointMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/mapper/PointMapper.xml index 445e3ec..3d1ed26 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/mapper/PointMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/mapper/PointMapper.xml @@ -8,7 +8,7 @@ `sch_base_point` p WHERE p.region_code like CONCAT('%', #{regionCode}, '%') and p.point_status = #{point_status} and p.is_used = 1 - ORDER BY region_code + ORDER BY point_code