| | |
| | | ); |
| | | |
| | | if (Cools.isEmpty(taskList)) { |
| | | bus.setBusSts(BusStsType.PROGRESS.val()); |
| | | bus.setUpdateTime(now); |
| | | if (!busService.updateById(bus)) { |
| | | log.error("Bus [{}] failed to Update !!!", bus.getUuid()); |
| | | if (bus.getBusSts().equals(BusStsType.RECEIVE.val())) { |
| | | bus.setBusSts(BusStsType.PROGRESS.val()); |
| | | bus.setUpdateTime(now); |
| | | if (!busService.updateById(bus)) { |
| | | log.error("Bus [{}] failed to Update !!!", bus.getUuid()); |
| | | } |
| | | } |
| | | return; |
| | | } |
| | |
| | | )); |
| | | break; |
| | | case TO_STANDBY: |
| | | // FuncSta standByFuncSta = funcStaService.query(agvId, lastCode.getId(), 2); |
| | | // load lift |
| | | // actionList.add(new Action( |
| | | // null, // 编号 |
| | | // null, // 总线 |
| | | // task.getId(), // 任务 |
| | | // null, // 动作号 |
| | | // null, // 优先级 |
| | | // ActionTypeType.LoadPlatformLift.desc, // 名称 |
| | | // null, // 属性值 |
| | | // lastCode.getData(), // 地面码 |
| | | // String.valueOf(0), // 动作参数 |
| | | // ActionTypeType.LoadPlatformLift.val(), // 动作类型 |
| | | // actionPrepareSts, // 动作进度 |
| | | // agvId, // AGV |
| | | // now // 工作时间 |
| | | // )); |
| | | // turn |
| | | // FuncSta standByFuncSta = funcStaService.query(lastCode.getId(), FuncStaType.STANDBY.toString()); |
| | | // Double standByDirection = Double.parseDouble(standByFuncSta.getAngle()); |
| | | // if (!lastDirection.equals(standByDirection)) { |
| | | // actionList.add(new Action( |
| | |
| | | if (Cools.isEmpty(actionList)) { |
| | | return; |
| | | } |
| | | |
| | | Long agvId = actionList.get(0).getAgvId(); |
| | | String agvNo = agvService.getAgvNo(agvId); |
| | | if (!agvService.judgeOnline(agvId)) { |
| | | return; |
| | | } |
| | | |
| | | long actionIssuedSts = ActionStsType.ISSUED.val(); |
| | | for (Action action : actionList) { |
| | | action.setActionSts(actionIssuedSts); |
| | |
| | | } |
| | | } |
| | | |
| | | String agvNo = agvService.getAgvNo(actionList.get(0).getAgvId()); |
| | | AgvAction agvAction = new AgvAction(agvNo, actionGroupId); |
| | | for (Action action : actionList) { |
| | | switch (Objects.requireNonNull(ActionTypeType.get(action.getActionTypeEl()))) { |
| | |
| | | .bodySync(body -> body.setHeight((short) Double.parseDouble(action.getParams()))) |
| | | ); |
| | | break; |
| | | case LoadPlatformLift: |
| | | agvAction.add(new AgvActionItem<>(LoadPlatformLift.class) |
| | | .setVal(action.getVal().intValue()) |
| | | .setQrCode(action.getCode()) |
| | | .bodySync(body -> body.setHeight((short) Double.parseDouble(action.getParams()))) |
| | | ); |
| | | break; |
| | | case ReadyReleaseToConveyorSta: |
| | | agvAction.add(new AgvActionItem<>(ReadyReleaseToConveyorSta.class) |
| | | .setVal(action.getVal().intValue()) |