|
|
|
@ -821,6 +821,8 @@ public class PlcEventTask { |
|
|
|
} |
|
|
|
} |
|
|
|
log.info("立库输送线读取的任务号:" + taskId); |
|
|
|
log.info("立库输送线读取的任务号:" + taskId); |
|
|
|
if (taskId != null && taskId != 0) { |
|
|
|
if (taskId != null && taskId != 0) { |
|
|
|
|
|
|
|
//跨航道移库目标任务
|
|
|
|
|
|
|
|
BusinDataTask targetTask=null; |
|
|
|
//获取任务信息
|
|
|
|
//获取任务信息
|
|
|
|
BusinDataTask businDataTask = iBusinDataTaskService.getById(taskId); |
|
|
|
BusinDataTask businDataTask = iBusinDataTaskService.getById(taskId); |
|
|
|
if (businDataTask == null) { |
|
|
|
if (businDataTask == null) { |
|
|
|
@ -861,9 +863,9 @@ public class PlcEventTask { |
|
|
|
|
|
|
|
|
|
|
|
agvTaskType = Integer.valueOf(abnormalWaitPintDeviceVo.getIsDown()); |
|
|
|
agvTaskType = Integer.valueOf(abnormalWaitPintDeviceVo.getIsDown()); |
|
|
|
} else if (businDataTask.getTaskType().equals(TaskTypeEnum.relocation_out.getValue())) { |
|
|
|
} else if (businDataTask.getTaskType().equals(TaskTypeEnum.relocation_out.getValue())) { |
|
|
|
// TODO 跨巷道移库AGV的模板尚未提供
|
|
|
|
|
|
|
|
String associatedTasksId = businDataTask.getAssociatedTasksId(); |
|
|
|
String associatedTasksId = businDataTask.getAssociatedTasksId(); |
|
|
|
BusinDataTask targetTask = iBusinDataTaskService.getById(associatedTasksId); |
|
|
|
targetTask = iBusinDataTaskService.getById(associatedTasksId); |
|
|
|
snPointMap.put("2", targetTask.getTaskPath()); |
|
|
|
snPointMap.put("2", targetTask.getTaskPath()); |
|
|
|
agvPoints=new ArrayList<>(); |
|
|
|
agvPoints=new ArrayList<>(); |
|
|
|
agvPoints.add(snPointMap.get("1")); |
|
|
|
agvPoints.add(snPointMap.get("1")); |
|
|
|
@ -871,7 +873,11 @@ public class PlcEventTask { |
|
|
|
agvTaskType=0; |
|
|
|
agvTaskType=0; |
|
|
|
|
|
|
|
|
|
|
|
} else if(businDataTask.getTaskType().equals(TaskTypeEnum.named_loc.getValue())){ |
|
|
|
} else if(businDataTask.getTaskType().equals(TaskTypeEnum.named_loc.getValue())){ |
|
|
|
|
|
|
|
snPointMap.put("2", businDataTask.getTaskPath()); |
|
|
|
|
|
|
|
agvPoints=new ArrayList<>(); |
|
|
|
|
|
|
|
agvPoints.add(snPointMap.get("1")); |
|
|
|
|
|
|
|
agvPoints.add(businDataTask.getTaskPath()); |
|
|
|
|
|
|
|
agvTaskType=1; |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
agvPoints.add(businDataTask.getTaskPath()); |
|
|
|
agvPoints.add(businDataTask.getTaskPath()); |
|
|
|
snPointMap.put("3", businDataTask.getTaskPath()); |
|
|
|
snPointMap.put("3", businDataTask.getTaskPath()); |
|
|
|
@ -883,6 +889,9 @@ public class PlcEventTask { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
businDataTask.setPoints(JsonUtil.toJSONString(snPointMap)); |
|
|
|
businDataTask.setPoints(JsonUtil.toJSONString(snPointMap)); |
|
|
|
|
|
|
|
if(targetTask !=null){ |
|
|
|
|
|
|
|
targetTask.setPoints(JsonUtil.toJSONString(snPointMap)); |
|
|
|
|
|
|
|
} |
|
|
|
businDataTask.setPlcId(basePointVo.getPlcId()); |
|
|
|
businDataTask.setPlcId(basePointVo.getPlcId()); |
|
|
|
//立库输送线id
|
|
|
|
//立库输送线id
|
|
|
|
businDataTask.setDpsNoOne(Long.valueOf(isysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.LK_plc_id))); |
|
|
|
businDataTask.setDpsNoOne(Long.valueOf(isysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.LK_plc_id))); |
|
|
|
@ -921,6 +930,11 @@ public class PlcEventTask { |
|
|
|
businDataTask.setPlcId(30L); |
|
|
|
businDataTask.setPlcId(30L); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ("25".equals(businDataTask.getTaskType())){ |
|
|
|
|
|
|
|
bo.setTaskType(1); |
|
|
|
|
|
|
|
businDataTask.setPlcId(30L); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//目的点位
|
|
|
|
//目的点位
|
|
|
|
// bo.setToLocation(businDataTask.getTaskPath());
|
|
|
|
// bo.setToLocation(businDataTask.getTaskPath());
|
|
|
|
Result<Boolean> booleanResult = rcsUtil.moveByAGV(bo); |
|
|
|
Result<Boolean> booleanResult = rcsUtil.moveByAGV(bo); |
|
|
|
@ -931,6 +945,9 @@ public class PlcEventTask { |
|
|
|
businDataTask.setIsDown(bo.getTaskType() + ""); |
|
|
|
businDataTask.setIsDown(bo.getTaskType() + ""); |
|
|
|
iBusinDataTaskService.updateById(businDataTask); |
|
|
|
iBusinDataTaskService.updateById(businDataTask); |
|
|
|
redisTemplate.opsForValue().set(RedisConstant.redisReqMate + taskId, businDataTask); |
|
|
|
redisTemplate.opsForValue().set(RedisConstant.redisReqMate + taskId, businDataTask); |
|
|
|
|
|
|
|
if(targetTask !=null){ |
|
|
|
|
|
|
|
iBusinDataTaskService.updateById(targetTask); |
|
|
|
|
|
|
|
} |
|
|
|
//扣减巷道任务数
|
|
|
|
//扣减巷道任务数
|
|
|
|
tunnelTaskUtil.subOutboundTaskNum(businDataTask.getTunnel()); |
|
|
|
tunnelTaskUtil.subOutboundTaskNum(businDataTask.getTunnel()); |
|
|
|
} |
|
|
|
} |
|
|
|
|