修改提交
This commit is contained in:
+4
-1
@@ -108,7 +108,7 @@ public class InboundPlanService {
|
||||
if (orderMapper.markPlanned(customerId, order.orderId(), plan.getPlanNo(), count, now) != 1) {
|
||||
throw new IllegalStateException("Failed to update order " + order.orderId());
|
||||
}
|
||||
orderMapper.insertHistory(order.orderId(), order.currentStatus(),
|
||||
orderMapper.insertHistory(customerId, order.orderId(), order.currentStatus(),
|
||||
"Inbound order converted to inbound plan " + plan.getPlanNo(), now);
|
||||
}
|
||||
return detail(customerId, plan);
|
||||
@@ -158,6 +158,7 @@ public class InboundPlanService {
|
||||
for (SourceOrderSnapshot order : orders) {
|
||||
InboundPlanLine line = new InboundPlanLine();
|
||||
line.setId(IdWorker.getId());
|
||||
line.setCustomerId(order.customerId());
|
||||
line.setPlanId(plan.getId());
|
||||
line.setOrderId(order.orderId());
|
||||
line.setInboundCode(order.inboundCode());
|
||||
@@ -182,6 +183,7 @@ public class InboundPlanService {
|
||||
SourceOrderSnapshot sample = warehouseSamples.get(draft.warehouseKey());
|
||||
InboundPlanPallet pallet = new InboundPlanPallet();
|
||||
pallet.setId(IdWorker.getId());
|
||||
pallet.setCustomerId(plan.getCustomerId());
|
||||
pallet.setPlanId(plan.getId());
|
||||
pallet.setPalletNo(plan.getPlanNo() + "-P" + String.format("%03d", result.size() + 1));
|
||||
pallet.setDestinationWarehouseId(sample.destinationWarehouseId());
|
||||
@@ -205,6 +207,7 @@ public class InboundPlanService {
|
||||
for (PalletAllocator.AllocationDraft draft : allocation.allocations()) {
|
||||
InboundPlanPalletAllocation item = new InboundPlanPalletAllocation();
|
||||
item.setId(IdWorker.getId());
|
||||
item.setCustomerId(plan.getCustomerId());
|
||||
item.setPlanId(plan.getId());
|
||||
item.setLineId(lineByOrder.get(draft.orderId()).getId());
|
||||
item.setPalletId(pallets.get(draft.pallet()).getId());
|
||||
|
||||
Reference in New Issue
Block a user