Merge remote-tracking branch 'origin/master'

This commit is contained in:
luojiaquan
2026-09-09 17:41:00 +08:00
51 changed files with 2700 additions and 671 deletions
@@ -1,14 +1,19 @@
package com.ruoyi.web.controller.price;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.price.domain.PrcQuote;
import com.ruoyi.price.domain.vo.TmsPriceQuoteRequest;
import com.ruoyi.price.domain.vo.TmsPriceQuoteResult;
import com.ruoyi.price.service.ITmsPriceQuoteService;
@@ -25,6 +30,28 @@ public class BillingController extends BaseController
@Autowired
private ITmsPriceQuoteService tmsPriceQuoteService;
/**
* Historical quote list.
*/
@PreAuthorize("@ss.hasPermi('price:billing:quote')")
@GetMapping("/quote/list")
public TableDataInfo list(PrcQuote query)
{
startPage();
List<PrcQuote> list = tmsPriceQuoteService.selectQuoteList(query);
return getDataTable(list);
}
/**
* Historical quote detail with fee lines.
*/
@PreAuthorize("@ss.hasPermi('price:billing:quote')")
@GetMapping("/quote/{quoteId}")
public AjaxResult getInfo(@PathVariable Long quoteId)
{
return success(tmsPriceQuoteService.getQuote(quoteId));
}
/**
* Same matching logic as TMS open API, for BMS console trial.
*/
@@ -1,5 +1,6 @@
package com.ruoyi.web.controller.price;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.annotation.Log;
@@ -45,9 +47,11 @@ public class ProductController extends BaseController
@PreAuthorize("@ss.hasPermi('price:product:query')")
@GetMapping("/{productCode}/countries")
public AjaxResult countries(@PathVariable String productCode)
public AjaxResult countries(@PathVariable String productCode,
@RequestParam(required = false) Date effectiveDate,
@RequestParam(required = false) Long productId)
{
List<BmsProductCountry> list = productService.selectCountryListByProductCode(productCode);
List<BmsProductCountry> list = productService.selectCountryListByProductCode(productCode, effectiveDate, productId);
return success(list);
}
@@ -36,3 +36,83 @@ no.update.permission=您没有修改数据的权限,请联系管理员添加
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
##价格模块提示语(price)
# 附加费 PrcSurcharge
price.surcharge.scName.empty=附加费名称不能为空
price.surcharge.chargeType.empty=计费方式不能为空
price.surcharge.chargeValue.empty=计费数值不能为空
price.surcharge.chargeValue.negative=计费数值不能为负数
# 附加费关联 PrcSurchargeRel
price.surchargeRel.scId.empty=附加费ID不能为空
price.surchargeRel.productId.empty=产品ID不能为空
price.surchargeRel.productCode.empty=产品代码不能为空
# 套餐 PrcPriceSet
price.set.notExists=套餐不存在
price.set.name.empty=套餐名称不能为空
price.set.name.exists=套餐名称已存在
price.set.effectiveDate.empty=生效日期不能为空
price.set.date.invalid=生效日期不能晚于失效日期
price.set.discount.range=折扣模式默认折扣需在 1~99
price.set.delete.statusNotAllowed=仅草稿或驳回状态的套餐允许删除:{0}
price.set.delete.boundCustomer=套餐【{0}】已绑定客户,请先解绑后再删除
price.set.submit.statusNotAllowed=当前状态不允许提交审核
price.set.approve.statusNotAllowed=仅审核中的套餐可以生效
price.set.reject.statusNotAllowed=仅审核中的套餐可以驳回
price.set.disable.statusNotAllowed=仅生效中的套餐可以停用
price.set.edit.audit=审核中的套餐不允许修改
price.set.edit.stopped=已停用的套餐不允许修改,请使用复用新建
price.set.childEdit.audit=审核中的套餐不允许改明细或客户
price.set.childEdit.stopped=已停用的套餐不允许改明细或客户
price.set.detail.notExists=套餐明细不存在
price.set.detail.productCode.empty=明细产品代码不能为空
price.set.detail.country.empty=固定价明细必须填写国家
price.set.detail.weight.empty=固定价明细必须填写重量段
price.set.detail.freight.empty=固定价明细必须填写运费单价
price.set.detail.registration.empty=固定价明细必须填写挂号费
price.set.detail.roundMode.invalid=取值方式仅支持 UP / DOWN / HALF_UP
price.set.customer.notExists=客户绑定不存在
price.set.customer.unbindAudit=审核中的套餐不允许解绑客户
price.set.customer.customerId.empty=客户ID不能为空
price.set.customer.beginDate.empty=客户绑定生效日期不能为空
price.set.customer.date.invalid=客户绑定生效日期不能晚于失效日期
price.set.customer.alreadyBound=该客户已绑定套餐,一个客户只能绑定一个套餐
price.set.customer.priority.invalid=优先级必须大于等于 1
# 重量段 PrcWeight
price.weight.range.empty=起始重量和结束重量不能为空
price.weight.range.invalid=起始重量必须小于结束重量
# 分区 XtdZone
price.zone.delete.hasDivision=分区方案【{0}】存在区划明细,不允许删除
# 产品导入 BmsProduct
price.product.codeDate.exists=同一产品代码与生效日期已存在,不能覆盖历史数据
price.product.effectiveDate.empty=生效日期不能为空
price.product.import.effEmpty=缺少生效日期,已跳过
price.product.import.fileEmpty=上传文件不能为空
price.product.import.fileType=仅支持 xls / xlsx 文件
price.product.import.sheetNotFound=未找到「产品目录」sheet,请上传威狮B2C小包价表格格式文件
price.product.import.noData=产品目录无有效数据行
price.product.import.regionEmpty=bms_region 无可用国家数据,请先同步/维护国家表后再导入
price.product.import.partialFail=导入完成但存在失败项:新增 {0},跳过 {1};失败明细:{2}
price.product.import.effTooEarly=生效日期 {0} 早于当前开放版 {1},请使用更晚的生效日期导入
price.product.import.needFeeAlter=请先执行 SQL:bms-back/sql/price/product_country_fee_alter.sql(缺少运费/挂号费字段)
price.product.import.needExpireAlter=请先执行 SQL:bms-back/sql/price/product_country_expire_alter.sql(缺少失效日期/版本唯一键)
price.product.import.needCodeEffUnique=无法新增「同代码、不同生效日」的产品。请先执行 SQL:bms-back/sql/price/product_code_eff_unique_alter.sql(去掉 product_code 单列唯一,改为代码+生效日唯一)
price.product.import.success=导入成功:新增 {0} 个产品,跳过 {1} 个(同代码同生效日不覆盖);写入国家/重量段明细 {2} 行。
price.product.import.success.detail1=产品主数据按「产品代码+生效日期」新增,不覆盖已有记录。国家明细:新生效日晚于上次则保留历史,上次失效日=本次生效日。
price.product.import.success.detail2=范围:产品目录 + 重量段 + 运费/挂号费 + 尺寸/尾程/时效;国家码来自 bms_region。
price.product.import.success.unmatched=未匹配国家表(country_code 为空):{0}
# 报价试算 TmsPriceQuote(对外 TMS API 错误码,保持英文契约)
price.quote.priceNotHit=没有产品/国家/重量段绑定,暂无价格
price.quote.freightMissing1=产品默认运费为空
price.quote.freightMissing2=产品默认运费或挂号费为空
price.quote.freightMissing3=运费为空
price.quote.requestBodyRequired=请求体为空
price.quote.customerIdRequired=客户ID为空
price.quote.productCodeRequired=产品代码为空
price.quote.countryRequired=国家代码或国家名称为空
price.quote.weightInvalid=重量必须大于0
price.quote.bizDateInvalid=业务日期格式必须为yyyy-MM-dd
price.quote.fixedPackageNoDetails=套餐固定价格没有明细,使用产品默认价格
price.quote.noCustomerPackageOverride=没有客户套餐覆盖,使用产品默认运费/挂号费
price.quote.quoteIdRequired=报价ID为空
price.quote.hitCustomerFixedPackageDetail=命中客户套餐固定价格明细