diff --git a/qaup-collision/src/main/java/com/qaup/collision/datacollector/websocket/AdxpFlightServiceWebSocketClient.java b/qaup-collision/src/main/java/com/qaup/collision/datacollector/websocket/AdxpFlightServiceWebSocketClient.java index b157476..f282010 100644 --- a/qaup-collision/src/main/java/com/qaup/collision/datacollector/websocket/AdxpFlightServiceWebSocketClient.java +++ b/qaup-collision/src/main/java/com/qaup/collision/datacollector/websocket/AdxpFlightServiceWebSocketClient.java @@ -1012,7 +1012,6 @@ public class AdxpFlightServiceWebSocketClient implements WebSocketHandler { String flightNumber = normalizeFlightNo(flightNumberRaw); String flightId = normalizeFlightNo(flightIdRaw); String contactCross = getTextContent(root, "ContactCross"); - String seat = getTextContentAny(root, "Seat", "SEAT"); String type = getTextContent(root, "Type"); long nowMs = System.currentTimeMillis(); @@ -1048,7 +1047,6 @@ public class AdxpFlightServiceWebSocketClient implements WebSocketHandler { dto.setType(routeType); if ("IN".equalsIgnoreCase(routeType)) { dto.setContactCross(contactCross); - dto.setSeat(seat); } // TISFLIGHT 特殊:可能无 BizKey。无 BizKey 时先 FuId 关联,再按航班号回退。 @@ -1066,22 +1064,12 @@ public class AdxpFlightServiceWebSocketClient implements WebSocketHandler { updateActiveBizKey(flightKey, normalizedBizKey, nowMs); // contactCross 仅对进港有效,避免进出港参数串用 if ("IN".equalsIgnoreCase(routeType) - && canUpdateRouteParams && contactCross != null && !contactCross.isBlank()) { setValueOnFlightAndBizKeys(flightKey, bizRedisKey, "contactCross", contactCross); setValueOnFlightAndBizKeys(flightKey, bizRedisKey, "contactCrossTs", String.valueOf(nowMs)); } // TISFLIGHT 也可提供 seat,作为 CRAFTSEAT 的补充来源 - if (canUpdateRouteParams - && seat != null && !seat.isBlank()) { - setValueOnFlightAndBizKeys(flightKey, bizRedisKey, "seat", seat); - setValueOnFlightAndBizKeys(flightKey, bizRedisKey, "seatTs", String.valueOf(nowMs)); - if ("OUT".equalsIgnoreCase(routeType)) { - setValueOnFlightAndBizKeys(flightKey, bizRedisKey, "startSeat", seat); - setValueOnFlightAndBizKeys(flightKey, bizRedisKey, "startSeatTs", String.valueOf(nowMs)); - } - } - if (!canUpdateRouteParams && (contactCross != null || seat != null)) { + if (!canUpdateRouteParams && contactCross != null) { log.warn("TISFLIGHT未建立BizKey关联,跳过contactCross/seat覆盖: flNo={}, flightId={}, fuId={}, bizKey={}, resolvedFlightNo={}", flightNumber, flightId, fuId, bizKey, resolvedFlightNo); } diff --git a/qaup-collision/src/main/java/com/qaup/collision/dataprocessing/service/DataProcessingService.java b/qaup-collision/src/main/java/com/qaup/collision/dataprocessing/service/DataProcessingService.java index bdc8f5b..8b39a6e 100644 --- a/qaup-collision/src/main/java/com/qaup/collision/dataprocessing/service/DataProcessingService.java +++ b/qaup-collision/src/main/java/com/qaup/collision/dataprocessing/service/DataProcessingService.java @@ -1349,19 +1349,25 @@ public class DataProcessingService { } private String readRedisParamBySelectedKey(String bizRedisKey, String flightKey, String field) { - String sourceKey = bizRedisKey != null ? bizRedisKey : flightKey; - if (sourceKey == null) { - return null; + String value = null; + if (bizRedisKey != null) { + value = normalizeRedisString(redisCache.getCacheMapValue(bizRedisKey, field)); } - return normalizeRedisString(redisCache.getCacheMapValue(sourceKey, field)); + if ((value == null || value.isBlank()) && flightKey != null) { + value = normalizeRedisString(redisCache.getCacheMapValue(flightKey, field)); + } + return value; } private Long readRedisParamLongBySelectedKey(String bizRedisKey, String flightKey, String field) { - String sourceKey = bizRedisKey != null ? bizRedisKey : flightKey; - if (sourceKey == null) { - return null; + Long value = null; + if (bizRedisKey != null) { + value = parseRedisLong(redisCache.getCacheMapValue(bizRedisKey, field)); } - return parseRedisLong(redisCache.getCacheMapValue(sourceKey, field)); + if (value == null && flightKey != null) { + value = parseRedisLong(redisCache.getCacheMapValue(flightKey, field)); + } + return value; } private static Long parseRedisLong(Object v) {