修改比较逻辑

This commit is contained in:
wuweihua
2026-11-10 18:10:10 +08:00
parent 2e5ab2bfc1
commit fca999c384
3 changed files with 11 additions and 11 deletions
@@ -147,8 +147,8 @@ public class BmsBizRuleServiceImpl implements IBmsBizRuleService
}
/**
* VOL_8000: chargeWeight = max(L*W*H/8000, volume_weight).
* Compare dimensional weight (/8000) with 材积重, not actual weight.
* VOL_8000: chargeWeight = max(L*W*H/8000, receive_weight).
* Compare dimensional weight (/8000) with 收货重.
*/
private BigDecimal resolveVol8000(TmsPriceBillRequest request, BigDecimal systemWeight)
{
@@ -168,12 +168,12 @@ public class BmsBizRuleServiceImpl implements IBmsBizRuleService
{
continue;
}
BigDecimal volumeWeight = firstPositive(request.getVolumeWeight());
if (volumeWeight == null)
BigDecimal receiveWeight = firstPositive(request.getReceiveWeight());
if (receiveWeight == null)
{
return dimVol;
}
return volumeWeight.max(dimVol).setScale(3, RoundingMode.HALF_UP);
return receiveWeight.max(dimVol).setScale(3, RoundingMode.HALF_UP);
}
return null;
}
@@ -537,7 +537,7 @@ public class BmsBizRuleServiceImpl implements IBmsBizRuleService
}
if (RULE_TYPE_VOL_8000.equalsIgnoreCase(row.getRuleType()) && StringUtils.isEmpty(row.getWeightSource()))
{
row.setWeightSource(WEIGHT_SOURCE_VOLUME);
row.setWeightSource(WEIGHT_SOURCE_RECEIVE);
}
if (StringUtils.isEmpty(row.getWeightSource()))
{