统一修改ruoyi->bms

This commit is contained in:
caojia
2026-09-28 10:02:38 +08:00
parent 341afc4111
commit 0408b6c35e
639 changed files with 2776 additions and 2807 deletions
@@ -0,0 +1,66 @@
package com.bms.price.mapper;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.BmsProductCountry;
/**
* 产品国家明细 数据层
*
* @author bms
*/
public interface BmsProductCountryMapper
{
public List<BmsProductCountry> selectBmsProductCountryList(BmsProductCountry country);
public int insertBmsProductCountry(BmsProductCountry country);
/** 按明细行主键更新可编辑字段(重量段/运费/挂号费/尺寸/尾程/时效/生效失效日期) */
public int updateBmsProductCountry(BmsProductCountry country);
public int deleteByProductId(Long productId);
public int deleteByProductCode(String productCode);
public int deleteByProductCodeAndEffectiveDate(
@Param("productCode") String productCode,
@Param("effectiveDate") Date effectiveDate);
/** Max open (expire_date is null) effective_date for product */
public Date selectMaxOpenEffectiveDate(@Param("productCode") String productCode);
/** Close open versions: set expire_date = newEffectiveDate where effective_date &lt; newEffectiveDate */
public int expireOpenByProductCode(
@Param("productCode") String productCode,
@Param("newEffectiveDate") Date newEffectiveDate);
/** Recompute status from effective_date / expire_date vs today */
public int refreshStatusByDates();
/** Replace same-day version only */
public int deleteOpenByProductCodeAndEffectiveDate(
@Param("productCode") String productCode,
@Param("effectiveDate") Date effectiveDate);
/**
* Match by product + country + weight + bizDate (+ optional zoneCode).
* When zoneCode is empty, prefer rows without zone.
* When zoneCode is set, require matching zone_code.
*/
public BmsProductCountry selectMatchByProductCountryWeight(
@Param("productCode") String productCode,
@Param("countryCode") String countryCode,
@Param("countryName") String countryName,
@Param("zoneCode") String zoneCode,
@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,
@Param("countryName") String countryName,
@Param("bizDate") Date bizDate);
}
@@ -0,0 +1,44 @@
package com.bms.price.mapper;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.BmsProduct;
/**
* 产品主表 数据层
*
* @author bms
*/
public interface BmsProductMapper
{
public BmsProduct selectBmsProductById(Long productId);
/** Latest row by product_code (effective_date desc) */
public BmsProduct selectBmsProductByCode(String productCode);
/** Unique business key: product_code + effective_date */
public BmsProduct selectBmsProductByCodeAndDate(@Param("productCode") String productCode,
@Param("effectiveDate") Date effectiveDate);
/** Product version effective on bizDate */
public BmsProduct selectEffectiveBmsProductByCode(@Param("productCode") String productCode,
@Param("bizDate") Date bizDate);
public List<BmsProduct> selectBmsProductList(BmsProduct product);
public int insertBmsProduct(BmsProduct product);
public int updateBmsProduct(BmsProduct product);
public int deleteBmsProductByIds(Long[] productIds);
/** Close previous open versions: expire_date = newEffectiveDate */
public int expireOpenByProductCode(
@Param("productCode") String productCode,
@Param("newEffectiveDate") Date newEffectiveDate,
@Param("excludeId") Long excludeId);
/** Recompute status from effective_date / expire_date vs today */
public int refreshStatusByDates();
}
@@ -0,0 +1,20 @@
package com.bms.price.mapper;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
/** Read upstream main order from Oracle (SLAVE datasource). */
public interface OracleUpstreamOrderMapper
{
Map<String, Object> selectByTransferNo(@Param("orderTable") String orderTable, @Param("transferNo") String transferNo);
Map<String, Object> selectByOrderId(@Param("orderTable") String orderTable, @Param("orderNo") String orderNo);
Map<String, Object> selectByOrgOrderId(@Param("orderTable") String orderTable, @Param("orderNo") String orderNo);
Map<String, Object> selectByTrackId(@Param("orderTable") String orderTable, @Param("trackingNo") String trackingNo);
Map<String, Object> selectByBarcode(@Param("orderTable") String orderTable, @Param("trackingNo") String trackingNo);
Map<String, Object> selectByCustomerTrackId(@Param("orderTable") String orderTable, @Param("trackingNo") String trackingNo);
}
@@ -0,0 +1,18 @@
package com.bms.price.mapper;
import java.util.List;
import com.bms.price.domain.PrcBillingTask;
public interface PrcBillingTaskMapper
{
PrcBillingTask selectPrcBillingTaskById(Long taskId);
List<PrcBillingTask> selectPrcBillingTaskList(PrcBillingTask query);
int insertPrcBillingTask(PrcBillingTask task);
int updatePrcBillingTask(PrcBillingTask task);
/** CAS: WAITING -> processing claim not needed; writeback SUCCESS/FAILED */
int updateBillingResult(PrcBillingTask task);
}
@@ -0,0 +1,52 @@
package com.bms.price.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcCustomerPriceSet;
/**
* 客户套餐 数据层
*
* @author bms
*/
public interface PrcCustomerPriceSetMapper
{
public PrcCustomerPriceSet selectPrcCustomerPriceSetById(Long customerPricesetId);
public List<PrcCustomerPriceSet> selectPrcCustomerPriceSetList(PrcCustomerPriceSet customer);
public int insertPrcCustomerPriceSet(PrcCustomerPriceSet customer);
public int updatePrcCustomerPriceSet(PrcCustomerPriceSet customer);
public int deletePrcCustomerPriceSetByIds(Long[] customerPricesetIds);
public int deletePrcCustomerPriceSetByPriceSetId(Long priceSetId);
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);
public int countByCustomerCode(@Param("customerCode") String customerCode,
@Param("excludeId") Long excludeId,
@Param("excludePriceSetId") Long excludePriceSetId);
public int countOverlap(@Param("customerId") Long customerId,
@Param("priceSetId") Long priceSetId,
@Param("beginDate") java.util.Date beginDate,
@Param("endDate") java.util.Date endDate);
/**
* Customer binds valid on bizDate; package not stopped. Version match is done in quote service.
*/
public java.util.List<PrcCustomerPriceSet> selectEffectiveByCustomer(
@Param("customerId") Long customerId,
@Param("bizDate") java.util.Date bizDate);
public java.util.List<PrcCustomerPriceSet> selectEffectiveByCustomerCode(
@Param("customerCode") String customerCode,
@Param("bizDate") java.util.Date bizDate);
}
@@ -0,0 +1,46 @@
package com.bms.price.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcIncomeBillFee;
/** receivable bill fee mapper */
public interface PrcIncomeBillFeeMapper
{
public List<PrcIncomeBillFee> selectByBillId(String billId);
public List<PrcIncomeBillFee> selectByBillIds(@Param("billIds") List<String> billIds);
/** 查询指定计费订单中尚未生成应收账单的费用。 */
public List<PrcIncomeBillFee> selectUnbilledByBillIds(@Param("billIds") List<String> billIds,
@Param("arBillStatus") String arBillStatus);
public PrcIncomeBillFee selectByFeeId(String feeId);
/** Count fees of a bill under given ar_bill_status and fee_type (e.g. BILLED + BASIC_FREIGHT). */
public int countByBillIdAndArBillStatusAndFeeType(@Param("billId") String billId,
@Param("arBillStatus") String arBillStatus, @Param("feeType") String feeType);
public int insertPrcIncomeBillFee(PrcIncomeBillFee fee);
public int insertBatch(@Param("list") List<PrcIncomeBillFee> fees);
public int updatePrcIncomeBillFee(PrcIncomeBillFee fee);
public int updateArBillStatusByBillIds(@Param("billIds") List<String> billIds,
@Param("fromStatus") String fromStatus, @Param("toStatus") String toStatus);
/** 按费用明细 ID 精确更新状态,避免误更新同一订单的历史费用。 */
public int updateArBillStatusByFeeIds(@Param("feeIds") List<String> feeIds,
@Param("fromStatus") String fromStatus, @Param("toStatus") String toStatus);
/** 作废或失败清理后,仅在不存在其他有效账单关联时恢复为未出账。 */
public int restoreUnbilledIfNoActiveArBill(@Param("feeIds") List<String> feeIds);
/** 按应收账单批量恢复其关联费用,避免大账单组装超大的费用 ID 列表。 */
public int restoreUnbilledIfNoActiveArBillByArBillId(@Param("arBillId") Long arBillId);
public int deleteByFeeId(String feeId);
public int deleteByBillId(String billId);
}
@@ -0,0 +1,19 @@
package com.bms.price.mapper;
import com.bms.price.domain.PrcIncomeBill;
/** prc_income_bill mapper */
public interface PrcIncomeBillMapper
{
PrcIncomeBill selectByBillId(String billId);
PrcIncomeBill selectByIncomeBillId(String incomeBillId);
int insertPrcIncomeBill(PrcIncomeBill row);
int updatePrcIncomeBill(PrcIncomeBill row);
int upsertPrcIncomeBill(PrcIncomeBill row);
int deleteByBillId(String billId);
}
@@ -0,0 +1,15 @@
package com.bms.price.mapper;
import com.bms.price.domain.PrcOrderBillExt;
/** prc_order_bill_ext mapper */
public interface PrcOrderBillExtMapper
{
public PrcOrderBillExt selectByBillId(String billId);
public PrcOrderBillExt selectByOrderNo(String orderNo);
public int insertPrcOrderBillExt(PrcOrderBillExt ext);
public int upsertPrcOrderBillExt(PrcOrderBillExt ext);
}
@@ -0,0 +1,105 @@
package com.bms.price.mapper;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcOrderBill;
/** order bill header mapper */
public interface PrcOrderBillMapper
{
public PrcOrderBill selectPrcOrderBillByOrderNo(String orderNo);
public PrcOrderBill selectPrcOrderBillByTransferNo(String transferNo);
/** TMS 状态查询:按订单号、运单号或转单号精确匹配,最多返回两条用于识别歧义。 */
List<PrcOrderBill> selectPrcOrderBillByTmsIdentifier(@Param("identifier") String identifier);
public PrcOrderBill selectPrcOrderBillById(String billId);
public List<PrcOrderBill> selectPrcOrderBillList(PrcOrderBill bill);
/** 订单号下拉搜索:按关键词模糊匹配,返回去重后的订单号(按最近创建排序,限量返回) */
public List<String> selectOrderNoOptions(@Param("keyword") String keyword, @Param("limit") int limit);
/** 运单号下拉搜索:按关键词模糊匹配,返回去重后的运单号(按最近创建排序,限量返回) */
public List<String> selectTrackingNoOptions(@Param("keyword") String keyword, @Param("limit") int limit);
/** 转单号下拉搜索:按关键词模糊匹配,返回去重后的转单号(按最近创建排序,限量返回) */
public List<String> selectTransferNoOptions(@Param("keyword") String keyword, @Param("limit") int limit);
/** 应收账单生成读取指定客户截止日期前仍存在未出账费用的订单计费快照。 */
public List<PrcOrderBill> selectPrcOrderBillByCustomerPeriod(@Param("customerId") Long customerId,
@Param("customerCode") String customerCode, @Param("orderIdentifiers") List<String> orderIdentifiers,
@Param("excludeOrderIdentifiers") List<String> excludeOrderIdentifiers,
@Param("cutoffDate") Date cutoffDate, @Param("currency") String currency,
@Param("arBillStatuses") List<String> arBillStatuses, @Param("feeArBillStatus") String feeArBillStatus,
@Param("excludedBillIds") List<String> excludedBillIds);
/** 统计应收账单预览结果金额,供全选模式展示。 */
BigDecimal sumPrcOrderBillIncomeByCustomerPeriod(@Param("customerId") Long customerId,
@Param("customerCode") String customerCode, @Param("orderIdentifiers") List<String> orderIdentifiers,
@Param("excludeOrderIdentifiers") List<String> excludeOrderIdentifiers,
@Param("cutoffDate") Date cutoffDate, @Param("currency") String currency,
@Param("arBillStatuses") List<String> arBillStatuses, @Param("feeArBillStatus") String feeArBillStatus);
/** 异步生成账单按 bill_id 游标读取一批来源订单。 */
List<PrcOrderBill> selectPrcOrderBillByCustomerPeriodCursor(@Param("customerId") Long customerId,
@Param("customerCode") String customerCode, @Param("orderIdentifiers") List<String> orderIdentifiers,
@Param("cutoffDate") Date cutoffDate, @Param("currency") String currency,
@Param("arBillStatuses") List<String> arBillStatuses, @Param("feeArBillStatus") String feeArBillStatus,
@Param("snapshotCreateTime") Date snapshotCreateTime,
@Param("lastSourceBillId") String lastSourceBillId, @Param("billIds") List<String> billIds,
@Param("excludedBillIds") List<String> excludedBillIds, @Param("limit") int limit);
int countPrcOrderBillByCustomerPeriod(@Param("customerId") Long customerId,
@Param("customerCode") String customerCode, @Param("orderIdentifiers") List<String> orderIdentifiers,
@Param("cutoffDate") Date cutoffDate, @Param("currency") String currency,
@Param("arBillStatuses") List<String> arBillStatuses, @Param("feeArBillStatus") String feeArBillStatus,
@Param("snapshotCreateTime") Date snapshotCreateTime,
@Param("billIds") List<String> billIds, @Param("excludedBillIds") List<String> excludedBillIds);
/** 按生成账单时用户勾选的订单读取,并再次校验账单筛选条件。 */
public List<PrcOrderBill> selectPrcOrderBillByCustomerCutoffAndIds(@Param("customerId") Long customerId,
@Param("customerCode") String customerCode, @Param("orderIdentifiers") List<String> orderIdentifiers,
@Param("cutoffDate") Date cutoffDate,
@Param("currency") String currency, @Param("billIds") List<String> billIds,
@Param("arBillStatuses") List<String> arBillStatuses, @Param("feeArBillStatus") String feeArBillStatus);
/** 原子占用订单,防止同一订单被并发生成到多张应收账单。 */
public int claimArBillOrders(@Param("billIds") List<String> billIds, @Param("operator") String operator,
@Param("arBillStatuses") List<String> arBillStatuses, @Param("toStatus") String toStatus);
/** 作废账单后释放订单,允许后续重新生成新版本账单。 */
public int releaseArBillOrders(@Param("billIds") List<String> billIds, @Param("operator") String operator,
@Param("fromStatus") String fromStatus, @Param("toStatus") String toStatus);
int releaseArBillOrdersByArBillId(@Param("arBillId") Long arBillId, @Param("operator") String operator,
@Param("fromStatus") String fromStatus, @Param("toStatus") String toStatus);
/** 根据费用明细状态汇总订单的 UNBILLED/PARTIAL/BILLED 状态。 */
int refreshArBillStatusByBillIds(@Param("billIds") List<String> billIds);
/** 按应收账单关联的来源订单批量汇总状态,适用于大账单清理和作废。 */
int refreshArBillStatusByArBillId(@Param("arBillId") Long arBillId);
public int insertPrcOrderBill(PrcOrderBill bill);
public int updatePrcOrderBill(PrcOrderBill bill);
/** 根据客户代码+欠费状态查询订单,按下单时间升序(核销清欠用) */
List<PrcOrderBill> selectArrearsByCustomerCode(@Param("customerCode") String customerCode,
@Param("creditArrearsStatus") String creditArrearsStatus);
/** 更新订单额度欠费状态 */
int updateCreditArrearsStatus(@Param("billId") String billId,
@Param("creditArrearsStatus") String creditArrearsStatus,
@Param("updateBy") String updateBy);
public int updateOrderBillAmounts(@Param("billId") String billId,
@Param("surchargeAmount") BigDecimal surchargeAmount,
@Param("incomeTotal") BigDecimal incomeTotal,
@Param("payTotal") BigDecimal payTotal);
}
@@ -0,0 +1,17 @@
package com.bms.price.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcPayBillFee;
/** payable bill fee mapper */
public interface PrcPayBillFeeMapper
{
public List<PrcPayBillFee> selectByBillId(String billId);
public int insertPrcPayBillFee(PrcPayBillFee fee);
public int insertBatch(@Param("list") List<PrcPayBillFee> fees);
public int deleteByBillId(String billId);
}
@@ -0,0 +1,19 @@
package com.bms.price.mapper;
import com.bms.price.domain.PrcPayBill;
/** prc_pay_bill mapper */
public interface PrcPayBillMapper
{
PrcPayBill selectByBillId(String billId);
PrcPayBill selectByPayBillId(String payBillId);
int insertPrcPayBill(PrcPayBill row);
int updatePrcPayBill(PrcPayBill row);
int upsertPrcPayBill(PrcPayBill row);
int deleteByBillId(String billId);
}
@@ -0,0 +1,75 @@
package com.bms.price.mapper;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcPriceSetDetail;
/**
* 价格套餐明细 数据层
*
* @author bms
*/
public interface PrcPriceSetDetailMapper
{
public PrcPriceSetDetail selectPrcPriceSetDetailById(Long psdId);
public List<PrcPriceSetDetail> selectPrcPriceSetDetailList(PrcPriceSetDetail detail);
/** 版本内去重后的 产品/国家/维度组合行(用于明细搜索下拉选项) */
public List<PrcPriceSetDetail> selectDetailOptionRows(@Param("psvId") Long psvId);
public int insertPrcPriceSetDetail(PrcPriceSetDetail detail);
public int updatePrcPriceSetDetail(PrcPriceSetDetail detail);
public int deletePrcPriceSetDetailByIds(Long[] psdIds);
public int deletePrcPriceSetDetailByPriceSetId(Long priceSetId);
public int deletePrcPriceSetDetailByPsvId(Long psvId);
/** legacy rows: price_set_id match but psv_id is null */
public int deleteOrphanDetailsByPriceSetId(Long priceSetId);
public int countProductByPriceSetId(Long priceSetId);
public int countByPriceSetId(Long priceSetId);
public int countByPsvId(Long psvId);
/** Copy all details from src version into new version (new psd_id, same price_set_id) */
public int copyDetailsFromVersion(@Param("srcPsvId") Long srcPsvId, @Param("newPsvId") Long newPsvId);
/**
* FIXED: insert details from active product + country library (asOf window or openOnly fallback).
* @return inserted row count
*/
public int insertFixedDetailsFromLibrary(
@Param("priceSetId") Long priceSetId,
@Param("psvId") Long psvId,
@Param("asOf") Date asOf,
@Param("openOnly") boolean openOnly);
/** DISCOUNT: one detail row per active product */
public int insertDiscountDetailsFromLibrary(
@Param("priceSetId") Long priceSetId,
@Param("psvId") Long psvId);
/** FIXED: product + country + zone + productCountryId / weight; optional psvId scopes to version */
public PrcPriceSetDetail selectFixedMatch(
@Param("priceSetId") Long priceSetId,
@Param("psvId") Long psvId,
@Param("productCode") String productCode,
@Param("countryCode") String countryCode,
@Param("countryName") String countryName,
@Param("zoneCode") String zoneCode,
@Param("productCountryId") Long productCountryId,
@Param("weightLabel") String weightLabel);
/** DISCOUNT by product; optional psvId scopes to version */
public PrcPriceSetDetail selectDiscountMatch(
@Param("priceSetId") Long priceSetId,
@Param("psvId") Long psvId,
@Param("productCode") String productCode);
}
@@ -0,0 +1,26 @@
package com.bms.price.mapper;
import java.util.List;
import com.bms.price.domain.PrcPriceSet;
/**
* 价格套餐 数据层
*
* @author bms
*/
public interface PrcPriceSetMapper
{
public PrcPriceSet selectPrcPriceSetById(Long priceSetId);
public List<PrcPriceSet> selectPrcPriceSetList(PrcPriceSet set);
public int insertPrcPriceSet(PrcPriceSet set);
public int updatePrcPriceSet(PrcPriceSet set);
public int updatePrcPriceSetStatus(PrcPriceSet set);
public int deletePrcPriceSetByIds(Long[] priceSetIds);
public int countByName(PrcPriceSet set);
}
@@ -0,0 +1,36 @@
package com.bms.price.mapper;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcPriceSetVersion;
/**
* Price set version
*/
public interface PrcPriceSetVersionMapper
{
public PrcPriceSetVersion selectPrcPriceSetVersionById(Long psvId);
public List<PrcPriceSetVersion> selectPrcPriceSetVersionList(PrcPriceSetVersion version);
public Integer selectMaxVersionSeq(@Param("priceSetId") Long priceSetId);
public int insertPrcPriceSetVersion(PrcPriceSetVersion version);
public int updatePrcPriceSetVersion(PrcPriceSetVersion version);
public int deletePrcPriceSetVersionByIds(Long[] psvIds);
public int deletePrcPriceSetVersionByPriceSetId(Long priceSetId);
public List<Long> selectPriceSetIds();
/**
* Version effective at asOf: effective_time &lt;= asOf and (expire_time null or &gt; asOf).
* Prefer latest effective_time.
*/
public PrcPriceSetVersion selectActiveByPriceSetAt(
@Param("priceSetId") Long priceSetId,
@Param("asOf") Date asOf);
}
@@ -0,0 +1,36 @@
package com.bms.price.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcPriceSetVersionSurcharge;
/**
* Price set version surcharge snapshot
*/
public interface PrcPriceSetVersionSurchargeMapper
{
public PrcPriceSetVersionSurcharge selectPrcPriceSetVersionSurchargeById(Long psvsId);
public List<PrcPriceSetVersionSurcharge> selectPrcPriceSetVersionSurchargeList(PrcPriceSetVersionSurcharge surcharge);
public int insertPrcPriceSetVersionSurcharge(PrcPriceSetVersionSurcharge surcharge);
public int updatePrcPriceSetVersionSurcharge(PrcPriceSetVersionSurcharge surcharge);
public int deletePrcPriceSetVersionSurchargeByIds(Long[] psvsIds);
public int deleteByPsvId(Long psvId);
public int deleteByPsdId(Long psdId);
public List<PrcPriceSetVersionSurcharge> selectByPsdIds(@Param("psdIds") List<Long> psdIds);
/** Snapshot all applicable product-rel surcharges for details under psvId (library create). */
public int insertFromLibraryRels(@Param("psvId") Long psvId, @Param("createBy") String createBy);
/** Copy surcharge snapshots from src version onto new version details (match by detail keys). */
public int copySurchargesFromVersion(
@Param("srcPsvId") Long srcPsvId,
@Param("newPsvId") Long newPsvId,
@Param("createBy") String createBy);
}
@@ -0,0 +1,17 @@
package com.bms.price.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcQuoteFee;
/** billing quote fee detail mapper */
public interface PrcQuoteFeeMapper
{
public List<PrcQuoteFee> selectByQuoteId(String quoteId);
public int insertPrcQuoteFee(PrcQuoteFee fee);
public int insertBatch(@Param("list") List<PrcQuoteFee> fees);
public int deleteByQuoteId(String quoteId);
}
@@ -0,0 +1,22 @@
package com.bms.price.mapper;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcQuote;
/** billing quote header mapper */
public interface PrcQuoteMapper
{
public PrcQuote selectPrcQuoteByKey(String quoteKey);
public PrcQuote selectPrcQuoteById(String quoteId);
public List<PrcQuote> selectPrcQuoteList(PrcQuote quote);
public int insertPrcQuote(PrcQuote quote);
public int updateQuoteAmounts(@Param("quoteId") String quoteId,
@Param("surchargeAmount") BigDecimal surchargeAmount,
@Param("payableTotal") BigDecimal payableTotal);
}
@@ -0,0 +1,24 @@
package com.bms.price.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcSurcharge;
/**
* 附加费配置 数据层
*
* 附加费为计费主数据:不做物理修改/删除,编辑=作废旧记录插入新记录,删除=仅作废。
*
* @author bms
*/
public interface PrcSurchargeMapper
{
public PrcSurcharge selectPrcSurchargeById(Long scId);
public List<PrcSurcharge> selectPrcSurchargeList(PrcSurcharge surcharge);
public int insertPrcSurcharge(PrcSurcharge surcharge);
/** 状态原地更新(不新增数据):停用置 of,版本化作废旧记录置 vd */
public int updateSsCodeByIds(@Param("scIds") Long[] scIds, @Param("ssCode") String ssCode, @Param("operator") String operator);
}
@@ -0,0 +1,28 @@
package com.bms.price.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcSurchargeRel;
/**
* 附加费与产品/明细关联 数据层
*
* @author bms
*/
public interface PrcSurchargeRelMapper
{
/**
* 查询关联列表(JOIN 附加费 + 明细),支持按 productCode / scId 过滤
*/
public List<PrcSurchargeRel> selectPrcSurchargeRelList(PrcSurchargeRel rel);
public int insertPrcSurchargeRel(PrcSurchargeRel rel);
public int deletePrcSurchargeRelByIds(Long[] relIds);
/** 删除产品时清理其关联 */
public int deleteRelByProductCodes(String[] productCodes);
/** 附加费版本化编辑后,把产品关联从旧记录重指向新记录 */
public int rebindRelScId(@Param("oldScId") Long oldScId, @Param("newScId") Long newScId, @Param("operator") String operator);
}
@@ -0,0 +1,26 @@
package com.bms.price.mapper;
import java.util.List;
import com.bms.price.domain.PrcWeightSectionDetail;
/**
* 重量段明细 数据层
*
* @author bms
*/
public interface PrcWeightSectionDetailMapper
{
public PrcWeightSectionDetail selectPrcWeightSectionDetailById(Long wsdId);
public List<PrcWeightSectionDetail> selectPrcWeightSectionDetailListByWstId(Long wstId);
public List<PrcWeightSectionDetail> selectPrcWeightSectionDetailList(PrcWeightSectionDetail detail);
public int insertPrcWeightSectionDetail(PrcWeightSectionDetail detail);
public int updatePrcWeightSectionDetail(PrcWeightSectionDetail detail);
public int deletePrcWeightSectionDetailByIds(Long[] wsdIds);
public int countByWstId(Long wstId);
}
@@ -0,0 +1,22 @@
package com.bms.price.mapper;
import java.util.List;
import com.bms.price.domain.PrcWeightSectionTemplate;
/**
* 重量段模板 数据层
*
* @author bms
*/
public interface PrcWeightSectionTemplateMapper
{
public PrcWeightSectionTemplate selectPrcWeightSectionTemplateById(Long wstId);
public List<PrcWeightSectionTemplate> selectPrcWeightSectionTemplateList(PrcWeightSectionTemplate template);
public int insertPrcWeightSectionTemplate(PrcWeightSectionTemplate template);
public int updatePrcWeightSectionTemplate(PrcWeightSectionTemplate template);
public int deletePrcWeightSectionTemplateByIds(Long[] wstIds);
}
@@ -0,0 +1,36 @@
package com.bms.price.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.bms.price.domain.PrcZone;
import com.bms.price.domain.PrcZoneDetail;
public interface PrcZoneDetailMapper
{
public PrcZoneDetail selectPrcZoneDetailById(Long detailId);
public List<PrcZoneDetail> selectPrcZoneDetailList(PrcZoneDetail detail);
public int countByZoneId(Long zoneId);
public int countByRegionId(Long regionId);
public int insertPrcZoneDetail(PrcZoneDetail detail);
public int insertPrcZoneDetailBatch(@Param("list") List<PrcZoneDetail> list);
public int updatePrcZoneDetail(PrcZoneDetail detail);
public int deletePrcZoneDetailByIds(Long[] detailIds);
public int deletePrcZoneDetailByZoneId(Long zoneId);
public int deletePrcZoneDetailByRegionId(Long regionId);
/**
* Resolve zone by country ISO2 + postcode (exact first, then longest prefix).
*/
public PrcZone selectZoneByCountryPostcode(
@Param("countryCode") String countryCode,
@Param("postcode") String postcode);
}
@@ -0,0 +1,30 @@
package com.bms.price.mapper;
import java.util.List;
import com.bms.price.domain.PrcZone;
import com.bms.price.domain.PrcZoneRegion;
public interface PrcZoneMapper
{
public PrcZone selectPrcZoneById(Long zoneId);
public List<PrcZone> selectPrcZoneList(PrcZone zone);
public List<PrcZone> selectPrcZoneListByRegionId(Long regionId);
public List<PrcZoneRegion> selectZoneRegionList(PrcZoneRegion query);
public PrcZoneRegion selectZoneRegionById(Long regionId);
public int countByRegionId(Long regionId);
public int insertPrcZone(PrcZone zone);
public int updatePrcZone(PrcZone zone);
public int deletePrcZoneByIds(Long[] zoneIds);
public int deletePrcZoneByRegionId(Long regionId);
public int deletePrcZoneByRegionIds(Long[] regionIds);
}