修改计费逻辑

This commit is contained in:
wuweihua
2026-09-24 18:02:45 +08:00
parent 1174dede01
commit 9292199ca1
3 changed files with 16 additions and 3 deletions
@@ -56,8 +56,9 @@ import com.ruoyi.price.search.IBillSearchStore;
import com.ruoyi.price.service.ITmsPriceQuoteService;
/**
* Shared quote/bill calc: bound set + active version by bizDate, else product default.
* Quote persists prc_quote; bill path calls calculate() then persists prc_order_bill.
* Shared quote/bill calc: bound set + active version by bizDate.
* No customer package bind: quote and bill both fail hard (no PRODUCT_DEFAULT).
* Bill path: no persist; billing task marked FAILED (abnormal order).
*
* @author ruoyi
*/
@@ -307,6 +308,16 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService
}
}
// No customer package bind: do not use PRODUCT_DEFAULT (quote and bill).
// Bill: no persist; billing task catches and writes success_status=FAILED.
if (binds == null || binds.isEmpty())
{
String msgKey = request instanceof TmsPriceBillRequest
? "price.bill.noCustomerPackage"
: "price.quote.noCustomerPackage";
throw new ServiceException(MessageUtils.message(msgKey));
}
TmsPriceQuoteResult fallback = buildDefault(request.getCustomerId(), base, productCode, productName, weight,
MessageUtils.message("price.quote.noCustomerPackageOverride"));
stampRequestMeta(request, fallback);