| | |
| | | } |
| | | } |
| | | vo.setLaneNo(crnProtocol.getLaneNo()); // |
| | | vo.setErrorCrn(crnProtocol.getErrCrn()); // |
| | | vo.setXspeed(crnProtocol.getXSpeed()); // 走行速度(m/min) |
| | | vo.setYspeed(crnProtocol.getYSpeed()); // 升降速度(m/min) |
| | | vo.setZspeed(crnProtocol.getZSpeed()); // 叉牙速度(m/min) |
| | |
| | | } |
| | | vo.setInEnable(basCrnp.getInEnable()); |
| | | vo.setOutEnable(basCrnp.getOutEnable()); |
| | | vo.setTaskComplete(crnThread.getResetFlag()? "任务完成下发等待":"-"); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | | command.setAckFinish((short) 1); // 任务完成确认位 |
| | | command.setTaskMode(CrnTaskModeType.NONE); // 任务模式 |
| | | command.setSourcePosX((short) 0); // 源库位排 |
| | | command.setSourcePosY((short) 0); // 源库位列 |
| | | command.setSourcePosZ((short) 0); // 源库位层 |
| | | command.setDestinationPosX((short) 0); // 目标库位排 |
| | | command.setDestinationPosY((short) 0); // 目标库位列 |
| | | command.setDestinationPosZ((short) 0); // 目标库位层 |
| | | command.setCommand((short)0); |
| | | return crnControl(command)?R.ok():R.error(); |
| | | if (Cools.isEmpty(param.getCrnNo()) || param.getCrnNo() == 0) { |
| | | return R.error("请选择堆垛机"); |
| | | } |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, param.getCrnNo()); |
| | | crnThread.setResetFlag(true); |
| | | return R.ok(); |
| | | // CrnCommand command = new CrnCommand(); |
| | | // command.setCrnNo(); // 堆垛机编号 |
| | | // command.setTaskNo((short) 0); // 工作号 |
| | | // command.setAckFinish((short) 1); // 任务完成确认位 |
| | | // command.setTaskMode(CrnTaskModeType.NONE); // 任务模式 |
| | | // command.setSourcePosX((short) 0); // 源库位排 |
| | | // command.setSourcePosY((short) 0); // 源库位列 |
| | | // command.setSourcePosZ((short) 0); // 源库位层 |
| | | // command.setDestinationPosX((short) 0); // 目标库位排 |
| | | // command.setDestinationPosY((short) 0); // 目标库位列 |
| | | // command.setDestinationPosZ((short) 0); // 目标库位层 |
| | | // command.setCommand((short)0); |
| | | // return crnControl(command)?R.ok():R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "任务完成指令清除") |
| | | @PostMapping("/crn/operator/taskCompleteClearCommand") |
| | | public R crnTaskCompleteClearCommand(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | // 系统运行状态判断 |
| | | if (Cools.isEmpty(param.getCrnNo()) || param.getCrnNo() == 0) { |
| | | return R.error("请选择堆垛机"); |
| | | } |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, param.getCrnNo()); |
| | | crnThread.setResetFlag(false); |
| | | return R.ok(); |
| | | // CrnCommand command = new CrnCommand(); |
| | | // command.setCrnNo(); // 堆垛机编号 |
| | | // command.setTaskNo((short) 0); // 工作号 |
| | | // command.setAckFinish((short) 1); // 任务完成确认位 |
| | | // command.setTaskMode(CrnTaskModeType.NONE); // 任务模式 |
| | | // command.setSourcePosX((short) 0); // 源库位排 |
| | | // command.setSourcePosY((short) 0); // 源库位列 |
| | | // command.setSourcePosZ((short) 0); // 源库位层 |
| | | // command.setDestinationPosX((short) 0); // 目标库位排 |
| | | // command.setDestinationPosY((short) 0); // 目标库位列 |
| | | // command.setDestinationPosZ((short) 0); // 目标库位层 |
| | | // command.setCommand((short)0); |
| | | // return crnControl(command)?R.ok():R.error(); |
| | | } |
| | | |
| | | // @ManagerAuth(memo = "暂停") |
| | |
| | | } |
| | | CrnCommand crnCommand = new CrnCommand(); |
| | | crnCommand.setCrnNo(crn.getId()); // 堆垛机编号 |
| | | crnCommand.setLaneNo(crnProtocol.getLaneNo()); // 堆垛机巷道号 |
| | | crnCommand.setTaskMode(CrnTaskModeType.CLEAR); |
| | | crnCommand.setAckFinish((short) 0); // 任务完成确认位 |
| | | crnCommand.setCommand((short) 0); // 任务完成确认位 |
| | |
| | | if (crnProtocol == null) { |
| | | throw new CoolException("堆垛机不在线"); |
| | | } |
| | | command.setLaneNo(crnProtocol.getLaneNo()); // 堆垛机巷道号 |
| | | |
| | | // 空闲判断 |
| | | // if (crnProtocol.getStatusType().equals(com.zy.core.enums.CrnStatusType.IDLE) && crnProtocol.getTaskNo() == 0) { |
| | | if (MessageQueue.offer(SlaveType.Crn, crn.getId(), new Task(4, command))) { |
| | |
| | | if (crnProtocol == null) { |
| | | throw new CoolException("堆垛机不在线"); |
| | | } |
| | | command.setLaneNo(crnProtocol.getLaneNo()); // 堆垛机巷道号 |
| | | |
| | | // 空闲判断 |
| | | // if (crnProtocol.getStatusType().equals(com.zy.core.enums.CrnStatusType.IDLE) && crnProtocol.getTaskNo() == 0) { |
| | | if (MessageQueue.offer(SlaveType.Crn, crn.getId(), new Task(2, command))) { |