优化
This commit is contained in:
+7
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user