| | |
| | | return false; |
| | | } |
| | | |
| | | String lockKey = RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + stationProtocol.getStationId(); |
| | | Object lock = redisUtil.get(lockKey); |
| | | Object lock = redisUtil.get(RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + stationProtocol.getStationId()); |
| | | if (lock != null) { |
| | | return false; |
| | | } |
| | |
| | | } |
| | | stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, "gsl-process", "station-back"); |
| | | News.info("{}扫码站异常,已退回至{},条码站状态:{}", stationProtocol.getTaskNo(), backStation.getStationId(), JSON.toJSONString(stationProtocol)); |
| | | redisUtil.set(lockKey, "lock", 60 * 60); |
| | | redisUtil.set(RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + stationProtocol.getStationId(), "lock", 60 * 60); |
| | | return false; |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | Integer backStationId = stationObjModel.getBarcodeStation() == null ? null : stationObjModel.getBarcodeStation().getStationId(); |
| | | if (backStationId == null) { |
| | | Integer barcodeStationId = stationObjModel.getBarcodeStation() == null ? null : stationObjModel.getBarcodeStation().getStationId(); |
| | | if (barcodeStationId == null) { |
| | | return; |
| | | } |
| | | |
| | |
| | | StationCommandType.MOVE, |
| | | commonService.getWorkNo(WrkIoType.ENABLE_IN.id), |
| | | stationId, |
| | | backStationId, |
| | | barcodeStationId, |
| | | 0 |
| | | ); |
| | | stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, STATION_COMMAND_SOURCE, "enable-in"); |
| | | Utils.precomputeInTaskEnableRow(backStationId); |
| | | Utils.precomputeInTaskEnableRow(barcodeStationId); |
| | | redisUtil.set(RedisKeyType.GENERATE_ENABLE_IN_STATION_DATA_LIMIT.key + stationId, "lock", 15); |
| | | // 启动入库时删除退回控制key,允许后续异常时再次生成退回命令 |
| | | redisUtil.del(RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + barcodeStationId); |
| | | News.info("{}站点启动入库成功,数据包:{}", stationId, JSON.toJSONString(command)); |
| | | } |
| | | |