优化
This commit is contained in:
+2
-1
@@ -2,8 +2,9 @@ package com.baiyue.common.event;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/** 海外仓卸柜完成事实;预计报空时间由头程按照片上传时间加两天计算。 */
|
||||
/** 海外仓卸柜完成事实;国内订舱 ID 是稳定聚合标识,containerNo 仅用于核对物理柜号。 */
|
||||
public record OverseasContainerUnloadedV1(
|
||||
String sourceContainerBookingId,
|
||||
String containerNo,
|
||||
Instant unloadingCompletedAt,
|
||||
Instant unloadingPhotoUploadedAt,
|
||||
|
||||
+2
-2
@@ -13,12 +13,12 @@ class OverseasContainerUnloadedV1Test {
|
||||
|
||||
@Test
|
||||
void payloadRoundTripsWithStableContainerIdAndUtcFacts() throws Exception {
|
||||
var payload = new OverseasContainerUnloadedV1("MSCU1234567",
|
||||
var payload = new OverseasContainerUnloadedV1("1001", "MSCU1234567",
|
||||
Instant.parse("2026-08-20T03:00:00Z"), Instant.parse("2026-08-20T02:30:00Z"), null);
|
||||
|
||||
String json = mapper.writeValueAsString(payload);
|
||||
|
||||
assertThat(mapper.readValue(json, OverseasContainerUnloadedV1.class)).isEqualTo(payload);
|
||||
assertThat(json).contains("MSCU1234567", "unloadingPhotoUploadedAt");
|
||||
assertThat(json).contains("sourceContainerBookingId", "1001", "MSCU1234567", "unloadingPhotoUploadedAt");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user