|
|
@ -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<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()); |
|
|
|
} |
|
|
|
} |
|
|
|