#
Junjie
2023-09-20 cb757218ff35e8b302de2d6cc5a95b842acd8ea2
src/main/java/com/zy/asrs/controller/LiftController.java
@@ -234,24 +234,14 @@
                    //移动托盘
                    int workNo = commonService.getWorkNo(3);//获取任务号
                    Integer startSta = null;
                    Integer targetSta = null;
                    for (LiftStaProtocol liftStaProtocol : liftThread.getLiftStaProtocols()) {
                        if (liftStaProtocol.getStaNo() == param.getSourceStaNo()) {
                            startSta = liftStaProtocol.getStaNo();
                        }
                        if (liftStaProtocol.getLev() == param.getStaNo()) {
                            targetSta = liftStaProtocol.getStaNo();
                        }
                    }
                    if (startSta == null || targetSta == null) {
                        throw new CoolException("起点或目标点不存在");
                    LiftStaProtocol sourceLiftSta = NyLiftUtils.getLiftStaByStaNo(param.getSourceStaNo());
                    LiftStaProtocol liftSta = NyLiftUtils.getLiftStaByStaNo(param.getStaNo());
                    if (sourceLiftSta == null || liftSta == null) {
                        throw new CoolException("源站或目标站不存在");
                    }
                    //获取提升机命令
                    NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, startSta, targetSta, workNo);
                    NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, sourceLiftSta.getStaNo(), liftSta.getStaNo(), workNo);
                    ArrayList<NyLiftCommand> commands = new ArrayList<>();
                    commands.add(liftCommand);