|
@ -90,9 +90,9 @@ public class KGHJRKTask extends AbstractTask { |
|
|
task.setRemark(""); |
|
|
task.setRemark(""); |
|
|
taskService.update(task); |
|
|
taskService.update(task); |
|
|
|
|
|
|
|
|
//发起任务时先把点位占用,防止发起重复任务
|
|
|
// //发起任务时先把点位占用,防止发起重复任务
|
|
|
point.setIng_task_code(task.getTask_code()); |
|
|
// point.setIng_task_code(task.getTask_code());
|
|
|
pointService.update(point); |
|
|
// pointService.update(point);
|
|
|
|
|
|
|
|
|
//下发
|
|
|
//下发
|
|
|
this.renotifyAcs(task); |
|
|
this.renotifyAcs(task); |
|
@ -173,7 +173,10 @@ public class KGHJRKTask extends AbstractTask { |
|
|
if (status.equals(TaskStatus.FINISHED)) { // 完成
|
|
|
if (status.equals(TaskStatus.FINISHED)) { // 完成
|
|
|
// 终点解锁,库存增加
|
|
|
// 终点解锁,库存增加
|
|
|
startPointObj.setIng_task_code(""); |
|
|
startPointObj.setIng_task_code(""); |
|
|
|
|
|
//正极板对接位通过plc信号同步,任务完成不增加
|
|
|
|
|
|
if(!"ZJBKGHJDJW".equals(startPointObj.getRegion_code())) { |
|
|
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() + 1); |
|
|
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() + 1); |
|
|
|
|
|
} |
|
|
pointService.update(endPointObj); |
|
|
pointService.update(endPointObj); |
|
|
|
|
|
|
|
|
// 任务完成
|
|
|
// 任务完成
|
|
@ -204,6 +207,21 @@ public class KGHJRKTask extends AbstractTask { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) { |
|
|
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); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |