Browse Source

下发任务目标地点先设置为等待点

psh
psh 1 year ago
parent
commit
470974d972
  1. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java
  2. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java
  3. 10
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/XSCKTask.java
  4. 12
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java
  5. 1
      lms/nladmin-ui/src/views/wms/sch/group/index.vue

1
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()); AbstractTask task = taskFactory.getTask(schBaseTask.getConfig_code());
// 执行创建任务 // 执行创建任务
task.feedbackState(param,schBaseTask,result); task.feedbackState(param,schBaseTask,result);
taskService.update(schBaseTask);
Map<String, String> map=new HashMap<>(); Map<String, String> map=new HashMap<>();
map.put("start_point",schBaseTask.getPoint_code1()); map.put("start_point",schBaseTask.getPoint_code1());
map.put("next_point",schBaseTask.getPoint_code2()); map.put("next_point",schBaseTask.getPoint_code2());

4
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; continue;
} }
// 设置起点并修改创建成功状态 // 设置起点并修改创建成功状态
task.setPoint_code1(point.getPoint_code()); // 取料先去等待点
task.setPoint_code1(point.getStart_wait_point());
task.setTask_status(TaskStatus.CREATED.getCode()); task.setTask_status(TaskStatus.CREATED.getCode());
task.setRemark(""); task.setRemark("");
taskService.update(task); taskService.update(task);
@ -223,6 +224,5 @@ public class BPSLTask extends AbstractTask {
SchBasePoint point = this.findNextPoint(jsonObject); SchBasePoint point = this.findNextPoint(jsonObject);
// 设置起点并修改创建成功状态 // 设置起点并修改创建成功状态
schBaseTask.setPoint_code1(point.getPoint_code()); schBaseTask.setPoint_code1(point.getPoint_code());
taskService.update(schBaseTask);
} }
} }

10
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; continue;
} }
// 设置起点并修改创建成功状态 // 设置起点并修改创建成功状态
task.setPoint_code1(point.getPoint_code()); // 取料先去等待点
task.setPoint_code1(point.getStart_wait_point());
task.setTask_status(TaskStatus.CREATED.getCode()); task.setTask_status(TaskStatus.CREATED.getCode());
task.setRemark(""); task.setRemark("");
taskService.update(task); taskService.update(task);
@ -230,6 +231,11 @@ public class XSCKTask extends AbstractTask {
@Override @Override
protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) { protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) {
//todo 重算最优点 // 重算最优点
SchBasePoint nextPoint=pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code2()));
SchBasePoint point = this.findNextPoint(nextPoint,JSONObject.parseObject(schBaseTask.getExt_group_data()));
// 设置起点并修改创建成功状态
schBaseTask.setPoint_code1(point.getPoint_code());
} }
} }

12
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 cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException; import org.nl.common.exception.BadRequestException;
import org.nl.config.MapOf; import org.nl.config.MapOf;
@ -98,7 +99,8 @@ public class GHSQHTask extends AbstractTask {
log.info("未找到当前符合允许放货的缓存点,暂不生成任务Vehicle_type:{}",schBasePoint.getVehicle_type()); log.info("未找到当前符合允许放货的缓存点,暂不生成任务Vehicle_type:{}",schBasePoint.getVehicle_type());
return; 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); this.updateStatus(task_code, TaskStatus.CANCELED);
} }
@SneakyThrows
@Override @Override
protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) { protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) {
//todo 重算最优点 //todo 重算最优点
SchBasePoint startPoint=pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
.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());
} }
} }

1
lms/nladmin-ui/src/views/wms/sch/group/index.vue

@ -253,6 +253,7 @@
<!-- <el-table-column prop="is_first_flow_task" label="是否首个流程任务" :min-width="flexWidth('is_first_flow_task',crud.data,'是否首个流程任务')"/>--> <!-- <el-table-column prop="is_first_flow_task" label="是否首个流程任务" :min-width="flexWidth('is_first_flow_task',crud.data,'是否首个流程任务')"/>-->
<!-- <el-table-column prop="flow_code" label="流程编码" :min-width="flexWidth('flow_code',crud.data,'流程编码')"/>--> <!-- <el-table-column prop="flow_code" label="流程编码" :min-width="flexWidth('flow_code',crud.data,'流程编码')"/>-->
<!-- <el-table-column prop="flow_num" label="流程顺序" :min-width="flexWidth('flow_num',crud.data,'流程顺序')"/>--> <!-- <el-table-column prop="flow_num" label="流程顺序" :min-width="flexWidth('flow_num',crud.data,'流程顺序')"/>-->
<el-table-column prop="move_way" label="移动途径" :min-width="flexWidth('move_way',crud.data,'移动途径')" />
<el-table-column prop="before_task_code" label="上一任务" :min-width="flexWidth('before_task_code',crud.data,'上一任务')" /> <el-table-column prop="before_task_code" label="上一任务" :min-width="flexWidth('before_task_code',crud.data,'上一任务')" />
<el-table-column prop="next_task_code" label="下一任务" :min-width="flexWidth('next_task_code',crud.data,'上一任务')" /> <el-table-column prop="next_task_code" label="下一任务" :min-width="flexWidth('next_task_code',crud.data,'上一任务')" />
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" /> <el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />

Loading…
Cancel
Save