优化代码注释为简体中文
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
|
||||
|
||||
Reference in New Issue
Block a user