|
|
@ -85,7 +85,7 @@ public class KGHJRKTask extends AbstractTask { |
|
|
|
continue; |
|
|
|
} |
|
|
|
// 设置终点并修改创建成功状态
|
|
|
|
task.setPoint_code2(point.getPoint_code()); |
|
|
|
task.setPoint_code2(point.getNext_wait_point()); |
|
|
|
task.setTask_status(TaskStatus.CREATED.getCode()); |
|
|
|
task.setRemark(""); |
|
|
|
taskService.update(task); |
|
|
@ -120,6 +120,7 @@ public class KGHJRKTask extends AbstractTask { |
|
|
|
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,"1"); |
|
|
|
//从前往后判断,直到发现点位有货,取前一个
|
|
|
|
SchBasePoint schBasePoint=null; |
|
|
|
if(!"ZJBKGHJDJW".equals(regionCode)) { |
|
|
|
for (int i = schBasePointList.size() - 1; i >= 0; i--) { |
|
|
|
SchBasePoint temp = schBasePointList.get(i); |
|
|
|
if (temp.getVehicle_qty() == 1 && |
|
|
@ -127,12 +128,24 @@ public class KGHJRKTask extends AbstractTask { |
|
|
|
if (schBasePoint != null) { |
|
|
|
log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code()); |
|
|
|
} else { |
|
|
|
log.info("当前区域:{}所有点位均已放满,暂时跳过",regionCode); |
|
|
|
throw new BadRequestException("当前区域:"+regionCode+"所有点位均已放满,暂时跳过"); |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
schBasePoint = temp; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
for (int i = schBasePointList.size() - 1; i >= 0; i--) { |
|
|
|
SchBasePoint temp = schBasePointList.get(i); |
|
|
|
if (temp.getVehicle_qty() <3 && |
|
|
|
ObjectUtil.isEmpty(temp.getIng_task_code())) { |
|
|
|
schBasePoint = temp; |
|
|
|
} |
|
|
|
} |
|
|
|
if (schBasePoint==null){ |
|
|
|
throw new BadRequestException("当前区域:"+regionCode+"所有点位均已放满,暂时跳过"); |
|
|
|
} |
|
|
|
} |
|
|
|
return schBasePoint; |
|
|
|
} |
|
|
|
|
|
|
|