This commit is contained in:
2026-09-20 09:17:47 +08:00
parent aa2953172b
commit d5c4059942
17 changed files with 682 additions and 21 deletions
@@ -138,7 +138,10 @@ public class DeliveryDocumentService {
.eq(LastlegOrder::getCustomerId, delivery.getCustomerId())
.eq(LastlegOrder::getDeliveryOrderNo, delivery.getDeliveryNo()));
for (LastlegOrder order : completedOrders) {
order.setSubOrderStatus("DELIVERY:DELIVERED");
// Preserve the outbound leg when receipt completion closes delivery.
// Sub-order status is a composite fact; replacing it with DELIVERY alone
// makes a successfully departed outbound appear unfinished or disappear.
order.setSubOrderStatus("OUTBOUND:OUTBOUNDED;DELIVERY:DELIVERED");
order.setUpdatedAt(now);
lastlegOrders.updateById(order);
}