This commit is contained in:
2026-08-08 10:11:04 +08:00
parent f3c2bafec8
commit fc14856ea3
64 changed files with 50932 additions and 30 deletions
@@ -55,6 +55,13 @@ public class InboundMeasurementRepository {
.eq(InboundOrderEntity::getId, inbound.getId())) == 1;
}
public boolean updateInboundWeightSummary(InboundOrderEntity inbound) {
return inboundOrders.update(inbound, new LambdaUpdateWrapper<InboundOrderEntity>()
.eq(InboundOrderEntity::getTenantId, inbound.getTenantId())
.eq(InboundOrderEntity::getId, inbound.getId())
.set(InboundOrderEntity::getActualGrossWeightKg, inbound.getActualGrossWeightKg())) == 1;
}
public InboundMeasurementEntity findMeasurement(long tenantId, long inboundId, long measurementId) {
return measurements.selectOne(new LambdaQueryWrapper<InboundMeasurementEntity>()
.eq(InboundMeasurementEntity::getTenantId, tenantId)
@@ -292,7 +292,7 @@ public class InboundMeasurementService {
inbound.setProcessStatus("MEASURING");
}
inbound.setUpdatedBy(operatorId);
if (!repository.updateInbound(inbound)) {
if (!repository.updateInboundWeightSummary(inbound)) {
throw concurrentModification();
}
}