addedServices = splitAddedServices(
+ first(source, "addedServices", "added_services", "增值服务"));
+ if (!addedServices.isEmpty()) {
+ target.put("addedServices", addedServices);
+ }
}
/**
@@ -163,6 +169,40 @@ public final class TmsV2RequestMapper {
put(target, "customsPort", first(source, "customsPort"));
}
+ /**
+ * 空运增值服务拆成多项。
+ *
+ * 工单里是 added_services 一句话,TMS 要 addedServices 列表。
+ * 顿号、中文逗号、英文逗号都拆;空格不拆,MUST GO 仍是一项。
+ * 已经是列表则逐项原样保留。空项丢掉,不改词。
+ */
+ public static List splitAddedServices(Object raw) {
+ List out = new ArrayList<>();
+ if (raw instanceof List) {
+ for (Object item : (List>) raw) {
+ addServiceToken(out, item);
+ }
+ return out;
+ }
+ String text = textOf(raw);
+ if (text.isEmpty()) {
+ return out;
+ }
+ for (String part : text.split("[、,,]")) {
+ addServiceToken(out, part);
+ }
+ return out;
+ }
+
+ /** 去掉空白后并入列表。同一词只留第一次。 */
+ private static void addServiceToken(List out, Object raw) {
+ String token = textOf(raw);
+ if (token.isEmpty() || out.contains(token)) {
+ return;
+ }
+ out.add(token);
+ }
+
private static String textOf(Object raw) {
return raw == null ? "" : String.valueOf(raw).trim();
}
diff --git a/inquiry-api/jeecg-module-inquiry/src/test/java/org/jeecg/modules/inquiry/tms/InquiryTmsQueryServiceTest.java b/inquiry-api/jeecg-module-inquiry/src/test/java/org/jeecg/modules/inquiry/tms/InquiryTmsQueryServiceTest.java
index 1c4a040..3e08d8c 100644
--- a/inquiry-api/jeecg-module-inquiry/src/test/java/org/jeecg/modules/inquiry/tms/InquiryTmsQueryServiceTest.java
+++ b/inquiry-api/jeecg-module-inquiry/src/test/java/org/jeecg/modules/inquiry/tms/InquiryTmsQueryServiceTest.java
@@ -92,4 +92,27 @@ public class InquiryTmsQueryServiceTest {
"WO202609220004", "2026-09-25", segment);
org.junit.jupiter.api.Assertions.assertTrue(missing.isEmpty(), String.valueOf(missing));
}
+
+ @Test
+ public void airQueryAllowsBlankQuoteDate() {
+ // 空运没填报价日期也算出站齐套,不能再补成当天才放行。
+ java.util.Map segment = new java.util.HashMap();
+ segment.put("cargoName", "茶叶");
+ segment.put("quantity", 1);
+ segment.put("weightKg", "1.5");
+ segment.put("volumeCbm", "100");
+ segment.put("packageType", "托盘");
+ java.util.List missing = InquiryTmsQueryService.missingAirQuery(
+ "WO202609220004", null, segment);
+ org.junit.jupiter.api.Assertions.assertTrue(missing.isEmpty(), String.valueOf(missing));
+ org.junit.jupiter.api.Assertions.assertNull(
+ InquiryTmsQueryService.resolveOutboundQuoteDate("AIR", null));
+ org.junit.jupiter.api.Assertions.assertEquals(
+ "2026-10-08",
+ InquiryTmsQueryService.resolveOutboundQuoteDate("AIR", "2026-10-08"));
+ org.junit.jupiter.api.Assertions.assertNotNull(
+ InquiryTmsQueryService.resolveOutboundQuoteDate("SEA", null));
+ org.junit.jupiter.api.Assertions.assertNotNull(
+ InquiryTmsQueryService.resolveOutboundQuoteDate("LAND", ""));
+ }
}
diff --git a/inquiry-api/jeecg-module-inquiry/src/test/java/org/jeecg/modules/inquiry/tms/TmsV2RequestMapperTest.java b/inquiry-api/jeecg-module-inquiry/src/test/java/org/jeecg/modules/inquiry/tms/TmsV2RequestMapperTest.java
index 375dc6b..3a69ff9 100644
--- a/inquiry-api/jeecg-module-inquiry/src/test/java/org/jeecg/modules/inquiry/tms/TmsV2RequestMapperTest.java
+++ b/inquiry-api/jeecg-module-inquiry/src/test/java/org/jeecg/modules/inquiry/tms/TmsV2RequestMapperTest.java
@@ -193,6 +193,31 @@ public class TmsV2RequestMapperTest {
assertFalse(out.containsKey("tradeTerms"));
assertFalse(out.containsKey("贸易条款"));
assertNull(out.get("originCode"));
+ assertFalse(out.containsKey("addedServices"));
+ }
+
+ @Test
+ public void airAddedServicesSplitIntoList() {
+ Map seg = new HashMap<>();
+ seg.put("destinationCode", "KUL");
+ seg.put("cargoName", "茶叶");
+ seg.put("quantity", "10");
+ seg.put("weightKg", "100");
+ seg.put("volumeCbm", "2");
+ seg.put("packageType", "纸箱");
+ seg.put("added_services", "托盘、前置仓,带电");
+ Map internal = new HashMap<>();
+ internal.put("transportMode", "AIR");
+ internal.put("quoteDate", "2026-10-13");
+ internal.put("segments", Collections.singletonList(seg));
+ Map body = TmsV2RequestMapper.quote(internal);
+ @SuppressWarnings("unchecked")
+ List