rev:修复无路由路线时取消任务索引越界
This commit is contained in:
@@ -284,8 +284,8 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(point_code)) {
|
||||
if(!(task.getStart_point_code().contains(point_code)
|
||||
|| task.getNext_point_code().contains(point_code))){
|
||||
if (!(task.getStart_point_code().contains(point_code)
|
||||
|| task.getNext_point_code().contains(point_code))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -416,8 +416,8 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
continue;
|
||||
}
|
||||
if (StrUtil.equals(task.getTask_status(), TaskStatusEnum.READY.getIndex())) {
|
||||
if((task.getStart_device_code().equals(start_device_code)
|
||||
|| task.getStart_device_code2().equals(start_device_code))){
|
||||
if ((task.getStart_device_code().equals(start_device_code)
|
||||
|| task.getStart_device_code2().equals(start_device_code))) {
|
||||
list.add(task);
|
||||
}
|
||||
}
|
||||
@@ -469,8 +469,8 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
continue;
|
||||
}
|
||||
if (StrUtil.equals(task.getTask_status(), TaskStatusEnum.BUSY.getIndex())) {
|
||||
if((task.getStart_device_code().equals(head_start_device_code)
|
||||
|| task.getStart_device_code2().equals(head_start_device_code))){
|
||||
if ((task.getStart_device_code().equals(head_start_device_code)
|
||||
|| task.getStart_device_code2().equals(head_start_device_code))) {
|
||||
Instruction instruction = instructionService.findByTaskcodeAndStatus(task.getTask_code());
|
||||
if (ObjectUtil.isNotEmpty(instruction)) {
|
||||
list.add(task);
|
||||
@@ -940,6 +940,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
entity.getStart_device_code(),
|
||||
entity.getNext_device_code(),
|
||||
entity.getRoute_plan_code());
|
||||
if (ObjectUtil.isNotEmpty(shortPathsList)) {
|
||||
String type = shortPathsList.get(0).getType();
|
||||
// != 0 为agv任务
|
||||
if (!StrUtil.equals(type, "0")) {
|
||||
@@ -949,6 +950,8 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void cancelNoSendWms(String id) throws Exception {
|
||||
@@ -1373,7 +1376,6 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public TaskDto findByEndCodeAndReady(String device_code) {
|
||||
Iterator var3 = tasks.iterator();
|
||||
@@ -1392,8 +1394,6 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public TaskDto findByStartCode(String device_code) {
|
||||
Iterator var3 = tasks.iterator();
|
||||
@@ -1633,7 +1633,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
List<InstructionMybatis> list = instructionService.list(Wrappers.lambdaQuery(InstructionMybatis.class));
|
||||
if (CollUtil.isNotEmpty(list) && list.size() > 0) {
|
||||
for (InstructionMybatis inst : list) {
|
||||
if(task.getTask_id().equals(inst.getTask_id())){
|
||||
if (task.getTask_id().equals(inst.getTask_id())) {
|
||||
JSONObject ins1 = new JSONObject();
|
||||
ins1.put("task_code", inst.getInstruction_code());
|
||||
ins1.put("vehicle_code", inst.getVehicle_code());
|
||||
@@ -1766,7 +1766,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
// }
|
||||
if (StrUtil.equals(task.getStart_device_code(), deviceCode)
|
||||
&& StrUtil.equals(task.getTask_status(), TaskStatusEnum.BUSY.getIndex())) {
|
||||
if (tasks.size()<2){
|
||||
if (tasks.size() < 2) {
|
||||
tasks.add(task);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user