收窄运输方式枚举为公路/铁路/水路/航空四种

运输计划导入校验白名单去掉「公路整车、公路配载/零担、跨境海运」

运单批量导入字典兜底值去掉多余枚举,仅保留四种运输方式
This commit is contained in:
2026-09-21 06:24:31 +08:00
parent 37d0ebc21e
commit ddfa52a2ac
2 changed files with 4 additions and 4 deletions
@@ -416,9 +416,9 @@ public class TransportPlanServiceImpl extends BaseServiceImpl<TransportPlanMappe
// 2. 校验运输类型枚举值 // 2. 校验运输类型枚举值
String transportType = trimToEmpty(excel.getTransportType()); String transportType = trimToEmpty(excel.getTransportType());
if (Func.isNotEmpty(transportType)) { if (Func.isNotEmpty(transportType)) {
List<String> validTransportTypes = List.of("公路整车", "公路配载/零担", "铁路运输", "水路运输", "跨境海运", "航空运输"); List<String> validTransportTypes = List.of("公路运输", "铁路运输", "水路运输", "航空运输");
if (!validTransportTypes.contains(transportType)) { if (!validTransportTypes.contains(transportType)) {
errors.add("运输类型需系统枚举值(公路整车、公路配载/零担、铁路运输、水路运输、跨境海运、航空运输)"); errors.add("运输类型需系统枚举值(公路运输、铁路运输、水路运输、航空运输)");
} }
} }
@@ -980,8 +980,8 @@ public class WaybillImportBatchServiceImpl extends BaseServiceImpl<WaybillImport
// 字典读取失败时使用默认值。 // 字典读取失败时使用默认值。
} }
if (options.isEmpty()) { if (options.isEmpty()) {
List<String> defaults = List.of("公路运输", "铁路运输", "水路运输", "航空运输", // 运输方式仅支持公路、铁路、水路、航空四种
"公路整车", "公路配载/零担", "铁路整车", "铁路零担", "水路", "航空", "多式联运", "管道运输", "其他"); List<String> defaults = List.of("公路运输", "铁路运输", "水路运输", "航空运输");
defaults.forEach(value -> options.put(value, value)); defaults.forEach(value -> options.put(value, value));
} }
return options; return options;