增加最计费重的计费逻辑

This commit is contained in:
wuweihua
2026-11-02 09:13:33 +08:00
parent 9d4dbdcbe6
commit 17e80b3a18
@@ -544,6 +544,12 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService
productCode, productName, discWeight, bizDate); productCode, productName, discWeight, bizDate);
if (hit != null) if (hit != null)
{ {
// Calc-only snap: do not persist raised min-band weight as charge_weight.
if (discWeight != null && weight != null && discWeight.compareTo(weight) != 0)
{
hit.setWeight(weight);
hit.setChargeWeight(weight);
}
stampRequestMeta(request, hit); stampRequestMeta(request, hit);
return hit; return hit;
} }
@@ -1027,7 +1033,11 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService
String msg = MessageUtils.message("price.quote.hitCustomerFixedPackageDetail") + " [" + verLabel + "]"; String msg = MessageUtils.message("price.quote.hitCustomerFixedPackageDetail") + " [" + verLabel + "]";
if (snappedToMinBand) if (snappedToMinBand)
{ {
msg = msg + "; chargeWeight raised to min band " + billWeight.toPlainString(); // Calc-only snap: keep original weight/chargeWeight for persist so upstream re-sync
// can replace them when the new weight is already in-band.
r.setWeight(weight);
r.setChargeWeight(weight);
msg = msg + "; billed at min band " + billWeight.toPlainString() + " (persist original weight)";
} }
r.setMatchMessage(msg); r.setMatchMessage(msg);
r.setCustomerId(bind.getCustomerId()); r.setCustomerId(bind.getCustomerId());