Test #5

Merged
admin merged 20 commits from test into main 2026-09-18 18:04:39 +08:00
Showing only changes of commit aedfcc3abf - Show all commits
@@ -754,17 +754,18 @@ public class ReceivingContainerService {
List<InboundPlan> containerPlans = plans.selectList(new LambdaQueryWrapper<InboundPlan>()
.eq(InboundPlan::getContainerNo, containerNo).orderByAsc(InboundPlan::getId));
for (InboundPlan plan : containerPlans) {
String customerId = trim(plan.getCustomerId());
if (customerId == null) throw conflict("Inbound plan has no owning customer");
for (InboundPlanLine line : lines.selectList(new LambdaQueryWrapper<InboundPlanLine>()
.eq(InboundPlanLine::getCustomerId, customerId).eq(InboundPlanLine::getPlanId, plan.getId())
.eq(InboundPlanLine::getPlanId, plan.getId())
.orderByAsc(InboundPlanLine::getId))) {
LastlegOrder order = orders.selectById(line.getOrderId());
if (order == null || !customerId.equals(order.getCustomerId())
if (order == null
|| !Objects.equals(sourceContainerBookingId, trim(order.getSourceContainerBookingId()))) continue;
String customerId = trim(plan.getCustomerId());
if (customerId == null || !customerId.equals(order.getCustomerId())
|| !customerId.equals(line.getCustomerId())
|| !Objects.equals(containerNo, trim(order.getContainerNo()))) {
throw conflict("Inbound line order is missing or belongs to another cabinet occurrence");
}
if (!Objects.equals(sourceContainerBookingId, trim(order.getSourceContainerBookingId()))) continue;
result.add(new InboundRef(plan, line, order));
}
}