优化代码注释为简体中文
This commit is contained in:
+10
-10
@@ -59,9 +59,9 @@ public class TmsPriceController extends BaseController
|
||||
private IBillSearchStore billSearchStore;
|
||||
|
||||
/**
|
||||
* Quote by customer + product + country + weight (+ destPostcode when country has zones).
|
||||
* Zone resolve: destPostcode -> prc_zone_detail/prc_zone -> product_country.zone_code.
|
||||
* Match: customer package FIXED > DISCOUNT > product default.
|
||||
* 按客户 + 产品 + 国家 + 重量试算(国家配置了分区时需传 destPostcode)。
|
||||
* 分区解析:destPostcode -> prc_zone_detail/prc_zone -> product_country.zone_code。
|
||||
* 匹配顺序:客户套餐 FIXED > DISCOUNT > 产品默认价。
|
||||
*/
|
||||
@PostMapping("/quote")
|
||||
public AjaxResult quote(
|
||||
@@ -83,9 +83,9 @@ public class TmsPriceController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Sync order and persist prc_order_bill / prc_income_bill_fee.
|
||||
* Same price match as quote (bound set + active version by bizDate, else default).
|
||||
* Same orderNo upserts.
|
||||
* 同步订单并落库 prc_order_bill / prc_income_bill_fee。
|
||||
* 价格匹配与试算一致(绑定套餐 + 按 bizDate 取生效版本,否则取默认价)。
|
||||
* 相同 orderNo 执行 upsert。
|
||||
*/
|
||||
@PostMapping("/bill")
|
||||
public AjaxResult bill(
|
||||
@@ -106,8 +106,8 @@ public class TmsPriceController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Warehouse inbound: create billing task (PENDING/REBILL/REFUND) and publish MQ.
|
||||
* Consumer queries Oracle by transferNo/orderNo then inserts prc_order_bill.
|
||||
* 仓库入库:创建计费任务(PENDING/REBILL/REFUND)并发送 MQ。
|
||||
* 消费端按 transferNo/orderNo 查询 Oracle,然后插入 prc_order_bill。
|
||||
* POST /api/tms/price/billing-task
|
||||
*/
|
||||
@PostMapping("/billing-task")
|
||||
@@ -121,7 +121,7 @@ public class TmsPriceController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Query billing task writeback status.
|
||||
* 查询计费任务回写状态。
|
||||
* GET /api/tms/price/billing-task/{taskId}
|
||||
*/
|
||||
@GetMapping("/billing-task/{taskId}")
|
||||
@@ -135,7 +135,7 @@ public class TmsPriceController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Query order bill by orderNo after sync.
|
||||
* 同步完成后按 orderNo 查询订单账单。
|
||||
*/
|
||||
@GetMapping("/bill/by-order/{orderNo}")
|
||||
public AjaxResult getBillByOrder(
|
||||
|
||||
+2
-2
@@ -188,7 +188,7 @@ public class CommonController
|
||||
}
|
||||
|
||||
/**
|
||||
* Common resource download: local profile path or oss://bucket/key (AR bill style).
|
||||
* 通用资源下载:本地 profile 路径或 oss://bucket/key(AR 账单风格)。
|
||||
*/
|
||||
@GetMapping("/download/resource")
|
||||
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
|
||||
@@ -207,7 +207,7 @@ public class CommonController
|
||||
}
|
||||
if (ossFile)
|
||||
{
|
||||
// Extension check still applies to the object key suffix.
|
||||
// 扩展名校验仍适用于对象 key 后缀。
|
||||
if (!FileUtils.checkAllowDownload(resource))
|
||||
{
|
||||
throw new Exception(StringUtils.format("resource ({}) not allowed", resource));
|
||||
|
||||
+5
-5
@@ -33,7 +33,7 @@ public class BillingTaskMonitorController extends BaseController
|
||||
@Autowired
|
||||
private IPrcBillingTaskService billingTaskService;
|
||||
|
||||
/** Default list = FAILED abnormal tasks. */
|
||||
/** 默认列表 = FAILED 异常任务。 */
|
||||
@PreAuthorize("@ss.hasPermi('monitor:billingTask:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PrcBillingTask query)
|
||||
@@ -58,7 +58,7 @@ public class BillingTaskMonitorController extends BaseController
|
||||
return success(billingTaskService.getById(taskId));
|
||||
}
|
||||
|
||||
/** Manual resync one task (reset WAITING then process). */
|
||||
/** 手工重同步单个任务(先重置为 WAITING 再处理)。 */
|
||||
@PreAuthorize("@ss.hasPermi('monitor:billingTask:retry')")
|
||||
@Log(title = "billing task retry", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/retry/{taskId}")
|
||||
@@ -67,7 +67,7 @@ public class BillingTaskMonitorController extends BaseController
|
||||
return success(billingTaskService.retryTask(taskId));
|
||||
}
|
||||
|
||||
/** Manual resync selected tasks. */
|
||||
/** 手工重同步选中的任务。 */
|
||||
@PreAuthorize("@ss.hasPermi('monitor:billingTask:retry')")
|
||||
@Log(title = "billing task batch retry", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/retry")
|
||||
@@ -116,8 +116,8 @@ public class BillingTaskMonitorController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async resync by customer + bill_time (batched ID pages to avoid OOM).
|
||||
* Returns asyncTaskId; poll {@code GET /retryTask/{asyncTaskId}}.
|
||||
* 按客户 + 计费时间异步重同步(ID 分页批处理,避免 OOM)。
|
||||
* 返回 asyncTaskId,通过 {@code GET /retryTask/{asyncTaskId}} 轮询进度。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('monitor:billingTask:retry')")
|
||||
@Log(title = "billing task filter retry", businessType = BusinessType.UPDATE)
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ public class PriceLogController extends BaseController
|
||||
return rsp;
|
||||
}
|
||||
|
||||
/** Group by productCode + write time for package-version drill-down. */
|
||||
/** 按 productCode + 写入时间分组,用于套餐版本下钻。 */
|
||||
@PreAuthorize("@ss.hasPermi('monitor:priceLog:list')")
|
||||
@GetMapping("/groups")
|
||||
public TableDataInfo groups(
|
||||
|
||||
+4
-4
@@ -119,7 +119,7 @@ public class TabOrderMonitorController extends BaseController
|
||||
rsp.setTotal(0L);
|
||||
return rsp;
|
||||
}
|
||||
// clear time so shared resolvers cannot accidentally reuse month window
|
||||
// 清空时间,避免共用解析器误复用按月时间窗口
|
||||
query.setBeginTime(null);
|
||||
query.setEndTime(null);
|
||||
customerKeywordResolver.resolve(query);
|
||||
@@ -224,7 +224,7 @@ public class TabOrderMonitorController extends BaseController
|
||||
@PostMapping("/syncByFilter")
|
||||
public AjaxResult syncByFilter(@RequestBody TabOrderMonitorQuery query)
|
||||
{
|
||||
// Upstream field overwrite only (no billing). Same filters as list query.
|
||||
// 仅覆盖上游字段(不触发计费)。筛选条件与列表查询一致。
|
||||
if (!hasListFilters(query))
|
||||
{
|
||||
return error("orderIdentifiers or (customer and pickup time) required");
|
||||
@@ -257,7 +257,7 @@ public class TabOrderMonitorController extends BaseController
|
||||
return success(task);
|
||||
}
|
||||
|
||||
/** Selected rows: overwrite local bill fields from Oracle; does not quote/rebill. */
|
||||
/** 选中行:用 Oracle 数据覆盖本地账单字段;不做报价/重算。 */
|
||||
@PreAuthorize("@ss.hasPermi('monitor:orderSource:sync') or @ss.hasPermi('price:orderBill:rebill')")
|
||||
@Log(title = "order source sync selected", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/sync")
|
||||
@@ -318,7 +318,7 @@ public class TabOrderMonitorController extends BaseController
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Prefer transferNo as bizId (same as BILL / upstream sync ES).
|
||||
// 优先使用转单号作为 bizId(与 BILL / 上游同步 ES 一致)。
|
||||
if (StringUtils.isNotEmpty(row.getTransferOrderId()))
|
||||
{
|
||||
return prefix + "_" + row.getTransferOrderId().trim();
|
||||
|
||||
+34
-34
@@ -96,7 +96,7 @@ public class BillingController extends BaseController
|
||||
private IBillSearchStore billSearchStore;
|
||||
|
||||
/**
|
||||
* Historical quote list.
|
||||
* 历史报价列表。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:quote')")
|
||||
@GetMapping("/quote/list")
|
||||
@@ -108,7 +108,7 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Products of the customer's bound effective package version (trial product dropdown).
|
||||
* 客户已绑定生效套餐版本下的产品(试算产品下拉)。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:quote')")
|
||||
@GetMapping("/quote/products")
|
||||
@@ -124,7 +124,7 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Historical quote detail with fee lines.
|
||||
* 历史报价详情,含费用明细行。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:quote')")
|
||||
@GetMapping("/quote/{quoteId}")
|
||||
@@ -134,7 +134,7 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Same matching logic as TMS open API, for BMS console trial.
|
||||
* 与 TMS 开放接口使用相同匹配逻辑,供 BMS 后台试算使用。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:quote')")
|
||||
@PostMapping("/quote")
|
||||
@@ -152,7 +152,7 @@ public class BillingController extends BaseController
|
||||
{
|
||||
query = new PrcOrderBill();
|
||||
}
|
||||
// Billing list only shows successfully billed orders.
|
||||
// 计费列表只展示计费成功的订单。
|
||||
query.setBillingFailStatuses(limitBillingListFailStatus());
|
||||
query.setBillingFailStatus(null);
|
||||
startPage();
|
||||
@@ -161,8 +161,8 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async export billing list by current filters (status limited to success=0).
|
||||
* Requires at least one meaningful filter. Poll task then download.
|
||||
* 按当前筛选条件异步导出计费列表(状态限定为成功 success=0)。
|
||||
* 需至少一个有效筛选条件。轮询任务完成后再下载。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:export')")
|
||||
@Log(title = "计费列表", businessType = BusinessType.EXPORT)
|
||||
@@ -173,7 +173,7 @@ public class BillingController extends BaseController
|
||||
{
|
||||
query = new PrcOrderBill();
|
||||
}
|
||||
// Filter gate uses the request as-is; defaults applied only for query scope.
|
||||
// 筛选条件校验使用原始请求;默认值仅用于查询范围。
|
||||
if (!OrderBillExportSupport.hasExportFilter(query))
|
||||
{
|
||||
return error(MessageUtils.message("price.bill.export.filterRequired"));
|
||||
@@ -206,11 +206,11 @@ public class BillingController extends BaseController
|
||||
|
||||
private static List<Integer> limitBillingListFailStatus()
|
||||
{
|
||||
// Billing list is success-only (billing_fail_status = 0).
|
||||
// 计费列表仅包含成功数据(billing_fail_status = 0)。
|
||||
return new ArrayList<Integer>(Arrays.asList(Integer.valueOf(0)));
|
||||
}
|
||||
|
||||
/** All prc_order_bill rows. Billing list stays limited to status 0. */
|
||||
/** 全部 prc_order_bill 记录。计费列表仍限定为状态 0。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:orderBill:list')")
|
||||
@GetMapping("/orderBill/list")
|
||||
public TableDataInfo orderBillList(PrcOrderBill query)
|
||||
@@ -221,7 +221,7 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
|
||||
/** Order-list popup: billing fail reason by billId (data-scoped). */
|
||||
/** 订单列表弹窗:按 billId 查询计费失败原因(受数据权限控制)。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:orderBill:list')")
|
||||
@GetMapping("/orderBill/{billId}/failReason")
|
||||
public AjaxResult orderBillFailReason(@PathVariable("billId") String billId)
|
||||
@@ -230,8 +230,8 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async export order list by current filters.
|
||||
* Requires at least one meaningful filter (default orderStatuses alone is not enough).
|
||||
* 按当前筛选条件异步导出订单列表。
|
||||
* 需至少一个有效筛选条件(仅默认 orderStatuses 不够)。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:orderBill:export')")
|
||||
@Log(title = "订单列表", businessType = BusinessType.EXPORT)
|
||||
@@ -263,8 +263,8 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare local order-bill products vs customer bound package SALES products
|
||||
* (includes product_code_mapping).
|
||||
* 对比本地订单账单产品与客户绑定套餐的 SALES 产品
|
||||
* (包含 product_code_mapping)。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:orderBill:list')")
|
||||
@PostMapping("/orderBill/checkProducts")
|
||||
@@ -274,7 +274,7 @@ public class BillingController extends BaseController
|
||||
return success(data);
|
||||
}
|
||||
|
||||
/** Drill-down order bills for one product under the same check filters. */
|
||||
/** 在同一校验筛选条件下,下钻查看单个产品的订单账单。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:orderBill:list')")
|
||||
@PostMapping("/orderBill/checkProducts/orders")
|
||||
public AjaxResult listOrderBillsByProduct(@RequestBody PrcOrderBill query)
|
||||
@@ -283,8 +283,8 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Order-list rebill from local prc_order_bill only (no Oracle TAB_ORDER).
|
||||
* Poll {@code GET /orderBill/rebill/task/{taskId}}.
|
||||
* 订单列表重算,仅基于本地 prc_order_bill(不查询 Oracle TAB_ORDER)。
|
||||
* 轮询 {@code GET /orderBill/rebill/task/{taskId}}。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:orderBill:rebill')")
|
||||
@Log(title = "Order bill local rebill", businessType = BusinessType.UPDATE)
|
||||
@@ -315,7 +315,7 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Order no options for remote-search dropdown (bill list multi search).
|
||||
* 远程搜索下拉的订单号选项(计费列表多选搜索)。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:bill') or @ss.hasPermi('price:orderBill:list')")
|
||||
@GetMapping("/bill/orderNos")
|
||||
@@ -357,8 +357,8 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* ES BILL logs for this order (billing / upstream sync / fail snapshots).
|
||||
* bizId prefers transferNo then orderNo (same as write path).
|
||||
* 该订单的 ES BILL 日志(计费 / 上游同步 / 失败快照)。
|
||||
* bizId 优先取 transferNo,其次取 orderNo(与写入路径一致)。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:bill') or @ss.hasPermi('price:orderBill:list')")
|
||||
@GetMapping("/bill/{billId}/history")
|
||||
@@ -383,7 +383,7 @@ public class BillingController extends BaseController
|
||||
int pageSize = pageDomain.getPageSize() == null ? 10 : pageDomain.getPageSize().intValue();
|
||||
String primary = EsBizLogSupport.billBizId(bill.getTransferNo(), bill.getOrderNo());
|
||||
BillSearchPage page = billSearchStore.search(EsLogType.BILL, primary, null, pageNum, pageSize);
|
||||
// Also pull by orderNo when transferNo was used as bizId, so older orderNo-keyed rows appear.
|
||||
// 当 bizId 使用 transferNo 时,再按 orderNo 拉取一次,以便出现更早的以 orderNo 为 key 的记录。
|
||||
if (StringUtils.isNotEmpty(bill.getTransferNo()) && StringUtils.isNotEmpty(bill.getOrderNo())
|
||||
&& !bill.getTransferNo().trim().equalsIgnoreCase(bill.getOrderNo().trim())
|
||||
&& pageNum == 1)
|
||||
@@ -448,7 +448,7 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Refund one receivable bill via billing task billType=REFUND.
|
||||
* 通过计费任务 billType=REFUND 退费单笔应收账单。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:refund')")
|
||||
@Log(title = "Billing refund", businessType = BusinessType.UPDATE)
|
||||
@@ -485,7 +485,7 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch update order credit arrears status (ARREARS -> NORMAL) with available-credit check.
|
||||
* 批量更新订单信用欠款状态(ARREARS -> NORMAL),并校验可用额度。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:arrearsUpdate')")
|
||||
@Log(title = "Billing credit arrears", businessType = BusinessType.UPDATE)
|
||||
@@ -545,7 +545,7 @@ public class BillingController extends BaseController
|
||||
return success(prcOrderBillService.addIncomeFee(request));
|
||||
}
|
||||
|
||||
/** Preview matched bills for batch add fee (filter: customer / transferNo / country). */
|
||||
/** 批量加费前预览匹配的账单(筛选:客户 / transferNo / 国家)。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:feeAdd')")
|
||||
@PostMapping("/bill/fee/batch/preview")
|
||||
public AjaxResult previewBatchAddIncomeFee(@RequestBody BatchAddIncomeBillFeeRequest request)
|
||||
@@ -553,7 +553,7 @@ public class BillingController extends BaseController
|
||||
return success(prcOrderBillService.previewBatchAddIncomeFee(request));
|
||||
}
|
||||
|
||||
/** Submit async batch add fee; poll /bill/fee/batch/task/{taskId}. */
|
||||
/** 提交异步批量加费;轮询 /bill/fee/batch/task/{taskId}。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:feeAdd')")
|
||||
@Log(title = "Billing batch income fee", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/bill/fee/batch")
|
||||
@@ -577,7 +577,7 @@ public class BillingController extends BaseController
|
||||
return success(task);
|
||||
}
|
||||
|
||||
/** Async recalc product_amount only. Poll /bill/recalcPrice/task/{taskId}. */
|
||||
/** 仅异步重算 product_amount。轮询 /bill/recalcPrice/task/{taskId}。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:recalc')")
|
||||
@Log(title = "Billing recalc product amount", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/bill/recalcProduct")
|
||||
@@ -591,7 +591,7 @@ public class BillingController extends BaseController
|
||||
return successTask(prcOrderBillService.submitRecalcBillPrice(request));
|
||||
}
|
||||
|
||||
/** Async recalc redline_amount only. Poll /bill/recalcPrice/task/{taskId}. */
|
||||
/** 仅异步重算 redline_amount。轮询 /bill/recalcPrice/task/{taskId}。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:recalc')")
|
||||
@Log(title = "Billing recalc redline amount", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/bill/recalcRedline")
|
||||
@@ -648,7 +648,7 @@ public class BillingController extends BaseController
|
||||
return success(result);
|
||||
}
|
||||
|
||||
/** Update charge_weight (keep weight), then rebill. */
|
||||
/** 更新 charge_weight(保留 weight),随后重新计费。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:chargeWeightEdit')")
|
||||
@Log(title = "Billing charge weight", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/bill/chargeWeight")
|
||||
@@ -658,7 +658,7 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Download import template. fillByFilter=true fills orderNo/customer from list filters.
|
||||
* 下载导入模板。fillByFilter=true 时按列表筛选条件填充 orderNo/customer。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:chargeWeightEdit')")
|
||||
@PostMapping("/bill/chargeWeight/importTemplate")
|
||||
@@ -680,8 +680,8 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async import charge_weight updates and rebill.
|
||||
* Returns taskId; poll /bill/chargeWeight/import/task/{taskId}.
|
||||
* 异步导入 charge_weight 更新并重新计费。
|
||||
* 返回 taskId;轮询 /bill/chargeWeight/import/task/{taskId}。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:chargeWeightEdit')")
|
||||
@Log(title = "Billing charge weight import", businessType = BusinessType.IMPORT)
|
||||
@@ -712,7 +712,7 @@ public class BillingController extends BaseController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Import task already queued; attachment failure should not block rebill
|
||||
// 导入任务已入队;附件保存失败不应阻塞后续重新计费
|
||||
Map<String, Object> payload = new HashMap<String, Object>();
|
||||
payload.put("taskId", taskId);
|
||||
payload.put("attachmentWarn", e.getMessage());
|
||||
@@ -733,7 +733,7 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* List charge-weight import Excel attachment records.
|
||||
* 查询收费重导入的 Excel 附件记录。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:chargeWeightEdit')")
|
||||
@GetMapping("/bill/chargeWeight/import/attachments")
|
||||
|
||||
+11
-11
@@ -37,7 +37,7 @@ import com.bms.price.service.IPrcPriceExcelFileService;
|
||||
import com.bms.price.service.IPrcPriceSetService;
|
||||
|
||||
/**
|
||||
* Exclusive quote (shares prc_price_set with PACKAGE)
|
||||
* 独家报价(与 PACKAGE 共用 prc_price_set 表)
|
||||
*
|
||||
* @author bms
|
||||
*/
|
||||
@@ -82,7 +82,7 @@ public class ExclusiveQuoteController extends BaseController
|
||||
set.setCreateBy(getUsername());
|
||||
set.setUpdateBy(getUsername());
|
||||
String taskId = priceSetService.submitSaveAsync(set);
|
||||
// Do not pass bare String to success(): overload puts it into msg, not data.
|
||||
// 不要向 success() 直接传字符串:该重载会把字符串放进 msg 而不是 data。
|
||||
Map<String, Object> payload = new HashMap<String, Object>();
|
||||
payload.put("taskId", taskId);
|
||||
return success(payload);
|
||||
@@ -111,7 +111,7 @@ public class ExclusiveQuoteController extends BaseController
|
||||
return toAjax(priceSetService.updatePrcPriceSet(set));
|
||||
}
|
||||
|
||||
/** Update package name and note only. */
|
||||
/** 仅更新套餐名称与备注。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:exclusive:edit')")
|
||||
@Log(title = "Exclusive quote basic", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/basic")
|
||||
@@ -200,7 +200,7 @@ public class ExclusiveQuoteController extends BaseController
|
||||
return toAjax(priceSetService.deleteVersion(psvId, getUsername()));
|
||||
}
|
||||
|
||||
/** Import excel attachments for a version (prc_price_excel_file.psv_id). */
|
||||
/** 版本的 Excel 附件导入(prc_price_excel_file.psv_id)。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:exclusive:list')")
|
||||
@GetMapping("/version/{psvId}/excelFiles")
|
||||
public AjaxResult versionExcelFiles(@PathVariable Long psvId)
|
||||
@@ -253,7 +253,7 @@ public class ExclusiveQuoteController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/** All detail rows for one product (no page); used by edit-price drawer. */
|
||||
/** 单个产品的全部明细行(不分页),供改价抽屉使用。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:exclusive:list')")
|
||||
@GetMapping("/detail/byProduct")
|
||||
public AjaxResult detailByProduct(@RequestParam("psvId") Long psvId,
|
||||
@@ -262,7 +262,7 @@ public class ExclusiveQuoteController extends BaseController
|
||||
return success(priceSetService.selectDetailListByProduct(psvId, productCode));
|
||||
}
|
||||
|
||||
/** All detail rows for a version (no page); batch prefetch instead of N byProduct calls. */
|
||||
/** 某个版本的全部明细行(不分页);用批量预取替代 N 次 byProduct 调用。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:exclusive:list')")
|
||||
@GetMapping("/detail/byVersion")
|
||||
public AjaxResult detailByVersion(@RequestParam("psvId") Long psvId)
|
||||
@@ -318,7 +318,7 @@ public class ExclusiveQuoteController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Preview pull product library (no DB write). For create wizard before finish.
|
||||
* 预览拉取产品库(不写库),用于新建向导提交前的预览。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:exclusive:edit') or @ss.hasPermi('price:exclusive:forceEdit') or @ss.hasPermi('price:exclusive:add')")
|
||||
@PostMapping("/detail/previewPullFromLibrary")
|
||||
@@ -328,8 +328,8 @@ public class ExclusiveQuoteController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Preview Excel import (no DB write). Optional detailsJson for updateOnly / build-price merge.
|
||||
* Optional countryCode = single-country dedicated-line Excel (same as product country import).
|
||||
* 预览 Excel 导入(不写库)。可选 detailsJson,用于 updateOnly / 构建价格合并。
|
||||
* 可选 countryCode = 单国家专线 Excel(与按产品国家导入一致)。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:exclusive:edit') or @ss.hasPermi('price:exclusive:forceEdit') or @ss.hasPermi('price:exclusive:add')")
|
||||
@PostMapping("/detail/previewImportPrices")
|
||||
@@ -359,7 +359,7 @@ public class ExclusiveQuoteController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async pull product library into version details. Returns taskId; poll /save/task/{taskId}.
|
||||
* 异步拉取产品库到版本明细。返回 taskId,通过 /save/task/{taskId} 轮询进度。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:exclusive:edit') or @ss.hasPermi('price:exclusive:forceEdit')")
|
||||
@Log(title = "Exclusive quote拉取产品", businessType = BusinessType.IMPORT)
|
||||
@@ -376,7 +376,7 @@ public class ExclusiveQuoteController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async batch write of detail surcharge snapshots. Returns taskId; poll /save/task/{taskId}.
|
||||
* 异步批量写入明细附加费快照。返回 taskId,通过 /save/task/{taskId} 轮询进度。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:exclusive:edit') or @ss.hasPermi('price:exclusive:forceEdit')")
|
||||
@Log(title = "Exclusive quote附加费", businessType = BusinessType.UPDATE)
|
||||
|
||||
+11
-11
@@ -55,7 +55,7 @@ public class PriceSetController extends BaseController
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PrcPriceSet set)
|
||||
{
|
||||
// Ordinary package module: never mix exclusive quotes into this list.
|
||||
// 普通套餐模块:该列表不混入专属报价。
|
||||
set.setSetCategory(PrcPriceSet.CATEGORY_PACKAGE);
|
||||
startPage();
|
||||
List<PrcPriceSet> list = priceSetService.selectPrcPriceSetList(set);
|
||||
@@ -83,7 +83,7 @@ public class PriceSetController extends BaseController
|
||||
set.setCreateBy(getUsername());
|
||||
set.setUpdateBy(getUsername());
|
||||
String taskId = priceSetService.submitSaveAsync(set);
|
||||
// Do not pass bare String to success(): overload puts it into msg, not data.
|
||||
// 不要向 success() 直接传裸 String:重载会把它放入 msg 而不是 data。
|
||||
Map<String, Object> payload = new HashMap<String, Object>();
|
||||
payload.put("taskId", taskId);
|
||||
return success(payload);
|
||||
@@ -112,7 +112,7 @@ public class PriceSetController extends BaseController
|
||||
return toAjax(priceSetService.updatePrcPriceSet(set));
|
||||
}
|
||||
|
||||
/** Update package name and note only. */
|
||||
/** 仅更新套餐名称和备注。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:set:edit')")
|
||||
@Log(title = "价格套餐基本信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/basic")
|
||||
@@ -190,7 +190,7 @@ public class PriceSetController extends BaseController
|
||||
return toAjax(priceSetService.deleteVersion(psvId, getUsername()));
|
||||
}
|
||||
|
||||
/** Import excel attachments for a version (prc_price_excel_file.psv_id). */
|
||||
/** 某个版本的导入 Excel 附件(prc_price_excel_file.psv_id)。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:set:list')")
|
||||
@GetMapping("/version/{psvId}/excelFiles")
|
||||
public AjaxResult versionExcelFiles(@PathVariable Long psvId)
|
||||
@@ -240,7 +240,7 @@ public class PriceSetController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/** All detail rows for one product (no page); used by edit-price drawer. */
|
||||
/** 某个产品的全部明细行(不分页);供改价抽屉使用。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:set:list')")
|
||||
@GetMapping("/detail/byProduct")
|
||||
public AjaxResult detailByProduct(@RequestParam("psvId") Long psvId,
|
||||
@@ -249,7 +249,7 @@ public class PriceSetController extends BaseController
|
||||
return success(priceSetService.selectDetailListByProduct(psvId, productCode));
|
||||
}
|
||||
|
||||
/** All detail rows for a version (no page); batch prefetch instead of N byProduct calls. */
|
||||
/** 某个版本的全部明细行(不分页);批量预取,避免 N 次 byProduct 调用。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:set:list')")
|
||||
@GetMapping("/detail/byVersion")
|
||||
public AjaxResult detailByVersion(@RequestParam("psvId") Long psvId)
|
||||
@@ -304,7 +304,7 @@ public class PriceSetController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Preview pull product library (no DB write). For create wizard before finish.
|
||||
* 预览从产品库拉取(不写库)。用于新建向导完成前的预览。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:set:edit') or @ss.hasPermi('price:set:forceEdit') or @ss.hasPermi('price:set:add')")
|
||||
@PostMapping("/detail/previewPullFromLibrary")
|
||||
@@ -314,8 +314,8 @@ public class PriceSetController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Preview Excel import (no DB write). Optional detailsJson for updateOnly / build-price merge.
|
||||
* Optional countryCode = single-country dedicated-line Excel (same as product country import).
|
||||
* 预览 Excel 导入(不写库)。可选 detailsJson 用于 updateOnly / 构建价格时的合并。
|
||||
* 可选 countryCode = 单国家专线 Excel(与产品国家导入一致)。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:set:edit') or @ss.hasPermi('price:set:forceEdit') or @ss.hasPermi('price:set:add')")
|
||||
@PostMapping("/detail/previewImportPrices")
|
||||
@@ -345,7 +345,7 @@ public class PriceSetController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async pull product library into version details. Returns taskId; poll /save/task/{taskId}.
|
||||
* 异步从产品库拉取到版本明细。返回 taskId;轮询 /save/task/{taskId}。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:set:edit') or @ss.hasPermi('price:set:forceEdit')")
|
||||
@Log(title = "套餐拉取产品", businessType = BusinessType.IMPORT)
|
||||
@@ -361,7 +361,7 @@ public class PriceSetController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async batch write of detail surcharge snapshots. Returns taskId; poll /save/task/{taskId}.
|
||||
* 异步批量写入明细附加费快照。返回 taskId;轮询 /save/task/{taskId}。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:set:edit') or @ss.hasPermi('price:set:forceEdit')")
|
||||
@Log(title = "套餐附加费", businessType = BusinessType.UPDATE)
|
||||
|
||||
+12
-12
@@ -63,8 +63,8 @@ public class ProductController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Product dropdown (non-paged). Slim query, no list-page status refresh.
|
||||
* Used by price-set / billing / customer bind; login required, no extra perm.
|
||||
* 产品下拉(非分页)。精简查询,不做列表页状态刷新。
|
||||
* 供价格套餐 / 计费 / 客户绑定使用;需登录,无额外权限要求。
|
||||
*/
|
||||
@GetMapping("/optionselect")
|
||||
public AjaxResult optionselect(BmsProduct product)
|
||||
@@ -139,7 +139,7 @@ public class ProductController extends BaseController
|
||||
return success();
|
||||
}
|
||||
|
||||
/** Persist create-page preview details into draft/pending/effect version. */
|
||||
/** 将新建页预览明细保存到草稿/待生效/生效版本。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:product:add') or @ss.hasPermi('price:product:edit')")
|
||||
@Log(title = "product preview apply", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/version/applyPreview")
|
||||
@@ -148,7 +148,7 @@ public class ProductController extends BaseController
|
||||
return success(productService.applyCatalogPreview(body));
|
||||
}
|
||||
|
||||
/** Async parallel save of create-page preview. Returns taskId; poll /import/task/{taskId}. */
|
||||
/** 异步并行保存新建页预览。返回 taskId;轮询 /import/task/{taskId}。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:product:add') or @ss.hasPermi('price:product:edit')")
|
||||
@Log(title = "product preview apply", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/version/applyPreviewAsync")
|
||||
@@ -160,7 +160,7 @@ public class ProductController extends BaseController
|
||||
return success(payload);
|
||||
}
|
||||
|
||||
/** Save import Excel attachment onto a draft/pending/effect version (prc_price_excel_file). */
|
||||
/** 将导入 Excel 附件保存到草稿/待生效/生效版本(prc_price_excel_file)。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:product:import')")
|
||||
@Log(title = "product version excel", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/version/{psvId}/excel")
|
||||
@@ -176,7 +176,7 @@ public class ProductController extends BaseController
|
||||
return success(row);
|
||||
}
|
||||
|
||||
/** List Excel attachments of a version. */
|
||||
/** 查询某个版本的 Excel 附件列表。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:product:query')")
|
||||
@GetMapping("/version/{psvId}/excelFiles")
|
||||
public AjaxResult listVersionExcelFiles(@PathVariable Long psvId)
|
||||
@@ -201,8 +201,8 @@ public class ProductController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async import Weishi B2C workbook. Returns taskId; poll /import/task/{taskId}.
|
||||
* effectiveDate is required: written to product / product_country; previous open rows expire at this date.
|
||||
* 异步导入 Weishi B2C 工作簿。返回 taskId;轮询 /import/task/{taskId}。
|
||||
* effectiveDate 必填:写入 product / product_country;原有未失效记录在该日期失效。
|
||||
*/
|
||||
@Log(title = "产品列表", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('price:product:import')")
|
||||
@@ -217,8 +217,8 @@ public class ProductController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async single-country cost-sheet import. Returns taskId; poll /import/task/{taskId}.
|
||||
* effectiveDate is required: written to product / product_country; previous open rows expire at this date.
|
||||
* 异步导入单国家成本表。返回 taskId;轮询 /import/task/{taskId}。
|
||||
* effectiveDate 必填:写入 product / product_country;原有未失效记录在该日期失效。
|
||||
*/
|
||||
@Log(title = "产品列表", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('price:product:import')")
|
||||
@@ -233,7 +233,7 @@ public class ProductController extends BaseController
|
||||
return success(payload);
|
||||
}
|
||||
|
||||
/** Async parse-only preview; returns taskId, poll /import/task/{taskId} for result. */
|
||||
/** 仅解析的异步预览;返回 taskId,轮询 /import/task/{taskId} 获取结果。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:product:import')")
|
||||
@PostMapping("/previewImport")
|
||||
public AjaxResult previewImport(
|
||||
@@ -246,7 +246,7 @@ public class ProductController extends BaseController
|
||||
return success(payload);
|
||||
}
|
||||
|
||||
/** Async single-country parse-only preview; returns taskId, poll /import/task/{taskId}. */
|
||||
/** 单国家仅解析的异步预览;返回 taskId,轮询 /import/task/{taskId}。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:product:import')")
|
||||
@PostMapping("/previewImportCountry")
|
||||
public AjaxResult previewImportCountry(
|
||||
|
||||
+10
-10
@@ -139,7 +139,7 @@ public class RedlineProductController extends BaseController
|
||||
return success();
|
||||
}
|
||||
|
||||
/** Persist create-page preview details into draft/pending/effect version. */
|
||||
/** 将新建页预览明细保存到草稿/待生效/生效版本。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:redline:add') or @ss.hasPermi('price:redline:edit')")
|
||||
@Log(title = "redline preview apply", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/version/applyPreview")
|
||||
@@ -148,7 +148,7 @@ public class RedlineProductController extends BaseController
|
||||
return success(productService.applyCatalogPreview(body));
|
||||
}
|
||||
|
||||
/** Async parallel save of create-page preview. Returns taskId; poll /import/task/{taskId}. */
|
||||
/** 异步并行保存新建页预览。返回 taskId;轮询 /import/task/{taskId}。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:redline:add') or @ss.hasPermi('price:redline:edit')")
|
||||
@Log(title = "redline preview apply", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/version/applyPreviewAsync")
|
||||
@@ -160,7 +160,7 @@ public class RedlineProductController extends BaseController
|
||||
return success(payload);
|
||||
}
|
||||
|
||||
/** Save import Excel attachment onto a draft/pending/effect version (prc_price_excel_file). */
|
||||
/** 将导入 Excel 附件保存到草稿/待生效/生效版本(prc_price_excel_file)。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:redline:import')")
|
||||
@Log(title = "redline version excel", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/version/{psvId}/excel")
|
||||
@@ -176,7 +176,7 @@ public class RedlineProductController extends BaseController
|
||||
return success(row);
|
||||
}
|
||||
|
||||
/** List Excel attachments of a version. */
|
||||
/** 查询某个版本的 Excel 附件列表。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:redline:query')")
|
||||
@GetMapping("/version/{psvId}/excelFiles")
|
||||
public AjaxResult listVersionExcelFiles(@PathVariable Long psvId)
|
||||
@@ -201,8 +201,8 @@ public class RedlineProductController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async import Weishi B2C workbook. Returns taskId; poll /import/task/{taskId}.
|
||||
* effectiveDate is required: written to product / product_country; previous open rows expire at this date.
|
||||
* 异步导入 Weishi B2C 工作簿。返回 taskId;轮询 /import/task/{taskId}。
|
||||
* effectiveDate 必填:写入 product / product_country;原有未失效记录在该日期失效。
|
||||
*/
|
||||
@Log(title = "产品列表", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('price:redline:import')")
|
||||
@@ -217,8 +217,8 @@ public class RedlineProductController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async single-country cost-sheet import. Returns taskId; poll /import/task/{taskId}.
|
||||
* effectiveDate is required: written to product / product_country; previous open rows expire at this date.
|
||||
* 异步导入单国家成本表。返回 taskId;轮询 /import/task/{taskId}。
|
||||
* effectiveDate 必填:写入 product / product_country;原有未失效记录在该日期失效。
|
||||
*/
|
||||
@Log(title = "产品列表", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('price:redline:import')")
|
||||
@@ -233,7 +233,7 @@ public class RedlineProductController extends BaseController
|
||||
return success(payload);
|
||||
}
|
||||
|
||||
/** Async parse-only preview; returns taskId, poll /import/task/{taskId} for result. */
|
||||
/** 仅解析的异步预览;返回 taskId,轮询 /import/task/{taskId} 获取结果。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:redline:import')")
|
||||
@PostMapping("/previewImport")
|
||||
public AjaxResult previewImport(
|
||||
@@ -246,7 +246,7 @@ public class RedlineProductController extends BaseController
|
||||
return success(payload);
|
||||
}
|
||||
|
||||
/** Async single-country parse-only preview; returns taskId, poll /import/task/{taskId}. */
|
||||
/** 单国家仅解析的异步预览;返回 taskId,轮询 /import/task/{taskId}。 */
|
||||
@PreAuthorize("@ss.hasPermi('price:redline:import')")
|
||||
@PostMapping("/previewImportCountry")
|
||||
public AjaxResult previewImportCountry(
|
||||
|
||||
+2
-2
@@ -47,7 +47,7 @@ public class SysFileTemplateController extends BaseController
|
||||
return success(fileTemplateService.selectSysFileTemplateById(templateId));
|
||||
}
|
||||
|
||||
/** Meta by file code (authenticated; used by import dialogs). */
|
||||
/** 按文件编码获取元信息(需登录,供导入弹窗使用)。 */
|
||||
@GetMapping("/code/{fileCode}")
|
||||
public AjaxResult getByCode(@PathVariable String fileCode)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ public class SysFileTemplateController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Download by file_code. Login required; no admin perm so import pages can use it.
|
||||
* 按 file_code 下载。需要登录,但不校验管理员权限,便于导入页面调用。
|
||||
*/
|
||||
@GetMapping("/download/{fileCode}")
|
||||
public void download(@PathVariable String fileCode, HttpServletResponse response) throws Exception
|
||||
|
||||
@@ -169,9 +169,9 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize destination postcode for zone match / persist.
|
||||
* Removes all Unicode whitespace (incl. NBSP / U+2005) and ASCII spaces;
|
||||
* strips Excel-style trailing ".0" on pure digits.
|
||||
* 规范化目的地邮编,用于分区匹配/持久化。
|
||||
* 移除所有 Unicode 空白字符(包括 NBSP / U+2005)和 ASCII 空格;
|
||||
* 去除纯数字末尾 Excel 风格的 ".0"。
|
||||
*/
|
||||
public static String normalizePostcode(String postcode)
|
||||
{
|
||||
@@ -681,12 +681,12 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares given {@code string} to a CharSequences vararg of {@code searchStrings},
|
||||
* returning {@code true} if the {@code string} is equal to any of the {@code searchStrings}, ignoring case.
|
||||
* 将给定的 {@code string} 与 {@code searchStrings} 可变参数中的字符序列进行比较,
|
||||
* 如果 {@code string} 与其中任意一个 {@code searchStrings} 相等(忽略大小写),则返回 {@code true}。
|
||||
*
|
||||
* @param string to compare, may be {@code null}.
|
||||
* @param searchStrings a vararg of strings, may be {@code null}.
|
||||
* @return {@code true} if the string is equal (case-insensitive) to any other element of {@code searchStrings};
|
||||
* @param string 要比较的字符串,可能为 {@code null}。
|
||||
* @param searchStrings 字符串可变参数,可能为 {@code null}。
|
||||
* @return 如果字符串与 {@code searchStrings} 中的任意其他元素相等(不区分大小写),则返回 {@code true};
|
||||
*/
|
||||
public static boolean equalsAnyIgnoreCase(final CharSequence string, final CharSequence... searchStrings)
|
||||
{
|
||||
|
||||
@@ -29,13 +29,13 @@ public class MimeTypeUtils
|
||||
public static final String[] DEFAULT_ALLOWED_EXTENSION = {
|
||||
// 图片
|
||||
"bmp", "gif", "jpg", "jpeg", "png",
|
||||
// word excel powerpoint
|
||||
// Word、Excel、PowerPoint 文档
|
||||
"doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt",
|
||||
// 压缩文件
|
||||
"rar", "zip", "gz", "bz2",
|
||||
// 视频格式
|
||||
"mp4", "avi", "rmvb",
|
||||
// pdf
|
||||
// pdf 文档
|
||||
"pdf" };
|
||||
|
||||
public static String getExtension(String prefix)
|
||||
|
||||
@@ -20,7 +20,7 @@ public class EscapeUtil
|
||||
TEXT[i] = new char[] { (char) i };
|
||||
}
|
||||
|
||||
// special HTML characters
|
||||
// 特殊的 HTML 字符
|
||||
TEXT['\''] = "'".toCharArray(); // 单引号
|
||||
TEXT['"'] = """.toCharArray(); // 双引号
|
||||
TEXT['&'] = "&".toCharArray(); // &符
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.regex.Pattern;
|
||||
public final class HTMLFilter
|
||||
{
|
||||
/**
|
||||
* regex flag union representing /si modifiers in php
|
||||
* 表示 php 中 /si 修饰符的正则表达式标志组合
|
||||
**/
|
||||
private static final int REGEX_FLAGS_SI = Pattern.CASE_INSENSITIVE | Pattern.DOTALL;
|
||||
private static final Pattern P_COMMENTS = Pattern.compile("<!--(.*?)-->", Pattern.DOTALL);
|
||||
@@ -45,60 +45,60 @@ public final class HTMLFilter
|
||||
private static final Pattern P_RIGHT_ARROW = Pattern.compile(">");
|
||||
private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>");
|
||||
|
||||
// @xxx could grow large... maybe use sesat's ReferenceMap
|
||||
// @xxx 可能会变得很大……也许可以使用 sesat 的 ReferenceMap
|
||||
private static final ConcurrentMap<String, Pattern> P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap<>();
|
||||
private static final ConcurrentMap<String, Pattern> P_REMOVE_SELF_BLANKS = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* set of allowed html elements, along with allowed attributes for each element
|
||||
* 允许的 html 元素集合,以及每个元素允许的属性
|
||||
**/
|
||||
private final Map<String, List<String>> vAllowed;
|
||||
/**
|
||||
* counts of open tags for each (allowable) html element
|
||||
* 每个(允许的)html 元素当前打开的标签计数
|
||||
**/
|
||||
private final Map<String, Integer> vTagCounts = new HashMap<>();
|
||||
|
||||
/**
|
||||
* html elements which must always be self-closing (e.g. "<img />")
|
||||
* 必须始终自闭合的 html 元素(例如 "<img />")
|
||||
**/
|
||||
private final String[] vSelfClosingTags;
|
||||
/**
|
||||
* html elements which must always have separate opening and closing tags (e.g. "<b></b>")
|
||||
* 必须始终具有独立开始和结束标签的 html 元素(例如 "<b></b>")
|
||||
**/
|
||||
private final String[] vNeedClosingTags;
|
||||
/**
|
||||
* set of disallowed html elements
|
||||
* 不允许的 html 元素集合
|
||||
**/
|
||||
private final String[] vDisallowed;
|
||||
/**
|
||||
* attributes which should be checked for valid protocols
|
||||
* 需要校验协议是否有效的属性
|
||||
**/
|
||||
private final String[] vProtocolAtts;
|
||||
/**
|
||||
* allowed protocols
|
||||
* 允许的协议
|
||||
**/
|
||||
private final String[] vAllowedProtocols;
|
||||
/**
|
||||
* tags which should be removed if they contain no content (e.g. "<b></b>" or "<b />")
|
||||
* 内容为空时应移除的标签(例如 "<b></b>" 或 "<b />")
|
||||
**/
|
||||
private final String[] vRemoveBlanks;
|
||||
/**
|
||||
* entities allowed within html markup
|
||||
* html 标记中允许的实体
|
||||
**/
|
||||
private final String[] vAllowedEntities;
|
||||
/**
|
||||
* flag determining whether comments are allowed in input String.
|
||||
* 用于标识输入字符串中是否允许注释的标志。
|
||||
*/
|
||||
private final boolean stripComment;
|
||||
private final boolean encodeQuotes;
|
||||
/**
|
||||
* flag determining whether to try to make tags when presented with "unbalanced" angle brackets (e.g. "<b text </b>"
|
||||
* becomes "<b> text </b>"). If set to false, unbalanced angle brackets will be html escaped.
|
||||
* 用于标识在遇到“不配对”的尖括号时是否尝试构造标签的标志(例如 "<b text </b>"
|
||||
* 会变成 "<b> text </b>")。如果设置为 false,不配对的尖括号将被 html 转义。
|
||||
*/
|
||||
private final boolean alwaysMakeTags;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
* 默认构造方法。
|
||||
*/
|
||||
public HTMLFilter()
|
||||
{
|
||||
@@ -125,7 +125,7 @@ public final class HTMLFilter
|
||||
vSelfClosingTags = new String[] { "img" };
|
||||
vNeedClosingTags = new String[] { "a", "b", "strong", "i", "em" };
|
||||
vDisallowed = new String[] {};
|
||||
vAllowedProtocols = new String[] { "http", "mailto", "https" }; // no ftp.
|
||||
vAllowedProtocols = new String[] { "http", "mailto", "https" }; // 不支持 ftp。
|
||||
vProtocolAtts = new String[] { "src", "href" };
|
||||
vRemoveBlanks = new String[] { "a", "b", "strong", "i", "em" };
|
||||
vAllowedEntities = new String[] { "amp", "gt", "lt", "quot" };
|
||||
@@ -135,9 +135,9 @@ public final class HTMLFilter
|
||||
}
|
||||
|
||||
/**
|
||||
* Map-parameter configurable constructor.
|
||||
* 可通过 Map 参数配置的构造方法。
|
||||
*
|
||||
* @param conf map containing configuration. keys match field names.
|
||||
* @param conf 包含配置的 map。键与字段名一致。
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public HTMLFilter(final Map<String, Object> conf)
|
||||
@@ -171,7 +171,7 @@ public final class HTMLFilter
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// my versions of some PHP library functions
|
||||
// 我实现的某些 PHP 库函数版本
|
||||
public static String chr(final int decimal)
|
||||
{
|
||||
return String.valueOf((char) decimal);
|
||||
@@ -190,10 +190,10 @@ public final class HTMLFilter
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* given a user submitted input String, filter out any invalid or restricted html.
|
||||
* 对用户提交的输入字符串,过滤掉任何无效或受限的 html。
|
||||
*
|
||||
* @param input text (i.e. submitted by a user) than may contain html
|
||||
* @return "clean" version of input, with only valid, whitelisted html elements allowed
|
||||
* @param input 可能包含 html 的文本(即用户提交的内容)
|
||||
* @return 输入的“干净”版本,仅允许有效且在 html 白名单中的元素
|
||||
*/
|
||||
public String filter(final String input)
|
||||
{
|
||||
@@ -242,7 +242,7 @@ public final class HTMLFilter
|
||||
if (alwaysMakeTags)
|
||||
{
|
||||
//
|
||||
// try and form html
|
||||
// 尝试构造 html
|
||||
//
|
||||
s = regexReplace(P_END_ARROW, "", s);
|
||||
// 不追加结束标签
|
||||
@@ -253,15 +253,15 @@ public final class HTMLFilter
|
||||
else
|
||||
{
|
||||
//
|
||||
// escape stray brackets
|
||||
// 转义多余的括号
|
||||
//
|
||||
s = regexReplace(P_STRAY_LEFT_ARROW, "<$1", s);
|
||||
s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2><", s);
|
||||
|
||||
//
|
||||
// the last regexp causes '<>' entities to appear
|
||||
// (we need to do a lookahead assertion so that the last bracket can
|
||||
// be used in the next pass of the regexp)
|
||||
// 上一个正则表达式会导致出现 "<>" 实体
|
||||
// (我们需要使用先行断言,以便最后一个括号
|
||||
// 可以在正则表达式的下一次匹配中使用)
|
||||
//
|
||||
s = regexReplace(P_BOTH_ARROWS, "", s);
|
||||
}
|
||||
@@ -282,8 +282,8 @@ public final class HTMLFilter
|
||||
}
|
||||
m.appendTail(buf);
|
||||
|
||||
// these get tallied in processTag
|
||||
// (remember to reset before subsequent calls to filter method)
|
||||
// 这些计数在 processTag 中进行累加
|
||||
// (记住在后续调用 filter 方法之前重置计数)
|
||||
final StringBuilder sBuilder = new StringBuilder(buf.toString());
|
||||
for (String key : vTagCounts.keySet())
|
||||
{
|
||||
@@ -325,7 +325,7 @@ public final class HTMLFilter
|
||||
|
||||
private String processTag(final String s)
|
||||
{
|
||||
// ending tags
|
||||
// 结束标签
|
||||
Matcher m = P_END_TAG.matcher(s);
|
||||
if (m.find())
|
||||
{
|
||||
@@ -343,7 +343,7 @@ public final class HTMLFilter
|
||||
}
|
||||
}
|
||||
|
||||
// starting tags
|
||||
// 开始标签
|
||||
m = P_START_TAG.matcher(s);
|
||||
if (m.find())
|
||||
{
|
||||
@@ -424,7 +424,7 @@ public final class HTMLFilter
|
||||
}
|
||||
}
|
||||
|
||||
// comments
|
||||
// 注释
|
||||
m = P_COMMENT.matcher(s);
|
||||
if (!stripComment && m.find())
|
||||
{
|
||||
@@ -443,7 +443,7 @@ public final class HTMLFilter
|
||||
final String protocol = m.group(1);
|
||||
if (!inArray(protocol, vAllowedProtocols))
|
||||
{
|
||||
// bad protocol, turn into local anchor link instead
|
||||
// 协议不合法,改为本地锚点链接
|
||||
s = "#" + s.substring(protocol.length() + 1);
|
||||
if (s.startsWith("#//"))
|
||||
{
|
||||
@@ -499,7 +499,7 @@ public final class HTMLFilter
|
||||
{
|
||||
StringBuffer buf = new StringBuffer();
|
||||
|
||||
// validate entities throughout the string
|
||||
// 校验整个字符串中的实体
|
||||
Matcher m = P_VALID_ENTITIES.matcher(s);
|
||||
while (m.find())
|
||||
{
|
||||
|
||||
@@ -569,12 +569,12 @@ public class ExcelUtil<T>
|
||||
}
|
||||
|
||||
/**
|
||||
* Common one-liner export for controllers.
|
||||
* 供控制器使用的通用一行式导出方法。
|
||||
*
|
||||
* @param response HTTP response
|
||||
* @param list export rows
|
||||
* @param clazz row class with @Excel fields
|
||||
* @param sheetName sheet / file title
|
||||
* @param response HTTP 响应
|
||||
* @param list 导出的数据行
|
||||
* @param clazz 带有 @Excel 注解字段的数据行类
|
||||
* @param sheetName sheet / 文件标题
|
||||
*/
|
||||
public static <E> void export(HttpServletResponse response, List<E> list, Class<E> clazz, String sheetName)
|
||||
{
|
||||
|
||||
@@ -75,10 +75,10 @@ public final class Base64
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes hex octects into Base64
|
||||
* 将十六进制字节编码为 Base64
|
||||
*
|
||||
* @param binaryData Array containing binaryData
|
||||
* @return Encoded Base64 array
|
||||
* @param binaryData 包含二进制数据的数组
|
||||
* @return 编码后的 Base64 数组
|
||||
*/
|
||||
public static String encode(byte[] binaryData)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ public final class Base64
|
||||
encodedData[encodedIndex++] = lookUpBase64Alphabet[b3 & 0x3f];
|
||||
}
|
||||
|
||||
// form integral number of 6-bit groups
|
||||
// 组成完整的 6 位组
|
||||
if (fewerThan24bits == EIGHTBIT)
|
||||
{
|
||||
b1 = binaryData[dataIndex];
|
||||
@@ -154,10 +154,10 @@ public final class Base64
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes Base64 data into octects
|
||||
* 将 Base64 数据解码为字节
|
||||
*
|
||||
* @param encoded string containing Base64 data
|
||||
* @return Array containind decoded data.
|
||||
* @param encoded 包含 Base64 数据的字符串
|
||||
* @return 包含解码后数据的数组。
|
||||
*/
|
||||
public static byte[] decode(String encoded)
|
||||
{
|
||||
@@ -167,12 +167,12 @@ public final class Base64
|
||||
}
|
||||
|
||||
char[] base64Data = encoded.toCharArray();
|
||||
// remove white spaces
|
||||
// 去除空白字符
|
||||
int len = removeWhiteSpace(base64Data);
|
||||
|
||||
if (len % FOURBYTE != 0)
|
||||
{
|
||||
return null;// should be divisible by four
|
||||
return null;// 应为 4 的倍数
|
||||
}
|
||||
|
||||
int numberQuadruple = (len / FOURBYTE);
|
||||
@@ -198,7 +198,7 @@ public final class Base64
|
||||
|| !isData((d3 = base64Data[dataIndex++])) || !isData((d4 = base64Data[dataIndex++])))
|
||||
{
|
||||
return null;
|
||||
} // if found "no data" just return null
|
||||
} // 如果未找到数据,直接返回 null
|
||||
|
||||
b1 = base64Alphabet[d1];
|
||||
b2 = base64Alphabet[d2];
|
||||
@@ -212,7 +212,7 @@ public final class Base64
|
||||
|
||||
if (!isData((d1 = base64Data[dataIndex++])) || !isData((d2 = base64Data[dataIndex++])))
|
||||
{
|
||||
return null;// if found "no data" just return null
|
||||
return null;// 如果未找到数据,直接返回 null
|
||||
}
|
||||
|
||||
b1 = base64Alphabet[d1];
|
||||
@@ -221,10 +221,10 @@ public final class Base64
|
||||
d3 = base64Data[dataIndex++];
|
||||
d4 = base64Data[dataIndex++];
|
||||
if (!isData((d3)) || !isData((d4)))
|
||||
{// Check if they are PAD characters
|
||||
{// 检查它们是否为 PAD 字符
|
||||
if (isPad(d3) && isPad(d4))
|
||||
{
|
||||
if ((b2 & 0xf) != 0)// last 4 bits should be zero
|
||||
if ((b2 & 0xf) != 0)// 最后 4 位应为零
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ public final class Base64
|
||||
else if (!isPad(d3) && isPad(d4))
|
||||
{
|
||||
b3 = base64Alphabet[d3];
|
||||
if ((b3 & 0x3) != 0)// last 2 bits should be zero
|
||||
if ((b3 & 0x3) != 0)// 最后 2 位应为零
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ public final class Base64
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // No PAD e.g 3cQl
|
||||
{ // 没有 PAD,例如 3cQl
|
||||
b3 = base64Alphabet[d3];
|
||||
b4 = base64Alphabet[d4];
|
||||
decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4);
|
||||
@@ -264,10 +264,10 @@ public final class Base64
|
||||
}
|
||||
|
||||
/**
|
||||
* remove WhiteSpace from MIME containing encoded Base64 data.
|
||||
* 从包含已编码 Base64 数据的 MIME 中移除空白字符。
|
||||
*
|
||||
* @param data the byte array of base64 data (with WS)
|
||||
* @return the new length
|
||||
* @param data Base64 数据的字节数组(含空白字符)
|
||||
* @return 新的长度
|
||||
*/
|
||||
private static int removeWhiteSpace(char[] data)
|
||||
{
|
||||
@@ -276,7 +276,7 @@ public final class Base64
|
||||
return 0;
|
||||
}
|
||||
|
||||
// count characters that's not whitespace
|
||||
// 统计非空白字符的数量
|
||||
int newSize = 0;
|
||||
int len = data.length;
|
||||
for (int i = 0; i < len; i++)
|
||||
|
||||
@@ -97,10 +97,10 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
||||
|
||||
byte[] randomBytes = new byte[16];
|
||||
ng.nextBytes(randomBytes);
|
||||
randomBytes[6] &= 0x0f; /* clear version */
|
||||
randomBytes[6] |= 0x40; /* set to version 4 */
|
||||
randomBytes[8] &= 0x3f; /* clear variant */
|
||||
randomBytes[8] |= 0x80; /* set to IETF variant */
|
||||
randomBytes[6] &= 0x0f; /* 清除版本位 */
|
||||
randomBytes[6] |= 0x40; /* 设置为版本 4 */
|
||||
randomBytes[8] &= 0x3f; /* 清除变体位 */
|
||||
randomBytes[8] |= 0x80; /* 设置为 IETF 变体 */
|
||||
return new UUID(randomBytes);
|
||||
}
|
||||
|
||||
@@ -123,10 +123,10 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
||||
throw new InternalError("MD5 not supported");
|
||||
}
|
||||
byte[] md5Bytes = md.digest(name);
|
||||
md5Bytes[6] &= 0x0f; /* clear version */
|
||||
md5Bytes[6] |= 0x30; /* set to version 3 */
|
||||
md5Bytes[8] &= 0x3f; /* clear variant */
|
||||
md5Bytes[8] |= 0x80; /* set to IETF variant */
|
||||
md5Bytes[6] &= 0x0f; /* 清除版本位 */
|
||||
md5Bytes[6] |= 0x30; /* 设置为版本 3 */
|
||||
md5Bytes[8] &= 0x3f; /* 清除变体位 */
|
||||
md5Bytes[8] |= 0x80; /* 设置为 IETF 变体 */
|
||||
return new UUID(md5Bytes);
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
||||
*/
|
||||
public int version()
|
||||
{
|
||||
// Version is bits masked by 0x000000000000F000 in MS long
|
||||
// 版本号是最高有效长整型中被 0x000000000000F000 掩码的位
|
||||
return (int) ((mostSigBits >> 12) & 0x0f);
|
||||
}
|
||||
|
||||
@@ -217,11 +217,11 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
||||
*/
|
||||
public int variant()
|
||||
{
|
||||
// This field is composed of a varying number of bits.
|
||||
// 0 - - Reserved for NCS backward compatibility
|
||||
// 1 0 - The IETF aka Leach-Salz variant (used by this class)
|
||||
// 1 1 0 Reserved, Microsoft backward compatibility
|
||||
// 1 1 1 Reserved for future definition.
|
||||
// 该字段由数量可变的位组成。
|
||||
// 0 - - 为 NCS 向后兼容保留
|
||||
// 1 0 - IETF 即 Leach-Salz 变体(本类使用)
|
||||
// 1 1 0 保留,微软向后兼容
|
||||
// 1 1 1 保留供以后定义使用。
|
||||
return (int) ((leastSigBits >>> (64 - (leastSigBits >>> 62))) & (leastSigBits >> 63));
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
||||
return (mostSigBits == id.mostSigBits && leastSigBits == id.leastSigBits);
|
||||
}
|
||||
|
||||
// Comparison Operations
|
||||
// 比较操作
|
||||
|
||||
/**
|
||||
* 将此 UUID 与指定的 UUID 比较。
|
||||
@@ -419,8 +419,8 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
||||
@Override
|
||||
public int compareTo(UUID val)
|
||||
{
|
||||
// The ordering is intentionally set up so that the UUIDs
|
||||
// can simply be numerically compared as two numbers
|
||||
// 此处有意这样设置比较顺序,使得 UUID
|
||||
// 可以简单地作为两个数字进行数值比较
|
||||
return (this.mostSigBits < val.mostSigBits ? -1 : //
|
||||
(this.mostSigBits > val.mostSigBits ? 1 : //
|
||||
(this.leastSigBits < val.leastSigBits ? -1 : //
|
||||
@@ -429,7 +429,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------
|
||||
// Private method start
|
||||
// 私有方法开始
|
||||
/**
|
||||
* 返回指定数字对应的hex值
|
||||
*
|
||||
|
||||
@@ -106,7 +106,7 @@ public class MyBatisConfig
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
// ignore
|
||||
// 忽略
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import org.springframework.stereotype.Component;
|
||||
public class TmsApiProperties
|
||||
{
|
||||
/**
|
||||
* Agreed API identification code (header X-Api-Code or body apiCode).
|
||||
* 约定的 API 标识码(请求头 X-Api-Code 或请求体 apiCode)。
|
||||
*/
|
||||
private String apiCode = "BMS.TMS.ZYaOvlQzpcfau8TUaCFfO3Hp8ieHIqGw";
|
||||
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public class BmsCustomerPriceSet extends BaseEntity
|
||||
/** 计价类型 FIXED=固定价 DISCOUNT=折扣 */
|
||||
private String setType;
|
||||
|
||||
/** Package status D=pending-enable A=audit E=effective R=reject S=stopped */
|
||||
/** 套餐状态 D=待启用 A=审核 E=生效 R=拒绝 S=停用 */
|
||||
private String priceSetStatus;
|
||||
|
||||
/** 套餐生效日期 */
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public class BmsPriceSetOption
|
||||
/** 计价类型 FIXED=固定价 DISCOUNT=折扣 */
|
||||
private String setType;
|
||||
|
||||
/** Package status D=pending-enable A=audit E=effective R=reject S=stopped */
|
||||
/** 套餐状态 D=待启用 A=审核 E=生效 R=拒绝 S=停用 */
|
||||
private String status;
|
||||
|
||||
/** 生效日期 */
|
||||
|
||||
+2
-2
@@ -94,7 +94,7 @@ public class BmsCustomerPriceSetServiceImpl implements IBmsCustomerPriceSetServi
|
||||
if (existing != null)
|
||||
{
|
||||
bind.setCustomerPricesetId(existing.getCustomerPricesetId());
|
||||
// UI no longer collects bind dates: keep existing when not passed.
|
||||
// UI 不再收集绑定日期:未传时保留原值。
|
||||
if (bind.getPrBegindate() == null)
|
||||
{
|
||||
bind.setPrBegindate(existing.getPrBegindate());
|
||||
@@ -107,7 +107,7 @@ public class BmsCustomerPriceSetServiceImpl implements IBmsCustomerPriceSetServi
|
||||
}
|
||||
else
|
||||
{
|
||||
// pr_begindate NOT NULL; UI omits it — default to now (same as price-set bind).
|
||||
// pr_begindate NOT NULL,UI 未传时默认取当前时间(与价格套餐绑定一致)。
|
||||
if (bind.getPrBegindate() == null)
|
||||
{
|
||||
bind.setPrBegindate(DateUtils.getNowDate());
|
||||
|
||||
@@ -10,22 +10,22 @@ import org.springframework.stereotype.Component;
|
||||
@ConfigurationProperties(prefix = "bms.billing")
|
||||
public class BillingProperties
|
||||
{
|
||||
/** local = Spring event; redis = Redis list queue */
|
||||
/** local = Spring 事件;redis = Redis 列表队列 */
|
||||
private String mqMode = "redis";
|
||||
private String mqQueueKey = "bms:billing:task";
|
||||
private boolean consumerEnabled = true;
|
||||
/** Messages popped per scheduled tick (redis mode) */
|
||||
/** 每个调度周期取出的消息数量(redis 模式) */
|
||||
private int consumerBatchSize = 32;
|
||||
/** Concurrent processTask threads (redis mode) */
|
||||
/** 并发执行 processTask 的线程数(redis 模式) */
|
||||
private int consumerThreads = 8;
|
||||
/** Concurrent threads for monitor order-source sync */
|
||||
/** 监控订单数源同步的并发线程数 */
|
||||
private int orderSourceSyncThreads = 8;
|
||||
/**
|
||||
* Concurrent threads for order-list local rebill (2~24).
|
||||
* Keep below Druid maxActive with headroom for other traffic.
|
||||
* 订单列表本地重计费的并发线程数(2~24)。
|
||||
* 需低于 Druid maxActive,并给其他流量留出余量。
|
||||
*/
|
||||
private int localRebillThreads = 16;
|
||||
/** Hourly auto-retry of prc_billing_task (all statuses) */
|
||||
/** 每小时自动重试 prc_billing_task(所有状态) */
|
||||
private NightRetry nightRetry = new NightRetry();
|
||||
private Oracle oracle = new Oracle();
|
||||
|
||||
@@ -120,18 +120,18 @@ public class BillingProperties
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto rebill window: pull prc_billing_task (all success_status) and retryTask.
|
||||
* Default hours [0, 24) local time (all day); empty result skips billing.
|
||||
* 自动重计费时间窗:拉取 prc_billing_task(所有 success_status)并执行 retryTask。
|
||||
* 默认本地时间 [0, 24) 点(全天);结果为空则跳过计费。
|
||||
*/
|
||||
public static class NightRetry
|
||||
{
|
||||
/** Master switch */
|
||||
/** 总开关 */
|
||||
private boolean enabled = true;
|
||||
/** Inclusive start hour (0 = 00:00) */
|
||||
/** 起始小时,含(0 = 00:00) */
|
||||
private int startHour = 0;
|
||||
/** Exclusive end hour (24 = all day) */
|
||||
/** 结束小时,不含(24 = 全天) */
|
||||
private int endHour = 24;
|
||||
/** Page size: bill this many then pull next page (default 500) */
|
||||
/** 分页大小:计费这么多条后再拉下一页(默认 500) */
|
||||
private int batchSize = 500;
|
||||
|
||||
public boolean isEnabled()
|
||||
@@ -177,9 +177,9 @@ public class BillingProperties
|
||||
|
||||
public static class Oracle
|
||||
{
|
||||
/** Upstream main-order table name on SLAVE/Oracle DS */
|
||||
/** SLAVE/Oracle 数据源上的上游主订单表名 */
|
||||
private String orderTable = "WEISHI_USER.TAB_ORDER";
|
||||
/** Optional default product when Oracle row has no PRODUCT_CODE */
|
||||
/** Oracle 行中没有 PRODUCT_CODE 时使用的可选默认产品 */
|
||||
private String defaultProductCode = "";
|
||||
|
||||
public String getOrderTable()
|
||||
|
||||
@@ -14,7 +14,7 @@ public class BmsProduct extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** maps to prc_price_set_product.psp_id */
|
||||
/** 对应 prc_price_set_product.psp_id */
|
||||
private Long productId;
|
||||
private Long psvId;
|
||||
private String priceType;
|
||||
@@ -30,7 +30,7 @@ public class BmsProduct extends BaseEntity
|
||||
private Date effectiveDate;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expireDate;
|
||||
/** 0 pending, 1 active, 2 expired */
|
||||
/** 0 待生效,1 生效,2 已失效 */
|
||||
public static final String STATUS_PENDING = "0";
|
||||
public static final String STATUS_ACTIVE = "1";
|
||||
public static final String STATUS_EXPIRED = "2";
|
||||
@@ -45,8 +45,8 @@ public class BmsProduct extends BaseEntity
|
||||
private Integer countryCount;
|
||||
private Integer surchargeCount;
|
||||
private List<BmsProductCountry> countries;
|
||||
/** query alias of status (0/1/2) */
|
||||
/** status 的查询别名(0/1/2) */
|
||||
private String effectStatus;
|
||||
/** query: active = status in (0,1); expired = status 2 */
|
||||
/** 查询:active = status in (0,1);expired = status 2 */
|
||||
private String statusGroup;
|
||||
}
|
||||
|
||||
@@ -12,23 +12,23 @@ public class BmsProductCountry implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** maps to prc_price_set_detail.psd_id */
|
||||
/** 对应 prc_price_set_detail.psd_id */
|
||||
private Long detailId;
|
||||
private Long psvId;
|
||||
private Long pspId;
|
||||
private String priceType;
|
||||
/** FK to product.product_id */
|
||||
/** 外键,指向 product.product_id */
|
||||
private Long productId;
|
||||
private String productCode;
|
||||
/** Parse/import helper only (not a DB column). */
|
||||
/** 仅用于解析/导入辅助(非数据库字段)。 */
|
||||
private String productName;
|
||||
private String countryName;
|
||||
private String countryCode;
|
||||
/** prc_zone.zone_id; null when product country has no zone */
|
||||
/** prc_zone.zone_id;产品国家无分区时为 null */
|
||||
private Long zoneId;
|
||||
/** e.g. Z1; null when no zone */
|
||||
/** 例如 Z1;无分区时为 null */
|
||||
private String zoneCode;
|
||||
/** e.g. Australia(Z1); null when no zone */
|
||||
/** 例如 Australia(Z1);无分区时为 null */
|
||||
private String zoneName;
|
||||
private BigDecimal weightMin;
|
||||
private BigDecimal weightMax;
|
||||
@@ -39,10 +39,10 @@ public class BmsProductCountry implements Serializable
|
||||
private String leadTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date effectiveDate;
|
||||
/** null=open; closed to next import effective_date */
|
||||
/** null=未关闭;关闭到下次导入的 effective_date */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expireDate;
|
||||
/** 0 pending, 1 active, 2 expired */
|
||||
/** 0 待生效,1 生效,2 已失效 */
|
||||
private String status;
|
||||
/** 0未删除 1已删除 */
|
||||
public static final String IS_DEL_NO = "0";
|
||||
@@ -52,8 +52,8 @@ public class BmsProductCountry implements Serializable
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/** query only: true = expire_date is null */
|
||||
/** 仅查询用:true = expire_date 为 null */
|
||||
private Boolean openOnly;
|
||||
/** query alias of status (0/1/2) */
|
||||
/** status 的查询别名(0/1/2) */
|
||||
private String effectStatus;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public class BmsProductImportTask implements Serializable
|
||||
private int percent;
|
||||
private String message;
|
||||
private String error;
|
||||
/** Preview parse payload (products / details); not persisted to DB. */
|
||||
/** 预览解析结果(products / details);不落库。 */
|
||||
private Object result;
|
||||
|
||||
public String getTaskId()
|
||||
|
||||
@@ -29,7 +29,7 @@ public class BmsRedlineProduct extends BaseEntity
|
||||
private Date effectiveDate;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expireDate;
|
||||
/** 0 pending, 1 active, 2 expired */
|
||||
/** 0 待生效,1 生效,2 已失效 */
|
||||
public static final String STATUS_PENDING = "0";
|
||||
public static final String STATUS_ACTIVE = "1";
|
||||
public static final String STATUS_EXPIRED = "2";
|
||||
@@ -44,8 +44,8 @@ public class BmsRedlineProduct extends BaseEntity
|
||||
private Integer countryCount;
|
||||
private Integer surchargeCount;
|
||||
private List<BmsRedlineProductCountry> countries;
|
||||
/** query alias of status (0/1/2) */
|
||||
/** status 的查询别名(0/1/2) */
|
||||
private String effectStatus;
|
||||
/** query: active = status in (0,1); expired = status 2 */
|
||||
/** 查询:active = status in (0,1);expired = status 2 */
|
||||
private String statusGroup;
|
||||
}
|
||||
|
||||
+10
-10
@@ -12,23 +12,23 @@ public class BmsRedlineProductCountry implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** maps to prc_price_set_detail.psd_id */
|
||||
/** 对应 prc_price_set_detail.psd_id */
|
||||
private Long detailId;
|
||||
private Long psvId;
|
||||
private Long pspId;
|
||||
private String priceType;
|
||||
/** FK to product.product_id / psp_id */
|
||||
/** 外键,指向 product.product_id / psp_id */
|
||||
private Long productId;
|
||||
private String productCode;
|
||||
/** Parse/import helper only (not a DB column). */
|
||||
/** 仅用于解析/导入辅助(非数据库字段)。 */
|
||||
private String productName;
|
||||
private String countryName;
|
||||
private String countryCode;
|
||||
/** prc_zone.zone_id; null when product country has no zone */
|
||||
/** prc_zone.zone_id;产品国家无分区时为 null */
|
||||
private Long zoneId;
|
||||
/** e.g. Z1; null when no zone */
|
||||
/** 例如 Z1;无分区时为 null */
|
||||
private String zoneCode;
|
||||
/** e.g. Australia(Z1); null when no zone */
|
||||
/** 例如 Australia(Z1);无分区时为 null */
|
||||
private String zoneName;
|
||||
private BigDecimal weightMin;
|
||||
private BigDecimal weightMax;
|
||||
@@ -39,10 +39,10 @@ public class BmsRedlineProductCountry implements Serializable
|
||||
private String leadTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date effectiveDate;
|
||||
/** null=open; closed to next import effective_date */
|
||||
/** null=未关闭;关闭到下次导入的 effective_date */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expireDate;
|
||||
/** 0 pending, 1 active, 2 expired */
|
||||
/** 0 待生效,1 生效,2 已失效 */
|
||||
private String status;
|
||||
/** 0未删除 1已删除 */
|
||||
public static final String IS_DEL_NO = "0";
|
||||
@@ -52,8 +52,8 @@ public class BmsRedlineProductCountry implements Serializable
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/** query only: true = expire_date is null */
|
||||
/** 仅查询用:true = expire_date 为 null */
|
||||
private Boolean openOnly;
|
||||
/** query alias of status (0/1/2) */
|
||||
/** status 的查询别名(0/1/2) */
|
||||
private String effectStatus;
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ public class BmsRedlineProductImportTask implements Serializable
|
||||
private int percent;
|
||||
private String message;
|
||||
private String error;
|
||||
/** Preview parse payload (products / details); not persisted to DB. */
|
||||
/** 预览解析结果(products / details);不落库。 */
|
||||
private Object result;
|
||||
|
||||
public String getTaskId()
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ public class CatalogPreviewApplyRequest implements Serializable
|
||||
|
||||
private Long psvId;
|
||||
private List<BmsProduct> products;
|
||||
/** key = upper-case productCode */
|
||||
/** key = 大写后的 productCode */
|
||||
private Map<String, List<BmsProductCountry>> detailsByProductCode;
|
||||
|
||||
public Long getPsvId()
|
||||
|
||||
@@ -17,17 +17,17 @@ public class PrcBillingTask extends BaseEntity
|
||||
private String transferNo;
|
||||
private String trackingNo;
|
||||
private String orderNo;
|
||||
/** Customer code snapshot for filter / rebill */
|
||||
/** 客户编码快照,用于筛选 / 重计费 */
|
||||
private String customerCode;
|
||||
/** PENDING / REBILL / REFUND */
|
||||
private String billType;
|
||||
/** WAITING / SUCCESS / FAILED */
|
||||
private String successStatus;
|
||||
/** Billing time from mobile (not Oracle order time; not overwritten on writeback) */
|
||||
/** 移动端传入的计费时间(非 Oracle 订单时间;回写时不会被覆盖) */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date billTime;
|
||||
private String billId;
|
||||
/** Stable fail code for search, e.g. NO_CUSTOMER_PACKAGE */
|
||||
/** 用于查询的稳定失败码,例如 NO_CUSTOMER_PACKAGE */
|
||||
private String failCode;
|
||||
private String errorMessage;
|
||||
}
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* Price-set detail batch bind customers.
|
||||
* 价格套餐明细批量绑定客户。
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@@ -23,8 +23,8 @@ public class PrcCustomerPriceSetBatch extends BaseEntity
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date prEnddate;
|
||||
private String priceSetNote;
|
||||
/** Customers to bind (need customerCode; id/name optional). */
|
||||
/** 要绑定的客户(需要 customerCode;id/name 可选)。 */
|
||||
private List<PrcCustomerPriceSet> customers;
|
||||
/** true = move already-bound customers onto this set; false = skip them. */
|
||||
/** true = 把已绑定的客户迁移到本套餐;false = 跳过这些客户。 */
|
||||
private Boolean overwriteExisting;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class PrcOrderBill extends BaseEntity
|
||||
private String trackingNo;
|
||||
/** 批量查询:多个运单号精确匹配(仅查询用,非表字段) */
|
||||
private List<String> trackingNos;
|
||||
/** transfer order no */
|
||||
/** 转单号 */
|
||||
private String transferNo;
|
||||
/** 批量查询:多个转单号精确匹配(仅查询用,非表字段) */
|
||||
private List<String> transferNos;
|
||||
@@ -50,7 +50,7 @@ public class PrcOrderBill extends BaseEntity
|
||||
private List<String> customerCodes;
|
||||
private Integer pieces;
|
||||
private BigDecimal actualWeight;
|
||||
/** Receive weight from upstream TAB_ORDER.WEIGHT */
|
||||
/** 收货重量,来自上游 TAB_ORDER.WEIGHT */
|
||||
private BigDecimal receiveWeight;
|
||||
private BigDecimal volume;
|
||||
private BigDecimal volumeWeight;
|
||||
@@ -109,9 +109,9 @@ public class PrcOrderBill extends BaseEntity
|
||||
private BigDecimal registrationFee;
|
||||
private BigDecimal freightAmount;
|
||||
private BigDecimal surchargeAmount;
|
||||
/** receivable total */
|
||||
/** 应收合计 */
|
||||
private BigDecimal incomeTotal;
|
||||
/** payable total */
|
||||
/** 应付合计 */
|
||||
private BigDecimal payTotal;
|
||||
private String currency;
|
||||
/** 应收账单状态:UNBILLED未出账/PARTIAL部分出账/BILLED已出账。 */
|
||||
@@ -122,7 +122,7 @@ public class PrcOrderBill extends BaseEntity
|
||||
private String creditArrearsStatus;
|
||||
/** NONE / REFUNDED */
|
||||
private String refundStatus;
|
||||
/** Billing fail: 0 ok writes income bill+fee; non-0 amount=0, no income bill/fee */
|
||||
/** 计费失败:0 正常,写入应收账单+费用;非 0 金额为 0,不写入应收账单/费用 */
|
||||
private Integer billingFailStatus;
|
||||
/** 失败原因 */
|
||||
private String errorMessage;
|
||||
@@ -133,6 +133,6 @@ public class PrcOrderBill extends BaseEntity
|
||||
private List<PrcIncomeBillFee> incomeFees;
|
||||
private List<PrcPayBillFee> payFees;
|
||||
|
||||
/** Excel export fields (Java props; export only). */
|
||||
/** Excel 导出字段(Java 属性名;仅导出用)。 */
|
||||
private List<String> exportFields;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class PrcOrderBillExportTask implements Serializable
|
||||
private String error;
|
||||
private String exportType;
|
||||
private String fileName;
|
||||
/** Relative path under download root, or empty until success. */
|
||||
/** 下载根目录下的相对路径,成功前为空。 */
|
||||
private String storageKey;
|
||||
private int rowCount;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public class PrcPriceExcelFile extends BaseEntity
|
||||
private Long pefId;
|
||||
/** PRODUCT / REDLINE / SALES */
|
||||
private String excelType;
|
||||
/** FK prc_price_set_version.psv_id */
|
||||
/** 外键 prc_price_set_version.psv_id */
|
||||
private Long psvId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date effectiveTime;
|
||||
@@ -32,6 +32,6 @@ public class PrcPriceExcelFile extends BaseEntity
|
||||
private String contentType;
|
||||
private String fileExtension;
|
||||
private String ossId;
|
||||
/** Comma-separated sheet names (optional) */
|
||||
/** 逗号分隔的 Sheet 名称(可选) */
|
||||
private String sheetNames;
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@ public class PrcPriceSet extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** Ordinary package (default). */
|
||||
/** 普通套餐(默认)。 */
|
||||
public static final String CATEGORY_PACKAGE = "PACKAGE";
|
||||
/** Boss exclusive quote. */
|
||||
/** 老板专属报价。 */
|
||||
public static final String CATEGORY_EXCLUSIVE = "EXCLUSIVE";
|
||||
/** Label / 打单套餐(应收价卡套餐). */
|
||||
public static final String CATEGORY_LABEL = "LABEL";
|
||||
@@ -28,7 +28,7 @@ public class PrcPriceSet extends BaseEntity
|
||||
private String priceSetNote;
|
||||
/** FIXED / DISCOUNT */
|
||||
private String setType;
|
||||
/** PACKAGE=ordinary set / EXCLUSIVE=boss exclusive quote / LABEL=打单套餐 */
|
||||
/** PACKAGE=普通套餐 / EXCLUSIVE=老板专属报价 / LABEL=打单套餐 */
|
||||
private String setCategory;
|
||||
private BigDecimal defaultDiscount;
|
||||
private String defaultType;
|
||||
@@ -43,27 +43,27 @@ public class PrcPriceSet extends BaseEntity
|
||||
|
||||
private Integer productCount;
|
||||
private Integer customerCount;
|
||||
/** List display: bound customer code/name summary (not a DB column). */
|
||||
/** 列表展示:已绑定客户编码/名称摘要(非数据库字段)。 */
|
||||
private String boundCustomers;
|
||||
private Boolean expired;
|
||||
private String keyword;
|
||||
/** Query only: filter packages by bound customer id. */
|
||||
/** 仅查询用:按绑定客户ID筛选套餐。 */
|
||||
private Long customerId;
|
||||
private String submitFlag;
|
||||
/** current version on create/edit save */
|
||||
/** 新建/编辑保存时的当前版本 */
|
||||
private PrcPriceSetVersion version;
|
||||
private List<PrcPriceSetDetail> details;
|
||||
private List<PrcPriceSetVersion> versions;
|
||||
private List<PrcCustomerPriceSet> customers;
|
||||
/** async save task id (not persisted) */
|
||||
/** 异步保存任务ID(不落库) */
|
||||
private String saveTaskId;
|
||||
/** Y: ignored on save; library pull only via /detail/pullFromLibrary */
|
||||
/** Y:保存时忽略;只能通过 /detail/pullFromLibrary 从库拉取 */
|
||||
private String pullFromLibrary;
|
||||
/** Y: even if version already has details, delete+re-pull from library */
|
||||
/** Y:即使版本已有明细,也删除后重新从库拉取 */
|
||||
private String forcePullLibrary;
|
||||
/**
|
||||
* Request-only: bind this Excel attachment (pef_id) to the saved version.psv_id
|
||||
* (not a column on prc_price_set).
|
||||
* 仅请求用:把这个 Excel 附件(pef_id)绑定到保存的版本 psv_id
|
||||
* (不是 prc_price_set 的字段)。
|
||||
*/
|
||||
private Long pefId;
|
||||
/** 请求专用:多个 Excel 附件 pef_id,保存时绑到版本(非表字段) */
|
||||
|
||||
@@ -30,14 +30,14 @@ public class PrcPriceSetDetail implements Serializable
|
||||
private String weightLabel;
|
||||
private BigDecimal weightMin;
|
||||
private BigDecimal weightMax;
|
||||
/** legacy migrate source id */
|
||||
/** 历史迁移来源ID */
|
||||
private Long productCountryId;
|
||||
private BigDecimal fvValue;
|
||||
private BigDecimal fvRegistrationFee;
|
||||
private String sizeLimit;
|
||||
private String lastMile;
|
||||
private String leadTime;
|
||||
/** display-only base from PRODUCT type when comparing discounts */
|
||||
/** 比较折扣时仅用于展示的 PRODUCT 类型基价 */
|
||||
private BigDecimal baseFreightPrice;
|
||||
private BigDecimal baseRegistrationFee;
|
||||
private BigDecimal discountValue;
|
||||
@@ -47,7 +47,7 @@ public class PrcPriceSetDetail implements Serializable
|
||||
private Date effectiveDate;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date expireDate;
|
||||
/** 0 not deleted / 1 deleted */
|
||||
/** 0 未删除 / 1 已删除 */
|
||||
public static final String IS_DEL_NO = "0";
|
||||
public static final String IS_DEL_YES = "1";
|
||||
private String isDel;
|
||||
|
||||
@@ -29,12 +29,12 @@ public class PrcPriceSetProduct implements Serializable
|
||||
private Date effectiveTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expireTime;
|
||||
/** 0 draft / 3 pending / 1 effect / 2 expired */
|
||||
/** 0 草稿 / 3 待生效 / 1 生效 / 2 已失效 */
|
||||
private String status;
|
||||
/** legacy migrate source id */
|
||||
/** 历史迁移来源ID */
|
||||
private Long sourceProductId;
|
||||
private String sourceSheet;
|
||||
/** 0 not deleted / 1 deleted */
|
||||
/** 0 未删除 / 1 已删除 */
|
||||
public static final String IS_DEL_NO = "0";
|
||||
public static final String IS_DEL_YES = "1";
|
||||
private String isDel;
|
||||
|
||||
@@ -23,27 +23,27 @@ public class PrcPriceSetVersion extends BaseEntity
|
||||
private Integer versionSeq;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date effectiveTime;
|
||||
/** null = open; set to next version effective_time when that version starts */
|
||||
/** null = 未关闭;当下一版本开始时设置为该版本的 effective_time */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expireTime;
|
||||
/** 0 draft / 3 pending / 1 active / 2 expired */
|
||||
/** 0 草稿 / 3 待生效 / 1 生效 / 2 已失效 */
|
||||
private String status;
|
||||
/**
|
||||
* Create-price mode for this version (column: price_build_mode).
|
||||
* SALES: PULL = product library; IMPORT = Excel + prior version; IMPORT_FRESH = Excel blank.
|
||||
* PRODUCT/REDLINE: IMPORT = copy from effect version; IMPORT_FRESH = rebuild (Excel).
|
||||
* Legacy catalog: COPY → IMPORT, old IMPORT → IMPORT_FRESH (see migrate SQL).
|
||||
* 该版本的建价模式(字段:price_build_mode)。
|
||||
* SALES:PULL = 产品库;IMPORT = Excel + 上一个版本;IMPORT_FRESH = Excel 空白。
|
||||
* PRODUCT/REDLINE:IMPORT = 从生效版本复制;IMPORT_FRESH = 重建(Excel)。
|
||||
* 历史目录:COPY → IMPORT,旧的 IMPORT → IMPORT_FRESH(见迁移 SQL)。
|
||||
*/
|
||||
private String priceBuildMode;
|
||||
/** 0 normal / 1 soft-deleted */
|
||||
/** 0 正常 / 1 软删除 */
|
||||
private String isDel;
|
||||
|
||||
private List<PrcPriceSetDetail> details;
|
||||
private List<PrcPriceSetProduct> products;
|
||||
/** query display: active product rows */
|
||||
/** 查询展示:生效的产品行数 */
|
||||
private Integer productCount;
|
||||
/** query display: active detail rows */
|
||||
/** 查询展示:生效的明细行数 */
|
||||
private Integer detailCount;
|
||||
/** query only: pending / expired / effect */
|
||||
/** 仅查询用:待生效 / 已失效 / 生效 */
|
||||
private String statusGroup;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public class PrcQuoteFee implements Serializable
|
||||
/** bms_fee_type: BASIC_FREIGHT / REGISTRATION_FEE / SURCHARGE */
|
||||
private String feeType;
|
||||
private String feeName;
|
||||
/** prc_surcharge.sc_id, 0 for freight/registration */
|
||||
/** prc_surcharge.sc_id,运费/挂号费为 0 */
|
||||
private Long scId;
|
||||
private BigDecimal amount;
|
||||
private String currency;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class PrcSurcharge extends BaseEntity
|
||||
private String currency;
|
||||
/** 字典 bms_round_mode:UP / DOWN / HALF_UP */
|
||||
private String roundMode;
|
||||
/** on / of */
|
||||
/** 开 / 关 */
|
||||
private String ssCode;
|
||||
/** 0未删除 1已删除 */
|
||||
public static final String IS_DEL_NO = "0";
|
||||
|
||||
@@ -28,10 +28,10 @@ public class PrcSurchargeRel extends BaseEntity
|
||||
|
||||
private Long relId;
|
||||
private Long scId;
|
||||
/** psp_id for PRODUCT/REDLINE/SALES */
|
||||
/** PRODUCT/REDLINE/SALES 时为 psp_id */
|
||||
private Long productId;
|
||||
private String productCode;
|
||||
/** psd_id for PRODUCT/REDLINE/SALES (null=all) */
|
||||
/** PRODUCT/REDLINE/SALES 时为 psd_id(null=全部) */
|
||||
private Long detailId;
|
||||
/** PRODUCT / SALES / REDLINE */
|
||||
private String priceType;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ public class PrcWeightSectionTemplate extends BaseEntity
|
||||
|
||||
private Long wstId;
|
||||
private String wstName;
|
||||
/** on / off */
|
||||
/** 开 / 关 */
|
||||
private String ssCode;
|
||||
private String pgCode;
|
||||
private Long snId;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class PrcZone implements Serializable
|
||||
|
||||
private Long zoneId;
|
||||
private Long regionId;
|
||||
/** ISO2 country code stored on prc_zone */
|
||||
/** 存储在 prc_zone 上的 ISO2 国家代码 */
|
||||
private String countryCode;
|
||||
private String zoneCode;
|
||||
private String zoneName;
|
||||
@@ -23,8 +23,8 @@ public class PrcZone implements Serializable
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/** list display, not a table column */
|
||||
/** 列表展示,非表字段 */
|
||||
private Integer detailCount;
|
||||
/** list display from region */
|
||||
/** 列表展示,来源于 region */
|
||||
private String countryNameCn;
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ public class RedlineCatalogPreviewApplyRequest implements Serializable
|
||||
|
||||
private Long psvId;
|
||||
private List<BmsRedlineProduct> products;
|
||||
/** key = upper-case productCode */
|
||||
/** key = 大写后的 productCode */
|
||||
private Map<String, List<BmsRedlineProductCountry>> detailsByProductCode;
|
||||
|
||||
public Long getPsvId()
|
||||
|
||||
+4
-4
@@ -15,17 +15,17 @@ public class AddIncomeBillFeeRequest implements Serializable
|
||||
@NotBlank(message = "billId required")
|
||||
private String billId;
|
||||
|
||||
/** Surcharge config id (prc_surcharge.sc_id). */
|
||||
/** 附加费配置ID(prc_surcharge.sc_id)。 */
|
||||
@NotNull(message = "scId required")
|
||||
private Long scId;
|
||||
|
||||
/** Dict bms_fee_type; empty = use surcharge.feeType. */
|
||||
/** 字典 bms_fee_type;为空则使用 surcharge.feeType。 */
|
||||
private String feeType;
|
||||
|
||||
/** Empty = calculate from surcharge chargeType. */
|
||||
/** 为空则按附加费的 chargeType 计算。 */
|
||||
private BigDecimal amount;
|
||||
|
||||
/** Default CNY. */
|
||||
/** 默认 CNY。 */
|
||||
private String currency;
|
||||
|
||||
private String remark;
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ public class BatchAddIncomeBillFeePreview implements Serializable
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int matchCount;
|
||||
/** First N rows for UI preview. */
|
||||
/** 供界面预览的前 N 行。 */
|
||||
private List<PrcOrderBill> samples = new ArrayList<PrcOrderBill>();
|
||||
|
||||
public int getMatchCount()
|
||||
|
||||
+12
-12
@@ -15,13 +15,13 @@ public class BatchAddIncomeBillFeeRequest implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ALL = list filters; SELECTED = billIds only. */
|
||||
/** ALL = 列表筛选条件;SELECTED = 仅 billIds。 */
|
||||
private String scopeMode;
|
||||
|
||||
/** Selected bill ids when scopeMode=SELECTED. */
|
||||
/** scopeMode=SELECTED 时选中的账单ID。 */
|
||||
private List<String> billIds;
|
||||
|
||||
/** Same filters as billing list search. */
|
||||
/** 与计费列表搜索相同的筛选条件。 */
|
||||
private List<String> orderNos;
|
||||
private List<String> trackingNos;
|
||||
private List<String> transferNos;
|
||||
@@ -31,33 +31,33 @@ public class BatchAddIncomeBillFeeRequest implements Serializable
|
||||
private List<String> productCodes;
|
||||
private String countryCode;
|
||||
private String creditArrearsStatus;
|
||||
/** Same as list filter order_status IN (...). */
|
||||
/** 与列表筛选 order_status IN (...) 相同。 */
|
||||
private List<Integer> orderStatuses;
|
||||
/** Same as list filter billing_fail_status IN (...). */
|
||||
/** 与列表筛选 billing_fail_status IN (...) 相同。 */
|
||||
private List<Integer> billingFailStatuses;
|
||||
|
||||
/** Billing time range (biz_date), inclusive; format yyyy-MM-dd. */
|
||||
/** 计费时间范围(biz_date),含边界;格式 yyyy-MM-dd。 */
|
||||
private String beginBizDate;
|
||||
private String endBizDate;
|
||||
|
||||
/** Receive/pickup time range (pickup_date), inclusive. */
|
||||
/** 收货/提货时间范围(pickup_date),含边界。 */
|
||||
private String beginPickupDate;
|
||||
private String endPickupDate;
|
||||
|
||||
/** Surcharge config id (prc_surcharge.sc_id). */
|
||||
/** 附加费配置ID(prc_surcharge.sc_id)。 */
|
||||
@NotNull(message = "scId required")
|
||||
private Long scId;
|
||||
|
||||
/** Dict bms_fee_type; empty = use surcharge.feeType. */
|
||||
/** 字典 bms_fee_type;为空则使用 surcharge.feeType。 */
|
||||
private String feeType;
|
||||
|
||||
/**
|
||||
* Fixed amount for every matched bill.
|
||||
* Empty = calculate per bill from surcharge chargeType / weight / freight.
|
||||
* 每个匹配账单的固定金额。
|
||||
* 为空则按附加费的 chargeType / 重量 / 运费逐票计算。
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/** Default CNY. */
|
||||
/** 默认 CNY。 */
|
||||
private String currency;
|
||||
|
||||
private String remark;
|
||||
|
||||
+5
-5
@@ -12,14 +12,14 @@ public class BillingTaskRetryByFilterRequest implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** Customer code (exact match) */
|
||||
/** 客户编码(精确匹配) */
|
||||
private String customerCode;
|
||||
/** Bill time start yyyy-MM-dd */
|
||||
/** 计费时间起 yyyy-MM-dd */
|
||||
private String beginTime;
|
||||
/** Bill time end yyyy-MM-dd */
|
||||
/** 计费时间止 yyyy-MM-dd */
|
||||
private String endTime;
|
||||
/** Optional: FAILED / WAITING / SUCCESS / ALL; default ALL */
|
||||
/** 可选:FAILED / WAITING / SUCCESS / ALL;默认 ALL */
|
||||
private String successStatus;
|
||||
/** Optional batch size; server clamps to 20~200, default 50 */
|
||||
/** 可选批大小;服务端限制在 20~200,默认 50 */
|
||||
private Integer batchSize;
|
||||
}
|
||||
|
||||
+4
-4
@@ -18,13 +18,13 @@ public class BillingTaskSubmitRequest implements Serializable
|
||||
private String transferNo;
|
||||
private String trackingNo;
|
||||
private String orderNo;
|
||||
/** Optional customer code; also filled from Oracle when task runs */
|
||||
/** 可选客户编码;任务执行时也会从 Oracle 补全 */
|
||||
private String customerCode;
|
||||
/** Billing time from mobile; persisted to prc_billing_task.bill_time */
|
||||
/** 移动端传入的计费时间;写入 prc_billing_task.bill_time */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date billTime;
|
||||
/** Optional: PENDING / REBILL / REFUND. Empty = auto PENDING or REBILL. */
|
||||
/** 可选:PENDING / REBILL / REFUND。为空则自动取 PENDING 或 REBILL。 */
|
||||
private String billType;
|
||||
/** Optional body apiCode when header X-Api-Code missing */
|
||||
/** 可选请求体 apiCode,请求头缺少 X-Api-Code 时使用 */
|
||||
private String apiCode;
|
||||
}
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@ public class ChargeWeightTemplateRequest implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** true = fill orderNo/customer from current list filters */
|
||||
/** true = 按当前列表筛选条件填充 orderNo/customer */
|
||||
private boolean fillByFilter;
|
||||
|
||||
private List<String> orderNos;
|
||||
@@ -21,11 +21,11 @@ public class ChargeWeightTemplateRequest implements Serializable
|
||||
private List<String> customerCodes;
|
||||
private List<String> productCodes;
|
||||
private String creditArrearsStatus;
|
||||
/** Same as list filter order_status IN (...). */
|
||||
/** 与列表筛选 order_status IN (...) 相同。 */
|
||||
private List<Integer> orderStatuses;
|
||||
private String beginBizDate;
|
||||
private String endBizDate;
|
||||
/** Receive/pickup time range (pickup_date), inclusive. */
|
||||
/** 收货/提货时间范围(pickup_date),含边界。 */
|
||||
private String beginPickupDate;
|
||||
private String endPickupDate;
|
||||
}
|
||||
|
||||
+5
-5
@@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Order-list billing fail reason popup payload.
|
||||
* 订单列表计费失败原因弹窗数据。
|
||||
*/
|
||||
@Data
|
||||
public class OrderBillFailReasonVo implements Serializable
|
||||
@@ -35,10 +35,10 @@ public class OrderBillFailReasonVo implements Serializable
|
||||
private String setType;
|
||||
private Long psvId;
|
||||
private String versionNo;
|
||||
/** Price-cycle version effective time. */
|
||||
/** 价卡周期的版本生效时间。 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date effectiveTime;
|
||||
/** Price-cycle version expire time; null = open. */
|
||||
/** 价卡周期的版本失效时间;null = 未关闭。 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expireTime;
|
||||
private Long psdId;
|
||||
@@ -60,8 +60,8 @@ public class OrderBillFailReasonVo implements Serializable
|
||||
|
||||
private Integer billingFailStatus;
|
||||
private String billingFailStatusLabel;
|
||||
/** Raw persisted fail text. */
|
||||
/** 原始落库的失败文本。 */
|
||||
private String errorMessage;
|
||||
/** Templated human-readable fail reason. */
|
||||
/** 模板化后的可读失败原因。 */
|
||||
private String failReasonDetail;
|
||||
}
|
||||
|
||||
+4
-4
@@ -13,7 +13,7 @@ public class RecalcBillPriceRequest implements Serializable
|
||||
/** PRODUCT | REDLINE */
|
||||
private String mode;
|
||||
|
||||
/** ALL = filters; SELECTED = billIds. */
|
||||
/** ALL = 筛选条件;SELECTED = billIds。 */
|
||||
private String scopeMode;
|
||||
private List<String> billIds;
|
||||
private List<String> orderNos;
|
||||
@@ -25,13 +25,13 @@ public class RecalcBillPriceRequest implements Serializable
|
||||
private List<String> productCodes;
|
||||
private String countryCode;
|
||||
private String creditArrearsStatus;
|
||||
/** Same as list filter order_status IN (...). */
|
||||
/** 与列表筛选 order_status IN (...) 相同。 */
|
||||
private List<Integer> orderStatuses;
|
||||
/** Same as list filter billing_fail_status IN (...). */
|
||||
/** 与列表筛选 billing_fail_status IN (...) 相同。 */
|
||||
private List<Integer> billingFailStatuses;
|
||||
private String beginBizDate;
|
||||
private String endBizDate;
|
||||
/** Receive/pickup time range (pickup_date), inclusive. */
|
||||
/** 收货/提货时间范围(pickup_date),含边界。 */
|
||||
private String beginPickupDate;
|
||||
private String endPickupDate;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class TabOrderCompareTask implements Serializable
|
||||
* 每项:transferNo / upstreamStatus / localStatus
|
||||
*/
|
||||
private List<Map<String, Object>> statusMismatchSamples = new ArrayList<Map<String, Object>>();
|
||||
/** status-mismatch transfer_no sample (flat, for UI fill) */
|
||||
/** 状态不一致的 transfer_no 样本(扁平结构,便于界面回填) */
|
||||
private List<String> statusMismatchTransferNos = new ArrayList<String>();
|
||||
|
||||
public String getTaskId() { return taskId; }
|
||||
|
||||
@@ -18,7 +18,7 @@ public class TabOrderExportTask implements Serializable
|
||||
private String message;
|
||||
private String error;
|
||||
private String fileName;
|
||||
/** Relative path under download root. */
|
||||
/** 下载根目录下的相对路径。 */
|
||||
private String storageKey;
|
||||
private int rowCount;
|
||||
|
||||
|
||||
@@ -50,6 +50,6 @@ public class TabOrderMonitorQuery implements Serializable
|
||||
private Integer blPickup;
|
||||
/** 分批同步计费每批条数 */
|
||||
private Integer batchSize;
|
||||
/** Excel export field names (Java props; export only). */
|
||||
/** Excel 导出字段名(Java 属性名;仅导出用)。 */
|
||||
private List<String> exportFields;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class TmsPriceBillRequest extends TmsPriceQuoteRequest
|
||||
private String orderNo;
|
||||
|
||||
private String trackingNo;
|
||||
/** transfer order no */
|
||||
/** 转单号 */
|
||||
private String transferNo;
|
||||
/** 所属销售员 */
|
||||
private String belongSaler;
|
||||
@@ -36,11 +36,11 @@ public class TmsPriceBillRequest extends TmsPriceQuoteRequest
|
||||
/** 客服员编码 */
|
||||
private String serviceManCode;
|
||||
private String customerName;
|
||||
/** From upstream LINE_NAME (fallback PRODUCT_NAME). */
|
||||
/** 来自上游 LINE_NAME(无则取 PRODUCT_NAME)。 */
|
||||
private String productName;
|
||||
private Integer pieces;
|
||||
private BigDecimal actualWeight;
|
||||
/** Upstream TAB_ORDER.WEIGHT (receive weight) */
|
||||
/** 上游 TAB_ORDER.WEIGHT(收货重量) */
|
||||
private BigDecimal receiveWeight;
|
||||
private BigDecimal volume;
|
||||
private BigDecimal volumeWeight;
|
||||
@@ -52,11 +52,11 @@ public class TmsPriceBillRequest extends TmsPriceQuoteRequest
|
||||
private String warehouseCode;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date orderTime;
|
||||
/** Upstream TAB_ORDER.ORDER_STATUS */
|
||||
/** 上游 TAB_ORDER.ORDER_STATUS */
|
||||
private Integer orderStatus;
|
||||
/** Upstream TAB_ORDER.BL_PICKUP 0/1 */
|
||||
/** 上游 TAB_ORDER.BL_PICKUP 0/1 */
|
||||
private Integer blPickup;
|
||||
/** Upstream TAB_ORDER.PICKUP_DATE */
|
||||
/** 上游 TAB_ORDER.PICKUP_DATE */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pickupDate;
|
||||
private String orderRemark;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class TmsPriceQuoteFeeLine implements Serializable
|
||||
private String feeId;
|
||||
private String feeType;
|
||||
private String feeName;
|
||||
/** surcharge config id, 0 for freight/registration */
|
||||
/** 附加费配置ID,运费/挂号费为 0 */
|
||||
private Long scId;
|
||||
private BigDecimal amount;
|
||||
/** 产品价(目录价分摊) */
|
||||
@@ -25,6 +25,6 @@ public class TmsPriceQuoteFeeLine implements Serializable
|
||||
private String remark;
|
||||
/** UNBILLED / BILLED */
|
||||
private String arBillStatus;
|
||||
/** 0=system 1=manual */
|
||||
/** 0=系统 1=人工 */
|
||||
private String manualFlag;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public class TmsPriceQuoteRequest implements Serializable
|
||||
|
||||
private Long customerId;
|
||||
|
||||
/** Required. Maps to ctr_customer.customer_code; used in quote unique key. */
|
||||
/** 必填。对应 ctr_customer.customer_code;参与报价唯一键。 */
|
||||
@NotBlank(message = "customerCode is required")
|
||||
private String customerCode;
|
||||
|
||||
@@ -26,20 +26,20 @@ public class TmsPriceQuoteRequest implements Serializable
|
||||
*/
|
||||
private String channelId;
|
||||
|
||||
/** ISO2; countryName alternative */
|
||||
/** ISO2;作为 countryName 的替代 */
|
||||
private String countryCode;
|
||||
/** country display name; countryCode alternative */
|
||||
/** 国家显示名称;作为 countryCode 的替代 */
|
||||
private String countryName;
|
||||
|
||||
/** Dest postcode; required when product-country has zones */
|
||||
/** 目的邮编;产品国家配置了分区时必填 */
|
||||
private String destPostcode;
|
||||
|
||||
@NotNull(message = "weight is required")
|
||||
private BigDecimal weight;
|
||||
|
||||
/** yyyy-MM-dd or yyyy-MM-dd HH:mm:ss; quote defaults today; bill required */
|
||||
/** yyyy-MM-dd 或 yyyy-MM-dd HH:mm:ss;试算默认当天;计费必填 */
|
||||
private String bizDate;
|
||||
private Integer tmsId;
|
||||
/** Header X-Api-Code first; body as fallback */
|
||||
/** 优先取请求头 X-Api-Code;否则取请求体 */
|
||||
private String apiCode;
|
||||
}
|
||||
|
||||
+15
-15
@@ -25,11 +25,11 @@ public class TmsPriceQuoteResult implements Serializable
|
||||
private String setType;
|
||||
private Integer bindPriority;
|
||||
private Long customerPricesetId;
|
||||
/** Hit package version id (prc_price_set_version.psv_id) */
|
||||
/** 命中的套餐版本ID(prc_price_set_version.psv_id) */
|
||||
private Long psvId;
|
||||
/** Hit package version no (e.g. V1) */
|
||||
/** 命中的套餐版本号(例如 V1) */
|
||||
private String versionNo;
|
||||
/** Hit package detail id when package version detail matched */
|
||||
/** 套餐版本明细命中时,命中的套餐明细ID */
|
||||
private Long psdId;
|
||||
|
||||
private String productCode;
|
||||
@@ -56,19 +56,19 @@ public class TmsPriceQuoteResult implements Serializable
|
||||
private BigDecimal freightAmount;
|
||||
/** 附加费合计(按产品关联命中后汇总) */
|
||||
private BigDecimal surchargeAmount;
|
||||
/** product catalog total: base freight*weight + base registration (no package surcharge) */
|
||||
/** 产品价合计:基础运费*重量 + 基础挂号费(不含套餐附加费) */
|
||||
private BigDecimal productAmount;
|
||||
/** redline total from redline_product_country (+ REDLINE surcharges) */
|
||||
/** 红线价合计,来自 redline_product_country(含 REDLINE 附加费) */
|
||||
private BigDecimal redlineAmount;
|
||||
/** matched redline_product_country.detail_id for REDLINE surcharge scope */
|
||||
/** 命中的 redline_product_country.detail_id,用于 REDLINE 附加费范围 */
|
||||
private Long redlineCountryId;
|
||||
/** cost total (currently = product catalog amount) */
|
||||
/** 成本合计(当前 = 产品价合计) */
|
||||
private BigDecimal costAmount;
|
||||
/** receivable total (order bill) */
|
||||
/** 应收合计(订单账单) */
|
||||
private BigDecimal incomeTotal;
|
||||
/** payable total (order bill); also quote payable */
|
||||
/** 应付合计(订单账单);也是报价应付 */
|
||||
private BigDecimal payTotal;
|
||||
/** quote / legacy field; same as incomeTotal for bill sync */
|
||||
/** 报价 / 历史字段;账单同步时与 incomeTotal 相同 */
|
||||
private BigDecimal payableTotal;
|
||||
private String currency = "CNY";
|
||||
/** UP / DOWN / HALF_UP */
|
||||
@@ -81,7 +81,7 @@ public class TmsPriceQuoteResult implements Serializable
|
||||
private String billId;
|
||||
private String orderNo;
|
||||
private String trackingNo;
|
||||
/** transfer order no */
|
||||
/** 转单号 */
|
||||
private String transferNo;
|
||||
/** 所属销售员 */
|
||||
private String belongSaler;
|
||||
@@ -103,11 +103,11 @@ public class TmsPriceQuoteResult implements Serializable
|
||||
private String creditArrearsStatus;
|
||||
/** NONE / REFUNDED */
|
||||
private String refundStatus;
|
||||
/** Billing fail: 0 ok (income bill+fee); 1/2/3 sales; 23/24/25 catalog */
|
||||
/** 计费失败:0 正常(写入应收账单+费用);1/2/3 销售价;23/24/25 产品价 */
|
||||
private Integer billingFailStatus;
|
||||
private Integer pieces;
|
||||
private BigDecimal actualWeight;
|
||||
/** Receive weight from upstream TAB_ORDER.WEIGHT */
|
||||
/** 收货重量,来自上游 TAB_ORDER.WEIGHT */
|
||||
private BigDecimal receiveWeight;
|
||||
private BigDecimal volume;
|
||||
private BigDecimal volumeWeight;
|
||||
@@ -120,10 +120,10 @@ public class TmsPriceQuoteResult implements Serializable
|
||||
private String warehouseCode;
|
||||
private Date orderTime;
|
||||
private String orderRemark;
|
||||
/** true=hit stored quote */
|
||||
/** true=命中已存报价 */
|
||||
private Boolean fromCache;
|
||||
/** 计费请求 JSON(当次响应/日志用,不落库) */
|
||||
private String requestJson;
|
||||
/** original billing response JSON from Elasticsearch */
|
||||
/** 来自 Elasticsearch 的原始计费响应 JSON */
|
||||
private String responseJson;
|
||||
}
|
||||
|
||||
+2
-2
@@ -14,10 +14,10 @@ public class UpdateIncomeBillFeeRequest implements Serializable
|
||||
@NotBlank(message = "feeId required")
|
||||
private String feeId;
|
||||
|
||||
/** Optional: change surcharge config. */
|
||||
/** 可选:更换附加费配置。 */
|
||||
private Long scId;
|
||||
|
||||
/** Dict bms_fee_type. */
|
||||
/** 字典 bms_fee_type。 */
|
||||
private String feeType;
|
||||
|
||||
private BigDecimal amount;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.bms.price.enums;
|
||||
|
||||
/**
|
||||
* prc_order_bill.billing_fail_status numeric codes.
|
||||
* 0 success;
|
||||
* 1/2/3 sales-price (package) miss: product / country / weight;
|
||||
* 23/24/25 product-catalog price miss: product / country / weight;
|
||||
* 4+ map to prc_billing_task.fail_code.
|
||||
* 26 not billed yet (order-source sync only).
|
||||
* Income bill + fee rows: only status 0.
|
||||
* prc_order_bill.billing_fail_status 数字编码。
|
||||
* 0 成功;
|
||||
* 1/2/3 销售价(套餐)未命中:产品 / 国家 / 重量段;
|
||||
* 23/24/25 产品价(目录)未命中:产品 / 国家 / 重量段;
|
||||
* 4 及以上对应 prc_billing_task.fail_code。
|
||||
* 26 尚未计费(仅订单数源同步使用)。
|
||||
* 应收账单 + 费用行:仅状态 0 才写入。
|
||||
*/
|
||||
public enum BillBillingFailStatus
|
||||
{
|
||||
@@ -34,13 +34,13 @@ public enum BillBillingFailStatus
|
||||
CUSTOMER_DISABLED(20),
|
||||
FREIGHT_MISSING(21),
|
||||
UNKNOWN(22),
|
||||
/** Product catalog (产品价) miss: no product rows. */
|
||||
/** 产品价(目录)未命中:没有产品行。 */
|
||||
CATALOG_PRODUCT(23),
|
||||
/** Product catalog miss: product hit but country/zone miss. */
|
||||
/** 产品价未命中:产品命中但国家/分区未命中。 */
|
||||
CATALOG_COUNTRY(24),
|
||||
/** Product catalog miss: product+country hit but weight band miss. */
|
||||
/** 产品价未命中:产品+国家命中但重量段未命中。 */
|
||||
CATALOG_WEIGHT(25),
|
||||
/** Order landed from upstream but not billed yet. */
|
||||
/** 订单已从上游落地但尚未计费。 */
|
||||
NOT_BILLED(26);
|
||||
|
||||
private final int code;
|
||||
@@ -86,7 +86,7 @@ public enum BillBillingFailStatus
|
||||
return code != null && code.intValue() == NOT_BILLED.code;
|
||||
}
|
||||
|
||||
/** Only success (0) persists prc_income_bill. */
|
||||
/** 仅成功(0)才写入 prc_income_bill。 */
|
||||
public static boolean storesIncomeBill(Integer code)
|
||||
{
|
||||
return code == null || code.intValue() == SUCCESS.code;
|
||||
|
||||
@@ -7,9 +7,9 @@ package com.bms.price.enums;
|
||||
*/
|
||||
public enum BillOrderStatus
|
||||
{
|
||||
/** Upstream: returned package; also set after billing-list fee refund. */
|
||||
/** 上游:包裹退回;账单列表费用退款后也会置为此状态。 */
|
||||
REFUNDED(9),
|
||||
/** Upstream: cancelled / deleted. */
|
||||
/** 上游:已取消 / 已删除。 */
|
||||
CANCELLED(10);
|
||||
|
||||
private final int code;
|
||||
@@ -34,7 +34,7 @@ public enum BillOrderStatus
|
||||
return status != null && status.intValue() == code;
|
||||
}
|
||||
|
||||
/** Upstream ORDER_STATUS 9/10 -> fee refund path. */
|
||||
/** 上游 ORDER_STATUS 9/10 -> 走费用退款流程。 */
|
||||
public static boolean requiresFeeRefund(Integer status)
|
||||
{
|
||||
return REFUNDED.matches(status) || CANCELLED.matches(status);
|
||||
|
||||
@@ -12,17 +12,17 @@ public enum BillTaskFailCode
|
||||
NO_ACTIVE_PACKAGE_VERSION("NO_ACTIVE_PACKAGE_VERSION"),
|
||||
ALREADY_IN_AR_BILL("ALREADY_IN_AR_BILL"),
|
||||
PRODUCT_ARCHIVE_MISSING("PRODUCT_ARCHIVE_MISSING"),
|
||||
/** Soft-fail: sales price (package) product miss. */
|
||||
/** 软失败:销售价(套餐)产品未命中。 */
|
||||
PRODUCT_NOT_HIT("PRODUCT_NOT_HIT"),
|
||||
/** Soft-fail: sales price country/zone miss. */
|
||||
/** 软失败:销售价国家/分区未命中。 */
|
||||
COUNTRY_NOT_HIT("COUNTRY_NOT_HIT"),
|
||||
/** Soft-fail: sales price weight band miss. */
|
||||
/** 软失败:销售价重量段未命中。 */
|
||||
WEIGHT_NOT_HIT("WEIGHT_NOT_HIT"),
|
||||
/** Soft-fail: product catalog (产品价) product miss. */
|
||||
/** 软失败:产品价(目录)产品未命中。 */
|
||||
CATALOG_PRODUCT_NOT_HIT("CATALOG_PRODUCT_NOT_HIT"),
|
||||
/** Soft-fail: product catalog country/zone miss. */
|
||||
/** 软失败:产品价国家/分区未命中。 */
|
||||
CATALOG_COUNTRY_NOT_HIT("CATALOG_COUNTRY_NOT_HIT"),
|
||||
/** Soft-fail: product catalog weight band miss. */
|
||||
/** 软失败:产品价重量段未命中。 */
|
||||
CATALOG_WEIGHT_NOT_HIT("CATALOG_WEIGHT_NOT_HIT"),
|
||||
PRICE_NOT_HIT("PRICE_NOT_HIT"),
|
||||
ZONE_PRICE_NOT_HIT("ZONE_PRICE_NOT_HIT"),
|
||||
@@ -53,7 +53,7 @@ public enum BillTaskFailCode
|
||||
}
|
||||
|
||||
/**
|
||||
* Map free-text error message to a stable fail code for search.
|
||||
* 把自由文本错误信息映射为可用于查询的稳定失败码。
|
||||
*/
|
||||
public static String resolveCode(String errorMessage)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ public enum BillTaskFailCode
|
||||
{
|
||||
return PRODUCT_ARCHIVE_MISSING.code;
|
||||
}
|
||||
// Soft-fail: product catalog before sales (more specific Chinese prefix)
|
||||
// 软失败:产品价先于销售价判断(中文前缀更具体)
|
||||
if (containsAny(msg, "产品价未匹配重量段", "CATALOG_WEIGHT_NOT_HIT", "billingFail.catalogWeight"))
|
||||
{
|
||||
return CATALOG_WEIGHT_NOT_HIT.code;
|
||||
@@ -91,7 +91,7 @@ public enum BillTaskFailCode
|
||||
{
|
||||
return CATALOG_PRODUCT_NOT_HIT.code;
|
||||
}
|
||||
// Soft-fail sales price (order matters: weight/country before generic product)
|
||||
// 软失败:销售价(顺序重要:重量段/国家先于笼统的产品)
|
||||
if (containsAny(msg, "销售价未匹配重量段", "未匹配重量段", "WEIGHT_NOT_HIT", "billingFail.weight"))
|
||||
{
|
||||
return WEIGHT_NOT_HIT.code;
|
||||
|
||||
@@ -3,11 +3,11 @@ package com.bms.price.enums;
|
||||
/** 计费任务类型,对应 prc_billing_task.bill_type */
|
||||
public enum BillTaskType
|
||||
{
|
||||
/** first-time billing */
|
||||
/** 首次计费 */
|
||||
PENDING("PENDING"),
|
||||
/** same transfer/order already billed */
|
||||
/** 同一转单/订单已计费过 */
|
||||
REBILL("REBILL"),
|
||||
/** refund */
|
||||
/** 退款 */
|
||||
REFUND("REFUND");
|
||||
|
||||
private final String code;
|
||||
|
||||
+27
-27
@@ -22,36 +22,36 @@ public interface BmsProductCountryMapper
|
||||
/** 按明细行主键更新可编辑字段(重量段/运费/挂号费/尺寸/尾程/时效/生效失效日期) */
|
||||
public int updateBmsProductCountry(BmsProductCountry country);
|
||||
|
||||
/** Import overlay: update price/zone/attrs on matched country row */
|
||||
/** 导入覆盖:更新命中国家行的价格/分区/属性 */
|
||||
public int updateBmsProductCountryImport(BmsProductCountry country);
|
||||
|
||||
/** Soft delete by product_id */
|
||||
/** 按 product_id 逻辑删除 */
|
||||
public int deleteByProductId(Long productId);
|
||||
|
||||
/** Soft delete by product_code */
|
||||
/** 按 product_code 逻辑删除 */
|
||||
public int deleteByProductCode(String productCode);
|
||||
|
||||
/** Soft delete by product_code + effective_date */
|
||||
/** 按 product_code + effective_date 逻辑删除 */
|
||||
public int deleteByProductCodeAndEffectiveDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("effectiveDate") Date effectiveDate);
|
||||
|
||||
/** Max open (expire_date is null) effective_date for product */
|
||||
/** 该产品最大的未结束(expire_date 为空)生效日期 */
|
||||
public Date selectMaxOpenEffectiveDate(@Param("productCode") String productCode);
|
||||
|
||||
/** Close open versions: set expire_date = newEffectiveDate where effective_date < newEffectiveDate */
|
||||
/** 结束未关闭版本:把 effective_date < newEffectiveDate 的行 expire_date 置为 newEffectiveDate */
|
||||
public int expireOpenByProductCode(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("newEffectiveDate") Date newEffectiveDate);
|
||||
|
||||
/** After deleting a pending version: reopen country rows closed at that effective date */
|
||||
/** 删除待生效版本后:恢复在该生效日期被关闭的国家行 */
|
||||
public int reopenExpiredByProductCodeAndExpireDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("expireDate") Date expireDate);
|
||||
|
||||
/**
|
||||
* Close open rows for one product + country where effective_date < newEffectiveDate.
|
||||
* Match by country_code when present, otherwise country_name.
|
||||
* 关闭某产品 + 国家下 effective_date < newEffectiveDate 的未关闭行。
|
||||
* 有 country_code 时按它匹配,否则按 country_name 匹配。
|
||||
*/
|
||||
public int expireOpenByProductCodeAndCountry(
|
||||
@Param("productCode") String productCode,
|
||||
@@ -59,26 +59,26 @@ public interface BmsProductCountryMapper
|
||||
@Param("countryName") String countryName,
|
||||
@Param("newEffectiveDate") Date newEffectiveDate);
|
||||
|
||||
/** Recompute status from effective_date / expire_date vs today */
|
||||
/** 按 effective_date / expire_date 与今天重新计算状态 */
|
||||
public int refreshStatusByDates();
|
||||
|
||||
/** Replace same-day version only */
|
||||
/** 仅替换同一生效日期的版本 */
|
||||
public int deleteOpenByProductCodeAndEffectiveDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("effectiveDate") Date effectiveDate);
|
||||
|
||||
/** Hard-delete all detail rows of one product (psp_id). */
|
||||
/** 物理删除某产品的全部明细行(psp_id)。 */
|
||||
public int physicalDeleteByPspId(@Param("productId") Long productId);
|
||||
|
||||
/** Hard-delete detail rows of one product + country (psp_id scope). */
|
||||
/** 物理删除某产品 + 国家的明细行(psp_id 范围)。 */
|
||||
public int physicalDeleteByPspIdAndCountry(
|
||||
@Param("productId") Long productId,
|
||||
@Param("countryCode") String countryCode,
|
||||
@Param("countryName") String countryName);
|
||||
|
||||
/**
|
||||
* Hard-delete draft/pending detail rows for one product + country (same-version replace).
|
||||
* Only versions with status draft(0) or pending(3) are affected.
|
||||
* 物理删除某产品 + 国家的草稿/待生效明细行(同版本替换)。
|
||||
* 只影响状态为草稿(0)或待生效(3)的版本。
|
||||
*/
|
||||
public int deleteOpenByProductCodeAndCountryOnDate(
|
||||
@Param("productCode") String productCode,
|
||||
@@ -86,17 +86,17 @@ public interface BmsProductCountryMapper
|
||||
@Param("countryName") String countryName,
|
||||
@Param("effectiveDate") Date effectiveDate);
|
||||
|
||||
/** Hard-delete surcharge_rel rows linked to draft/pending details for product+country. */
|
||||
/** 物理删除产品+国家草稿/待生效明细关联的 surcharge_rel 行。 */
|
||||
public int deleteSurchargeRelByProductCodeAndCountryOnDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("countryCode") String countryCode,
|
||||
@Param("countryName") String countryName,
|
||||
@Param("effectiveDate") Date effectiveDate);
|
||||
|
||||
/** Open country rows (expire_date is null) for product */
|
||||
/** 该产品未结束(expire_date 为空)的国家行 */
|
||||
public List<BmsProductCountry> selectOpenByProductCode(@Param("productCode") String productCode);
|
||||
|
||||
/** Copy previously open rows into a new effective_date (caller must expire first) */
|
||||
/** 把之前未结束的行复制到新的生效日期(调用方需先结束旧版本) */
|
||||
public int copyOpenCountries(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("productId") Long productId,
|
||||
@@ -104,9 +104,9 @@ public interface BmsProductCountryMapper
|
||||
@Param("status") String status);
|
||||
|
||||
/**
|
||||
* Match by product + country + weight + bizDate (+ optional zoneCode).
|
||||
* When zoneCode is empty, prefer rows without zone.
|
||||
* When zoneCode is set, require matching zone_code.
|
||||
* 按产品 + 国家 + 重量 + 业务日期(+ 可选 zoneCode)匹配。
|
||||
* zoneCode 为空时优先取无分区的行。
|
||||
* zoneCode 有值时要求 zone_code 一致。
|
||||
*/
|
||||
public BmsProductCountry selectMatchByProductCountryWeight(
|
||||
@Param("productCode") String productCode,
|
||||
@@ -117,8 +117,8 @@ public interface BmsProductCountryMapper
|
||||
@Param("bizDate") Date bizDate);
|
||||
|
||||
/**
|
||||
* Lowest PRODUCT catalog weight band for product/country/zone (ignore weight).
|
||||
* Used when charge weight is below the minimum band.
|
||||
* 产品/国家/分区下最低的 PRODUCT 目录重量段(忽略重量)。
|
||||
* 用于计费重量低于最小重量段时。
|
||||
*/
|
||||
public BmsProductCountry selectMinBandByProductCountry(
|
||||
@Param("productCode") String productCode,
|
||||
@@ -127,21 +127,21 @@ public interface BmsProductCountryMapper
|
||||
@Param("zoneCode") String zoneCode,
|
||||
@Param("bizDate") Date bizDate);
|
||||
|
||||
/** Count product-country rows that have a zone for this product+country+bizDate */
|
||||
/** 统计该产品+国家+业务日期下带分区的产品国家行数 */
|
||||
public int countZonedByProductCountry(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("countryCode") String countryCode,
|
||||
@Param("countryName") String countryName,
|
||||
@Param("bizDate") Date bizDate);
|
||||
|
||||
/** Count catalog rows by product (+ bizDate window), ignore country/zone/weight. */
|
||||
/** 按产品(+ 业务日期区间)统计目录行数,忽略国家/分区/重量。 */
|
||||
public int countByProduct(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("bizDate") Date bizDate);
|
||||
|
||||
/**
|
||||
* Count catalog rows by product + country + zone (+ bizDate), ignore weight.
|
||||
* Used to diagnose country miss vs weight miss.
|
||||
* 按产品 + 国家 + 分区(+ 业务日期)统计目录行数,忽略重量。
|
||||
* 用于区分是国家未命中还是重量未命中。
|
||||
*/
|
||||
public int countByProductCountryZone(
|
||||
@Param("productCode") String productCode,
|
||||
|
||||
@@ -14,43 +14,43 @@ public interface BmsProductMapper
|
||||
{
|
||||
public BmsProduct selectBmsProductById(Long productId);
|
||||
|
||||
/** Latest row by product_code (effective_date desc) */
|
||||
/** 按 product_code 取最新行(effective_date 倒序) */
|
||||
public BmsProduct selectBmsProductByCode(String productCode);
|
||||
|
||||
/** Unique business key: product_code + effective_date */
|
||||
/** 唯一业务键:product_code + effective_date */
|
||||
public BmsProduct selectBmsProductByCodeAndDate(@Param("productCode") String productCode,
|
||||
@Param("effectiveDate") Date effectiveDate);
|
||||
|
||||
/** Product row in a specific version */
|
||||
/** 指定版本中的产品行 */
|
||||
public BmsProduct selectByCodeAndPsvId(@Param("productCode") String productCode, @Param("psvId") Long psvId);
|
||||
|
||||
/** Product version effective on bizDate */
|
||||
/** 业务日期生效的产品版本 */
|
||||
public BmsProduct selectEffectiveBmsProductByCode(@Param("productCode") String productCode,
|
||||
@Param("bizDate") Date bizDate);
|
||||
|
||||
public List<BmsProduct> selectBmsProductList(BmsProduct product);
|
||||
|
||||
/** Dropdown options: slim columns, no country/surcharge count subqueries */
|
||||
/** 下拉选项:仅精简列,不含国家/附加费计数子查询 */
|
||||
public List<BmsProduct> selectBmsProductOptions(BmsProduct product);
|
||||
|
||||
public int insertBmsProduct(BmsProduct product);
|
||||
|
||||
public int updateBmsProduct(BmsProduct product);
|
||||
|
||||
/** Soft delete: set del_flag = 2 */
|
||||
/** 逻辑删除:del_flag 置为 2 */
|
||||
public int deleteBmsProductByIds(Long[] productIds);
|
||||
|
||||
/** Close previous open versions: expire_date = newEffectiveDate */
|
||||
/** 结束之前的未关闭版本:expire_date 置为 newEffectiveDate */
|
||||
public int expireOpenByProductCode(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("newEffectiveDate") Date newEffectiveDate,
|
||||
@Param("excludeId") Long excludeId);
|
||||
|
||||
/** After deleting a pending version: reopen rows closed at that effective date */
|
||||
/** 删除待生效版本后:恢复在该生效日期被关闭的行 */
|
||||
public int reopenExpiredByProductCodeAndExpireDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("expireDate") Date expireDate);
|
||||
|
||||
/** Recompute status from effective_date / expire_date vs today */
|
||||
/** 按 effective_date / expire_date 与今天重新计算状态 */
|
||||
public int refreshStatusByDates();
|
||||
}
|
||||
|
||||
+19
-19
@@ -22,7 +22,7 @@ public interface BmsRedlineProductCountryMapper
|
||||
/** 按明细行主键更新可编辑字段(重量段/运费/挂号费/尺寸/尾程/时效/生效失效日期) */
|
||||
public int updateBmsRedlineProductCountry(BmsRedlineProductCountry country);
|
||||
|
||||
/** Import overlay: update price/zone/attrs on matched country row */
|
||||
/** 导入覆盖:更新命中国家行的价格/分区/属性 */
|
||||
public int updateBmsRedlineProductCountryImport(BmsRedlineProductCountry country);
|
||||
|
||||
public int deleteByProductId(Long productId);
|
||||
@@ -33,22 +33,22 @@ public interface BmsRedlineProductCountryMapper
|
||||
@Param("productCode") String productCode,
|
||||
@Param("effectiveDate") Date effectiveDate);
|
||||
|
||||
/** Max open (expire_date is null) effective_date for product */
|
||||
/** 该产品最大的未结束(expire_date 为空)生效日期 */
|
||||
public Date selectMaxOpenEffectiveDate(@Param("productCode") String productCode);
|
||||
|
||||
/** Close open versions: set expire_date = newEffectiveDate where effective_date < newEffectiveDate */
|
||||
/** 结束未关闭版本:把 effective_date < newEffectiveDate 的行 expire_date 置为 newEffectiveDate */
|
||||
public int expireOpenByProductCode(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("newEffectiveDate") Date newEffectiveDate);
|
||||
|
||||
/** After deleting a pending version: reopen rows closed at that effective date */
|
||||
/** 删除待生效版本后:恢复在该生效日期被关闭的行 */
|
||||
public int reopenExpiredByProductCodeAndExpireDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("expireDate") Date expireDate);
|
||||
|
||||
/**
|
||||
* Close open rows for one product + country where effective_date < newEffectiveDate.
|
||||
* Match by country_code when present, otherwise country_name.
|
||||
* 关闭某产品 + 国家下 effective_date < newEffectiveDate 的未关闭行。
|
||||
* 有 country_code 时按它匹配,否则按 country_name 匹配。
|
||||
*/
|
||||
public int expireOpenByProductCodeAndCountry(
|
||||
@Param("productCode") String productCode,
|
||||
@@ -56,26 +56,26 @@ public interface BmsRedlineProductCountryMapper
|
||||
@Param("countryName") String countryName,
|
||||
@Param("newEffectiveDate") Date newEffectiveDate);
|
||||
|
||||
/** Recompute status from effective_date / expire_date vs today */
|
||||
/** 按 effective_date / expire_date 与今天重新计算状态 */
|
||||
public int refreshStatusByDates();
|
||||
|
||||
/** Replace same-day version only */
|
||||
/** 仅替换同一生效日期的版本 */
|
||||
public int deleteOpenByProductCodeAndEffectiveDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("effectiveDate") Date effectiveDate);
|
||||
|
||||
/** Hard-delete all detail rows of one product (psp_id). */
|
||||
/** 物理删除某产品的全部明细行(psp_id)。 */
|
||||
public int physicalDeleteByPspId(@Param("productId") Long productId);
|
||||
|
||||
/** Hard-delete detail rows of one product + country (psp_id scope). */
|
||||
/** 物理删除某产品 + 国家的明细行(psp_id 范围)。 */
|
||||
public int physicalDeleteByPspIdAndCountry(
|
||||
@Param("productId") Long productId,
|
||||
@Param("countryCode") String countryCode,
|
||||
@Param("countryName") String countryName);
|
||||
|
||||
/**
|
||||
* Hard-delete draft/pending detail rows for one product + country (same-version replace).
|
||||
* Only versions with status draft(0) or pending(3) are affected.
|
||||
* 物理删除某产品 + 国家的草稿/待生效明细行(同版本替换)。
|
||||
* 只影响状态为草稿(0)或待生效(3)的版本。
|
||||
*/
|
||||
public int deleteOpenByProductCodeAndCountryOnDate(
|
||||
@Param("productCode") String productCode,
|
||||
@@ -83,17 +83,17 @@ public interface BmsRedlineProductCountryMapper
|
||||
@Param("countryName") String countryName,
|
||||
@Param("effectiveDate") Date effectiveDate);
|
||||
|
||||
/** Hard-delete surcharge_rel rows linked to draft/pending details for product+country. */
|
||||
/** 物理删除产品+国家草稿/待生效明细关联的 surcharge_rel 行。 */
|
||||
public int deleteSurchargeRelByProductCodeAndCountryOnDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("countryCode") String countryCode,
|
||||
@Param("countryName") String countryName,
|
||||
@Param("effectiveDate") Date effectiveDate);
|
||||
|
||||
/** Open country rows (expire_date is null) for product */
|
||||
/** 该产品未结束(expire_date 为空)的国家行 */
|
||||
public List<BmsRedlineProductCountry> selectOpenByProductCode(@Param("productCode") String productCode);
|
||||
|
||||
/** Copy previously open rows into a new effective_date (caller must expire first) */
|
||||
/** 把之前未结束的行复制到新的生效日期(调用方需先结束旧版本) */
|
||||
public int copyOpenCountries(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("productId") Long productId,
|
||||
@@ -101,9 +101,9 @@ public interface BmsRedlineProductCountryMapper
|
||||
@Param("status") String status);
|
||||
|
||||
/**
|
||||
* Match by product + country + weight + bizDate (+ optional zoneCode).
|
||||
* When zoneCode is empty, prefer rows without zone.
|
||||
* When zoneCode is set, require matching zone_code.
|
||||
* 按产品 + 国家 + 重量 + 业务日期(+ 可选 zoneCode)匹配。
|
||||
* zoneCode 为空时优先取无分区的行。
|
||||
* zoneCode 有值时要求 zone_code 一致。
|
||||
*/
|
||||
public BmsRedlineProductCountry selectMatchByProductCountryWeight(
|
||||
@Param("productCode") String productCode,
|
||||
@@ -113,7 +113,7 @@ public interface BmsRedlineProductCountryMapper
|
||||
@Param("weight") BigDecimal weight,
|
||||
@Param("bizDate") Date bizDate);
|
||||
|
||||
/** Count product-country rows that have a zone for this product+country+bizDate */
|
||||
/** 统计该产品+国家+业务日期下带分区的产品国家行数 */
|
||||
public int countZonedByProductCountry(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("countryCode") String countryCode,
|
||||
|
||||
@@ -14,17 +14,17 @@ public interface BmsRedlineProductMapper
|
||||
{
|
||||
public BmsRedlineProduct selectBmsRedlineProductById(Long productId);
|
||||
|
||||
/** Latest row by product_code (effective_date desc) */
|
||||
/** 按 product_code 取最新行(effective_date 倒序) */
|
||||
public BmsRedlineProduct selectBmsRedlineProductByCode(String productCode);
|
||||
|
||||
/** Unique business key: product_code + effective_date */
|
||||
/** 唯一业务键:product_code + effective_date */
|
||||
public BmsRedlineProduct selectBmsRedlineProductByCodeAndDate(@Param("productCode") String productCode,
|
||||
@Param("effectiveDate") Date effectiveDate);
|
||||
|
||||
/** Product row in a specific version */
|
||||
/** 指定版本中的产品行 */
|
||||
public BmsRedlineProduct selectByCodeAndPsvId(@Param("productCode") String productCode, @Param("psvId") Long psvId);
|
||||
|
||||
/** Product version effective on bizDate */
|
||||
/** 业务日期生效的产品版本 */
|
||||
public BmsRedlineProduct selectEffectiveBmsRedlineProductByCode(@Param("productCode") String productCode,
|
||||
@Param("bizDate") Date bizDate);
|
||||
|
||||
@@ -36,17 +36,17 @@ public interface BmsRedlineProductMapper
|
||||
|
||||
public int deleteBmsRedlineProductByIds(Long[] productIds);
|
||||
|
||||
/** Close previous open versions: expire_date = newEffectiveDate */
|
||||
/** 结束之前的未关闭版本:expire_date 置为 newEffectiveDate */
|
||||
public int expireOpenByProductCode(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("newEffectiveDate") Date newEffectiveDate,
|
||||
@Param("excludeId") Long excludeId);
|
||||
|
||||
/** After deleting a pending version: reopen rows closed at that effective date */
|
||||
/** 删除待生效版本后:恢复在该生效日期被关闭的行 */
|
||||
public int reopenExpiredByProductCodeAndExpireDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("expireDate") Date expireDate);
|
||||
|
||||
/** Recompute status from effective_date / expire_date vs today */
|
||||
/** 按 effective_date / expire_date 与今天重新计算状态 */
|
||||
public int refreshStatusByDates();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
import com.bms.price.domain.ChannelProductMap;
|
||||
|
||||
/**
|
||||
* Channel-product pay-type mapping.
|
||||
* 渠道-产品付款方式映射。
|
||||
*/
|
||||
public interface ChannelProductMapMapper
|
||||
{
|
||||
|
||||
+4
-4
@@ -22,7 +22,7 @@ public interface OracleUpstreamOrderMapper
|
||||
|
||||
long countTabOrderMonitor(@Param("orderTable") String orderTable, @Param("query") TabOrderMonitorQuery query);
|
||||
|
||||
/** Key-first page for customer+time queries (sort narrow columns only). */
|
||||
/** 客户+时间查询的主键优先分页(仅对窄列排序)。 */
|
||||
List<Map<String, Object>> selectTabOrderMonitorKeyPage(
|
||||
@Param("orderTable") String orderTable,
|
||||
@Param("query") TabOrderMonitorQuery query,
|
||||
@@ -38,17 +38,17 @@ public interface OracleUpstreamOrderMapper
|
||||
@Param("startRow") long startRow,
|
||||
@Param("endRow") long endRow);
|
||||
|
||||
/** List detail by ids: display columns only. */
|
||||
/** 按 ID 查明细:仅返回展示列。 */
|
||||
List<Map<String, Object>> selectTabOrderMonitorListByIds(
|
||||
@Param("orderTable") String orderTable,
|
||||
@Param("ids") List<String> ids);
|
||||
|
||||
/** Distinct product codes for product-vs-package check (grouped, no pagination). */
|
||||
/** 产品与套餐比对用的去重产品编码(分组,不分页)。 */
|
||||
List<Map<String, Object>> selectTabOrderProductCodes(
|
||||
@Param("orderTable") String orderTable,
|
||||
@Param("query") TabOrderMonitorQuery query);
|
||||
|
||||
/** Order ids for one product code under the same filters (no pagination). */
|
||||
/** 相同筛选条件下某个产品编码的订单 ID(不分页)。 */
|
||||
List<Map<String, Object>> selectTabOrderIdsByProduct(
|
||||
@Param("orderTable") String orderTable,
|
||||
@Param("query") TabOrderMonitorQuery query);
|
||||
|
||||
@@ -14,18 +14,18 @@ public interface PrcBillingTaskMapper
|
||||
|
||||
int updatePrcBillingTask(PrcBillingTask task);
|
||||
|
||||
/** CAS: WAITING -> processing claim not needed; writeback SUCCESS/FAILED */
|
||||
/** CAS:WAITING -> processing 无需抢占;回写 SUCCESS/FAILED */
|
||||
int updateBillingResult(PrcBillingTask task);
|
||||
|
||||
/** Delete the queue row once prc_order_bill is saved. transfer_no is the unique key. */
|
||||
/** prc_order_bill 保存后删除队列行。transfer_no 为唯一键。 */
|
||||
int deleteByTransferNo(@Param("transferNo") String transferNo);
|
||||
|
||||
/** Count tasks for filter retry (customer + bill_time window). */
|
||||
/** 统计筛选重试的任务数(客户 + 账单时间窗口)。 */
|
||||
int countTaskIdsByFilter(PrcBillingTask query);
|
||||
|
||||
/**
|
||||
* Keyset page of task ids only (asc) to avoid loading full rows into memory.
|
||||
* lastTaskId exclusive lower bound; pass 0 for first page.
|
||||
* 仅按任务 ID 做键集分页(升序),避免把完整行加载到内存。
|
||||
* lastTaskId 为排他下界;首页传 0。
|
||||
*/
|
||||
List<Long> selectTaskIdsByFilter(
|
||||
@Param("query") PrcBillingTask query,
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ public interface PrcCustomerPriceSetMapper
|
||||
|
||||
public int countByPriceSetId(Long priceSetId);
|
||||
|
||||
/** Count binds of this customer; optional exclude current bind or current set */
|
||||
/** 统计该客户的绑定数;可选排除当前绑定或当前套餐 */
|
||||
public int countByCustomerId(@Param("customerId") Long customerId,
|
||||
@Param("excludeId") Long excludeId,
|
||||
@Param("excludePriceSetId") Long excludePriceSetId);
|
||||
@@ -40,7 +40,7 @@ public interface PrcCustomerPriceSetMapper
|
||||
@Param("endDate") java.util.Date endDate);
|
||||
|
||||
/**
|
||||
* Customer package binds (package not stopped). Temporal match uses version effective_time in quote/bill.
|
||||
* 客户套餐绑定(套餐未停用)。时效匹配在报价/账单中使用版本的 effective_time。
|
||||
*/
|
||||
public java.util.List<PrcCustomerPriceSet> selectEffectiveByCustomer(
|
||||
@Param("customerId") Long customerId);
|
||||
|
||||
@@ -17,11 +17,11 @@ public interface PrcIncomeBillFeeMapper
|
||||
|
||||
public PrcIncomeBillFee selectByFeeId(String feeId);
|
||||
|
||||
/** Lookup by unique key uk_bill_fee_item (bill_id, fee_type, sc_id). */
|
||||
/** 按唯一键 uk_bill_fee_item(bill_id、fee_type、sc_id)查询。 */
|
||||
public PrcIncomeBillFee selectByBillIdAndFeeTypeAndScId(@Param("billId") String billId,
|
||||
@Param("feeType") String feeType, @Param("scId") Long scId);
|
||||
|
||||
/** Count fees of a bill under given ar_bill_status and fee_type (e.g. BILLED + BASIC_FREIGHT). */
|
||||
/** 统计某账单在指定 ar_bill_status 和 fee_type 下的费用数(例如 BILLED + BASIC_FREIGHT)。 */
|
||||
public int countByBillIdAndArBillStatusAndFeeType(@Param("billId") String billId,
|
||||
@Param("arBillStatus") String arBillStatus, @Param("feeType") String feeType);
|
||||
|
||||
@@ -48,6 +48,6 @@ public interface PrcIncomeBillFeeMapper
|
||||
|
||||
public int deleteByBillId(String billId);
|
||||
|
||||
/** Rebill: delete auto fees only; keep manual_flag=1 rows. */
|
||||
/** 重新出账:只删除自动费用;保留 manual_flag=1 的行。 */
|
||||
public int deleteAutoFeesByBillId(String billId);
|
||||
}
|
||||
|
||||
@@ -21,16 +21,16 @@ public interface PrcOrderBillMapper
|
||||
|
||||
public List<PrcOrderBill> selectPrcOrderBillList(PrcOrderBill bill);
|
||||
|
||||
/** bill_id only (same filters / data-scope as list), for large local rebill. */
|
||||
/** 只取 bill_id(筛选条件/数据权限与列表一致),用于本地大批量重新出账。 */
|
||||
List<String> selectPrcOrderBillIds(PrcOrderBill bill);
|
||||
|
||||
/** Count matching bills (same filters / data-scope as list). */
|
||||
/** 统计匹配的账单数(筛选条件/数据权限与列表一致)。 */
|
||||
int countPrcOrderBillIds(PrcOrderBill bill);
|
||||
|
||||
/** Distinct customer+product groups for product-check (order counts in filter window). */
|
||||
/** 产品校验用的去重客户+产品分组(统计筛选窗口内的订单数)。 */
|
||||
List<Map<String, Object>> selectDistinctProductGroups(PrcOrderBill bill);
|
||||
|
||||
/** Drill-down orders for one product under product-check filters. */
|
||||
/** 产品校验筛选条件下钻某个产品的订单。 */
|
||||
List<PrcOrderBill> selectOrderBillsByProductForCheck(@Param("query") PrcOrderBill query, @Param("limit") int limit);
|
||||
|
||||
/**
|
||||
@@ -138,6 +138,6 @@ public interface PrcOrderBillMapper
|
||||
/** 只更新应付合计,不改应收。 */
|
||||
int updatePayTotal(@Param("billId") String billId, @Param("payTotal") BigDecimal payTotal);
|
||||
|
||||
/** Count order bills that reference this sales package version. */
|
||||
/** 统计引用该销售套餐版本的订单账单数。 */
|
||||
int countByPsvId(@Param("psvId") Long psvId);
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ public interface PrcPriceExcelFileMapper
|
||||
|
||||
public List<PrcPriceExcelFile> selectPrcPriceExcelFileList(PrcPriceExcelFile query);
|
||||
|
||||
/** Excel files bound to a version via psv_id */
|
||||
/** 通过 psv_id 绑定到某版本的 Excel 文件 */
|
||||
public List<PrcPriceExcelFile> selectByPsvId(@Param("psvId") Long psvId);
|
||||
|
||||
/** Hard delete attachments of a version. */
|
||||
/** 物理删除某版本的附件。 */
|
||||
public int physicalDeleteByPsvId(@Param("psvId") Long psvId);
|
||||
|
||||
public int insertPrcPriceExcelFile(PrcPriceExcelFile row);
|
||||
|
||||
+11
-11
@@ -25,15 +25,15 @@ public interface PrcPriceSetDetailMapper
|
||||
|
||||
public int deletePrcPriceSetDetailByIds(Long[] psdIds);
|
||||
|
||||
/** Delete SALES details for all versions of a price set */
|
||||
/** 删除某价格套餐所有版本的 SALES 明细 */
|
||||
public int deletePrcPriceSetDetailByPriceSetId(Long priceSetId);
|
||||
|
||||
public int deletePrcPriceSetDetailByPsvId(Long psvId);
|
||||
|
||||
/** Hard delete detail rows by ids (draft / pending). */
|
||||
/** 按 ID 物理删除明细行(草稿 / 待生效)。 */
|
||||
public int physicalDeleteByIds(Long[] psdIds);
|
||||
|
||||
/** Hard delete all detail rows under a version. */
|
||||
/** 物理删除某版本下的全部明细行。 */
|
||||
public int physicalDeleteByPsvId(@Param("psvId") Long psvId);
|
||||
|
||||
public int deleteOrphanDetailsByPriceSetId(Long priceSetId);
|
||||
@@ -44,15 +44,15 @@ public interface PrcPriceSetDetailMapper
|
||||
|
||||
public int countByPsvId(Long psvId);
|
||||
|
||||
/** Count detail rows including soft-deleted (for deleted-version tab). */
|
||||
/** 统计明细行数,包含已逻辑删除的数据(供已删除版本页签使用)。 */
|
||||
public int countByPsvIdAll(Long psvId);
|
||||
|
||||
public int copyDetailsFromVersion(@Param("srcPsvId") Long srcPsvId, @Param("newPsvId") Long newPsvId);
|
||||
|
||||
/** Copy version effective time, expire time and status onto catalog detail rows. */
|
||||
/** 把版本生效时间、失效时间和状态复制到目录明细行。 */
|
||||
public int syncEffectByPriceType(@Param("priceType") String priceType);
|
||||
|
||||
/** Copy SALES version effect fields onto package detail rows. */
|
||||
/** 把 SALES 版本的生效字段复制到套餐明细行。 */
|
||||
public int syncEffectByPriceSetId(@Param("priceSetId") Long priceSetId);
|
||||
|
||||
public int insertFixedDetailsFromLibrary(
|
||||
@@ -75,8 +75,8 @@ public interface PrcPriceSetDetailMapper
|
||||
@Param("weight") BigDecimal weight);
|
||||
|
||||
/**
|
||||
* Lowest FIXED weight band for product/country/zone (ignore weight).
|
||||
* Used when charge weight is below the minimum band.
|
||||
* 产品/国家/分区下最低的 FIXED 重量段(忽略重量)。
|
||||
* 用于计费重量低于最小重量段时。
|
||||
*/
|
||||
public PrcPriceSetDetail selectFixedMinBand(
|
||||
@Param("psvId") Long psvId,
|
||||
@@ -86,8 +86,8 @@ public interface PrcPriceSetDetailMapper
|
||||
@Param("zoneCode") String zoneCode);
|
||||
|
||||
/**
|
||||
* Next FIXED weight band whose weight_min is strictly above {@code weight}
|
||||
* (ceil into the gap between bands, e.g. 1.001 -> 1.01~2).
|
||||
* 下一个 weight_min 严格大于 {@code weight} 的 FIXED 重量段
|
||||
* (重量落在段间空隙时向上取整,例如 1.001 -> 1.01~2)。
|
||||
*/
|
||||
public PrcPriceSetDetail selectFixedNextBandUp(
|
||||
@Param("psvId") Long psvId,
|
||||
@@ -126,7 +126,7 @@ public interface PrcPriceSetDetailMapper
|
||||
public int updatePriceTypeByPsvId(@Param("psvId") Long psvId, @Param("priceType") String priceType);
|
||||
|
||||
/**
|
||||
* Match PRODUCT/REDLINE detail by catalog type + bizDate window on version.
|
||||
* 按目录类型 + 版本上的业务日期区间匹配 PRODUCT/REDLINE 明细。
|
||||
*/
|
||||
public PrcPriceSetDetail selectCatalogMatch(
|
||||
@Param("priceType") String priceType,
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface PrcPriceSetMapper
|
||||
{
|
||||
public PrcPriceSet selectPrcPriceSetById(Long priceSetId);
|
||||
|
||||
/** Header only (no product/customer count subqueries). */
|
||||
/** 仅表头(不含产品/客户计数子查询)。 */
|
||||
public PrcPriceSet selectPrcPriceSetHeaderById(Long priceSetId);
|
||||
|
||||
public List<PrcPriceSet> selectPrcPriceSetList(PrcPriceSet set);
|
||||
@@ -21,7 +21,7 @@ public interface PrcPriceSetMapper
|
||||
|
||||
public int updatePrcPriceSet(PrcPriceSet set);
|
||||
|
||||
/** Update name / note only (does not touch set_type / discount / status). */
|
||||
/** 仅更新名称 / 备注(不修改 set_type / discount / status)。 */
|
||||
public int updateBasicInfo(PrcPriceSet set);
|
||||
|
||||
public int updatePrcPriceSetStatus(PrcPriceSet set);
|
||||
|
||||
+6
-6
@@ -23,16 +23,16 @@ public interface PrcPriceSetProductMapper
|
||||
|
||||
public int deleteByPsvIdAndCode(@Param("psvId") Long psvId, @Param("productCode") String productCode);
|
||||
|
||||
/** Hard delete one product under a version (draft / pending). */
|
||||
/** 物理删除某版本下的一个产品(草稿 / 待生效)。 */
|
||||
public int physicalDeleteByPsvIdAndCode(@Param("psvId") Long psvId, @Param("productCode") String productCode);
|
||||
|
||||
/** Hard delete all product rows under a version. */
|
||||
/** 物理删除某版本下的全部产品行。 */
|
||||
public int physicalDeleteByPsvId(@Param("psvId") Long psvId);
|
||||
|
||||
/** Copy active PRODUCT catalog into this SALES version. */
|
||||
/** 把生效的 PRODUCT 目录复制到该 SALES 版本。 */
|
||||
public int insertFromLibrary(@Param("psvId") Long psvId);
|
||||
|
||||
/** Preview: active PRODUCT catalog products. */
|
||||
/** 预览:生效的 PRODUCT 目录产品。 */
|
||||
public List<PrcPriceSetProduct> selectFromLibrary();
|
||||
|
||||
public int copyFromVersion(@Param("srcPsvId") Long srcPsvId, @Param("newPsvId") Long newPsvId);
|
||||
@@ -41,9 +41,9 @@ public interface PrcPriceSetProductMapper
|
||||
|
||||
public int updatePriceTypeByPsvId(@Param("psvId") Long psvId, @Param("priceType") String priceType);
|
||||
|
||||
/** Copy version effective_time and status onto catalog product rows. */
|
||||
/** 把版本 effective_time 和状态复制到目录产品行。 */
|
||||
public int syncEffectByPriceType(@Param("priceType") String priceType);
|
||||
|
||||
/** Copy SALES version effect fields onto package product rows. */
|
||||
/** 把 SALES 版本的生效字段复制到套餐产品行。 */
|
||||
public int syncEffectByPriceSetId(@Param("priceSetId") Long priceSetId);
|
||||
}
|
||||
|
||||
+6
-6
@@ -14,13 +14,13 @@ public interface PrcPriceSetVersionMapper
|
||||
|
||||
public List<PrcPriceSetVersion> selectPrcPriceSetVersionList(PrcPriceSetVersion version);
|
||||
|
||||
/** Catalog versions (price_set_id null) with product/detail counts. */
|
||||
/** 目录版本(price_set_id 为空)及产品/明细计数。 */
|
||||
public List<PrcPriceSetVersion> selectCatalogVersionList(PrcPriceSetVersion version);
|
||||
|
||||
/** Max seq for SALES by price_set_id */
|
||||
/** 按 price_set_id 取 SALES 最大序号 */
|
||||
public Integer selectMaxVersionSeq(@Param("priceSetId") Long priceSetId);
|
||||
|
||||
/** Max seq for catalog type (price_set_id null) or SALES when priceSetId set */
|
||||
/** 目录类型(price_set_id 为空)或传了 priceSetId 时的 SALES 最大序号 */
|
||||
public Integer selectMaxVersionSeqByType(@Param("priceType") String priceType,
|
||||
@Param("priceSetId") Long priceSetId);
|
||||
|
||||
@@ -30,7 +30,7 @@ public interface PrcPriceSetVersionMapper
|
||||
|
||||
public int deletePrcPriceSetVersionByIds(Long[] psvIds);
|
||||
|
||||
/** Soft-delete catalog/sales version row (is_del=1). */
|
||||
/** 逻辑删除目录/销售版本行(is_del=1)。 */
|
||||
public int softDeleteById(@Param("psvId") Long psvId, @Param("updateBy") String updateBy);
|
||||
|
||||
public int deletePrcPriceSetVersionByPriceSetId(Long priceSetId);
|
||||
@@ -38,14 +38,14 @@ public interface PrcPriceSetVersionMapper
|
||||
public List<Long> selectPriceSetIds();
|
||||
|
||||
/**
|
||||
* SALES version effective at asOf for a price set.
|
||||
* 某价格套餐在 asOf 生效的 SALES 版本。
|
||||
*/
|
||||
public PrcPriceSetVersion selectActiveByPriceSetAt(
|
||||
@Param("priceSetId") Long priceSetId,
|
||||
@Param("asOf") Date asOf);
|
||||
|
||||
/**
|
||||
* Catalog (PRODUCT/REDLINE) version effective at asOf.
|
||||
* 在 asOf 生效的目录(PRODUCT/REDLINE)版本。
|
||||
*/
|
||||
public PrcPriceSetVersion selectActiveByTypeAt(
|
||||
@Param("priceType") String priceType,
|
||||
|
||||
@@ -35,20 +35,20 @@ public interface PrcSurchargeRelMapper
|
||||
@Param("productIds") List<Long> productIds,
|
||||
@Param("priceType") String priceType);
|
||||
|
||||
/** Hard delete surcharge rows by detail ids (draft / pending). */
|
||||
/** 按明细 ID 物理删除附加费行(草稿 / 待生效)。 */
|
||||
public int physicalDeleteByDetailIdsAndPriceType(
|
||||
@Param("detailIds") List<Long> detailIds,
|
||||
@Param("priceType") String priceType);
|
||||
|
||||
/** Hard delete surcharge rows by set-product ids (draft / pending). */
|
||||
/** 按套餐产品 ID 物理删除附加费行(草稿 / 待生效)。 */
|
||||
public int physicalDeleteByProductIdsAndPriceType(
|
||||
@Param("productIds") List<Long> productIds,
|
||||
@Param("priceType") String priceType);
|
||||
|
||||
/** Hard delete surcharge rows linked to products/details under a version. */
|
||||
/** 物理删除某版本下产品/明细关联的附加费行。 */
|
||||
public int physicalDeleteByPsvId(@Param("psvId") Long psvId);
|
||||
|
||||
/** Soft-delete surcharge rows linked to products/details under a version. */
|
||||
/** 逻辑删除某版本下产品/明细关联的附加费行。 */
|
||||
public int softDeleteByPsvId(@Param("psvId") Long psvId);
|
||||
|
||||
/** 附加费版本化编辑后,把产品关联从旧记录重指向新记录 */
|
||||
|
||||
@@ -28,7 +28,7 @@ public interface PrcZoneDetailMapper
|
||||
public int deletePrcZoneDetailByRegionId(Long regionId);
|
||||
|
||||
/**
|
||||
* Resolve zone by country ISO2 + postcode (exact first, then longest prefix).
|
||||
* 按国家 ISO2 + 邮编解析分区(先精确匹配,再取最长前缀)。
|
||||
*/
|
||||
public PrcZone selectZoneByCountryPostcode(
|
||||
@Param("countryCode") String countryCode,
|
||||
|
||||
@@ -41,7 +41,7 @@ public class BillingTaskMqConsumer
|
||||
@Autowired(required = false)
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
|
||||
/** Local MQ mode: async event listener. */
|
||||
/** 本地 MQ 模式:异步事件监听。 */
|
||||
@Async
|
||||
@EventListener
|
||||
public void onLocalEvent(BillingTaskMqEvent event)
|
||||
@@ -58,8 +58,8 @@ public class BillingTaskMqConsumer
|
||||
}
|
||||
|
||||
/**
|
||||
* Redis MQ mode: pop a batch each tick and process concurrently.
|
||||
* Previously only 1 message / schedule cycle — queue backlog grew while inserts were fast.
|
||||
* Redis MQ 模式:每次调度弹出一批消息并发处理。
|
||||
* 原先每个调度周期只处理 1 条消息 —— 写入较快时队列会积压。
|
||||
*/
|
||||
@Scheduled(fixedDelayString = "${bms.billing.consumer-delay-ms:200}")
|
||||
public void pollRedisQueue()
|
||||
|
||||
@@ -8,17 +8,17 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
@ConfigurationProperties(prefix = "bms.elasticsearch")
|
||||
public class ElasticsearchProperties
|
||||
{
|
||||
/** false = skip ES write/read */
|
||||
/** false = 跳过 ES 读写 */
|
||||
private boolean enabled = true;
|
||||
|
||||
/** e.g. http://127.0.0.1:9200 */
|
||||
/** 例如 http://127.0.0.1:9200 */
|
||||
private String uris = "http://127.0.0.1:9200";
|
||||
|
||||
private String username;
|
||||
|
||||
private String password;
|
||||
|
||||
/** index name */
|
||||
/** 索引名称 */
|
||||
private String index = "bms_biz_log";
|
||||
|
||||
public boolean isEnabled()
|
||||
|
||||
@@ -69,7 +69,7 @@ public class EsBillSearchStore implements IBillSearchStore
|
||||
doc.put("bizId", bizId.trim());
|
||||
doc.put("status", StringUtils.isEmpty(status) ? EsBizLogSupport.STATUS_SUCCESS : status.trim());
|
||||
doc.put("error", StringUtils.isEmpty(errorMessage) ? null : errorMessage);
|
||||
// Index dynamic mapping is strict on a few fields; coerce before PUT.
|
||||
// 索引动态映射对部分字段类型要求严格,PUT 前先做类型转换。
|
||||
doc.put("request", normalizeRequestForEs(parseOrRaw(requestJson)));
|
||||
doc.put("response", normalizeResponseForEs(parseOrRaw(responseJson)));
|
||||
String ts = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(now);
|
||||
@@ -87,8 +87,8 @@ public class EsBillSearchStore implements IBillSearchStore
|
||||
}
|
||||
|
||||
/**
|
||||
* request.bizDate is mapped as date (ISO / epoch only); bill writes "yyyy-MM-dd HH:mm:ss".
|
||||
* request.taskId is mapped as long; UUID strings must not stay under taskId.
|
||||
* request.bizDate 映射为 date(仅支持 ISO / epoch);计费写入的是 "yyyy-MM-dd HH:mm:ss"。
|
||||
* request.taskId 映射为 long;UUID 字符串不能留在 taskId 下。
|
||||
*/
|
||||
private Object normalizeRequestForEs(Object request)
|
||||
{
|
||||
@@ -103,8 +103,8 @@ public class EsBillSearchStore implements IBillSearchStore
|
||||
}
|
||||
|
||||
/**
|
||||
* response.ok mapped as long; response.success as boolean; response.taskId as long.
|
||||
* Local rebill DONE used UUID taskId + numeric success and was rejected by ES.
|
||||
* response.ok 映射为 long;response.success 映射为 boolean;response.taskId 映射为 long。
|
||||
* 本地重算完成消息曾使用 UUID taskId + 数字型 success,被 ES 拒绝。
|
||||
*/
|
||||
private Object normalizeResponseForEs(Object response)
|
||||
{
|
||||
@@ -135,7 +135,7 @@ public class EsBillSearchStore implements IBillSearchStore
|
||||
return;
|
||||
}
|
||||
String bizDate = ((String) raw).trim();
|
||||
// "yyyy-MM-dd HH:mm:ss" -> ISO-local so ES date mapper accepts it.
|
||||
// 将 "yyyy-MM-dd HH:mm:ss" 转为 ISO 本地时间,便于 ES 日期映射解析。
|
||||
if (bizDate.length() >= 19 && bizDate.charAt(10) == ' ')
|
||||
{
|
||||
obj.put("bizDate", bizDate.substring(0, 10) + "T" + bizDate.substring(11));
|
||||
@@ -504,7 +504,7 @@ public class EsBillSearchStore implements IBillSearchStore
|
||||
filters.add(boolWrap);
|
||||
}
|
||||
|
||||
/** Match country code / name (exact or contains). */
|
||||
/** 匹配国家编码 / 名称(精确或包含)。 */
|
||||
private void addCountryKeywordFilter(JSONArray filters, String countryKeyword)
|
||||
{
|
||||
if (StringUtils.isEmpty(countryKeyword))
|
||||
@@ -603,7 +603,7 @@ public class EsBillSearchStore implements IBillSearchStore
|
||||
filters.add(wrap);
|
||||
}
|
||||
|
||||
/** Match write-time by minute prefix, e.g. 2026-11-05 13:27. */
|
||||
/** 按分钟前缀匹配写入时间,例如 2026-11-05 13:27。 */
|
||||
private void addUpdateTimePrefixFilter(JSONArray filters, String updateTimePrefix)
|
||||
{
|
||||
if (StringUtils.isEmpty(updateTimePrefix))
|
||||
@@ -631,7 +631,7 @@ public class EsBillSearchStore implements IBillSearchStore
|
||||
filters.add(wrap);
|
||||
}
|
||||
|
||||
/** Prefer numeric term; also accept keyword/string mapping of bizKeys.psvId. */
|
||||
/** 优先使用数值 term,同时兼容 bizKeys.psvId 的 keyword/字符串映射。 */
|
||||
private void addPsvIdFilter(JSONArray filters, Long psvId)
|
||||
{
|
||||
if (psvId == null)
|
||||
|
||||
@@ -18,7 +18,7 @@ public final class EsBizLogSupport
|
||||
public static final String STATUS_SUCCESS = "SUCCESS";
|
||||
public static final String STATUS_FAIL = "FAIL";
|
||||
|
||||
/** Request attribute: fail already written to ES in this request. */
|
||||
/** 请求属性:本次请求中的失败日志已写入 ES。 */
|
||||
public static final String ATTR_FAIL_LOGGED = "bms.es.fail.logged";
|
||||
|
||||
private static final int ERROR_MAX = 2000;
|
||||
@@ -95,7 +95,7 @@ public final class EsBizLogSupport
|
||||
}
|
||||
|
||||
/**
|
||||
* Billing ES bizId: prefer transferNo, then orderNo.
|
||||
* 计费 ES bizId:优先取 transferNo,其次取 orderNo。
|
||||
*/
|
||||
public static String billBizId(TmsPriceBillRequest request)
|
||||
{
|
||||
@@ -138,8 +138,8 @@ public final class EsBizLogSupport
|
||||
}
|
||||
|
||||
/**
|
||||
* Common entry for quote/bill API failures (validation / JSON parse / business / unexpected).
|
||||
* Dedups with {@link #ATTR_FAIL_LOGGED} so controller/service/advice can all call safely.
|
||||
* 报价 / 计费 API 失败的公共入口(校验 / JSON 解析 / 业务 / 未预期异常)。
|
||||
* 通过 {@link #ATTR_FAIL_LOGGED} 去重,使 controller/service/advice 均可安全调用。
|
||||
*/
|
||||
public static void saveApiFail(IBillSearchStore store, HttpServletRequest httpRequest, Object boundTarget,
|
||||
Throwable e)
|
||||
@@ -162,7 +162,7 @@ public final class EsBizLogSupport
|
||||
}
|
||||
Object payload = boundTarget != null ? boundTarget : rawBody;
|
||||
String bizId = resolveFailBizId(logType, boundTarget, rawBody);
|
||||
// saveFail also marks ATTR_FAIL_LOGGED
|
||||
// saveFail 内部也会标记 ATTR_FAIL_LOGGED
|
||||
saveFail(store, logType, bizId, payload, errorMessage);
|
||||
if (!isFailLogged(httpRequest))
|
||||
{
|
||||
|
||||
@@ -8,20 +8,20 @@ public final class EsLogType
|
||||
{
|
||||
public static final String BILL = "BILL";
|
||||
public static final String QUOTE = "QUOTE";
|
||||
/** Order credit occupy/release */
|
||||
/** 订单额度占用/释放 */
|
||||
public static final String CREDIT = "CREDIT";
|
||||
/** Clear order credit arrears after balance in */
|
||||
/** 充值到账后清除订单额度欠款 */
|
||||
public static final String ARREARS = "ARREARS";
|
||||
/** Monitor: sync billing from TAB_ORDER */
|
||||
/** 监控:从 TAB_ORDER 同步计费 */
|
||||
public static final String ORDER_SOURCE_SYNC = "ORDER_SOURCE_SYNC";
|
||||
/** Monitor: sales / product / redline price before-after changes */
|
||||
/** 监控:销售价 / 产品价 / 红线价的变更前后记录 */
|
||||
public static final String PRICE_CHANGE = "PRICE_CHANGE";
|
||||
|
||||
private EsLogType()
|
||||
{
|
||||
}
|
||||
|
||||
/** One document per bizId + write time. */
|
||||
/** 每个 bizId + 写入时间对应一条文档。 */
|
||||
public static String docId(String logType, String bizId)
|
||||
{
|
||||
return docId(logType, bizId, new Date());
|
||||
|
||||
@@ -19,7 +19,7 @@ public interface IBillSearchStore
|
||||
BillSearchPage search(String logType, String bizId, String status, int pageNum, int pageSize);
|
||||
|
||||
/**
|
||||
* Search with optional sales-version / priceKind filters (request.bizKeys.psvId, request.priceKind).
|
||||
* 支持可选的销售版本 / 价格类型过滤查询(request.bizKeys.psvId、request.priceKind)。
|
||||
*/
|
||||
default BillSearchPage search(String logType, String bizId, String status, Long psvId, String priceKind,
|
||||
int pageNum, int pageSize)
|
||||
@@ -28,7 +28,7 @@ public interface IBillSearchStore
|
||||
}
|
||||
|
||||
/**
|
||||
* Search with optional productCode + updateTime (exact) / updateTimePrefix (e.g. yyyy-MM-dd HH:mm) filters.
|
||||
* 支持可选的 productCode + updateTime(精确)/ updateTimePrefix(例如 yyyy-MM-dd HH:mm)过滤查询。
|
||||
*/
|
||||
default BillSearchPage search(String logType, String bizId, String status, Long psvId, String priceKind,
|
||||
String productCode, String updateTime, int pageNum, int pageSize)
|
||||
@@ -44,7 +44,7 @@ public interface IBillSearchStore
|
||||
}
|
||||
|
||||
/**
|
||||
* Search with optional countryKeyword (matches bizKeys.countryCode / countryName).
|
||||
* 支持可选的 countryKeyword 过滤查询(匹配 bizKeys.countryCode / countryName)。
|
||||
*/
|
||||
default BillSearchPage search(String logType, String bizId, String status, Long psvId, String priceKind,
|
||||
String productCode, String updateTime, String updateTimePrefix, String countryKeyword,
|
||||
@@ -54,7 +54,7 @@ public interface IBillSearchStore
|
||||
}
|
||||
|
||||
/**
|
||||
* Group PRICE_CHANGE logs by productCode + updateTime for one package version.
|
||||
* 按产品编码 + 更新时间对某一套餐版本下的 PRICE_CHANGE 日志分组。
|
||||
*/
|
||||
default PriceChangeGroupPage searchPriceChangeGroups(Long psvId, String priceKind, String status,
|
||||
int pageNum, int pageSize)
|
||||
|
||||
@@ -25,7 +25,7 @@ public final class PriceChangeEsLog
|
||||
public static final String ACTION_DELETE = "DELETE";
|
||||
public static final String ACTION_IMPORT = "IMPORT";
|
||||
|
||||
/** Async import workers have no SecurityContext; pass operName via this override. */
|
||||
/** 异步导入线程没有 SecurityContext,通过该覆盖值传入操作人名称。 */
|
||||
private static final ThreadLocal<String> OPERATOR_OVERRIDE = new ThreadLocal<String>();
|
||||
|
||||
private PriceChangeEsLog()
|
||||
@@ -106,7 +106,7 @@ public final class PriceChangeEsLog
|
||||
changes.add(change(field, fieldLabel, oldValue, newValue));
|
||||
}
|
||||
|
||||
/** Sales detail price fields (freight / registration / discount). */
|
||||
/** 销售明细价格字段(运费 / 挂号费 / 折扣)。 */
|
||||
public static List<Map<String, String>> diffSalesDetail(PrcPriceSetDetail oldRow, PrcPriceSetDetail newRow)
|
||||
{
|
||||
List<Map<String, String>> changes = new ArrayList<Map<String, String>>();
|
||||
@@ -159,7 +159,7 @@ public final class PriceChangeEsLog
|
||||
return keys;
|
||||
}
|
||||
|
||||
/** Display weight band for sales detail logs (e.g. 0<W≤0.5). */
|
||||
/** 销售明细日志展示用的重量段(例如 0<W≤0.5)。 */
|
||||
public static String weightBandOf(PrcPriceSetDetail d)
|
||||
{
|
||||
if (d == null)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.bms.price.search;
|
||||
|
||||
/**
|
||||
* Price-change log group key: productCode + write time.
|
||||
* 价格变更日志分组键:productCode + 写入时间。
|
||||
*/
|
||||
public class PriceChangeGroup
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.bms.price.search;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/** Paginated product+time groups of price-change logs. */
|
||||
/** 价格变更日志按产品 + 时间分组的查询结果。 */
|
||||
public class PriceChangeGroupPage
|
||||
{
|
||||
private long total;
|
||||
|
||||
@@ -43,7 +43,7 @@ public final class TabOrderSyncEsLog
|
||||
store.save(EsLogType.ORDER_SOURCE_SYNC, bizId, reqJson, respJson, st, errorMessage);
|
||||
}
|
||||
|
||||
/** Persist one failed sync order so it appears in order-source operation log. */
|
||||
/** 持久化一条同步失败的订单,使其出现在订单源操作日志中。 */
|
||||
public static void saveOneFail(IBillSearchStore store, Object row, Object response, String errorMessage)
|
||||
{
|
||||
String transferNo = null;
|
||||
|
||||
@@ -19,7 +19,7 @@ public interface IBmsProductService
|
||||
|
||||
public List<BmsProduct> selectBmsProductList(BmsProduct product);
|
||||
|
||||
/** Product dropdown options (no status refresh, no count subqueries). */
|
||||
/** 产品下拉选项(不刷新状态,不做计数子查询)。 */
|
||||
public List<BmsProduct> selectBmsProductOptions(BmsProduct product);
|
||||
|
||||
public int insertBmsProduct(BmsProduct product);
|
||||
@@ -40,19 +40,19 @@ public interface IBmsProductService
|
||||
|
||||
public String importCountryProductExcel(MultipartFile file, String countryCode, String operName, Date effectiveDate) throws Exception;
|
||||
|
||||
/** Submit async all-country import; returns taskId for polling getImportTask. */
|
||||
/** 提交异步全国家导入;返回 taskId 用于轮询 getImportTask。 */
|
||||
public String submitImportProductExcelAsync(MultipartFile file, boolean updateSupport, String operName, Date effectiveDate) throws Exception;
|
||||
|
||||
/** Submit async single-country import; returns taskId for polling getImportTask. */
|
||||
/** 提交异步单国家导入;返回 taskId 用于轮询 getImportTask。 */
|
||||
public String submitImportCountryProductExcelAsync(MultipartFile file, String countryCode, String operName, Date effectiveDate) throws Exception;
|
||||
|
||||
/** Poll Redis progress for product import task. */
|
||||
/** 轮询产品导入任务的 Redis 进度。 */
|
||||
public BmsProductImportTask getImportTask(String taskId);
|
||||
|
||||
/** Sync import from bytes (used by async runner; taskId may be null). */
|
||||
/** 从字节内容同步导入(供异步执行器使用;taskId 可以为空)。 */
|
||||
public String importProductExcel(byte[] bytes, String filename, boolean updateSupport, String operName, String taskId, Date effectiveDate) throws Exception;
|
||||
|
||||
/** Sync country import from bytes (used by async runner; taskId may be null). */
|
||||
/** 从字节内容同步导入国家数据(供异步执行器使用;taskId 可以为空)。 */
|
||||
public String importCountryProductExcel(byte[] bytes, String filename, String countryCode, String operName, String taskId, Date effectiveDate) throws Exception;
|
||||
|
||||
public java.util.Map<String, List<BmsProductCountry>> parseQuoteExcelByProduct(MultipartFile file) throws Exception;
|
||||
@@ -62,41 +62,41 @@ public interface IBmsProductService
|
||||
public java.util.Map<String, List<BmsProductCountry>> parseCountryQuoteExcelByProduct(byte[] bytes, String filename,
|
||||
String countryCode) throws Exception;
|
||||
|
||||
/** Parse multi-country workbook; return product list only (no DB write). */
|
||||
/** 解析多国家工作簿;只返回产品列表(不写数据库)。 */
|
||||
public java.util.Map<String, Object> previewImportCatalog(byte[] bytes, String filename) throws Exception;
|
||||
|
||||
/** Parse single-country workbook; return product list only (no DB write). */
|
||||
/** 解析单国家工作簿;只返回产品列表(不写数据库)。 */
|
||||
public java.util.Map<String, Object> previewImportCountryCatalog(byte[] bytes, String filename, String countryCode)
|
||||
throws Exception;
|
||||
|
||||
/** Submit async multi-country parse-only preview; poll getImportTask for result. */
|
||||
/** 提交异步多国家仅解析预览;轮询 getImportTask 获取结果。 */
|
||||
public String submitPreviewImportAsync(org.springframework.web.multipart.MultipartFile file) throws Exception;
|
||||
|
||||
/** One task parses up to 5 workbooks and merges by product code. */
|
||||
/** 一个任务最多解析 5 个工作簿,并按产品编码合并。 */
|
||||
public String submitPreviewImportAsync(java.util.List<org.springframework.web.multipart.MultipartFile> files)
|
||||
throws Exception;
|
||||
|
||||
/** Submit async single-country parse-only preview; poll getImportTask for result. */
|
||||
/** 提交异步单国家仅解析预览;轮询 getImportTask 获取结果。 */
|
||||
public String submitPreviewImportCountryAsync(org.springframework.web.multipart.MultipartFile file, String countryCode)
|
||||
throws Exception;
|
||||
|
||||
/** One task parses up to 5 single-country workbooks and merges by product code. */
|
||||
/** 一个任务最多解析 5 个单国家工作簿,并按产品编码合并。 */
|
||||
public String submitPreviewImportCountryAsync(java.util.List<org.springframework.web.multipart.MultipartFile> files,
|
||||
String countryCode) throws Exception;
|
||||
|
||||
/** Later workbook overwrites the same product code. */
|
||||
/** 后一个工作簿会覆盖相同产品编码的数据。 */
|
||||
public java.util.Map<String, Object> mergeCatalogPreview(java.util.Map<String, Object> base,
|
||||
java.util.Map<String, Object> incoming);
|
||||
|
||||
/**
|
||||
* Persist create-page preview into draft/pending version (no activate, no effectiveDate required).
|
||||
* Replaces only countries present in detailsByProductCode for each product.
|
||||
* 将新建页面的预览数据落库为草稿/待生效版本(不启用,也不需要 effectiveDate)。
|
||||
* 对每个产品,只替换 detailsByProductCode 中出现的国家。
|
||||
*/
|
||||
public int applyCatalogPreview(CatalogPreviewApplyRequest request);
|
||||
|
||||
/** One product in its own transaction, for parallel apply. */
|
||||
/** 单个产品使用独立事务,便于并行应用。 */
|
||||
public int applyOneCatalogProduct(Long psvId, String code, BmsProduct meta, java.util.List<BmsProductCountry> details);
|
||||
|
||||
/** Returns taskId; poll import task. Products are saved on a worker pool. */
|
||||
/** 返回 taskId;轮询导入任务。产品由 worker 线程池保存。 */
|
||||
public String submitApplyCatalogPreviewAsync(CatalogPreviewApplyRequest request);
|
||||
}
|
||||
|
||||
+16
-16
@@ -37,61 +37,61 @@ public interface IBmsRedlineProductService
|
||||
|
||||
public String importCountryProductExcel(MultipartFile file, String countryCode, String operName, Date effectiveDate) throws Exception;
|
||||
|
||||
/** Submit async all-country import; returns taskId for polling getImportTask. */
|
||||
/** 提交异步全国家导入;返回 taskId 用于轮询 getImportTask。 */
|
||||
public String submitImportProductExcelAsync(MultipartFile file, boolean updateSupport, String operName, Date effectiveDate) throws Exception;
|
||||
|
||||
/** Submit async single-country import; returns taskId for polling getImportTask. */
|
||||
/** 提交异步单国家导入;返回 taskId 用于轮询 getImportTask。 */
|
||||
public String submitImportCountryProductExcelAsync(MultipartFile file, String countryCode, String operName, Date effectiveDate) throws Exception;
|
||||
|
||||
/** Poll Redis progress for product import task. */
|
||||
/** 轮询产品导入任务的 Redis 进度。 */
|
||||
public BmsRedlineProductImportTask getImportTask(String taskId);
|
||||
|
||||
/** Sync import from bytes (used by async runner; taskId may be null). */
|
||||
/** 从字节内容同步导入(供异步执行器使用;taskId 可以为空)。 */
|
||||
public String importProductExcel(byte[] bytes, String filename, boolean updateSupport, String operName, String taskId, Date effectiveDate) throws Exception;
|
||||
|
||||
/** Sync country import from bytes (used by async runner; taskId may be null). */
|
||||
/** 从字节内容同步导入国家数据(供异步执行器使用;taskId 可以为空)。 */
|
||||
public String importCountryProductExcel(byte[] bytes, String filename, String countryCode, String operName, String taskId, Date effectiveDate) throws Exception;
|
||||
|
||||
public java.util.Map<String, List<BmsRedlineProductCountry>> parseQuoteExcelByProduct(MultipartFile file) throws Exception;
|
||||
|
||||
public java.util.Map<String, List<BmsRedlineProductCountry>> parseQuoteExcelByProduct(byte[] bytes, String filename) throws Exception;
|
||||
|
||||
/** Parse multi-country workbook; return product list only (no DB write). */
|
||||
/** 解析多国家工作簿;只返回产品列表(不写数据库)。 */
|
||||
public java.util.Map<String, Object> previewImportCatalog(byte[] bytes, String filename) throws Exception;
|
||||
|
||||
/** Parse single-country workbook; return product list only (no DB write). */
|
||||
/** 解析单国家工作簿;只返回产品列表(不写数据库)。 */
|
||||
public java.util.Map<String, Object> previewImportCountryCatalog(byte[] bytes, String filename, String countryCode)
|
||||
throws Exception;
|
||||
|
||||
/** Submit async multi-country parse-only preview; poll getImportTask for result. */
|
||||
/** 提交异步多国家仅解析预览;轮询 getImportTask 获取结果。 */
|
||||
public String submitPreviewImportAsync(org.springframework.web.multipart.MultipartFile file) throws Exception;
|
||||
|
||||
/** One task parses up to 5 workbooks and merges by product code. */
|
||||
/** 一个任务最多解析 5 个工作簿,并按产品编码合并。 */
|
||||
public String submitPreviewImportAsync(java.util.List<org.springframework.web.multipart.MultipartFile> files)
|
||||
throws Exception;
|
||||
|
||||
/** Submit async single-country parse-only preview; poll getImportTask for result. */
|
||||
/** 提交异步单国家仅解析预览;轮询 getImportTask 获取结果。 */
|
||||
public String submitPreviewImportCountryAsync(org.springframework.web.multipart.MultipartFile file, String countryCode)
|
||||
throws Exception;
|
||||
|
||||
/** One task parses up to 5 single-country workbooks and merges by product code. */
|
||||
/** 一个任务最多解析 5 个单国家工作簿,并按产品编码合并。 */
|
||||
public String submitPreviewImportCountryAsync(java.util.List<org.springframework.web.multipart.MultipartFile> files,
|
||||
String countryCode) throws Exception;
|
||||
|
||||
/** Later workbook overwrites the same product code. */
|
||||
/** 后一个工作簿会覆盖相同产品编码的数据。 */
|
||||
public java.util.Map<String, Object> mergeCatalogPreview(java.util.Map<String, Object> base,
|
||||
java.util.Map<String, Object> incoming);
|
||||
|
||||
/**
|
||||
* Persist create-page preview into draft/pending version (no activate, no effectiveDate required).
|
||||
* Replaces only countries present in detailsByProductCode for each product.
|
||||
* 将新建页面的预览数据落库为草稿/待生效版本(不启用,也不需要 effectiveDate)。
|
||||
* 对每个产品,只替换 detailsByProductCode 中出现的国家。
|
||||
*/
|
||||
public int applyCatalogPreview(RedlineCatalogPreviewApplyRequest request);
|
||||
|
||||
/** One product in its own transaction, for parallel apply. */
|
||||
/** 单个产品使用独立事务,便于并行应用。 */
|
||||
public int applyOneCatalogProduct(Long psvId, String code, BmsRedlineProduct meta,
|
||||
java.util.List<BmsRedlineProductCountry> details);
|
||||
|
||||
/** Returns taskId; poll import task. Products are saved on a worker pool. */
|
||||
/** 返回 taskId;轮询导入任务。产品由 worker 线程池保存。 */
|
||||
public String submitApplyCatalogPreviewAsync(RedlineCatalogPreviewApplyRequest request);
|
||||
}
|
||||
|
||||
+10
-10
@@ -9,37 +9,37 @@ import com.bms.price.domain.vo.BillingTaskSubmitRequest;
|
||||
|
||||
public interface IPrcBillingTaskService
|
||||
{
|
||||
/** Warehouse inbound: create task + publish MQ. */
|
||||
/** 仓库入库:创建任务并发送 MQ。 */
|
||||
PrcBillingTask submitInbound(BillingTaskSubmitRequest request);
|
||||
|
||||
/** Monitor sync: create task then process immediately (no extra MQ). */
|
||||
/** 监控同步:创建任务后立即处理(不再发额外 MQ)。 */
|
||||
PrcBillingTask submitAndProcess(BillingTaskSubmitRequest request);
|
||||
|
||||
/**
|
||||
* Monitor sync with upstream Oracle full row already fetched by order list:
|
||||
* billing maps the row directly, skipping per-order Oracle public-network queries.
|
||||
* 监控同步,且上游 Oracle 整行数据已由订单列表取回:
|
||||
* 计费直接映射该行,跳过逐单的 Oracle 公网查询。
|
||||
*/
|
||||
PrcBillingTask submitAndProcess(BillingTaskSubmitRequest request, Map<String, Object> upstreamRow);
|
||||
|
||||
/** MQ consumer entry: Oracle query -> bill -> writeback success status. */
|
||||
/** MQ 消费入口:查询 Oracle -> 计费 -> 回写成功状态。 */
|
||||
void processTask(Long taskId);
|
||||
|
||||
PrcBillingTask getById(Long taskId);
|
||||
|
||||
/** Admin list (failed / waiting / filter). */
|
||||
/** 后台列表(失败 / 等待 / 按条件筛选)。 */
|
||||
List<PrcBillingTask> selectList(PrcBillingTask query);
|
||||
|
||||
/**
|
||||
* Manual resync: reset to WAITING then process again (including SUCCESS for correction).
|
||||
* @return task after retry
|
||||
* 手工重新同步:重置为 WAITING 后重新处理(包括已 SUCCESS 的用于更正)。
|
||||
* @return 重试后的任务
|
||||
*/
|
||||
PrcBillingTask retryTask(Long taskId);
|
||||
|
||||
/**
|
||||
* Start async filter retry (customer + bill_time). Returns async task id for progress poll.
|
||||
* 启动异步按条件重试(客户 + bill_time)。返回异步任务 ID 用于进度轮询。
|
||||
*/
|
||||
String startRetryByFilter(BillingTaskRetryByFilterRequest request);
|
||||
|
||||
/** Poll async filter-retry progress. */
|
||||
/** 轮询异步按条件重试的进度。 */
|
||||
PrcBillingTaskRetryTask getRetryByFilterTask(String asyncTaskId);
|
||||
}
|
||||
|
||||
@@ -26,18 +26,18 @@ public interface IPrcOrderBillService
|
||||
TmsPriceQuoteResult bill(TmsPriceBillRequest request);
|
||||
|
||||
/**
|
||||
* Order-source sync only: overwrite local {@code prc_order_bill} + {@code prc_order_bill_ext}
|
||||
* from an Oracle TAB_ORDER row. No quote / credit / fee / refund / AR validation.
|
||||
* Rebilling remains on the order-list local-rebill path.
|
||||
* 仅用于订单来源同步:用 Oracle TAB_ORDER 的一行数据覆盖本地 {@code prc_order_bill} 和 {@code prc_order_bill_ext}。
|
||||
* 不做报价 / 授信 / 费用 / 退费 / 应收校验。
|
||||
* 重新计费仍走订单列表的本地重算路径。
|
||||
*
|
||||
* @param upstreamRow Oracle TAB_ORDER full row
|
||||
* @param upstreamRow Oracle TAB_ORDER 整行数据
|
||||
* @return billId
|
||||
*/
|
||||
String syncUpstreamOverwrite(java.util.Map<String, Object> upstreamRow);
|
||||
|
||||
/**
|
||||
* Persist prc_order_bill and ext when billing cannot produce a quote.
|
||||
* Status outside 0/1/2/3 does not write prc_income_bill.
|
||||
* 计费无法生成报价时,仍然落库 prc_order_bill 及其扩展表。
|
||||
* 状态不在 0/1/2/3 范围内时不写入 prc_income_bill。
|
||||
*/
|
||||
void persistFailedSnapshot(TmsPriceBillRequest request, int billingFailStatus, String errorMessage);
|
||||
|
||||
@@ -61,27 +61,27 @@ public interface IPrcOrderBillService
|
||||
|
||||
TmsPriceQuoteResult getBill(String billId);
|
||||
|
||||
/** Billing fail reason for order-list popup (data-scoped). */
|
||||
/** 订单列表弹窗使用的计费失败原因(带数据权限)。 */
|
||||
OrderBillFailReasonVo getBillingFailReason(String billId);
|
||||
|
||||
TmsPriceQuoteResult getBillByOrderNo(String orderNo);
|
||||
|
||||
/** Manual add income fee from surcharge config; refresh receivable totals. */
|
||||
/** 按附加费配置手工添加收入费用;同时刷新应收合计。 */
|
||||
TmsPriceQuoteResult addIncomeFee(AddIncomeBillFeeRequest request);
|
||||
|
||||
/** Update manual UNBILLED income fee; refresh receivable totals. */
|
||||
/** 修改手工录入的 UNBILLED 收入费用;同时刷新应收合计。 */
|
||||
TmsPriceQuoteResult updateIncomeFee(UpdateIncomeBillFeeRequest request);
|
||||
|
||||
/** Delete manual UNBILLED income fee; refresh receivable totals. */
|
||||
/** 删除手工录入的 UNBILLED 收入费用;同时刷新应收合计。 */
|
||||
TmsPriceQuoteResult deleteIncomeFee(String feeId);
|
||||
|
||||
/** Preview matched bills for batch add fee (data-scoped). */
|
||||
/** 预览批量添加费用命中的账单(带数据权限)。 */
|
||||
BatchAddIncomeBillFeePreview previewBatchAddIncomeFee(BatchAddIncomeBillFeeRequest request);
|
||||
|
||||
/** Submit async batch add fee; returns taskId. */
|
||||
/** 提交异步批量添加费用;返回 taskId。 */
|
||||
String submitBatchAddIncomeFee(BatchAddIncomeBillFeeRequest request);
|
||||
|
||||
/** Poll Redis progress for batch add fee task. */
|
||||
/** 轮询批量添加费用任务的 Redis 进度。 */
|
||||
BatchAddIncomeBillFeeTask getBatchAddIncomeFeeTask(String taskId);
|
||||
|
||||
/** 提供给 TMS 判断订单是否可以继续处理的客户状态查询。 */
|
||||
@@ -106,90 +106,90 @@ public interface IPrcOrderBillService
|
||||
TmsPriceQuoteResult updateCreditArrearsStatus(String billId);
|
||||
|
||||
/**
|
||||
* Update charge_weight (manual override), keep weight, and rebill.
|
||||
* Applies data-scope check.
|
||||
* 更新 charge_weight(手工覆盖),保留原重量,并重新计费。
|
||||
* 会做数据权限校验。
|
||||
*
|
||||
* @param billId bill id
|
||||
* @param chargeWeight new charge weight (kg)
|
||||
* @param billId 账单 ID
|
||||
* @param chargeWeight 新的计费重量(kg)
|
||||
*/
|
||||
TmsPriceQuoteResult updateChargeWeight(String billId, BigDecimal chargeWeight);
|
||||
|
||||
/**
|
||||
* Update charge_weight without data-scope check (pre-validated async import).
|
||||
* 更新 charge_weight,不做数据权限校验(供已校验的异步导入使用)。
|
||||
*/
|
||||
TmsPriceQuoteResult updateChargeWeightByBillId(String billId, BigDecimal chargeWeight);
|
||||
|
||||
/**
|
||||
* Submit async import of charge_weight updates; returns taskId.
|
||||
* 提交 charge_weight 更新的异步导入;返回 taskId。
|
||||
*
|
||||
* @param rows excel rows
|
||||
* @param rows Excel 行数据
|
||||
* @return taskId
|
||||
*/
|
||||
String submitImportChargeWeight(List<ChargeWeightImportRow> rows);
|
||||
|
||||
/** Poll Redis progress for charge-weight import task. */
|
||||
/** 轮询计费重量导入任务的 Redis 进度。 */
|
||||
ChargeWeightImportTask getChargeWeightImportTask(String taskId);
|
||||
|
||||
/**
|
||||
* Build import-template rows. Empty when fillByFilter=false;
|
||||
* otherwise fill orderNo/customer from list filters (data-scoped).
|
||||
* 构建导入模板行。fillByFilter=false 时返回空;
|
||||
* 否则按列表筛选条件填入 orderNo/customer(带数据权限)。
|
||||
*/
|
||||
List<ChargeWeightImportRow> buildChargeWeightTemplateRows(ChargeWeightTemplateRequest request);
|
||||
|
||||
/**
|
||||
* Submit async recalc of product_amount or redline_amount (request.mode).
|
||||
* Existing bills only; no AR restriction; sales amounts untouched.
|
||||
* 提交 product_amount 或 redline_amount 的异步重算(由 request.mode 决定)。
|
||||
* 仅处理已有账单;不受应收限制;不修改销售金额。
|
||||
*
|
||||
* @return taskId
|
||||
*/
|
||||
String submitRecalcBillPrice(RecalcBillPriceRequest request);
|
||||
|
||||
/** Poll Redis progress for product/redline recalc task. */
|
||||
/** 轮询产品价/红线价重算任务的 Redis 进度。 */
|
||||
BatchAddIncomeBillFeeTask getRecalcBillPriceTask(String taskId);
|
||||
|
||||
/**
|
||||
* Recalc and persist product_amount or redline_amount by mode (PRODUCT/REDLINE).
|
||||
* Requires existing prc_order_bill; skips AR editable guard.
|
||||
* 按模式(PRODUCT/REDLINE)重算并落库 product_amount 或 redline_amount。
|
||||
* 要求 prc_order_bill 已存在;跳过应收可编辑校验。
|
||||
*/
|
||||
void recalcBillPriceByBillId(String billId, String mode);
|
||||
|
||||
/**
|
||||
* Full rebill from local prc_order_bill only (no Oracle upstream).
|
||||
* Refund-like local status (order_status 9/10 or refund_status=REFUNDED):
|
||||
* skip when prc_income_bill_fee already has fee_type=REFUND; otherwise {@link #refund}.
|
||||
* Else rebuilds request from the bill row then {@link #bill}.
|
||||
* 仅基于本地 prc_order_bill 做完整重算(不调 Oracle 上游)。
|
||||
* 本地状态类似退费(order_status 9/10 或 refund_status=REFUNDED)时:
|
||||
* 若 prc_income_bill_fee 已有 fee_type=REFUND 则跳过,否则走 {@link #refund}。
|
||||
* 其余情况用账单行重建请求后走 {@link #bill}。
|
||||
*/
|
||||
TmsPriceQuoteResult rebillLocalByBillId(String billId);
|
||||
|
||||
/**
|
||||
* Async local rebill by selected billIds or list filters. Returns taskId for progress poll.
|
||||
* Large sets: only bill_id loaded, then processed by continuous parallel workers.
|
||||
* 按选中的 billId 或列表筛选条件做异步本地重算。返回 taskId 用于进度轮询。
|
||||
* 数据量大时只加载 bill_id,再由持续的并行 worker 处理。
|
||||
*/
|
||||
String submitLocalRebill(LocalRebillRequest request);
|
||||
|
||||
/** Poll Redis progress for local rebill task. */
|
||||
/** 轮询本地重算任务的 Redis 进度。 */
|
||||
BatchAddIncomeBillFeeTask getLocalRebillTask(String taskId);
|
||||
|
||||
/** Cooperative cancel for a running local rebill task. */
|
||||
/** 协作取消正在运行的本地重算任务。 */
|
||||
BatchAddIncomeBillFeeTask cancelLocalRebill(String taskId);
|
||||
|
||||
/** Data-scoped bill_id list for local rebill (same filters as order-bill list). */
|
||||
/** 本地重算用的带数据权限的 bill_id 列表(筛选条件与订单账单列表一致)。 */
|
||||
List<String> selectBillIdsForLocalRebill(PrcOrderBill query);
|
||||
|
||||
/** Data-scoped count for local rebill. */
|
||||
/** 本地重算的带数据权限的数量统计。 */
|
||||
int countBillIdsForLocalRebill(PrcOrderBill query);
|
||||
|
||||
/**
|
||||
* Submit async Excel export for order list or billing list.
|
||||
* Requires at least one meaningful filter; returns taskId for poll/download.
|
||||
* 提交订单列表或计费列表的异步 Excel 导出。
|
||||
* 至少需要一个有效筛选条件;返回 taskId 用于轮询/下载。
|
||||
*
|
||||
* @param exportType {@link PrcOrderBillExportTask#TYPE_ORDER} or {@link PrcOrderBillExportTask#TYPE_BILLING}
|
||||
* @param exportType {@link PrcOrderBillExportTask#TYPE_ORDER} 或 {@link PrcOrderBillExportTask#TYPE_BILLING}
|
||||
*/
|
||||
String submitOrderBillExport(String exportType, PrcOrderBill query);
|
||||
|
||||
/** Poll Redis progress for order/billing list export task. */
|
||||
/** 轮询订单/计费列表导出任务的 Redis 进度。 */
|
||||
PrcOrderBillExportTask getOrderBillExportTask(String taskId);
|
||||
|
||||
/** Stream SUCCESS export file to response by taskId. */
|
||||
/** 按 taskId 将 SUCCESS 状态的导出文件流式写入响应。 */
|
||||
void downloadOrderBillExport(String taskId, HttpServletResponse response) throws Exception;
|
||||
}
|
||||
|
||||
+5
-5
@@ -11,19 +11,19 @@ public interface IPrcPriceExcelFileService
|
||||
{
|
||||
public PrcPriceExcelFile selectPrcPriceExcelFileById(Long pefId);
|
||||
|
||||
/** Excel files bound to a price version */
|
||||
/** 绑定到价格版本的 Excel 文件 */
|
||||
List<PrcPriceExcelFile> selectByPsvId(Long psvId);
|
||||
|
||||
/**
|
||||
* Persist uploaded Excel under upload/price/excel and insert metadata row.
|
||||
* 将上传的 Excel 保存到 upload/price/excel,并写入元数据记录。
|
||||
*
|
||||
* @param excelType PRODUCT / REDLINE / SALES
|
||||
* @param psvId version id (nullable for draft preview; bind later)
|
||||
* @return inserted row with pefId
|
||||
* @param psvId 版本 ID(草稿预览时可为空,之后再绑定)
|
||||
* @return 包含 pefId 的新增记录
|
||||
*/
|
||||
public PrcPriceExcelFile saveImportExcel(String excelType, Date effectiveTime, byte[] bytes,
|
||||
String filename, String operName, Long psvId) throws Exception;
|
||||
|
||||
/** Bind an existing attachment row to a version */
|
||||
/** 将已有的附件记录绑定到指定版本 */
|
||||
public int bindPsvId(Long pefId, Long psvId);
|
||||
}
|
||||
|
||||
@@ -22,14 +22,14 @@ public interface IPrcPriceSetService
|
||||
|
||||
public List<PrcPriceSet> selectPrcPriceSetList(PrcPriceSet set);
|
||||
|
||||
/** Fail if the package is not in the expected category (PACKAGE / EXCLUSIVE). */
|
||||
/** 套餐不属于预期类别(PACKAGE / EXCLUSIVE)时抛出失败。 */
|
||||
public void assertSetCategory(Long priceSetId, String expectedCategory);
|
||||
|
||||
public Long savePrcPriceSet(PrcPriceSet set);
|
||||
|
||||
public int updatePrcPriceSet(PrcPriceSet set);
|
||||
|
||||
/** Update package name and note only; allowed for effect / draft / stopped. */
|
||||
/** 只更新套餐名称和备注;生效 / 草稿 / 已停用状态均可操作。 */
|
||||
public int updateBasicInfo(PrcPriceSet set);
|
||||
|
||||
public int deletePrcPriceSetByIds(Long[] priceSetIds);
|
||||
@@ -42,29 +42,29 @@ public interface IPrcPriceSetService
|
||||
|
||||
public int disable(Long priceSetId, String updateBy);
|
||||
|
||||
/** Re-enable a stopped package (S -> E). */
|
||||
/** 重新启用已停用的套餐(S -> E)。 */
|
||||
public int enable(Long priceSetId, String updateBy);
|
||||
|
||||
/**
|
||||
* Activate a draft or reschedule a pending version with user-specified effectiveTime.
|
||||
* effectiveTime <= now -> EFFECT; future -> PENDING(3). Then refresh 0/3/1/2.
|
||||
* 按用户指定的 effectiveTime 启用草稿版本,或重排待生效版本。
|
||||
* effectiveTime <= now -> EFFECT;未来时间 -> PENDING(3)。随后刷新 0/3/1/2。
|
||||
*/
|
||||
public int activateVersion(Long psvId, Date effectiveTime, String updateBy);
|
||||
|
||||
/**
|
||||
* Copy source version into a new draft version under the same package:
|
||||
* insert prc_price_set_version + copy prc_price_set_detail (+ surcharge snapshots).
|
||||
* @return new psvId
|
||||
* 将源版本复制为同一套餐下的新草稿版本:
|
||||
* 插入 prc_price_set_version 并复制 prc_price_set_detail(含附加费快照)。
|
||||
* @return 新的 psvId
|
||||
*/
|
||||
public Long copyVersion(Long sourcePsvId, String createBy);
|
||||
|
||||
/**
|
||||
* Create an empty draft version under the package (no detail copy).
|
||||
* @return new psvId
|
||||
* 在套餐下创建空草稿版本(不复制明细)。
|
||||
* @return 新的 psvId
|
||||
*/
|
||||
public Long createVersion(Long priceSetId, String createBy);
|
||||
|
||||
/** Delete a draft version and its details / surcharge snapshots */
|
||||
/** 删除草稿版本及其明细 / 附加费快照 */
|
||||
public int deleteVersion(Long psvId, String updateBy);
|
||||
|
||||
public Long copy(Long priceSetId, String createBy);
|
||||
@@ -74,12 +74,12 @@ public interface IPrcPriceSetService
|
||||
public List<PrcPriceSetDetail> selectDetailList(PrcPriceSetDetail detail);
|
||||
|
||||
/**
|
||||
* Load all detail rows for one product under a version (no pagination).
|
||||
* 查询某版本下单个产品的全部明细行(不分页)。
|
||||
*/
|
||||
public List<PrcPriceSetDetail> selectDetailListByProduct(Long psvId, String productCode);
|
||||
|
||||
/**
|
||||
* Load all detail rows for a version (no pagination). For batch prefetch vs N byProduct calls.
|
||||
* 查询某版本的全部明细行(不分页)。用于批量预取,替代 N 次按产品查询。
|
||||
*/
|
||||
public List<PrcPriceSetDetail> selectDetailListByVersion(Long psvId);
|
||||
|
||||
@@ -99,109 +99,109 @@ public interface IPrcPriceSetService
|
||||
|
||||
public int insertCustomer(PrcCustomerPriceSet customer);
|
||||
|
||||
/** Batch bind customers to a price set; returns summary message. */
|
||||
/** 批量将客户绑定到价格套餐;返回汇总提示信息。 */
|
||||
public String batchInsertCustomers(PrcCustomerPriceSetBatch batch);
|
||||
|
||||
public int updateCustomer(PrcCustomerPriceSet customer);
|
||||
|
||||
public int deleteCustomerByIds(Long[] customerPricesetIds);
|
||||
|
||||
/** chain expire_time = next version effective_time, then refresh 0/3/1/2 */
|
||||
/** 串联 expire_time = 下一版本的 effective_time,然后刷新 0/3/1/2 */
|
||||
public int refreshAllVersionStatus();
|
||||
|
||||
/** submit async save, return taskId immediately */
|
||||
/** 提交异步保存,立即返回 taskId */
|
||||
public String submitSaveAsync(PrcPriceSet set);
|
||||
|
||||
/**
|
||||
* Submit async batch write of detail surcharge snapshots (product-level pick can hit many rows).
|
||||
* @return taskId for polling getSaveTask
|
||||
* 提交明细附加费快照的异步批量写入(按产品选择可能命中大量行)。
|
||||
* @return taskId 用于轮询 getSaveTask
|
||||
*/
|
||||
public String submitDetailSurchargeAsync(List<PrcPriceSetDetail> details);
|
||||
|
||||
/** Sync batch update of detail surcharge snapshots */
|
||||
/** 同步批量更新明细附加费快照 */
|
||||
public int batchUpdateDetailSurcharges(List<PrcPriceSetDetail> details);
|
||||
|
||||
/** poll async save progress */
|
||||
/** 轮询异步保存进度 */
|
||||
public PrcPriceSetSaveTask getSaveTask(String taskId);
|
||||
|
||||
/**
|
||||
* Submit async import of Weishi B2C quote Excel into FIXED package detail prices.
|
||||
* @return taskId for polling getSaveTask
|
||||
* 提交 Weishi B2C 报价 Excel 的异步导入,写入 FIXED 套餐明细价格。
|
||||
* @return taskId 用于轮询 getSaveTask
|
||||
*/
|
||||
public String submitImportDetailPricesAsync(Long priceSetId, Long psvId, MultipartFile file, String operName) throws Exception;
|
||||
|
||||
/**
|
||||
* @param updateOnly true = only update matched existing details (no insert / no new product)
|
||||
* @param updateOnly true = 只更新匹配到的已有明细(不新增 / 不新增产品)
|
||||
*/
|
||||
public String submitImportDetailPricesAsync(Long priceSetId, Long psvId, MultipartFile file, String operName,
|
||||
boolean updateOnly) throws Exception;
|
||||
|
||||
/**
|
||||
* @param replaceByProductCountry true = Excel build-price mode: replace only product+country scopes in this file
|
||||
* @param countryCode optional; when set, parse single-country dedicated-line Excel (product country-import format)
|
||||
* @param replaceByProductCountry true = Excel 建价模式:只替换本文件中的 产品+国家 范围
|
||||
* @param countryCode 可选;有值时解析单国家专线 Excel(产品国家导入格式)
|
||||
*/
|
||||
public String submitImportDetailPricesAsync(Long priceSetId, Long psvId, MultipartFile file, String operName,
|
||||
boolean updateOnly, boolean replaceByProductCountry, String countryCode) throws Exception;
|
||||
|
||||
/** One task imports up to 5 workbooks in order. */
|
||||
/** 一个任务按顺序最多导入 5 个工作簿。 */
|
||||
public String submitImportDetailPricesAsync(Long priceSetId, Long psvId, List<MultipartFile> files, String operName,
|
||||
boolean updateOnly, boolean replaceByProductCountry, String countryCode) throws Exception;
|
||||
|
||||
/** Parse up to 5 workbooks in one call. Later file wins on the same product+country scope. */
|
||||
/** 一次解析最多 5 个工作簿。相同 产品+国家 范围以后一个文件为准。 */
|
||||
public Map<String, Object> previewImportDetailPricesMany(List<byte[]> bytesList, List<String> names,
|
||||
boolean updateOnly, List<PrcPriceSetDetail> existingDetails, boolean replaceByProductCountry, String countryCode)
|
||||
throws Exception;
|
||||
|
||||
/**
|
||||
* @param exclusiveTemplate true = HALARA large-customer exclusive quote Excel (destination / handling fee)
|
||||
* @param exclusiveTemplate true = HALARA 大客户专属报价 Excel(目的地 / 操作费)
|
||||
*/
|
||||
public Map<String, Object> previewImportDetailPricesMany(List<byte[]> bytesList, List<String> names,
|
||||
boolean updateOnly, List<PrcPriceSetDetail> existingDetails, boolean replaceByProductCountry, String countryCode,
|
||||
boolean exclusiveTemplate) throws Exception;
|
||||
|
||||
/**
|
||||
* Sync worker: parse bytes and upsert FIXED detail prices matched by
|
||||
* product + country + zone(if any) + weight band (insert when missing unless updateOnly).
|
||||
* 同步 worker:解析字节内容,并按 产品 + 国家 + 分区(如有)+ 重量段
|
||||
* 匹配后 upsert FIXED 明细价格(缺失时插入,updateOnly 时不插入)。
|
||||
*/
|
||||
public String importDetailPrices(Long priceSetId, Long psvId, byte[] bytes, String filename, String operName) throws Exception;
|
||||
|
||||
/** Sync worker with optional taskId for progress reporting. */
|
||||
/** 同步 worker,可选传入 taskId 用于上报进度。 */
|
||||
public String importDetailPrices(Long priceSetId, Long psvId, byte[] bytes, String filename, String operName, String taskId) throws Exception;
|
||||
|
||||
public String importDetailPrices(Long priceSetId, Long psvId, byte[] bytes, String filename, String operName,
|
||||
String taskId, boolean updateOnly) throws Exception;
|
||||
|
||||
/**
|
||||
* @param replaceByProductCountry package Excel build-price only; other import modes pass false
|
||||
* @param countryCode optional single-country dedicated-line import
|
||||
* @param replaceByProductCountry 仅套餐 Excel 建价使用;其他导入模式传 false
|
||||
* @param countryCode 可选,单国家专线导入
|
||||
*/
|
||||
public String importDetailPrices(Long priceSetId, Long psvId, byte[] bytes, String filename, String operName,
|
||||
String taskId, boolean updateOnly, boolean replaceByProductCountry, String countryCode) throws Exception;
|
||||
|
||||
/**
|
||||
* Submit async pull of product library into version details.
|
||||
* @return taskId for polling getSaveTask
|
||||
* 提交将产品库异步拉取到版本明细。
|
||||
* @return taskId 用于轮询 getSaveTask
|
||||
*/
|
||||
public String submitPullFromLibraryAsync(Long priceSetId, Long psvId, boolean force, String operName);
|
||||
|
||||
/** Sync worker: replace (or skip) version details from product / product_country. */
|
||||
/** 同步 worker:从 product / product_country 替换(或跳过)版本明细。 */
|
||||
public String pullFromLibrary(Long priceSetId, Long psvId, boolean force, String operName, String taskId);
|
||||
|
||||
/**
|
||||
* Preview pull: return products + FIXED details from library without writing DB.
|
||||
* 预览拉取:从产品库返回产品 + FIXED 明细,不写数据库。
|
||||
*/
|
||||
public Map<String, Object> previewPullFromLibrary();
|
||||
|
||||
/**
|
||||
* Preview import: parse Excel into products + details without writing DB.
|
||||
* When updateOnly, merge prices into existingDetails (in-memory match).
|
||||
* 预览导入:将 Excel 解析为产品 + 明细,不写数据库。
|
||||
* updateOnly 时把价格合并进 existingDetails(内存中匹配)。
|
||||
*/
|
||||
public Map<String, Object> previewImportDetailPrices(byte[] bytes, String filename, boolean updateOnly,
|
||||
List<PrcPriceSetDetail> existingDetails) throws Exception;
|
||||
|
||||
/**
|
||||
* @param replaceByProductCountry package Excel build-price only: keep other product/country rows
|
||||
* @param countryCode optional single-country dedicated-line import
|
||||
* @param replaceByProductCountry 仅套餐 Excel 建价使用:保留下其他 产品/国家 行
|
||||
* @param countryCode 可选,单国家专线导入
|
||||
*/
|
||||
public Map<String, Object> previewImportDetailPrices(byte[] bytes, String filename, boolean updateOnly,
|
||||
List<PrcPriceSetDetail> existingDetails, boolean replaceByProductCountry, String countryCode) throws Exception;
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface IPrcZoneService
|
||||
|
||||
public List<PrcZoneRegion> selectZoneRegionList(PrcZoneRegion query);
|
||||
|
||||
/** Delete all zones (and details) for the given region ids */
|
||||
/** 删除指定区域 ID 下的所有分区(及其明细) */
|
||||
public int deleteZonesByRegionIds(Long[] regionIds);
|
||||
|
||||
public PrcZone selectPrcZoneById(Long zoneId);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user