From 22091b5dd971f915ae110a91778978df23c9bb2c Mon Sep 17 00:00:00 2001 From: weicw <594098497@qq.com> Date: Sat, 7 Nov 2026 04:29:50 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E8=AE=A1=E5=88=92=E8=B0=83=E5=BA=A6?= =?UTF-8?q?=E7=94=9F=E6=88=90=E7=9A=84=E8=BF=90=E5=8D=95=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E5=8F=B8=E6=9C=BA=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 计划调度与多联总单调度归一后的数据来源豁免司机必填;手工建单规则不变。 --- .../transport/service/impl/WaybillServiceImpl.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/WaybillServiceImpl.java b/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/WaybillServiceImpl.java index c692583e..dcfbcae5 100644 --- a/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/WaybillServiceImpl.java +++ b/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/WaybillServiceImpl.java @@ -2174,7 +2174,7 @@ public class WaybillServiceImpl extends BaseServiceImpl if (isRoadTransport(waybill.getTransportType())) { if ("承运商".equals(waybill.getCarrierType())) { TransportBusinessSupport.validateRequired(waybill.getCarrierName(), "承运商不能为空"); - } else if (!isBatchImport(waybill)) { + } else if (!isBatchImport(waybill) && !isDriverOptionalSource(waybill)) { TransportBusinessSupport.validateRequired(waybill.getDriverName(), "司机不能为空"); } } @@ -2350,6 +2350,14 @@ public class WaybillServiceImpl extends BaseServiceImpl return waybill != null && TransportBusinessSupport.DATA_SOURCE_BATCH_IMPORT.equals(waybill.getDataSource()); } + /** + * 计划调度生成的运单允许司机为空:调度明细里司机与手机号对全部承运类型都是选填。 + * 数据来源已由 prepare 归一,多联总单调度同样归为计划调度。 + */ + private boolean isDriverOptionalSource(Waybill waybill) { + return waybill != null && TransportBusinessSupport.DATA_SOURCE_PLAN_DISPATCH.equals(waybill.getDataSource()); + } + private void fillJsonFromFlatFields(Waybill waybill) { if (Func.isEmpty(waybill.getTaskEntryMode())) { waybill.setTaskEntryMode("simple");