| | |
| | | if (shuttleThread == null) { |
| | | return; |
| | | } |
| | | ShuttleProtocol shuttleProtocol = shuttleThread.getStatus(); |
| | | ShuttleProtocol shuttleProtocol = shuttleThread.getStatus(false); |
| | | if (shuttleProtocol == null) { |
| | | return; |
| | | } |
| | |
| | | } |
| | | |
| | | if (shuttleProtocol.getMoveType() == 0) {//跑轨道 |
| | | ArrayList<String> locs = new ArrayList<>(); |
| | | for (int i = shuttleProtocol.getXCurrent(); i <= shuttleProtocol.getXTarget(); i++) { |
| | | String locNo = Utils.getLocNo(i, shuttleProtocol.getYCurrent(), lev); |
| | | locs.add(locNo); |
| | | } |
| | | |
| | | List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .in(Loc::getLocNo, locs)); |
| | | if (locList.isEmpty()) { |
| | | //空库位 |
| | | shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1); |
| | | return; |
| | | } |
| | | |
| | | Loc start = locList.get(0); |
| | | Loc target = locList.get(locList.size() - 1); |
| | | //判断小车是否在起点位置 |
| | | if (!shuttleProtocol.getCurrentLocNo().equals(start.getLocNo())) {//不在起点位置,调度去起点位置 |
| | | shuttleDispatcher.generateMoveTask(device, start.getLocNo()); |
| | | }else { |
| | | //在起点位置,调度去目标位置 |
| | | if (shuttleProtocol.getCurrentLocNo().equals(target.getLocNo())) { |
| | | shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);//小车和目标位置一致,跳过 |
| | | }else { |
| | | shuttleDispatcher.generateMoveTask(device, start.getLocNo()); |
| | | shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1); |
| | | } |
| | | } |
| | | } else if (shuttleProtocol.getMoveType() == 1) {//跑库位 |
| | | Integer xCurrent = shuttleProtocol.getXCurrent(); |
| | | if (xCurrent > shuttleProtocol.getXTarget()) {//当X值大于X目标值,进行归零且Y方向+1 |
| | | shuttleProtocol.setXCurrent(shuttleProtocol.getXStart()); |
| | |
| | | shuttleDispatcher.generateMoveTask(device, target.getLocNo()); |
| | | shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1); |
| | | } |
| | | } else if (shuttleProtocol.getMoveType() == 1) {//跑库位 |
| | | ArrayList<String> locs = new ArrayList<>(); |
| | | for (int i = shuttleProtocol.getXCurrent(); i <= shuttleProtocol.getXTarget(); i++) { |
| | | String locNo = Utils.getLocNo(i, shuttleProtocol.getYCurrent(), lev); |
| | | locs.add(locNo); |
| | | } |
| | | |
| | | List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .in(Loc::getLocNo, locs)); |
| | | if (locList.isEmpty()) { |
| | | //空库位 |
| | | shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1); |
| | | return; |
| | | } |
| | | |
| | | Loc start = locList.get(0); |
| | | Loc target = locList.get(locList.size() - 1); |
| | | //判断小车是否在起点位置 |
| | | if (!shuttleProtocol.getCurrentLocNo().equals(start.getLocNo())) {//不在起点位置,调度去起点位置 |
| | | shuttleDispatcher.generateMoveTask(device, start.getLocNo()); |
| | | }else { |
| | | //在起点位置,调度去目标位置 |
| | | if (shuttleProtocol.getCurrentLocNo().equals(target.getLocNo())) { |
| | | shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);//小车和目标位置一致,跳过 |
| | | }else { |
| | | shuttleDispatcher.generateMoveTask(device, start.getLocNo()); |
| | | shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1); |
| | | } |
| | | } |
| | | } else if (shuttleProtocol.getMoveType() == 2) {//母轨道循环跑 |
| | | Integer xCurrent = shuttleProtocol.getXCurrent(); |
| | | Integer yCurrent = shuttleProtocol.getYCurrent(); |
| | |
| | | return R.error("小车忙碌中"); |
| | | } |
| | | |
| | | shuttleProtocol.setMoveLoc(true);//开启跑库 |
| | | shuttleProtocol.setMoveType(param.getMoveType()); |
| | | shuttleProtocol.setXStart(param.getStartX()); |
| | | shuttleProtocol.setXTarget(param.getTargetX()); |
| | | shuttleProtocol.setXCurrent(param.getStartX()); |
| | | shuttleProtocol.setYStart(param.getStartY()); |
| | | shuttleProtocol.setYTarget(param.getTargetY()); |
| | | shuttleProtocol.setYCurrent(param.getStartY()); |
| | | shuttleThread.enableMoveLoc(param); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | Device device = deviceService.getOne(new LambdaQueryWrapper<Device>() |
| | | .eq(Device::getDeviceType, DeviceCtgType.SHUTTLE.val()) |
| | | .eq(Device::getDeviceNo, shuttleNo) |
| | | .eq(Device::getStatus, 1) |
| | | ); |
| | | if (null == device) { |
| | | return vo; |
| | |
| | | |
| | | List<Task> selectManualByExecuteSts(); |
| | | |
| | | List<Task> selectMoveByAnalyzeSts(); |
| | | |
| | | List<Task> selectMoveByExecuteSts(); |
| | | |
| | | List<Task> selectWaitAnalyzeInBoundTask(); |
| | | |
| | | List<Task> selectPakOut(); |
| | |
| | | // 持久化 motion 并生产priority |
| | | int batchInsert(List<Motion> motionList, String uuid, Integer taskNo); |
| | | |
| | | int batchInsert(List<Motion> motionList, String uuid, Integer taskNo, Long hostId); |
| | | |
| | | } |
| | |
| | | |
| | | List<Task> selectManualByExecuteSts(); |
| | | |
| | | List<Task> selectMoveByAnalyzeSts(); |
| | | |
| | | List<Task> selectMoveByExecuteSts(); |
| | | |
| | | List<Task> selectWaitAnalyzeInBoundTask(); |
| | | |
| | | List<Task> selectPakOut(); |
| | |
| | | public synchronized void initRealtimeBasMap() { |
| | | try { |
| | | List<Dict> dicts = dictService.list(new LambdaQueryWrapper<Dict>() |
| | | .like(Dict::getFlag, "map") |
| | | .like(Dict::getFlag, "map-") |
| | | .eq(Dict::getStatus, 1)); |
| | | |
| | | TreeMap<Integer, ArrayList<ArrayList<MapNode>>> levData = new TreeMap<>(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int batchInsert(List<Motion> motionList, String uuid, Integer taskNo) { |
| | | public int batchInsert(List<Motion> motionList, String uuid, Integer taskNo, Long hostId) { |
| | | int i = motionList.size(); |
| | | for (Motion motion : motionList) { |
| | | motion.setPriority(i); |
| | | motion.setTaskNo(taskNo); |
| | | motion.setUuid(uuid); |
| | | if (hostId != null) { |
| | | motion.setHostId(hostId); |
| | | } |
| | | if (!this.save(motion)) { |
| | | throw new CoolException(JSON.toJSONString(motion) + "动作保存失败"); |
| | | } |
| | |
| | | } |
| | | return motionList.size(); |
| | | } |
| | | |
| | | @Override |
| | | public int batchInsert(List<Motion> motionList, String uuid, Integer taskNo) { |
| | | return batchInsert(motionList, uuid, taskNo, null); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Task> selectMoveByAnalyzeSts() { |
| | | return this.baseMapper.selectMoveByAnalyzeSts(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Task> selectMoveByExecuteSts() { |
| | | return this.baseMapper.selectMoveByExecuteSts(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Task> selectWaitAnalyzeInBoundTask() { |
| | | return this.baseMapper.selectWaitAnalyzeInBoundTask(); |
| | | } |
| | |
| | | @Autowired |
| | | private ShuttleCommandService shuttleCommandService; |
| | | |
| | | // @Scheduled(cron = "0/1 * * * * ? ") |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | public synchronized void executeTask() { |
| | | Date now = new Date(); |
| | | // ANALYZE_INBOUND |
| | |
| | | } |
| | | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | public synchronized void executeMoveTask() { |
| | | Date now = new Date(); |
| | | // ANALYZE_MOVE |
| | | for (Task task : taskService.selectMoveByAnalyzeSts()) { |
| | | Motion executingMotion = motionService.selectOfTop1(task.getUuid(), MotionStsType.EXECUTING.val(), task.getHostId()); |
| | | if (executingMotion != null) {//存在正在执行的motion |
| | | continue; |
| | | } |
| | | |
| | | Motion motion = motionService.selectOfTop1(task.getUuid(), MotionStsType.INIT.val(), task.getHostId()); |
| | | if (null != motion) { |
| | | boolean result = this.executeMotion(motion); |
| | | if (!result) { |
| | | continue; |
| | | } |
| | | // 更新Task |
| | | switch (TaskStsType.query(task.getTaskSts())) { |
| | | case ANALYZE_MOVE: |
| | | task.setTaskSts(TaskStsType.EXECUTE_MOVE.sts); |
| | | break; |
| | | } |
| | | task.setUpdateTime(now); |
| | | if (!taskService.updateById(task)) { |
| | | log.error("{}其他工作档更新状态失败!", task.getTaskNo()); |
| | | } |
| | | } |
| | | } |
| | | // EXECUTE_MOVE |
| | | for (Task task : taskService.selectMoveByExecuteSts()) { |
| | | if (!motionService.hasRunningMotion(task.getUuid(), task.getHostId())) { |
| | | Motion motion = motionService.selectOfTop1(task.getUuid(), MotionStsType.WAITING.val(), task.getHostId()); |
| | | if (null != motion) { |
| | | boolean result = this.executeMotion(motion); |
| | | if (!result) { |
| | | continue; |
| | | } |
| | | } else { |
| | | if (motionService.selectOfTop1(task.getUuid(), MotionStsType.EXECUTING.val(), task.getHostId()) != null) { |
| | | continue; |
| | | } |
| | | |
| | | // 更新Task |
| | | switch (TaskStsType.query(task.getTaskSts())) { |
| | | case EXECUTE_MOVE: |
| | | task.setTaskSts(TaskStsType.COMPLETE_MOVE.sts); |
| | | break; |
| | | } |
| | | task.setUpdateTime(now); |
| | | if (!taskService.updateById(task)) { |
| | | log.error("{}他工作档更新状态失败!", task.getTaskNo()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | public void scanMotionByExecuting() { |
| | | List<Motion> motionList = motionService.selectBySts(MotionStsType.EXECUTING.val()); |
| | | for (Motion motion : motionList) { |
| | |
| | | package com.zy.asrs.wcs.core.utils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.asrs.framework.common.SpringUtils; |
| | | import com.zy.asrs.wcs.core.model.NavigateNode; |
| | | import com.zy.asrs.wcs.system.entity.Dict; |
| | | import com.zy.asrs.wcs.system.service.DictService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | */ |
| | | public class NavigateSolution { |
| | | |
| | | // -1 -> 墙壁, 1 -> 起点 2 -> 终点 3-> 母轨 4->站点 |
| | | // -1 -> 墙壁, 0 -> 货位, 1 -> 起点 2 -> 终点 3-> 母轨 4->站点 |
| | | |
| | | int[][] map = {{}}; |
| | | |
| | |
| | | |
| | | |
| | | public ArrayList<NavigateNode> extend_current_node(NavigateNode current_node) { |
| | | //默认地图母轨方向x |
| | | String mapDirection = "x"; |
| | | DictService dictService = SpringUtils.getBean(DictService.class); |
| | | if (dictService != null) { |
| | | Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>() |
| | | .eq(Dict::getFlag, "direction_map") |
| | | .eq(Dict::getStatus, 1)); |
| | | if (dict != null) { |
| | | mapDirection = dict.getValue(); |
| | | } |
| | | } |
| | | |
| | | //获取当前结点的x, y |
| | | int x = current_node.getX(); |
| | | int y = current_node.getY(); |
| | |
| | | // neighbour_node.add(node); |
| | | // } |
| | | // } |
| | | if (map[x][y] == 3) { |
| | | //母轨才能进行左右移动 |
| | | if (is_valid(x, y + 1)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x, y + 1); |
| | | neighbour_node.add(node); |
| | | } |
| | | if (is_valid(x, y - 1)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x, y - 1); |
| | | neighbour_node.add(node); |
| | | } |
| | | } |
| | | |
| | | if (map[x][y] == 0 || map[x][y] == 3 || map[x][y] == 4 || map[x][y] == 5) { |
| | | //子轨和母轨、输送线、充电桩才能进行上下移动 |
| | | if (is_valid(x + 1, y)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x + 1, y); |
| | | neighbour_node.add(node); |
| | | if (mapDirection.equals("x")) {//母轨x方向 |
| | | if (map[x][y] == 3) { |
| | | //母轨才能进行上下移动 |
| | | if (is_valid(x + 1, y)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x + 1, y); |
| | | neighbour_node.add(node); |
| | | } |
| | | if (is_valid(x - 1, y)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x -1, y); |
| | | neighbour_node.add(node); |
| | | } |
| | | } |
| | | if (is_valid(x - 1, y)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x -1, y); |
| | | neighbour_node.add(node); |
| | | |
| | | if (map[x][y] == 0 || map[x][y] == 3 || map[x][y] == 4 || map[x][y] == 5) { |
| | | //子轨和母轨、输送线、充电桩才能进行左右移动 |
| | | if (is_valid(x, y + 1)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x, y + 1); |
| | | neighbour_node.add(node); |
| | | } |
| | | if (is_valid(x, y - 1)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x, y - 1); |
| | | neighbour_node.add(node); |
| | | } |
| | | } |
| | | }else if (mapDirection.equals("y")) {//母轨y方向 |
| | | if (map[x][y] == 3) { |
| | | //母轨才能进行左右移动 |
| | | if (is_valid(x, y + 1)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x, y + 1); |
| | | neighbour_node.add(node); |
| | | } |
| | | if (is_valid(x, y - 1)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x, y - 1); |
| | | neighbour_node.add(node); |
| | | } |
| | | } |
| | | |
| | | if (map[x][y] == 0 || map[x][y] == 3 || map[x][y] == 4 || map[x][y] == 5) { |
| | | //子轨和母轨、输送线、充电桩才能进行上下移动 |
| | | if (is_valid(x + 1, y)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x + 1, y); |
| | | neighbour_node.add(node); |
| | | } |
| | | if (is_valid(x - 1, y)) |
| | | { |
| | | NavigateNode node = new NavigateNode(x -1, y); |
| | | neighbour_node.add(node); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | return null; |
| | | } |
| | | |
| | | //获取避让位置 |
| | | String standByLocNo = this.searchStandByLocNo(Integer.valueOf(device.getDeviceNo()), device.getHostId(), shuttleThread.getStatus().getCurrentLocNo()); |
| | | |
| | | Task task = new Task(); |
| | | task.setUuid(String.valueOf(snowflakeIdWorker.nextId())); |
| | | task.setTaskNo(String.valueOf(Utils.getTaskNo("MOVE"))); |
| | |
| | | task.setOriginSite(null); |
| | | task.setOriginLoc(null); |
| | | task.setDestSite(null); |
| | | task.setDestLoc(standByLocNo); // 避让位置 |
| | | task.setDestLoc(locNo); // 迁移位置 |
| | | task.setIoTime(new Date()); |
| | | task.setStartTime(new Date()); |
| | | task.setHostId(device.getHostId()); |
| | |
| | | News.error("保存{}号四向穿梭车迁移任务失败!!!", device.getDeviceNo()); |
| | | return null; |
| | | } |
| | | motionService.batchInsert(motionList, task.getUuid(), Integer.valueOf(task.getTaskNo())); |
| | | motionService.batchInsert(motionList, task.getUuid(), Integer.valueOf(task.getTaskNo()), device.getHostId()); |
| | | |
| | | task.setTaskSts(TaskStsType.ANALYZE_MOVE.sts); |
| | | |
| | |
| | | package com.zy.asrs.wcs.rcs.thread; |
| | | |
| | | import com.zy.asrs.wcs.common.ExecuteSupport; |
| | | import com.zy.asrs.wcs.core.domain.param.ShuttleMoveLocParam; |
| | | import com.zy.asrs.wcs.core.model.NavigateNode; |
| | | import com.zy.asrs.wcs.core.model.command.ShuttleCommand; |
| | | import com.zy.asrs.wcs.core.model.enums.MotionCtgType; |
| | |
| | | |
| | | public interface ShuttleThread extends ThreadHandler{ |
| | | |
| | | ShuttleProtocol getStatus();//获取四向穿梭车状态 |
| | | ShuttleProtocol getStatus(boolean clone);//获取四向穿梭车状态 |
| | | |
| | | ShuttleProtocol getStatus();//获取四向穿梭车状态-默认clone |
| | | |
| | | Device getDevice();//获取设备信息 |
| | | |
| | |
| | | |
| | | boolean setPakMk(boolean pakMk);//设置标记 |
| | | |
| | | boolean enableMoveLoc(ShuttleMoveLocParam param); |
| | | |
| | | //***************获取命令***************** |
| | | |
| | | ShuttleCommand getMoveCommand(Integer taskNo, String startCodeNum, String distCodeNum, Integer allDistance, Integer runDirection, Integer runSpeed, List<NavigateNode> nodes);//获取移动命令 |
| | |
| | | import com.zy.asrs.framework.common.SpringUtils; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import com.zy.asrs.wcs.common.ExecuteSupport; |
| | | import com.zy.asrs.wcs.core.domain.param.ShuttleMoveLocParam; |
| | | import com.zy.asrs.wcs.core.entity.BasShuttle; |
| | | import com.zy.asrs.wcs.core.entity.Loc; |
| | | import com.zy.asrs.wcs.core.model.MapNode; |
| | |
| | | |
| | | @Override |
| | | public ShuttleProtocol getStatus() { |
| | | return getStatus(true); |
| | | } |
| | | |
| | | @Override |
| | | public ShuttleProtocol getStatus(boolean clone) { |
| | | if (this.shuttleProtocol == null) { |
| | | return null; |
| | | } |
| | | return this.shuttleProtocol.clone(); |
| | | return clone ? this.shuttleProtocol.clone() : this.shuttleProtocol; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean enableMoveLoc(ShuttleMoveLocParam param) { |
| | | shuttleProtocol.setMoveLoc(true);//开启跑库 |
| | | shuttleProtocol.setMoveType(param.getMoveType()); |
| | | shuttleProtocol.setXStart(param.getStartX()); |
| | | shuttleProtocol.setXTarget(param.getTargetX()); |
| | | shuttleProtocol.setXCurrent(param.getStartX()); |
| | | shuttleProtocol.setYStart(param.getStartY()); |
| | | shuttleProtocol.setYTarget(param.getTargetY()); |
| | | shuttleProtocol.setYCurrent(param.getStartY()); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public ShuttleCommand getMoveCommand(Integer taskNo, String startCodeNum, String distCodeNum, Integer allDistance, Integer runDirection, Integer runSpeed, List<NavigateNode> nodes) { |
| | | NavigateMapData navigateMapData = SpringUtils.getBean(NavigateMapData.class); |
| | | NyShuttleHttpCommand httpStandard = getHttpStandard(Integer.parseInt(device.getDeviceNo()), taskNo); |
| | |
| | | import com.zy.asrs.framework.common.SpringUtils; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import com.zy.asrs.wcs.common.ExecuteSupport; |
| | | import com.zy.asrs.wcs.core.domain.param.ShuttleMoveLocParam; |
| | | import com.zy.asrs.wcs.core.entity.BasShuttle; |
| | | import com.zy.asrs.wcs.core.entity.Loc; |
| | | import com.zy.asrs.wcs.core.model.NavigateNode; |
| | |
| | | basShuttle.setStatus(1); |
| | | basShuttle.setDeleted(0); |
| | | basShuttle.setHostId(device.getHostId()); |
| | | basShuttle.setDeviceId(device.getId().intValue()); |
| | | shuttleService.save(basShuttle); |
| | | } |
| | | //任务号 |
| | |
| | | |
| | | @Override |
| | | public ShuttleProtocol getStatus() { |
| | | return getStatus(true); |
| | | } |
| | | |
| | | @Override |
| | | public ShuttleProtocol getStatus(boolean clone) { |
| | | if (this.shuttleProtocol == null) { |
| | | return null; |
| | | } |
| | | return this.shuttleProtocol.clone(); |
| | | return clone ? this.shuttleProtocol.clone() : this.shuttleProtocol; |
| | | } |
| | | |
| | | @Override |
| | |
| | | NavigateNode targetPath = sectionNodes.get(sectionNodes.size() - 1); |
| | | if (ShuttleRunDirection.get(startPath.getDirection()) == ShuttleRunDirection.LEFT |
| | | || ShuttleRunDirection.get(startPath.getDirection()) == ShuttleRunDirection.RIGHT) { |
| | | //母轨方向 |
| | | oper = 5; |
| | | } else { |
| | | //子轨方向 |
| | | oper = 6; |
| | | } else { |
| | | //母轨方向 |
| | | oper = 5; |
| | | } |
| | | |
| | | for (int i = 0; i < sectionNodes.size(); i++) { |
| | |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | Integer code = jsonObject.getInteger("code"); |
| | | System.out.println("路径下发" + taskNo); |
| | | System.out.println(JSON.toJSONString(jsonObject)); |
| | | System.out.println(JSON.toJSONString(param)); |
| | | if (code.equals(200)) { |
| | | System.out.println("路径下发" + taskNo); |
| | | return true; |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | Integer code = jsonObject.getInteger("code"); |
| | | System.out.println(JSON.toJSONString(command.getBody())); |
| | | if (code.equals(200)) { |
| | | this.shuttleProtocol.setSendTime(System.currentTimeMillis());//指令下发时间 |
| | | return true; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean enableMoveLoc(ShuttleMoveLocParam param) { |
| | | shuttleProtocol.setMoveLoc(true);//开启跑库 |
| | | shuttleProtocol.setMoveType(param.getMoveType()); |
| | | shuttleProtocol.setXStart(param.getStartX()); |
| | | shuttleProtocol.setXTarget(param.getTargetX()); |
| | | shuttleProtocol.setXCurrent(param.getStartX()); |
| | | shuttleProtocol.setYStart(param.getStartY()); |
| | | shuttleProtocol.setYTarget(param.getTargetY()); |
| | | shuttleProtocol.setYCurrent(param.getStartY()); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public ShuttleCommand getMoveCommand(Integer taskNo, String startCodeNum, String distCodeNum, Integer allDistance, Integer runDirection, Integer runSpeed, List<NavigateNode> nodes) { |
| | | HashMap<String, Object> body = new HashMap<>(); |
| | | body.put("messageName", "runOrder"); |
| | |
| | | order by priority desc,start_time,task_no asc |
| | | </select> |
| | | |
| | | <select id="selectMoveByAnalyzeSts" resultType="com.zy.asrs.wcs.core.entity.Task"> |
| | | select * from wcs_task |
| | | where 1=1 |
| | | and task_sts in (302) |
| | | order by priority desc,start_time,task_no asc |
| | | </select> |
| | | |
| | | <select id="selectMoveByExecuteSts" resultType="com.zy.asrs.wcs.core.entity.Task"> |
| | | select * from wcs_task |
| | | where 1=1 |
| | | and task_sts in (303) |
| | | order by priority desc,start_time,task_no asc |
| | | </select> |
| | | |
| | | <select id="selectWaitAnalyzeInBoundTask" resultType="com.zy.asrs.wcs.core.entity.Task"> |
| | | select * from wcs_task where task_ctg = 1 and task_sts = 1 |
| | | </select> |