fix(lastleg): allow appointment registration before dispatch assignment

This commit is contained in:
2026-10-22 08:16:51 +08:00
parent 738b778edf
commit 8adaea75fa
2 changed files with 29 additions and 1 deletions
@@ -39,7 +39,8 @@ public class FbaAppointmentExecutionAdapter implements FbaAppointmentExecutionPo
var members=members(input);if(members.isEmpty()) throw bad("请选择需要重新预约的客户");
var before=read(batches(members));var selected=selected(before,members);
var tripNos=tripNos(selected);var numbers=dispatchNos(selected);
amendments.lockExistingAppointmentDispatches(new Actor(operator,ActorMode.PLATFORM,null),numbers);
// 尚未排车的客户仍需核对完整执行版本,但没有原排车资源需要加锁。
if(!numbers.isEmpty()) amendments.lockExistingAppointmentDispatches(new Actor(operator,ActorMode.PLATFORM,null),numbers);
for(var number:numbers) {
dispatches.completion(number,true);
dispatches.lockForPlanning(number);