| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.asrs.framework.common.Cools; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import com.zy.asrs.wcs.core.action.ShuttleAction; |
| | | import com.zy.asrs.wcs.core.entity.Loc; |
| | | import com.zy.asrs.wcs.core.model.NavigateNode; |
| | | import com.zy.asrs.wcs.core.model.command.ShuttleAssignCommand; |
| | |
| | | private LocService locService; |
| | | @Autowired |
| | | private NavigateMapUtils navigateMapUtils; |
| | | @Autowired |
| | | private ShuttleAction shuttleAction; |
| | | |
| | | // 计算 |
| | | public Boolean accept(Motion motion) { |
| | |
| | | |
| | | if (motion.getOrigin() != null && motion.getTarget() != null) { |
| | | //所使用的路径进行锁定禁用 |
| | | boolean lockResult = navigateMapUtils.writeNavigateNodeToRedisMap(Utils.getLev(motion.getTarget()), Integer.parseInt(shuttleProtocol.getShuttleNo()), assignCommand.getNodes(), true);//所使用的路径进行锁定禁用 |
| | | boolean lockResult = navigateMapUtils.writeNavigateNodeToRedisMap(Utils.getLev(motion.getTarget()), shuttleProtocol.getShuttleNo(), assignCommand.getNodes(), true);//所使用的路径进行锁定禁用 |
| | | if (!lockResult) { |
| | | return false;//锁定失败 |
| | | } |
| | | // shuttleThread.assignWork(assignCommand); |
| | | }else { |
| | | // shuttleThread.assignWork(assignCommand); |
| | | } |
| | | |
| | | return Boolean.TRUE; |
| | | boolean result = shuttleAction.assignWork(shuttleThread.getDevice(), assignCommand); |
| | | return result; |
| | | } |
| | | |
| | | public Boolean finish(Motion motion) { |