修改计费逻辑
This commit is contained in:
+13
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user