一件代发拣货

This commit is contained in:
2026-09-01 09:57:10 +08:00
parent a213be67c5
commit 2f1bda8369
16 changed files with 154 additions and 9 deletions
@@ -243,6 +243,18 @@ public class InboundPlanService {
if (trimToNull(request.warehouseName()) != null) line.setDestinationWarehouseName(request.warehouseName().trim());
lineMapper.updateById(line);
}
// Pallets carry the same destination snapshot and are consumed by PDA/resource assignment.
// Update them in this transaction so a plan edit cannot leave lines and pallets pointing at
// different warehouses.
List<InboundPlanPallet> pallets = palletMapper.selectList(new LambdaQueryWrapper<InboundPlanPallet>()
.eq(InboundPlanPallet::getPlanId, plan.getId())
.eq(InboundPlanPallet::getCustomerId, plan.getCustomerId()));
for (InboundPlanPallet pallet : pallets) {
pallet.setDestinationWarehouseId(String.valueOf(request.overseasWarehouseId()));
if (trimToNull(request.warehouseCode()) != null) pallet.setDestinationWarehouseCode(request.warehouseCode().trim());
if (trimToNull(request.warehouseName()) != null) pallet.setDestinationWarehouseName(request.warehouseName().trim());
palletMapper.updateById(pallet);
}
return detail(customerId, plan);
}