|
|
@ -90,9 +90,9 @@ public class KGHJRKTask extends AbstractTask { |
|
|
|
task.setRemark(""); |
|
|
|
taskService.update(task); |
|
|
|
|
|
|
|
//发起任务时先把点位占用,防止发起重复任务
|
|
|
|
point.setIng_task_code(task.getTask_code()); |
|
|
|
pointService.update(point); |
|
|
|
// //发起任务时先把点位占用,防止发起重复任务
|
|
|
|
// point.setIng_task_code(task.getTask_code());
|
|
|
|
// pointService.update(point);
|
|
|
|
|
|
|
|
//下发
|
|
|
|
this.renotifyAcs(task); |
|
|
@ -173,7 +173,10 @@ public class KGHJRKTask extends AbstractTask { |
|
|
|
if (status.equals(TaskStatus.FINISHED)) { // 完成
|
|
|
|
// 终点解锁,库存增加
|
|
|
|
startPointObj.setIng_task_code(""); |
|
|
|
//正极板对接位通过plc信号同步,任务完成不增加
|
|
|
|
if(!"ZJBKGHJDJW".equals(startPointObj.getRegion_code())) { |
|
|
|
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() + 1); |
|
|
|
} |
|
|
|
pointService.update(endPointObj); |
|
|
|
|
|
|
|
// 任务完成
|
|
|
@ -204,6 +207,21 @@ public class KGHJRKTask extends AbstractTask { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) { |
|
|
|
//todo 重算最优点
|
|
|
|
//重新计算固化室放货点位
|
|
|
|
JSONObject extGroupData = JSONObject.parseObject(schBaseTask.getExt_group_data()); |
|
|
|
SchBasePoint startPoint = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>() |
|
|
|
.eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1())); |
|
|
|
SchBasePoint point = findNextPoint(startPoint, schBaseTask.getVehicle_type()); |
|
|
|
if("ZJBKGHJDJW".equals(point.getRegion_code())) { |
|
|
|
schBaseTask.setPoint_code2(point.getPoint_code() + "0" + (point.getVehicle_qty() + 1)); |
|
|
|
}else{ |
|
|
|
schBaseTask.setPoint_code2(point.getPoint_code()); |
|
|
|
if(ObjectUtil.isNotEmpty(point.getIng_task_code())&&!schBaseTask.getTask_code().equals(point.getIng_task_code())){ |
|
|
|
throw new BadRequestException("当前空架点位有任务,暂不反馈!"); |
|
|
|
} |
|
|
|
//重算点位时把点位占用
|
|
|
|
point.setIng_task_code(schBaseTask.getTask_code()); |
|
|
|
pointService.update(point); |
|
|
|
} |
|
|
|
} |
|
|
|
} |