| | |
| | | continue; |
| | | } |
| | | |
| | | // 满足自动、有物、有工作号,生成入库数据 |
| | | if (stationProtocol.isAutoing() |
| | | && stationProtocol.isLoading() |
| | | && stationProtocol.isInEnable() |
| | | && stationProtocol.getTaskNo() > 0) { |
| | | if (Cools.isEmpty(stationProtocol.getBarcode())) { |
| | | continue; |
| | | } |
| | | |
| | | if (stationProtocol.getError() > 0) { |
| | | StationObjModel backStation = entity.getBackStation(); |
| | | StationCommand command = stationThread.getCommand(StationCommandType.MOVE, 9998, stationId, backStation.getStationId(), 0); |
| | | if (command == null) { |
| | | News.taskInfo(stationProtocol.getTaskNo(), "{}工作,获取输送线命令失败", stationProtocol.getTaskNo()); |
| | | continue; |
| | | } |
| | | MessageQueue.offer(SlaveType.Devp, basDevp.getDevpNo(), new Task(2, command)); |
| | | News.taskInfo(stationProtocol.getTaskNo(), "{}扫码异常,已退回至{}", backStation.getStationId()); |
| | | } |
| | | |
| | | // 检测任务是否生成 |
| | |
| | | taskParam.setTaskPri(dto.getTaskPri()); |
| | | taskParam.setBarcode(barcode); |
| | | 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.setSystemWarning(""); |
| | | } else { |
| | | // 接口返回非200,重新发起请求 |
| | |
| | | continue; |
| | | } |
| | | |
| | | //满足自动、无物、工作号0,生成入库数据 |
| | | if (stationProtocol.isAutoing() |
| | | && stationProtocol.isLoading() |
| | | && stationProtocol.getTaskNo() == 0 |