|
@ -84,14 +84,13 @@ public class MJXLTask extends AbstractTask { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
// 设置终点并修改创建成功状态
|
|
|
// 设置终点并修改创建成功状态
|
|
|
task.setPoint_code2(point.getPoint_code()); |
|
|
task.setPoint_code2(point.getNext_wait_point()); |
|
|
task.setTask_status(TaskStatus.CREATED.getCode()); |
|
|
task.setTask_status(TaskStatus.CREATED.getCode()); |
|
|
task.setRemark(""); |
|
|
task.setRemark(""); |
|
|
taskService.update(task); |
|
|
taskService.update(task); |
|
|
|
|
|
|
|
|
//发起任务时先把点位占用,防止发起重复任务
|
|
|
//发起任务时先把点位占用,防止发起重复任务
|
|
|
point.setIng_task_code(task.getTask_code()); |
|
|
point.setIng_task_code(task.getTask_code()); |
|
|
point.setVehicle_qty(point.getVehicle_qty() + 1); |
|
|
|
|
|
point.setVehicle_type(materialType); |
|
|
point.setVehicle_type(materialType); |
|
|
pointService.update(point); |
|
|
pointService.update(point); |
|
|
|
|
|
|
|
@ -163,7 +162,7 @@ public class MJXLTask extends AbstractTask { |
|
|
.eq(PdmBdWorkorder::getWorkorder_code, extGroupData.getString("workorder_code"))) |
|
|
.eq(PdmBdWorkorder::getWorkorder_code, extGroupData.getString("workorder_code"))) |
|
|
: null; |
|
|
: null; |
|
|
String startPoint = taskObj.getPoint_code1(); // 获取起点
|
|
|
String startPoint = taskObj.getPoint_code1(); // 获取起点
|
|
|
String endPoint = taskObj.getPoint_code2(); // 获取终点
|
|
|
String endPoint = taskObj.getPoint_code2().substring(0,taskObj.getPoint_code2().length()-2); // 获取终点
|
|
|
SchBasePoint startPointObj = pointService.getById(startPoint); |
|
|
SchBasePoint startPointObj = pointService.getById(startPoint); |
|
|
SchBasePoint endPointObj = pointService.getById(endPoint); |
|
|
SchBasePoint endPointObj = pointService.getById(endPoint); |
|
|
// 根据传来的类型去对任务进行操作
|
|
|
// 根据传来的类型去对任务进行操作
|
|
@ -179,6 +178,7 @@ public class MJXLTask extends AbstractTask { |
|
|
// 终点解锁
|
|
|
// 终点解锁
|
|
|
endPointObj.setIng_task_code(""); |
|
|
endPointObj.setIng_task_code(""); |
|
|
endPointObj.setVehicle_code(ObjectUtil.isEmpty(endPointObj.getVehicle_code()) ? vehicle_code + "," : endPointObj.getVehicle_code() + vehicle_code + ","); |
|
|
endPointObj.setVehicle_code(ObjectUtil.isEmpty(endPointObj.getVehicle_code()) ? vehicle_code + "," : endPointObj.getVehicle_code() + vehicle_code + ","); |
|
|
|
|
|
endPointObj.setVehicle_qty(endPointObj.getVehicle_qty() + 1); |
|
|
pointService.update(endPointObj); |
|
|
pointService.update(endPointObj); |
|
|
// 要把数据存到组盘表 -> 改造公共方法,返回id
|
|
|
// 要把数据存到组盘表 -> 改造公共方法,返回id
|
|
|
SchBaseVehiclematerialgroup groupEntity = new SchBaseVehiclematerialgroup(); |
|
|
SchBaseVehiclematerialgroup groupEntity = new SchBaseVehiclematerialgroup(); |
|
@ -222,7 +222,6 @@ public class MJXLTask extends AbstractTask { |
|
|
if (ObjectUtil.isNotEmpty(endPointObj)) { |
|
|
if (ObjectUtil.isNotEmpty(endPointObj)) { |
|
|
endPointObj.setIng_task_code(""); |
|
|
endPointObj.setIng_task_code(""); |
|
|
//任务取消把原先占用的位置释放
|
|
|
//任务取消把原先占用的位置释放
|
|
|
endPointObj.setVehicle_qty(endPointObj.getVehicle_qty()-1); |
|
|
|
|
|
if (endPointObj.getVehicle_qty() <= 0) { |
|
|
if (endPointObj.getVehicle_qty() <= 0) { |
|
|
endPointObj.setVehicle_type(null); |
|
|
endPointObj.setVehicle_type(null); |
|
|
} |
|
|
} |
|
@ -246,6 +245,15 @@ public class MJXLTask extends AbstractTask { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void feedbackTaskState(JSONObject param, SchBaseTask schBaseTask, BaseResponse result) { |
|
|
protected void feedbackTaskState(JSONObject param, SchBaseTask schBaseTask, BaseResponse result) { |
|
|
//无需重算,返回当前点位即可
|
|
|
//重新计算固化室放货点位
|
|
|
|
|
|
try { |
|
|
|
|
|
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, extGroupData); |
|
|
|
|
|
schBaseTask.setPoint_code2(point.getPoint_code()+"0"+(point.getVehicle_qty()+1)); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
log.error("error:{}", e, e.getMessage()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|