| | |
| | | package com.zy.asrs.wcs.core.timer; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import com.zy.asrs.wcs.core.entity.Task; |
| | | import com.zy.asrs.wcs.core.kernel.command.*; |
| | |
| | | if (executingMotion != null) {//存在正在执行的motion |
| | | if (executingMotion.getSync() == 1) {//当前执行中的动作是同步动作,等待执行完成后再执行下一个动作 |
| | | continue; |
| | | } |
| | | |
| | | //异步动作,只允许下一条动作被执行 |
| | | Motion nextMotion = motionService.getOne(new LambdaQueryWrapper<Motion>().eq(Motion::getUuid, executingMotion.getUuid()).eq(Motion::getPriority, executingMotion.getPriority() - 1)); |
| | | if (nextMotion != null) { |
| | | if (!(nextMotion.getMotionSts() == MotionStsType.INIT.val() || nextMotion.getMotionSts() == MotionStsType.WAITING.val())) { |
| | | continue;//下一条动作已经被执行,不允许再执行后续动作 |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | if (executingMotion.getSync() == 1) {//当前执行中的动作是同步动作,等待执行完成后再执行下一个动作 |
| | | continue; |
| | | } |
| | | |
| | | //异步动作,只允许下一条动作被执行 |
| | | Motion nextMotion = motionService.getOne(new LambdaQueryWrapper<Motion>().eq(Motion::getUuid, executingMotion.getUuid()).eq(Motion::getPriority, executingMotion.getPriority() - 1)); |
| | | if (nextMotion != null) { |
| | | if (!(nextMotion.getMotionSts() == MotionStsType.INIT.val() || nextMotion.getMotionSts() == MotionStsType.WAITING.val())) { |
| | | continue;//下一条动作已经被执行,不允许再执行后续动作 |
| | | } |
| | | } |
| | | } |
| | | |
| | | Motion motion = motionService.selectOfTop1(taskCharge.getUuid(), MotionStsType.INIT.val(), taskCharge.getHostId()); |
| | |
| | | if (executingMotion.getSync() == 1) {//当前执行中的动作是同步动作,等待执行完成后再执行下一个动作 |
| | | continue; |
| | | } |
| | | |
| | | //异步动作,只允许下一条动作被执行 |
| | | Motion nextMotion = motionService.getOne(new LambdaQueryWrapper<Motion>().eq(Motion::getUuid, executingMotion.getUuid()).eq(Motion::getPriority, executingMotion.getPriority() - 1)); |
| | | if (nextMotion != null) { |
| | | if (!(nextMotion.getMotionSts() == MotionStsType.INIT.val() || nextMotion.getMotionSts() == MotionStsType.WAITING.val())) { |
| | | continue;//下一条动作已经被执行,不允许再执行后续动作 |
| | | } |
| | | } |
| | | } |
| | | |
| | | Motion motion = motionService.selectOfTop1(taskCharge.getUuid(), MotionStsType.INIT.val(), taskCharge.getHostId()); |
| | |
| | | if (executingMotion.getSync() == 1) {//当前执行中的动作是同步动作,等待执行完成后再执行下一个动作 |
| | | continue; |
| | | } |
| | | |
| | | //异步动作,只允许下一条动作被执行 |
| | | Motion nextMotion = motionService.getOne(new LambdaQueryWrapper<Motion>().eq(Motion::getUuid, executingMotion.getUuid()).eq(Motion::getPriority, executingMotion.getPriority() - 1)); |
| | | if (nextMotion != null) { |
| | | if (!(nextMotion.getMotionSts() == MotionStsType.INIT.val() || nextMotion.getMotionSts() == MotionStsType.WAITING.val())) { |
| | | continue;//下一条动作已经被执行,不允许再执行后续动作 |
| | | } |
| | | } |
| | | } |
| | | |
| | | Motion motion = motionService.selectOfTop1(task.getUuid(), MotionStsType.INIT.val(), task.getHostId()); |
| | |
| | | if (executingMotion.getSync() == 1) {//当前执行中的动作是同步动作,等待执行完成后再执行下一个动作 |
| | | continue; |
| | | } |
| | | |
| | | //异步动作,只允许下一条动作被执行 |
| | | Motion nextMotion = motionService.getOne(new LambdaQueryWrapper<Motion>().eq(Motion::getUuid, executingMotion.getUuid()).eq(Motion::getPriority, executingMotion.getPriority() - 1)); |
| | | if (nextMotion != null) { |
| | | if (!(nextMotion.getMotionSts() == MotionStsType.INIT.val() || nextMotion.getMotionSts() == MotionStsType.WAITING.val())) { |
| | | continue;//下一条动作已经被执行,不允许再执行后续动作 |
| | | } |
| | | } |
| | | } |
| | | |
| | | Motion motion = motionService.selectOfTop1(task.getUuid(), MotionStsType.INIT.val(), task.getHostId()); |