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,13 +940,16 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
entity.getStart_device_code(),
|
||||
entity.getNext_device_code(),
|
||||
entity.getRoute_plan_code());
|
||||
String type = shortPathsList.get(0).getType();
|
||||
// != 0 为agv任务
|
||||
if (!StrUtil.equals(type, "0")) {
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "3")) {
|
||||
agvService.markComplete(entity.getTask_code());
|
||||
if (ObjectUtil.isNotEmpty(shortPathsList)) {
|
||||
String type = shortPathsList.get(0).getType();
|
||||
// != 0 为agv任务
|
||||
if (!StrUtil.equals(type, "0")) {
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "3")) {
|
||||
agvService.markComplete(entity.getTask_code());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1217,8 +1220,8 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
instdto.setAgv_inst_type(CommonFinalParam.ONE);
|
||||
instructionservice.create2(instdto);
|
||||
|
||||
acsTask.setTask_status(CommonFinalParam.ONE);
|
||||
this.update(acsTask);
|
||||
acsTask.setTask_status(CommonFinalParam.ONE);
|
||||
this.update(acsTask);
|
||||
return instdto;
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
@@ -1686,7 +1686,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadTaskTreeLogging(List<JSONObject> taskAndInst, HttpServletResponse response) throws IOException {
|
||||
public void downloadTaskTreeLogging(List<JSONObject> taskAndInst, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (JSONObject jsonObject : taskAndInst) {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
@@ -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