Junjie
2023-07-01 ee5e6e5d4714358de0371f83d02739cb765b4dbf
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -673,15 +673,31 @@
                    if (wrkMast != null) {
                        if (wrkMast.getWrkSts() == 4 || wrkMast.getWrkSts() == 8) {
                            ShuttleThread shuttleThread = null;
                            ShuttleProtocol shuttleProtocol = null;
                            HashMap<String, Object> searchIdleShuttle = null;
                            LiftThread liftThread = (LiftThread) SlaveConnection.get(SlaveType.Lift, 1);
                            LiftProtocol liftProtocol = liftThread.getLiftProtocol();
                            if (wrkMast.getWrkSts() == 4) {
                                if (wrkMast.getShuttleNo() == null) {
                                //寻找最近且空闲的四向穿梭车
                                searchIdleShuttle = this.searchIdleShuttle(wrkMast);
                                shuttleThread = (ShuttleThread) searchIdleShuttle.get("result");
                                    wrkMast.setShuttleNo(shuttleThread.getSlave().getId());//给工作档分配四向穿梭车号
                                    wrkMastMapper.updateById(wrkMast);
                                    shuttleProtocol = shuttleThread.getShuttleProtocol();
                                    if (!shuttleProtocol.isIdle()) {
                                        continue;
                                    }
                                }else {
                                    //直接使用任务保存中的小车
                                    shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, wrkMast.getShuttleNo());
                                    shuttleProtocol = shuttleThread.getShuttleProtocol();
                                    if (!shuttleProtocol.isIdle(workNo)) {
                                        continue;
                                    }
                                }
                            }else if(wrkMast.getWrkSts() == 8){//状态8,需要向小车下发命令从提升机移动出去,需要判断提升机状是否空闲、提升机是否到达目标楼层、目标楼层站点是否存在、目标楼层站点是否给出提升机到位信号
                                //状态8,等待命令进行入库搬运动作
@@ -719,14 +735,17 @@
                                Integer shuttleNo = wrkMast.getShuttleNo();//四向穿梭车号
                                shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttleNo);
                                shuttleProtocol = shuttleThread.getShuttleProtocol();
                                if (!shuttleProtocol.isIdle(workNo)) {
                                    continue;
                                }
                            }
                            if (shuttleThread == null) {
                                continue;
                            }
                            ShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol();
                            if (!shuttleProtocol.isIdle()) {
                            if (shuttleProtocol == null) {
                                continue;
                            }
@@ -751,24 +770,13 @@
                            //提升机口站点库位号
                            String liftSiteLocNo = Utils.levToOutInStaLocNo(currentLev);
                            if (wrkMast.getWrkSts() == 8 || Boolean.parseBoolean(searchIdleShuttle.get("sameLay").toString())) {
                                //同一层直接取货无需经过提升机
                            if (wrkMast.getWrkSts() == 4) {
                                if (currentLev == Utils.getLev(locNo)) {
                                    //小车和目标在同一楼层
                                //直接计算车到提升机取货再到库位路径指令
                                List<ShuttleCommand> commands = this.shuttleAssignCommand(wrkMast.getWrkSts() == 4 ? currentLocNo : liftSiteLocNo, liftSiteLocNo, locNo, assignCommand, shuttleThread);
                                if (commands == null) {
                                    continue;//找不到路径等待下一次
                                }
                                if (wrkMast.getWrkSts() == 8) {
                                    //此时车在提升机内部,下达一步指令让车移动到提升机口
                                    Integer staNo = Utils.levToOutInStaNo(currentLev >= 2 ? currentLev + 1 : currentLev);//站点号
                                    BasDevp basDevp = basDevpService.selectById(staNo);
                                    short startCode = liftProtocol.getBarcode();//提升机内部二维码
                                    Short distCode = Short.parseShort(basDevp.getQrCodeValue());//提升机口站点二维码
                                    Short runDirection = ShuttleRunDirection.BOTTOM.id;//运行方向
                                    //获取命令
                                    ShuttleCommand moveCommand = shuttleThread.getMoveCommand(startCode, distCode, 1400, runDirection, startCode, 1400, 500);
                                    commands.add(0, moveCommand);//将该指令添加到队头
                                }
                                assignCommand.setCommands(commands);
                                //分配目标库位
@@ -777,8 +785,7 @@
                                assignCommand.setLocNo(wrkMast.getLocNo());
                                wrkMast.setWrkSts(9L);//小车入库中
                            }else {
                                //不同层,将目标库位分配成提升机库位号
                                    //小车和目标不在同一楼层
                                //小车移动到提升机口,计算路径
                                List<ShuttleCommand> commands = this.shuttleAssignCommand(currentLocNo, liftSiteLocNo, NavigationMapType.NONE.id, assignCommand, shuttleThread);
                                if (commands == null) {
@@ -800,6 +807,81 @@
                                assignCommand.setCommands(commands);
                                wrkMast.setWrkSts(5L);//小车迁移状态
                            }
                            } else if (wrkMast.getWrkSts() == 8) {
                                //直接计算车到提升机取货再到库位路径指令
                                List<ShuttleCommand> commands = this.shuttleAssignCommand(wrkMast.getWrkSts() == 4 ? currentLocNo : liftSiteLocNo, liftSiteLocNo, locNo, assignCommand, shuttleThread);
                                if (commands == null) {
                                    continue;//找不到路径等待下一次
                                }
                                //此时车在提升机内部,下达一步指令让车移动到提升机口
                                Integer staNo = Utils.levToOutInStaNo(currentLev >= 2 ? currentLev + 1 : currentLev);//站点号
                                BasDevp basDevp = basDevpService.selectById(staNo);
                                short startCode = liftProtocol.getBarcode();//提升机内部二维码
                                Short distCode = Short.parseShort(basDevp.getQrCodeValue());//提升机口站点二维码
                                Short runDirection = ShuttleRunDirection.BOTTOM.id;//运行方向
                                //获取命令
                                ShuttleCommand moveCommand = shuttleThread.getMoveCommand(startCode, distCode, 1400, runDirection, startCode, 1400, 500);
                                commands.add(0, moveCommand);//将该指令添加到队头
                                assignCommand.setCommands(commands);
                                //分配目标库位
                                shuttleProtocol.setLocNo(wrkMast.getLocNo());
                                //目标库位
                                assignCommand.setLocNo(wrkMast.getLocNo());
                                wrkMast.setWrkSts(9L);//小车入库中
                            }
//                            if (wrkMast.getWrkSts() == 8 || Boolean.parseBoolean(searchIdleShuttle.get("sameLay").toString())) {
//                                //同一层直接取货无需经过提升机
//                                //直接计算车到提升机取货再到库位路径指令
//                                List<ShuttleCommand> commands = this.shuttleAssignCommand(wrkMast.getWrkSts() == 4 ? currentLocNo : liftSiteLocNo, liftSiteLocNo, locNo, assignCommand, shuttleThread);
//                                if (commands == null) {
//                                    continue;//找不到路径等待下一次
//                                }
//                                if (wrkMast.getWrkSts() == 8) {
//                                    //此时车在提升机内部,下达一步指令让车移动到提升机口
//                                    Integer staNo = Utils.levToOutInStaNo(currentLev >= 2 ? currentLev + 1 : currentLev);//站点号
//                                    BasDevp basDevp = basDevpService.selectById(staNo);
//
//                                    short startCode = liftProtocol.getBarcode();//提升机内部二维码
//                                    Short distCode = Short.parseShort(basDevp.getQrCodeValue());//提升机口站点二维码
//                                    Short runDirection = ShuttleRunDirection.BOTTOM.id;//运行方向
//                                    //获取命令
//                                    ShuttleCommand moveCommand = shuttleThread.getMoveCommand(startCode, distCode, 1400, runDirection, startCode, 1400, 500);
//                                    commands.add(0, moveCommand);//将该指令添加到队头
//                                }
//                                assignCommand.setCommands(commands);
//                                //分配目标库位
//                                shuttleProtocol.setLocNo(wrkMast.getLocNo());
//                                //目标库位
//                                assignCommand.setLocNo(wrkMast.getLocNo());
//                                wrkMast.setWrkSts(9L);//小车入库中
//                            }else {
//                                //不同层,将目标库位分配成提升机库位号
//
//                                //小车移动到提升机口,计算路径
//                                List<ShuttleCommand> commands = this.shuttleAssignCommand(currentLocNo, liftSiteLocNo, NavigationMapType.NONE.id, assignCommand, shuttleThread);
//                                if (commands == null) {
//                                    continue;//未找到路径
//                                }
//
//                                //获取当前小车所在楼层的站点信息
//                                BasDevp basDevp = basDevpService.queryByLocNo(liftSiteLocNo);
//                                Short endStartCode = Short.parseShort(basDevp.getQrCodeValue());//站点二维码
//
//                                //增加移动进提升机命令
//                                ShuttleCommand moveCommand = shuttleThread.getMoveCommand(endStartCode, liftProtocol.getBarcode(), 1400, ShuttleRunDirection.TOP.id, endStartCode, 1400, 500);
//                                commands.add(moveCommand);
//
//                                //分配目标库位
//                                shuttleProtocol.setLocNo(liftSiteLocNo);
//                                //目标库位
//                                assignCommand.setLocNo(liftSiteLocNo);
//                                assignCommand.setCommands(commands);
//                                wrkMast.setWrkSts(5L);//小车迁移状态
//                            }
                            if (wrkMastMapper.updateById(wrkMast) > 0) {
                                //下发任务
@@ -994,9 +1076,19 @@
                    LiftProtocol liftProtocol = liftThread.getLiftProtocol();
                    if (wrkMast.getWrkSts() == 21) {
                        if (wrkMast.getShuttleNo() == null) {
                        //寻找最近且空闲的四向穿梭车
                        searchIdleShuttle = this.searchIdleShuttle(wrkMast);
                        shuttleThread = (ShuttleThread) searchIdleShuttle.get("result");
                            if (shuttleThread == null) {
                                continue;
                            }
                            wrkMast.setShuttleNo(shuttleThread.getSlave().getId());//给工作档分配四向穿梭车号
                            wrkMastMapper.updateById(wrkMast);
                        }else {
                            //直接使用任务保存中的小车
                            shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, wrkMast.getShuttleNo());
                        }
                    }else if(wrkMast.getWrkSts() == 25) {//状态25,需要向小车下发命令从提升机移动出去,需要判断提升机状是否空闲、提升机是否到达目标楼层、目标楼层站点是否存在、目标楼层站点是否给出提升机到位信号
                        //判断提升机是否空闲
@@ -1051,17 +1143,16 @@
                        continue;
                    }
                    if (!shuttleProtocol.isIdle()) {
                        continue;
                    }
                    if (outStaLocNo == null) {
                        continue;
                    }
                    if (wrkMast.getWrkSts() == 21) {
                        wrkMast.setShuttleNo(shuttleProtocol.getShuttleNo().intValue());//给工作档分配四向穿梭车号
                        if (!shuttleProtocol.isIdle()) {
                            continue;
                        }
                        //源库位(小车当前位置)
                        String currentLocNo = shuttleProtocol.getCurrentLocNo();
@@ -1080,7 +1171,7 @@
                        assignCommand.setSourceLocNo(currentLocNo);
                        //判断小车和库位是否在同一层
                        if (Boolean.parseBoolean(searchIdleShuttle.get("sameLay").toString())) {
                        if (currentLev == Utils.getLev(wrkMast.getSourceLocNo())) {
                            //同一层(将小车移动到货物位置)
                            List<ShuttleCommand> commands = this.shuttleAssignCommand(currentLocNo, wrkMast.getSourceLocNo(), liftSiteLocNo, assignCommand, shuttleThread);
@@ -1140,6 +1231,9 @@
                            }
                        }
                    } else if (wrkMast.getWrkSts() == 25) {
                        if (!shuttleProtocol.isIdle(wrkMast.getWrkNo().shortValue())) {
                            continue;
                        }
                        wrkMast.setShuttleNo(shuttleProtocol.getShuttleNo().intValue());//给工作档分配四向穿梭车号
@@ -1212,6 +1306,18 @@
            distLocNo = locNo;
        }
        //判断当前任务所在楼层是否有其他任务已经分配了小车,如有则直接用该小车(一层楼仅分配一台车)
        List<WrkMast> wrkMasts = wrkMastService.selectShuttleWrkByLev(lev);//判断当前穿梭车楼层是否已有分配车辆的任务,如果有则分配这辆车
        if (wrkMasts.size() > 0) {
            //存在其他任务,分配这辆车
            WrkMast wrkMast1 = wrkMasts.get(0);
            ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, wrkMast1.getShuttleNo());
            map.put("sameLay", true);//同层
            map.put("result", shuttleThread);
            return map;
        }
        for (ShuttleSlave shuttle : slaveProperties.getShuttle()) {
            //获取四向穿梭车线程
            ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttle.getId());
@@ -1246,27 +1352,18 @@
        }
        Integer recentAllDistance = 9999999;
        if (sameLev.size() > 0) {
            //同一楼层有空闲穿梭车,则只在工作档楼层寻找
            //寻找离任务最近的穿梭车
            for (ShuttleThread shuttleThread : sameLev) {
                if (recentShuttle == null) {//最近穿梭车为空,则默认赋予为最近穿梭车
                    recentShuttle = shuttleThread;
                }
                //当前穿梭车库位号
                String currentLocNo = shuttleThread.getShuttleProtocol().getCurrentLocNo();
                //目前最近穿梭车库位号
                String recentLocNo = recentShuttle.getShuttleProtocol().getCurrentLocNo();
                //当前最近四向穿梭车到目标地点距离
                List<NavigateNode> recentShuttlePath = NavigateUtils.calc(recentLocNo, distLocNo, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(recentShuttle.getSlave().getId(), Utils.getLev(recentLocNo)));//搜索空闲穿梭车,使用正常通道地图
                //当前穿梭车线程到目标地点距离
                List<NavigateNode> currentShuttlePath = NavigateUtils.calc(currentLocNo, distLocNo, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleThread.getSlave().getId(), Utils.getLev(currentLocNo)));//搜索空闲穿梭车,使用正常通道地图
                if (recentShuttlePath == null || currentShuttlePath == null) {
                if (currentShuttlePath == null) {
                    continue;
                }
                Integer recentAllDistance = NavigateUtils.getOriginPathAllDistance(recentShuttlePath);//计算当前路径行走总距离
                Integer currentAllDistance = NavigateUtils.getOriginPathAllDistance(currentShuttlePath);//计算当前路径行走总距离
                if (currentAllDistance < recentAllDistance) {
                    //如果当前楼层的车路径更小,则更新最近穿梭车
@@ -1284,29 +1381,18 @@
                //当前穿梭车库位号
                String currentLocNo = shuttleThread.getShuttleProtocol().getCurrentLocNo();
                int currentLev = Utils.getLev(currentLocNo);
                List<LocMast> locMasts = wrkMastService.selectNoShuttleWrkByLev(currentLev);//判断当前穿梭车楼层是否有待分配车辆的任务,如果有则不分配这辆车
                if (locMasts.size() > 0) {
                List<WrkMast> wrkMasts1 = wrkMastService.selectNoShuttleWrkByLev(currentLev);//判断当前穿梭车楼层是否有待分配车辆的任务,如果有则不分配这辆车
                if (wrkMasts1.size() > 0) {
                    //存在其他任务,跳过这辆车
                    continue;
                }
                if (recentShuttle == null) {//最近穿梭车为空,则默认赋予为最近穿梭车
                    recentShuttle = shuttleThread;
                }
                //目前最近穿梭车库位号
                String recentLocNo = recentShuttle.getShuttleProtocol().getCurrentLocNo();
                int recentLev = Utils.getLev(recentLocNo);
                //当前最近四向穿梭车到当前车子所在楼层的提升机口距离
                List<NavigateNode> recentShuttlePath = NavigateUtils.calc(recentLocNo, Utils.levToOutInStaLocNo(recentLev), NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleThread.getSlave().getId(), recentLev));//搜索空闲穿梭车,使用正常通道地图
                //当前穿梭车线程到当前车子所在楼层的提升机口距离
                List<NavigateNode> currentShuttlePath = NavigateUtils.calc(currentLocNo, Utils.levToOutInStaLocNo(currentLev), NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleThread.getSlave().getId(), currentLev));//搜索空闲穿梭车,使用正常通道地图
                if (recentShuttlePath == null || currentShuttlePath == null) {
                if (currentShuttlePath == null) {
                    continue;
                }
                Integer recentAllDistance = NavigateUtils.getOriginPathAllDistance(recentShuttlePath);//计算当前路径行走总距离
                Integer currentAllDistance = NavigateUtils.getOriginPathAllDistance(currentShuttlePath);//计算当前路径行走总距离
                if (currentAllDistance < recentAllDistance) {
                    //如果当前楼层的车路径更小,则更新最近穿梭车
@@ -1349,6 +1435,8 @@
                    switch (wrkMast.getWrkSts().intValue()) {
                        case 9://9.小车入库搬运中 ==> 14.入库完成
                            wrkMast.setWrkSts(14L);
                            //任务号清零
                            shuttleProtocol.setTaskNo((short) 0);
                            break;
                        case 5://5.迁移小车至提升机口 ==> 6.迁移小车至提升机口完成
                            wrkMast.setWrkSts(6L);
@@ -1367,6 +1455,8 @@
                            }
                            wrkMast.setWrkSts(27L);
                            //任务号清零
                            shuttleProtocol.setTaskNo((short) 0);
                            break;
                        default:
                    }
@@ -1374,8 +1464,6 @@
                    if (wrkMastMapper.updateById(wrkMast) > 0) {
                        //设置四向穿梭车为空闲状态
                        shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.IDLE);
                        //任务号清零
                        shuttleProtocol.setTaskNo((short) 0);
                        //源库位清零
                        shuttleProtocol.setSourceLocNo(null);
                        //目标库位清零
@@ -1386,9 +1474,14 @@
                        if (wrkMast.getWrkSts() == 27) {
                            if (moveAssignCommand != null) {
                                try {
                                    Thread.sleep(4000);
                                //下发任务
                                shuttleProtocol.setPakMk(true);
                                MessageQueue.offer(SlaveType.Shuttle, shuttleThread.getSlave().getId(), new Task(3, moveAssignCommand));
                                } catch (InterruptedException e) {
                                    throw new RuntimeException(e);
                                }
                            }
                        }
@@ -1485,8 +1578,15 @@
            }
            //搜索是否有待处理的任务
            WrkMast wrkMast = wrkMastMapper.selectLiftStep262327();
            if (wrkMast == null) {
            List<WrkMast> wrkMasts = wrkMastMapper.selectLiftStep262327();
            if (wrkMasts.size() == 0) {
                continue;
            }
            for (WrkMast wrkMast : wrkMasts) {
                //搜索是否有其他任务占用了提升机,如果占用提升机的任务和当前任务相同,则运行执行
                WrkMast wrkMast1 = wrkMastMapper.selectLiftWrkMast(liftProtocol.getLiftNo().intValue());
                if (wrkMast1 != null && wrkMast1.getWrkNo().intValue() != wrkMast.getWrkNo().intValue()) {
                continue;
            }
@@ -1559,6 +1659,7 @@
                liftProtocol.setTaskNo(wrkMast.getWrkNo().shortValue());//设置任务号
                liftProtocol.setProtocolStatus(LiftProtocolStatusType.WORKING);//设置提升机状态为工作中
                    wrkMast.setLiftNo(liftProtocol.getLiftNo().intValue());//设置提升机号用于锁定提升机防止被其他任务占用
                wrkMast.setWrkSts(3L);//3.提升机搬运中
            } else if (wrkMast.getWrkSts() == 6) {//6.迁移小车至提升机口完成 => 7.提升机迁移小车中
                if (liftProtocol.getTaskNo().intValue() != 0 && liftProtocol.getTaskNo().intValue() != wrkMast.getWrkNo()) {
@@ -1576,7 +1677,7 @@
                if (shuttleProtocol == null) {
                    continue;
                }
                if (!shuttleProtocol.isIdle()) {
                    if (!shuttleProtocol.isIdle(wrkMast.getWrkNo().shortValue())) {
                    continue;//小车状态忙
                }
                if (shuttleProtocol.getCurrentCode().intValue() != liftProtocol.getBarcode().intValue()) {
@@ -1603,6 +1704,7 @@
                liftProtocol.setTaskNo(wrkMast.getWrkNo().shortValue());//设置任务号
                liftProtocol.setProtocolStatus(LiftProtocolStatusType.WORKING);//设置提升机状态为工作中
                    wrkMast.setLiftNo(liftProtocol.getLiftNo().intValue());//设置提升机号用于锁定提升机防止被其他任务占用
                wrkMast.setWrkSts(7L);//6.迁移小车至提升机口完成 => 7.提升机迁移小车中
            } else if(wrkMast.getWrkSts() == 23) {//23.迁移小车至提升机口完成 => 24.提升机迁移小车中
                if (liftProtocol.getTaskNo().intValue() != 0 && liftProtocol.getTaskNo().intValue() != wrkMast.getWrkNo()) {
@@ -1621,7 +1723,7 @@
                    continue;
                }
                if (!shuttleProtocol.isIdle()) {
                    if (!shuttleProtocol.isIdle(wrkMast.getWrkNo().shortValue())) {
                    continue;//小车状态忙
                }
                if (shuttleProtocol.getCurrentCode().intValue() != liftProtocol.getBarcode().intValue()) {
@@ -1648,6 +1750,7 @@
                liftProtocol.setTaskNo(wrkMast.getWrkNo().shortValue());//设置任务号
                liftProtocol.setProtocolStatus(LiftProtocolStatusType.WORKING);//设置提升机状态为工作中
                    wrkMast.setLiftNo(liftProtocol.getLiftNo().intValue());//设置提升机号用于锁定提升机防止被其他任务占用
                wrkMast.setWrkSts(24L);//23.迁移小车至提升机口完成 => 24.提升机迁移小车中
            } else if (wrkMast.getWrkSts() == 27) {//27.小车出库搬运完成
                if (liftProtocol.getTaskNo().intValue() != 0 && liftProtocol.getTaskNo().intValue() != wrkMast.getWrkNo()) {
@@ -1707,6 +1810,7 @@
                liftProtocol.setTaskNo(wrkMast.getWrkNo().shortValue());//设置任务号
                liftProtocol.setProtocolStatus(LiftProtocolStatusType.WORKING);//设置提升机状态为工作中
                    wrkMast.setLiftNo(liftProtocol.getLiftNo().intValue());//设置提升机号用于锁定提升机防止被其他任务占用
                wrkMast.setWrkSts(28L);//28.提升机搬运中
            }
@@ -1719,6 +1823,8 @@
                //下发任务
                MessageQueue.offer(SlaveType.Lift, liftProtocol.getLiftNo().intValue(), new Task(3, assignCommand));
            }
            }
        }
    }
@@ -1774,6 +1880,7 @@
                            wrkMast.setWrkSts(4L);
                            //任务号清零
                            liftProtocol.setTaskNo((short) 0);
                            wrkMast.setLiftNo(null);//提升机解锁
                            break;
                        case 7://7.提升机迁移小车中 ==> 8.提升机迁移小车完成
                            if (liftProtocol.getLev().intValue() != lev) {
@@ -1795,6 +1902,7 @@
                            wrkMast.setWrkSts(34L);//34.出库完成,暂时先直接完成出库工作档,后续需要根据输送线给出的状态来确定34.出库完成状态
                            //任务号清零
                            liftProtocol.setTaskNo((short) 0);
                            wrkMast.setLiftNo(null);//提升机解锁
                            break;
                        default:
                    }
@@ -2697,7 +2805,7 @@
                //小车已经达到提升机内
                //判断提升机是否处于空闲状态
                if (!liftProtocol.isIdle()) {
                if (!liftProtocol.isIdle(wrkCharge.getWrkNo().shortValue())) {
                    continue;
                }
@@ -2788,6 +2896,9 @@
            }else if (wrkCharge.getWrkSts() == 57) {//57.小车到达充电桩
                //充电中
                //判断小车是否充满电量,满电1000或电压54V以上
                if (shuttleProtocol.getBatteryPower() == null || shuttleProtocol.getCurrentVoltage() == null) {
                    continue;
                }
                if (shuttleProtocol.getBatteryPower() >= 1000 && shuttleProtocol.getCurrentVoltage() >= 54000) {
                    //充满,断开充电
//                    List<ShuttleCommand> commands = new ArrayList<>();