psh 5 months ago
parent
commit
ba8110eb7c
  1. 10
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java

10
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java

@ -95,7 +95,7 @@ public class GHSQHTask extends AbstractTask {
log.info("未找到当前符合允许取货的固化室点位,暂不生成任务");
return;
}
SchBasePoint nextPoint = this.findNextPoint(schBasePoint);
SchBasePoint nextPoint = this.findNextPoint(schBasePoint,new SchBaseTask());
if (ObjectUtil.isEmpty(nextPoint)) {
// 消息通知
log.info("未找到当前符合允许放货的缓存点,暂不生成任务Vehicle_type:{}", schBasePoint.getVehicle_type());
@ -174,7 +174,7 @@ public class GHSQHTask extends AbstractTask {
* 3.将当前点位设置为目标点
* 4.如果没有符合条件的点位跳过执行暂时等待
*/
private SchBasePoint findNextPoint(SchBasePoint startPoint) {
private SchBasePoint findNextPoint(SchBasePoint startPoint,SchBaseTask task) {
String regionCode = null;
String materialType = startPoint.getVehicle_type();
if ("1".equals(startPoint.getVehicle_type())) {
@ -192,6 +192,10 @@ public class GHSQHTask extends AbstractTask {
for (int i = schBasePointList.size() - 1; i >= 0; i--) {
SchBasePoint schBasePoint = schBasePointList.get(i);
SchBasePoint temp = null;
if(ObjectUtil.isNotEmpty(task) &&task.getTask_code().equals(schBasePoint.getIng_task_code())){
log.info("点位"+schBasePoint.getPoint_code()+"已被当前任务锁定直接反馈");
return schBasePoint;
}
if (schBasePoint.getVehicle_qty() == 0
&& ObjectUtil.isEmpty(schBasePoint.getIng_task_code())
//放货三拖一起放,只能到01位置
@ -335,7 +339,7 @@ public class GHSQHTask extends AbstractTask {
}
SchBasePoint startPoint = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getPoint_code, schBasePoint));
SchBasePoint nextPoint = this.findNextPoint(startPoint);
SchBasePoint nextPoint = this.findNextPoint(startPoint,schBaseTask);
if (ObjectUtil.isEmpty(nextPoint)) {
throw new Exception("当前起点" + schBaseTask.getPoint_code1() + "未找到合适的放货点位");
}

Loading…
Cancel
Save