| | |
| | | |
| | | Agv agv = null; |
| | | if (!Cools.isEmpty(param.getAgvNo())) { |
| | | agv = agvService.selectByUuid(param.getAgvNo()); |
| | | List<Task> tasks = taskService.selectInSts(agv.getId(), TaskStsType.WAITING, TaskStsType.ASSIGN, TaskStsType.PROGRESS); |
| | | if (!Cools.isEmpty(tasks)) { |
| | | for (Task task : tasks) { |
| | | if (TaskTypeType.LOC_TO_LOC.toString().equals(task.getTaskTypeEl()) |
| | | || TaskTypeType.LOC_TO_STA.toString().equals(task.getTaskTypeEl()) |
| | | || TaskTypeType.STA_TO_LOC.toString().equals(task.getTaskTypeEl()) |
| | | || TaskTypeType.STA_TO_STA.toString().equals(task.getTaskTypeEl()) |
| | | ) { |
| | | return R.error("Restore Failed, because the agv has Tasks that are associated with Loc!"); |
| | | } |
| | | } |
| | | } |
| | | // agv = agvService.selectByUuid(param.getAgvNo()); |
| | | // List<Task> tasks = taskService.selectInSts(agv.getId(), TaskStsType.WAITING, TaskStsType.ASSIGN, TaskStsType.PROGRESS); |
| | | // if (!Cools.isEmpty(tasks)) { |
| | | // for (Task task : tasks) { |
| | | // if (TaskTypeType.LOC_TO_LOC.toString().equals(task.getTaskTypeEl()) |
| | | // || TaskTypeType.LOC_TO_STA.toString().equals(task.getTaskTypeEl()) |
| | | // || TaskTypeType.STA_TO_LOC.toString().equals(task.getTaskTypeEl()) |
| | | // || TaskTypeType.STA_TO_STA.toString().equals(task.getTaskTypeEl()) |
| | | // ) { |
| | | // return R.error("Restore Failed, because the agv has Tasks that are associated with Loc!"); |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | if (null != agv) { |
| | |
| | | case ReadyTakeFromShelvesLoc: |
| | | case ReadyTakeFromConveyorSta: |
| | | // addParameter(parameters, "loadId", resolveLoadId(action, actionType)); // 货架码,为空不判断 |
| | | addParameter(parameters, "loadId", ""); |
| | | // addParameter(parameters, "loadType", resolveLoadType(actionType)); // 货架xml |
| | | addParameter(parameters, "loadType", "0"); // 货架xml |
| | | // HeightDepthParam heightDepthParam = parseHeightDepth(action.getParams()); |
| | |
| | | case ReadyReleaseToConveyorSta: |
| | | // addParameter(parameters, "loadId", resolveLoadId(action, actionType)); |
| | | // addParameter(parameters, "loadType", resolveLoadType(actionType)); |
| | | addParameter(parameters, "loadId", ""); |
| | | addParameter(parameters, "loadType", "0"); // 货架xml |
| | | // addParameter(parameters, "tabZero", true); // true: 转盘归零, false:转盘不动,default: true |
| | | // addParameter(parameters, "precision", 0.02); // 举升精度 |
| | |
| | | if (node == null || node.getNodePosition() == null) { |
| | | return; |
| | | } |
| | | node.getNodePosition().setTheta(toHikThetaRadians(rcsDirectionDegrees, agvModel)); |
| | | Double theta = toHikThetaRadians(rcsDirectionDegrees, agvModel); |
| | | if (theta != null && theta > Math.PI) { |
| | | theta -= 2D * Math.PI; |
| | | } |
| | | node.getNodePosition().setTheta(theta); |
| | | } |
| | | |
| | | private Double calculateTravelDirection(String startCode, String endCode) { |