| | |
| | | //启动入库,删除条码站退回限制 |
| | | Integer backStationId = entity.getBarcodeStation().getStationId(); |
| | | String lockKey = RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + backStationId; |
| | | redisUtil.del(lockKey); |
| | | if (redisUtil.hasKey(lockKey)) { |
| | | StationProtocol backStationProtocol = stationMap.get(backStationId); |
| | | if (backStationProtocol == null) { |
| | | continue; |
| | | } |
| | | |
| | | if (backStationProtocol.isAutoing() |
| | | && !backStationProtocol.isLoading() |
| | | && stationProtocol.getTaskNo() == 0 |
| | | ) { |
| | | //条码站自动、无物、工作号0。删除条码站退回限制 |
| | | redisUtil.del(lockKey); |
| | | } |
| | | } |
| | | |
| | | StationCommand command = stationThread.getCommand(StationCommandType.MOVE, commonService.getWorkNo(WrkIoType.ENABLE_IN.id), stationId, backStationId, 0); |
| | | stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, "gsl-process", "enable-in"); |
| | |
| | | } |
| | | stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, "gsl-process", "station-back"); |
| | | News.info("{}扫码站异常,已退回至{},条码站状态:{}", stationProtocol.getTaskNo(), backStation.getStationId(), JSON.toJSONString(stationProtocol)); |
| | | redisUtil.set(lockKey, "lock", 60 * 10); |
| | | redisUtil.set(lockKey, "lock", 60 * 60); |
| | | return false; |
| | | } |
| | | |