| | |
| | | |
| | | @Override |
| | | public void run() { |
| | | //请求生成入库任务 |
| | | generateStoreWrkFile(); |
| | | //检测入库站是否有任务生成,并启动入库 |
| | | checkInStationHasTask(); |
| | | //请求生成入库任务 |
| | | generateStoreWrkFile(); |
| | | |
| | | //执行堆垛机任务 |
| | | crnOperateUtils.crnIoExecute(); |
| | |
| | | stationOperateProcessUtils.stationOutExecute(); |
| | | //检测输送站点出库任务执行完成 |
| | | stationOperateProcessUtils.stationOutExecuteFinish(); |
| | | |
| | | //检测输送站点是否运行堵塞 |
| | | stationOperateProcessUtils.checkStationRunBlock(); |
| | | } |
| | | |
| | | /** |
| | |
| | | //满足自动、有物、有工作号,生成入库数据 |
| | | if (stationProtocol.isAutoing() |
| | | && stationProtocol.isLoading() |
| | | && stationProtocol.isInEnable() |
| | | && stationProtocol.getTaskNo() > 0 |
| | | ) { |
| | | if (stationProtocol.getError() > 0) { |
| | | Object backLock = redisUtil.get(RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + stationId); |
| | | if (backLock != null) { |
| | | continue; |
| | | } |
| | | |
| | | //报警回退 |
| | | StationCommand command = stationThread.getCommand(StationCommandType.MOVE, commonService.getWorkNo(WrkIoType.STATION_BACK.id), stationId, entity.getBackStation().getStationId(), 0); |
| | | MessageQueue.offer(SlaveType.Devp, basDevp.getDevpNo(), new Task(2, command)); |
| | | redisUtil.set(RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + stationId, "lock", 15); |
| | | News.info("{}站点报警回退成功,数据包:{}", stationId, JSON.toJSONString(command)); |
| | | continue; |
| | | } |
| | | |
| | | if (Cools.isEmpty(stationProtocol.getBarcode())) { |
| | | continue; |
| | | } |
| | |
| | | taskParam.setTaskPri(dto.getTaskPri()); |
| | | taskParam.setBarcode(stationProtocol.getBarcode()); |
| | | WrkMast wrkMast = commonService.createInTask(taskParam); |
| | | |
| | | StationCommand command = stationThread.getCommand(StationCommandType.WRITE_INFO, wrkMast.getWrkNo(), stationId, stationId, 0); |
| | | if(command == null){ |
| | | News.taskInfo(wrkMast.getWrkNo(), "获取输送线命令失败"); |
| | | continue; |
| | | } |
| | | MessageQueue.offer(SlaveType.Devp, basDevp.getDevpNo(), new Task(2, command)); |
| | | } |
| | | } |
| | | } |
| | |
| | | && stationProtocol.getTaskNo() == 0 |
| | | && stationProtocol.isEnableIn() |
| | | ) { |
| | | StationCommand command = stationThread.getCommand(StationCommandType.MOVE, commonService.getWorkNo(WrkIoType.FAKE_TASK_NO.id), stationId, entity.getBarcodeStation().getStationId(), 0); |
| | | StationCommand command = stationThread.getCommand(StationCommandType.MOVE, commonService.getWorkNo(WrkIoType.ENABLE_IN.id), stationId, entity.getBarcodeStation().getStationId(), 0); |
| | | MessageQueue.offer(SlaveType.Devp, basDevp.getDevpNo(), new Task(2, command)); |
| | | redisUtil.set(RedisKeyType.GENERATE_ENABLE_IN_STATION_DATA_LIMIT.key + stationId, "lock", 10); |
| | | redisUtil.set(RedisKeyType.GENERATE_ENABLE_IN_STATION_DATA_LIMIT.key + stationId, "lock", 15); |
| | | News.info("{}站点启动入库成功,数据包:{}", stationId, JSON.toJSONString(command)); |
| | | } |
| | | } |
| | | } |