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 ef6fd39..26ae64b 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 @@ -199,6 +199,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { AbstractTask task = taskFactory.getTask(schBaseTask.getConfig_code()); // 执行创建任务 task.feedbackState(param,schBaseTask,result); + taskService.update(schBaseTask); Map map=new HashMap<>(); map.put("start_point",schBaseTask.getPoint_code1()); map.put("next_point",schBaseTask.getPoint_code2()); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java index 996938d..27a20db 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java @@ -86,7 +86,8 @@ public class BPSLTask extends AbstractTask { continue; } // 设置起点并修改创建成功状态 - task.setPoint_code1(point.getPoint_code()); + // 取料先去等待点 + task.setPoint_code1(point.getStart_wait_point()); task.setTask_status(TaskStatus.CREATED.getCode()); task.setRemark(""); taskService.update(task); @@ -223,6 +224,5 @@ public class BPSLTask extends AbstractTask { SchBasePoint point = this.findNextPoint(jsonObject); // 设置起点并修改创建成功状态 schBaseTask.setPoint_code1(point.getPoint_code()); - taskService.update(schBaseTask); } } 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 db71194..d92d171 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 @@ -89,7 +89,8 @@ public class XSCKTask extends AbstractTask { continue; } // 设置起点并修改创建成功状态 - task.setPoint_code1(point.getPoint_code()); + // 取料先去等待点 + task.setPoint_code1(point.getStart_wait_point()); task.setTask_status(TaskStatus.CREATED.getCode()); task.setRemark(""); taskService.update(task); @@ -230,6 +231,11 @@ public class XSCKTask extends AbstractTask { @Override protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) { - //todo 重算最优点 + // 重算最优点 + SchBasePoint nextPoint=pointService.getOne(new LambdaQueryWrapper() + .eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code2())); + SchBasePoint point = this.findNextPoint(nextPoint,JSONObject.parseObject(schBaseTask.getExt_group_data())); + // 设置起点并修改创建成功状态 + schBaseTask.setPoint_code1(point.getPoint_code()); } } \ No newline at end of file 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 199e42c..2a549eb 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 @@ -6,6 +6,7 @@ import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.nl.common.exception.BadRequestException; import org.nl.config.MapOf; @@ -98,7 +99,8 @@ public class GHSQHTask extends AbstractTask { log.info("未找到当前符合允许放货的缓存点,暂不生成任务Vehicle_type:{}",schBasePoint.getVehicle_type()); return; } - this.createTask(schBasePoint,nextPoint.getPoint_code()); + // 放料先去等待点 + this.createTask(schBasePoint,nextPoint.getNext_wait_point()); } @@ -294,8 +296,16 @@ public class GHSQHTask extends AbstractTask { this.updateStatus(task_code, TaskStatus.CANCELED); } + @SneakyThrows @Override protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) { //todo 重算最优点 + SchBasePoint startPoint=pointService.getOne(new LambdaQueryWrapper() + .eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1())); + SchBasePoint nextPoint=this.findNextPoint(startPoint); + if(ObjectUtil.isEmpty(nextPoint)){ + throw new Exception("当前起点"+schBaseTask.getPoint_code1()+"未找到合适的放货点位"); + } + schBaseTask.setPoint_code2(nextPoint.getPoint_code()); } } diff --git a/lms/nladmin-ui/src/views/wms/sch/group/index.vue b/lms/nladmin-ui/src/views/wms/sch/group/index.vue index 2b186a1..9d23a3b 100644 --- a/lms/nladmin-ui/src/views/wms/sch/group/index.vue +++ b/lms/nladmin-ui/src/views/wms/sch/group/index.vue @@ -253,6 +253,7 @@ +