fix: 按物理箱贯通一件代发履约箱数

This commit is contained in:
2026-09-16 20:49:35 +08:00
parent 8797c0bef9
commit 545ad2083d
34 changed files with 779 additions and 132 deletions
@@ -120,12 +120,14 @@ public class InboundStockReceiptService {
}
DropshipPalletSnapshot sourcePallet = dropshipPallets.get(pallet.getSourcePalletNo());
if (sourcePallet == null || sourcePallet.packageCount() != value(allocation.getPickedPackageCount())) {
throw conflict("One-click dropship source pallet SKU package total does not match PDA receipt");
}
for (DropshipPalletSnapshot.Sku sku : sourcePallet.skus()) {
created.add(persist(customerId, plan, task, line, allocation, pallet, order,
new SkuSnapshot(sku.skuCode(), sku.productName(), null, sku.packageCount()), receivedAt));
throw conflict("One-click dropship source pallet physical carton total does not match PDA receipt");
}
DropshipPalletSnapshot.Sku single = sourcePallet.skus().size() == 1
? sourcePallet.skus().get(0) : null;
created.add(persist(customerId, plan, task, line, allocation, pallet, order,
new SkuSnapshot(single == null ? "MIXED" : single.skuCode(),
single == null ? "混合SKU" : single.productName(), null,
sourcePallet.packageCount()), receivedAt));
} else {
long allocationPackages = value(allocation.getPickedPackageCount());
for (SkuSnapshot sku : consume(skuRemainders, allocationPackages)) {