This commit is contained in:
luojiaquan
2026-09-28 09:10:37 +08:00
4 changed files with 19 additions and 6 deletions
@@ -2,7 +2,7 @@
## 1. 接口用途
TMS 根据订单号、运单号或转单号查询 BMS 中的订单计费记录,并获取该订单关联客户的当前启用状态和订单计费记录中的欠费状态快照。
TMS 根据订单号、运单号或转单号查询 BMS 中的订单计费记录,并获取该订单关联客户的当前启用状态和订单计费记录中的欠费状态快照。其他字段返回用于TMS辅助判断。
## 2. 基本信息
@@ -11,13 +11,13 @@ TMS 根据订单号、运单号或转单号查询 BMS 中的订单计费记录
|---|---|
| 请求方式 | `GET` |
| 请求地址 | `/api/tms/order-bill/status` |
| 完整地址示例 | `http://{BMS_HOST}:{PORT}/api/tms/order-bill/status` |
| 完整地址示例 | `https://bms.lionquexpress.com/prod-api/api/tms/order-bill/status` |
| 登录要求 | 不需要登录 Token |
| 接口鉴权 | 必须携带请求头 `X-Api-Code` |
| 字符编码 | UTF-8 |
| 响应格式 | JSON |
> `X-Api-Code` = BMS.TMS.ZYaOvlQzpcfau8TUaCFfO3Hp8ieHIqGw。
> `X-Api-Code` = BMS.TMS.ZYaOvlQzpcfau8TUaCFfO3Hp8ieHIqGw
## 3. 请求参数
@@ -143,6 +143,7 @@ price.quote.weightInvalid=重量必须大于0
price.quote.bizDateInvalid=业务日期格式必须为yyyy-MM-dd
price.quote.fixedPackageNoDetails=套餐固定价格没有明细,使用产品默认价格
price.quote.noCustomerPackageOverride=没有客户套餐覆盖,使用产品默认运费/挂号费
price.quote.noCustomerPackage=客户未绑定套餐,无法试算
price.quote.quoteIdRequired=报价ID为空
price.quote.hitCustomerFixedPackageDetail=命中客户套餐固定价格明细
@@ -153,6 +154,7 @@ price.bill.notFound=计费记录不存在
price.bill.customerRequired=订单同步缺少有效客户
price.bill.alreadyInArBill=订单{0}已生成应收账单,作废后方可重新计费
price.bill.bizDateRequired=业务日期为空
price.bill.noCustomerPackage=客户未绑定套餐,无法计费
price.bill.fee.scIdRequired=附加费不能为空
price.bill.fee.surchargeNotFound=附加费配置不存在或已停用
price.bill.fee.notFound=费用明细不存在
@@ -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);
+1 -1
View File
@@ -7,7 +7,7 @@
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
<el-form-item label="客户" prop="customerCode">
<customer-select v-model="form.customerCode" value-key="customerCode" placeholder="请选择客户" />
<div class="form-hint">与套餐绑定客户一致;无套餐时走产品默认价</div>
<div class="form-hint">与套餐绑定客户一致;未绑定套餐时报错</div>
</el-form-item>
<el-form-item label="产品" prop="productCode">
<el-select