🐛 拒单票不再被排除在可配载之外,随配载提交清除接单事实

This commit is contained in:
2026-10-18 14:48:17 +08:00
parent ca92288cf4
commit f9453e4fac
6 changed files with 23 additions and 26 deletions
@@ -784,9 +784,6 @@ public class LoadingManageServiceImpl extends BaseServiceImpl<LoadingManageMappe
if (!LoadableAdmissionSupport.LOADABLE_BUSINESS_STATUS.equals(waybill.getBusinessStatus())) {
return prefix + "当前状态不是待执行,不可配载";
}
if (WaybillProcessSupport.isRejected(waybill.getDriverAcceptStatus())) {
return prefix + "已被司机拒绝接单,不可配载";
}
return prefix + "不可配载";
}
@@ -29,7 +29,10 @@ import java.util.List;
import java.util.Locale;
/**
* 可配载准入判据:公路 + 待执行 + 未关联其它配载单 + 未拒单。
* 可配载准入判据:公路 + 待执行 + 未关联其它配载单。
* <p>
* 接单状态不进判据:拒单票照样可配载。配载提交会把它的接单事实清成待接单,
* 否则新司机看不到这张票——司机端入口一律排除已拒绝的运单。
* <p>
* 候选列表取数与配载提交/编辑/重新派单的校验共用这一份定义。
*/
@@ -99,8 +102,7 @@ public final class LoadableAdmissionSupport {
return false;
}
if (!isRoadTransport(waybill.getTransportType())
|| !LOADABLE_BUSINESS_STATUS.equals(text(waybill.getBusinessStatus()))
|| WaybillProcessSupport.isRejected(waybill.getDriverAcceptStatus())) {
|| !LOADABLE_BUSINESS_STATUS.equals(text(waybill.getBusinessStatus()))) {
return false;
}
String loadingNo = text(waybill.getLoadingNo());
@@ -126,7 +128,7 @@ public final class LoadableAdmissionSupport {
}
/**
* 把整条可配载判据加到运单查询上:公路 + 待执行 + 未配载 + 非拒单。
* 把整条可配载判据加到运单查询上:公路 + 待执行 + 未配载。
*
* @param wrapper 运单列表查询条件
*/
@@ -134,9 +136,6 @@ public final class LoadableAdmissionSupport {
applyRoadTransportCondition(wrapper);
wrapper.eq(Waybill::getBusinessStatus, LOADABLE_BUSINESS_STATUS);
wrapper.and(nested -> nested.isNull(Waybill::getLoadingNo).or().eq(Waybill::getLoadingNo, ""));
// 接单状态绝大多数为 NULL,而 NULL <> 'rejected' 不成立,只写不等于会把它们一起滤掉
wrapper.and(nested -> nested.isNull(Waybill::getDriverAcceptStatus)
.or().ne(Waybill::getDriverAcceptStatus, WaybillProcessSupport.ACCEPT_REJECTED));
}
private static void applyRoadTransportCondition(LambdaQueryWrapper<Waybill> wrapper) {