fix(acceptance): complete overseas fulfillment closure

This commit is contained in:
2026-09-09 00:25:34 +08:00
parent 094d9c1e81
commit 7e76fed728
12 changed files with 70 additions and 27 deletions
@@ -300,7 +300,8 @@ public class PdaPalletOperationService {
if (unbind && changes.stream().noneMatch(change -> "IDLE".equals(change.targetStatus()))) {
throw conflict("解绑必须清空来源托盘");
}
changes.sort(Comparator.comparingLong(change -> change.pallet().palletId()));
changes.sort(Comparator.comparingInt((PalletChange change) -> "IDLE".equals(change.targetStatus()) ? 0 : 1)
.thenComparingLong(change -> change.pallet().palletId()));
return new Plan(pallets, moves, changes);
}