简化实体代码

This commit is contained in:
wuweihua
2026-09-08 09:29:42 +08:00
parent 9e98cd791e
commit 647be14d66
19 changed files with 109 additions and 744 deletions
+6
View File
@@ -23,6 +23,12 @@
<artifactId>ruoyi-common</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>
@@ -3,15 +3,13 @@ package com.ruoyi.price.domain;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* BMS产品主表 bms_product
*
* @author ruoyi
*/
/** BMS产品主表 bms_product */
@Data
@EqualsAndHashCode(callSuper = true)
public class BmsProduct extends BaseEntity
{
private static final long serialVersionUID = 1L;
@@ -30,53 +28,6 @@ public class BmsProduct extends BaseEntity
private String status;
private String sourceSheet;
private Long tmsId;
/** 国家明细数(列表展示) */
private Integer countryCount;
private List<BmsProductCountry> countries;
public Long getProductId() { return productId; }
public void setProductId(Long productId) { this.productId = productId; }
public String getProductCode() { return productCode; }
public void setProductCode(String productCode) { this.productCode = productCode; }
public String getProductName() { return productName; }
public void setProductName(String productName) { this.productName = productName; }
public String getServiceLevel() { return serviceLevel; }
public void setServiceLevel(String serviceLevel) { this.serviceLevel = serviceLevel; }
public String getCargoAttr() { return cargoAttr; }
public void setCargoAttr(String cargoAttr) { this.cargoAttr = cargoAttr; }
public String getDestRegion() { return destRegion; }
public void setDestRegion(String destRegion) { this.destRegion = destRegion; }
public String getUpdateNote() { return updateNote; }
public void setUpdateNote(String updateNote) { this.updateNote = updateNote; }
public String getTaxMode() { return taxMode; }
public void setTaxMode(String taxMode) { this.taxMode = taxMode; }
public Date getEffectiveDate() { return effectiveDate; }
public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; }
public String getStatus() { return status; }
public void setStatus(String status) { this.status = status; }
public String getSourceSheet() { return sourceSheet; }
public void setSourceSheet(String sourceSheet) { this.sourceSheet = sourceSheet; }
public Long getTmsId() { return tmsId; }
public void setTmsId(Long tmsId) { this.tmsId = tmsId; }
public Integer getCountryCount() { return countryCount; }
public void setCountryCount(Integer countryCount) { this.countryCount = countryCount; }
public List<BmsProductCountry> getCountries() { return countries; }
public void setCountries(List<BmsProductCountry> countries) { this.countries = countries; }
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("productId", getProductId())
.append("productCode", getProductCode())
.append("productName", getProductName())
.append("serviceLevel", getServiceLevel())
.append("cargoAttr", getCargoAttr())
.append("destRegion", getDestRegion())
.append("taxMode", getTaxMode())
.append("effectiveDate", getEffectiveDate())
.append("status", getStatus())
.append("sourceSheet", getSourceSheet())
.toString();
}
}
@@ -4,14 +4,10 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
/**
* 产品国家服务明细 bms_product_country(含重量段,便于计费匹配)
*
* @author ruoyi
*/
/** 产品国家服务明细 bms_product_country */
@Data
public class BmsProductCountry implements Serializable
{
private static final long serialVersionUID = 1L;
@@ -20,13 +16,9 @@ public class BmsProductCountry implements Serializable
private String productCode;
private String countryName;
private String countryCode;
/** 重量段最小值 KG */
private BigDecimal weightMin;
/** 重量段最大值 KG */
private BigDecimal weightMax;
/** 运费 RMB/KG */
private BigDecimal freightPrice;
/** 挂号费 RMB/票 */
private BigDecimal registrationFee;
private String sizeLimit;
private String lastMile;
@@ -37,48 +29,4 @@ public class BmsProductCountry implements Serializable
private Date createdAt;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updatedAt;
public Long getDetailId() { return detailId; }
public void setDetailId(Long detailId) { this.detailId = detailId; }
public String getProductCode() { return productCode; }
public void setProductCode(String productCode) { this.productCode = productCode; }
public String getCountryName() { return countryName; }
public void setCountryName(String countryName) { this.countryName = countryName; }
public String getCountryCode() { return countryCode; }
public void setCountryCode(String countryCode) { this.countryCode = countryCode; }
public BigDecimal getWeightMin() { return weightMin; }
public void setWeightMin(BigDecimal weightMin) { this.weightMin = weightMin; }
public BigDecimal getWeightMax() { return weightMax; }
public void setWeightMax(BigDecimal weightMax) { this.weightMax = weightMax; }
public BigDecimal getFreightPrice() { return freightPrice; }
public void setFreightPrice(BigDecimal freightPrice) { this.freightPrice = freightPrice; }
public BigDecimal getRegistrationFee() { return registrationFee; }
public void setRegistrationFee(BigDecimal registrationFee) { this.registrationFee = registrationFee; }
public String getSizeLimit() { return sizeLimit; }
public void setSizeLimit(String sizeLimit) { this.sizeLimit = sizeLimit; }
public String getLastMile() { return lastMile; }
public void setLastMile(String lastMile) { this.lastMile = lastMile; }
public String getLeadTime() { return leadTime; }
public void setLeadTime(String leadTime) { this.leadTime = leadTime; }
public Date getEffectiveDate() { return effectiveDate; }
public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; }
public Date getCreatedAt() { return createdAt; }
public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; }
public Date getUpdatedAt() { return updatedAt; }
public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; }
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("detailId", getDetailId())
.append("productCode", getProductCode())
.append("countryName", getCountryName())
.append("countryCode", getCountryCode())
.append("weightMin", getWeightMin())
.append("weightMax", getWeightMax())
.append("freightPrice", getFreightPrice())
.append("registrationFee", getRegistrationFee())
.toString();
}
}
@@ -2,15 +2,13 @@ package com.ruoyi.price.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 客户套餐 prc_customer_price_set
*
* @author ruoyi
*/
/** 客户套餐 prc_customer_price_set */
@Data
@EqualsAndHashCode(callSuper = true)
public class PrcCustomerPriceSet extends BaseEntity
{
private static final long serialVersionUID = 1L;
@@ -19,39 +17,11 @@ public class PrcCustomerPriceSet extends BaseEntity
private Long priceSetId;
private Long customerId;
private String customerName;
/** 优先级,数字越小越优先 */
/** 数字越小越优先 */
private Integer bindPriority;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date prBegindate;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date prEnddate;
private String priceSetNote;
public Long getCustomerPricesetId() { return customerPricesetId; }
public void setCustomerPricesetId(Long customerPricesetId) { this.customerPricesetId = customerPricesetId; }
public Long getPriceSetId() { return priceSetId; }
public void setPriceSetId(Long priceSetId) { this.priceSetId = priceSetId; }
public Long getCustomerId() { return customerId; }
public void setCustomerId(Long customerId) { this.customerId = customerId; }
public String getCustomerName() { return customerName; }
public void setCustomerName(String customerName) { this.customerName = customerName; }
public Integer getBindPriority() { return bindPriority; }
public void setBindPriority(Integer bindPriority) { this.bindPriority = bindPriority; }
public Date getPrBegindate() { return prBegindate; }
public void setPrBegindate(Date prBegindate) { this.prBegindate = prBegindate; }
public Date getPrEnddate() { return prEnddate; }
public void setPrEnddate(Date prEnddate) { this.prEnddate = prEnddate; }
public String getPriceSetNote() { return priceSetNote; }
public void setPriceSetNote(String priceSetNote) { this.priceSetNote = priceSetNote; }
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("customerPricesetId", getCustomerPricesetId())
.append("priceSetId", getPriceSetId())
.append("customerId", getCustomerId())
.append("bindPriority", getBindPriority())
.toString();
}
}
@@ -4,112 +4,39 @@ import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 价格套餐 prc_price_set
*
* @author ruoyi
*/
/** 价格套餐 prc_price_set */
@Data
@EqualsAndHashCode(callSuper = true)
public class PrcPriceSet extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 价格套餐id */
private Long priceSetId;
/** 套餐编码 */
private String priceSetCode;
/** 套餐名称 */
private String priceSetName;
/** 备注 */
private String priceSetNote;
/** 计价类型 FIXED / DISCOUNT */
/** FIXED / DISCOUNT */
private String setType;
/** 默认折扣百分数 */
private BigDecimal defaultDiscount;
/** 默认套餐 Y */
private String defaultType;
/** 试算标记 Y */
private String calculateSign;
/** 生效日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date effectiveDate;
/** 失效日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date expireDate;
/** 状态 D/A/E/R/S */
/** D/A/E/R/S */
private String status;
/** 租户ID */
private Long tmsId;
/** 产品数(列表) */
private Integer productCount;
/** 客户数(列表) */
private Integer customerCount;
/** 是否已过期(计算字段) */
private Boolean expired;
/** 列表搜索关键字 */
private String keyword;
/** 保存后是否提交审核 Y */
private String submitFlag;
/** 套餐明细(向导保存) */
private List<PrcPriceSetDetail> details;
/** 绑定客户(向导保存) */
private List<PrcCustomerPriceSet> customers;
public Long getPriceSetId() { return priceSetId; }
public void setPriceSetId(Long priceSetId) { this.priceSetId = priceSetId; }
public String getPriceSetCode() { return priceSetCode; }
public void setPriceSetCode(String priceSetCode) { this.priceSetCode = priceSetCode; }
public String getPriceSetName() { return priceSetName; }
public void setPriceSetName(String priceSetName) { this.priceSetName = priceSetName; }
public String getPriceSetNote() { return priceSetNote; }
public void setPriceSetNote(String priceSetNote) { this.priceSetNote = priceSetNote; }
public String getSetType() { return setType; }
public void setSetType(String setType) { this.setType = setType; }
public BigDecimal getDefaultDiscount() { return defaultDiscount; }
public void setDefaultDiscount(BigDecimal defaultDiscount) { this.defaultDiscount = defaultDiscount; }
public String getDefaultType() { return defaultType; }
public void setDefaultType(String defaultType) { this.defaultType = defaultType; }
public String getCalculateSign() { return calculateSign; }
public void setCalculateSign(String calculateSign) { this.calculateSign = calculateSign; }
public Date getEffectiveDate() { return effectiveDate; }
public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; }
public Date getExpireDate() { return expireDate; }
public void setExpireDate(Date expireDate) { this.expireDate = expireDate; }
public String getStatus() { return status; }
public void setStatus(String status) { this.status = status; }
public Long getTmsId() { return tmsId; }
public void setTmsId(Long tmsId) { this.tmsId = tmsId; }
public Integer getProductCount() { return productCount; }
public void setProductCount(Integer productCount) { this.productCount = productCount; }
public Integer getCustomerCount() { return customerCount; }
public void setCustomerCount(Integer customerCount) { this.customerCount = customerCount; }
public Boolean getExpired() { return expired; }
public void setExpired(Boolean expired) { this.expired = expired; }
public String getKeyword() { return keyword; }
public void setKeyword(String keyword) { this.keyword = keyword; }
public String getSubmitFlag() { return submitFlag; }
public void setSubmitFlag(String submitFlag) { this.submitFlag = submitFlag; }
public List<PrcPriceSetDetail> getDetails() { return details; }
public void setDetails(List<PrcPriceSetDetail> details) { this.details = details; }
public List<PrcCustomerPriceSet> getCustomers() { return customers; }
public void setCustomers(List<PrcCustomerPriceSet> customers) { this.customers = customers; }
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("priceSetId", getPriceSetId())
.append("priceSetCode", getPriceSetCode())
.append("priceSetName", getPriceSetName())
.append("setType", getSetType())
.append("status", getStatus())
.append("effectiveDate", getEffectiveDate())
.append("expireDate", getExpireDate())
.toString();
}
}
@@ -1,34 +1,17 @@
package com.ruoyi.price.domain;
/**
* 套餐校验项
*
* @author ruoyi
*/
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/** 套餐校验项 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PrcPriceSetCheckItem
{
/** 校验项名称 */
private String item;
/** PASS / WARN / FAIL / INFO */
private String result;
/** 说明 */
private String message;
public PrcPriceSetCheckItem()
{
}
public PrcPriceSetCheckItem(String item, String result, String message)
{
this.item = item;
this.result = result;
this.message = message;
}
public String getItem() { return item; }
public void setItem(String item) { this.item = item; }
public String getResult() { return result; }
public void setResult(String result) { this.result = result; }
public String getMessage() { return message; }
public void setMessage(String message) { this.message = message; }
}
@@ -4,14 +4,10 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
/**
* 价格套餐明细 prc_price_set_detail
*
* @author ruoyi
*/
/** 价格套餐明细 prc_price_set_detail */
@Data
public class PrcPriceSetDetail implements Serializable
{
private static final long serialVersionUID = 1L;
@@ -25,64 +21,16 @@ public class PrcPriceSetDetail implements Serializable
private Long zdId;
private Long wsdId;
private String weightLabel;
/** 关联 bms_product_country.detail_id */
/** bms_product_country.detail_id */
private Long productCountryId;
private BigDecimal fvValue;
private BigDecimal fvRegistrationFee;
private BigDecimal discountValue;
/** 取值方式:UP / DOWN / HALF_UP(字典 bms_round_mode) */
/** UP / DOWN / HALF_UP */
private String roundMode;
private Integer prId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createdAt;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updatedAt;
public Long getPsdId() { return psdId; }
public void setPsdId(Long psdId) { this.psdId = psdId; }
public Long getPriceSetId() { return priceSetId; }
public void setPriceSetId(Long priceSetId) { this.priceSetId = priceSetId; }
public String getProductCode() { return productCode; }
public void setProductCode(String productCode) { this.productCode = productCode; }
public String getProductName() { return productName; }
public void setProductName(String productName) { this.productName = productName; }
public String getCountryCode() { return countryCode; }
public void setCountryCode(String countryCode) { this.countryCode = countryCode; }
public String getCountryName() { return countryName; }
public void setCountryName(String countryName) { this.countryName = countryName; }
public Long getZdId() { return zdId; }
public void setZdId(Long zdId) { this.zdId = zdId; }
public Long getWsdId() { return wsdId; }
public void setWsdId(Long wsdId) { this.wsdId = wsdId; }
public String getWeightLabel() { return weightLabel; }
public void setWeightLabel(String weightLabel) { this.weightLabel = weightLabel; }
public Long getProductCountryId() { return productCountryId; }
public void setProductCountryId(Long productCountryId) { this.productCountryId = productCountryId; }
public BigDecimal getFvValue() { return fvValue; }
public void setFvValue(BigDecimal fvValue) { this.fvValue = fvValue; }
public BigDecimal getFvRegistrationFee() { return fvRegistrationFee; }
public void setFvRegistrationFee(BigDecimal fvRegistrationFee) { this.fvRegistrationFee = fvRegistrationFee; }
public BigDecimal getDiscountValue() { return discountValue; }
public void setDiscountValue(BigDecimal discountValue) { this.discountValue = discountValue; }
public String getRoundMode() { return roundMode; }
public void setRoundMode(String roundMode) { this.roundMode = roundMode; }
public Integer getPrId() { return prId; }
public void setPrId(Integer prId) { this.prId = prId; }
public Date getCreatedAt() { return createdAt; }
public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; }
public Date getUpdatedAt() { return updatedAt; }
public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; }
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("psdId", getPsdId())
.append("priceSetId", getPriceSetId())
.append("productCode", getProductCode())
.append("countryCode", getCountryCode())
.append("wsdId", getWsdId())
.append("productCountryId", getProductCountryId())
.toString();
}
}
@@ -1,84 +1,30 @@
package com.ruoyi.price.domain;
import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 附加费配置 prc_surcharge
*
* @author ruoyi
*/
/** 附加费配置 prc_surcharge */
@Data
@EqualsAndHashCode(callSuper = true)
public class PrcSurcharge extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 附加费配置ID */
private Long scId;
/** 附加费名称 */
private String scName;
/** 费用类型(字典 bms_fee_type) */
/** 字典 bms_fee_type */
private String feeType;
/** 计费方式 FIXED固定金额/WEIGHT按重量/RATE按比例 */
/** FIXED / WEIGHT / RATE */
private String chargeType;
/** 计费数值 */
private BigDecimal chargeValue;
/** 币种 */
private String currency;
/** 取值方式(字典 bms_round_mode)UP/DOWN/HALF_UP */
/** 字典 bms_round_mode:UP / DOWN / HALF_UP */
private String roundMode;
/** 状态码 on/of */
/** on / of */
private String ssCode;
/** 适用国家ISO2(空=全部) */
private String countryCode;
/** 备注 */
private String scNote;
/** 租户ID */
private Long tmsId;
public Long getScId() { return scId; }
public void setScId(Long scId) { this.scId = scId; }
public String getScName() { return scName; }
public void setScName(String scName) { this.scName = scName; }
public String getFeeType() { return feeType; }
public void setFeeType(String feeType) { this.feeType = feeType; }
public String getChargeType() { return chargeType; }
public void setChargeType(String chargeType) { this.chargeType = chargeType; }
public BigDecimal getChargeValue() { return chargeValue; }
public void setChargeValue(BigDecimal chargeValue) { this.chargeValue = chargeValue; }
public String getCurrency() { return currency; }
public void setCurrency(String currency) { this.currency = currency; }
public String getRoundMode() { return roundMode; }
public void setRoundMode(String roundMode) { this.roundMode = roundMode; }
public String getSsCode() { return ssCode; }
public void setSsCode(String ssCode) { this.ssCode = ssCode; }
public String getCountryCode() { return countryCode; }
public void setCountryCode(String countryCode) { this.countryCode = countryCode; }
public String getScNote() { return scNote; }
public void setScNote(String scNote) { this.scNote = scNote; }
public Long getTmsId() { return tmsId; }
public void setTmsId(Long tmsId) { this.tmsId = tmsId; }
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("scId", getScId())
.append("scName", getScName())
.append("feeType", getFeeType())
.append("chargeType", getChargeType())
.append("chargeValue", getChargeValue())
.append("currency", getCurrency())
.append("roundMode", getRoundMode())
.append("ssCode", getSsCode())
.append("countryCode", getCountryCode())
.append("scNote", getScNote())
.append("tmsId", getTmsId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
@@ -4,83 +4,27 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
/**
* 重量段明细 prc_weight_section_detail
*
* @author ruoyi
*/
/** 重量段明细 prc_weight_section_detail */
@Data
public class PrcWeightSectionDetail implements Serializable
{
private static final long serialVersionUID = 1L;
/** 重量段明细ID */
private Long wsdId;
/** 重量段模板ID */
private Long wstId;
/** 段标题 */
private String wlTitle;
/** 起始重量 */
private BigDecimal wlStartweight;
/** 结束重量 */
private BigDecimal wlEndweight;
/** 计费方式代码 */
private String weightBillingCode;
/** 单位重量 */
private BigDecimal fvUnitweight;
/** 生效日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date effectiveDate;
/** 失效日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date expireDate;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createdAt;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updatedAt;
public Long getWsdId() { return wsdId; }
public void setWsdId(Long wsdId) { this.wsdId = wsdId; }
public Long getWstId() { return wstId; }
public void setWstId(Long wstId) { this.wstId = wstId; }
public String getWlTitle() { return wlTitle; }
public void setWlTitle(String wlTitle) { this.wlTitle = wlTitle; }
public BigDecimal getWlStartweight() { return wlStartweight; }
public void setWlStartweight(BigDecimal wlStartweight) { this.wlStartweight = wlStartweight; }
public BigDecimal getWlEndweight() { return wlEndweight; }
public void setWlEndweight(BigDecimal wlEndweight) { this.wlEndweight = wlEndweight; }
public String getWeightBillingCode() { return weightBillingCode; }
public void setWeightBillingCode(String weightBillingCode) { this.weightBillingCode = weightBillingCode; }
public BigDecimal getFvUnitweight() { return fvUnitweight; }
public void setFvUnitweight(BigDecimal fvUnitweight) { this.fvUnitweight = fvUnitweight; }
public Date getEffectiveDate() { return effectiveDate; }
public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; }
public Date getExpireDate() { return expireDate; }
public void setExpireDate(Date expireDate) { this.expireDate = expireDate; }
public Date getCreatedAt() { return createdAt; }
public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; }
public Date getUpdatedAt() { return updatedAt; }
public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; }
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("wsdId", getWsdId())
.append("wstId", getWstId())
.append("wlTitle", getWlTitle())
.append("wlStartweight", getWlStartweight())
.append("wlEndweight", getWlEndweight())
.append("weightBillingCode", getWeightBillingCode())
.append("fvUnitweight", getFvUnitweight())
.append("effectiveDate", getEffectiveDate())
.append("expireDate", getExpireDate())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.toString();
}
}
@@ -1,78 +1,26 @@
package com.ruoyi.price.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 重量段模板 prc_weight_section_template
*
* @author ruoyi
*/
/** 重量段模板 prc_weight_section_template */
@Data
@EqualsAndHashCode(callSuper = true)
public class PrcWeightSectionTemplate extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 重量段模板ID */
private Long wstId;
/** 模板名称 */
private String wstName;
/** 状态码(on/off) */
/** on / off */
private String ssCode;
/** 产品组代码 */
private String pgCode;
/** 服务渠道ID */
private Long snId;
/** 货物类型代码 */
private String ctCode;
/** 付款方式代码 */
private String pmCode;
/** 备注 */
private String wstNote;
/** 租户ID */
private Long tmsId;
/** 明细数量(列表展示,非表字段) */
/** 列表展示,非表字段 */
private Integer detailCount;
public Long getWstId() { return wstId; }
public void setWstId(Long wstId) { this.wstId = wstId; }
public String getWstName() { return wstName; }
public void setWstName(String wstName) { this.wstName = wstName; }
public String getSsCode() { return ssCode; }
public void setSsCode(String ssCode) { this.ssCode = ssCode; }
public String getPgCode() { return pgCode; }
public void setPgCode(String pgCode) { this.pgCode = pgCode; }
public Long getSnId() { return snId; }
public void setSnId(Long snId) { this.snId = snId; }
public String getCtCode() { return ctCode; }
public void setCtCode(String ctCode) { this.ctCode = ctCode; }
public String getPmCode() { return pmCode; }
public void setPmCode(String pmCode) { this.pmCode = pmCode; }
public String getWstNote() { return wstNote; }
public void setWstNote(String wstNote) { this.wstNote = wstNote; }
public Long getTmsId() { return tmsId; }
public void setTmsId(Long tmsId) { this.tmsId = tmsId; }
public Integer getDetailCount() { return detailCount; }
public void setDetailCount(Integer detailCount) { this.detailCount = detailCount; }
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("wstId", getWstId())
.append("wstName", getWstName())
.append("ssCode", getSsCode())
.append("pgCode", getPgCode())
.append("snId", getSnId())
.append("ctCode", getCtCode())
.append("pmCode", getPmCode())
.append("wstNote", getWstNote())
.append("tmsId", getTmsId())
.append("detailCount", getDetailCount())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
@@ -3,56 +3,20 @@ package com.ruoyi.price.domain;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
/**
* 分区国家 xtd_zonecountry
*
* @author ruoyi
*/
/** 分区国家 xtd_zonecountry */
@Data
public class XtdZoneCountry implements Serializable
{
private static final long serialVersionUID = 1L;
/** 分区国家ID */
private Long zcId;
/** 区划ID */
private Long zdId;
/** 国家代码(ISO2) */
private String countryCode;
/** 划分类型(默认C) */
private String zcDividekind;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createdAt;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updatedAt;
public Long getZcId() { return zcId; }
public void setZcId(Long zcId) { this.zcId = zcId; }
public Long getZdId() { return zdId; }
public void setZdId(Long zdId) { this.zdId = zdId; }
public String getCountryCode() { return countryCode; }
public void setCountryCode(String countryCode) { this.countryCode = countryCode; }
public String getZcDividekind() { return zcDividekind; }
public void setZcDividekind(String zcDividekind) { this.zcDividekind = zcDividekind; }
public Date getCreatedAt() { return createdAt; }
public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; }
public Date getUpdatedAt() { return updatedAt; }
public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; }
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("zcId", getZcId())
.append("zdId", getZdId())
.append("countryCode", getCountryCode())
.append("zcDividekind", getZcDividekind())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.toString();
}
}
@@ -3,76 +3,25 @@ package com.ruoyi.price.domain;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
/**
* 分区区划 xtd_zone_division
*
* @author ruoyi
*/
/** 分区区划 xtd_zone_division */
@Data
public class XtdZoneDivision implements Serializable
{
private static final long serialVersionUID = 1L;
/** 区划ID */
private Long zdId;
/** 分区方案ID */
private Long zsId;
/** 排序 */
private Integer zdSort;
/** 区划代码 */
private String zdCode;
/** 区划名称 */
private String znName;
/** 区划英文名 */
private String znEname;
/** 备注 */
private String znNote;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createdAt;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updatedAt;
/** 国家数量(列表展示,非表字段) */
/** 列表展示,非表字段 */
private Integer countryCount;
public Long getZdId() { return zdId; }
public void setZdId(Long zdId) { this.zdId = zdId; }
public Long getZsId() { return zsId; }
public void setZsId(Long zsId) { this.zsId = zsId; }
public Integer getZdSort() { return zdSort; }
public void setZdSort(Integer zdSort) { this.zdSort = zdSort; }
public String getZdCode() { return zdCode; }
public void setZdCode(String zdCode) { this.zdCode = zdCode; }
public String getZnName() { return znName; }
public void setZnName(String znName) { this.znName = znName; }
public String getZnEname() { return znEname; }
public void setZnEname(String znEname) { this.znEname = znEname; }
public String getZnNote() { return znNote; }
public void setZnNote(String znNote) { this.znNote = znNote; }
public Date getCreatedAt() { return createdAt; }
public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; }
public Date getUpdatedAt() { return updatedAt; }
public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; }
public Integer getCountryCount() { return countryCount; }
public void setCountryCount(Integer countryCount) { this.countryCount = countryCount; }
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("zdId", getZdId())
.append("zsId", getZsId())
.append("zdSort", getZdSort())
.append("zdCode", getZdCode())
.append("znName", getZnName())
.append("znEname", getZnEname())
.append("znNote", getZnNote())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.append("countryCount", getCountryCount())
.toString();
}
}
@@ -1,75 +1,24 @@
package com.ruoyi.price.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 分区方案 xtd_zone_scheme
*
* @author ruoyi
*/
/** 分区方案 xtd_zone_scheme */
@Data
@EqualsAndHashCode(callSuper = true)
public class XtdZoneScheme extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 分区方案ID */
private Long zsId;
/** 方案名称 */
private String zsName;
/** 状态码(on/off) */
/** on / off */
private String ssCode;
/** 产品组代码 */
private String pgCode;
/** 服务渠道ID */
private Long snId;
/** 备注 */
private String zsNote;
/** 租户ID */
private Long tmsId;
/** 区划数量(列表展示,非表字段) */
/** 列表展示,非表字段 */
private Integer divisionCount;
public Long getZsId() { return zsId; }
public void setZsId(Long zsId) { this.zsId = zsId; }
public String getZsName() { return zsName; }
public void setZsName(String zsName) { this.zsName = zsName; }
public String getSsCode() { return ssCode; }
public void setSsCode(String ssCode) { this.ssCode = ssCode; }
public String getPgCode() { return pgCode; }
public void setPgCode(String pgCode) { this.pgCode = pgCode; }
public Long getSnId() { return snId; }
public void setSnId(Long snId) { this.snId = snId; }
public String getZsNote() { return zsNote; }
public void setZsNote(String zsNote) { this.zsNote = zsNote; }
public Long getTmsId() { return tmsId; }
public void setTmsId(Long tmsId) { this.tmsId = tmsId; }
public Integer getDivisionCount() { return divisionCount; }
public void setDivisionCount(Integer divisionCount) { this.divisionCount = divisionCount; }
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("zsId", getZsId())
.append("zsName", getZsName())
.append("ssCode", getSsCode())
.append("pgCode", getPgCode())
.append("snId", getSnId())
.append("zsNote", getZsNote())
.append("tmsId", getTmsId())
.append("divisionCount", getDivisionCount())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
@@ -4,12 +4,10 @@ import java.io.Serializable;
import java.math.BigDecimal;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
/**
* TMS freight quote request.
*
* @author ruoyi
*/
/** TMS freight quote request */
@Data
public class TmsPriceQuoteRequest implements Serializable
{
private static final long serialVersionUID = 1L;
@@ -20,41 +18,17 @@ public class TmsPriceQuoteRequest implements Serializable
@NotBlank(message = "productCode is required")
private String productCode;
/** ISO2 country code; provide countryCode or countryName */
/** ISO2;与 countryName 二选一 */
private String countryCode;
/** Country CN name; provide countryCode or countryName */
/** 国家中文名;与 countryCode 二选一 */
private String countryName;
@NotNull(message = "weight is required")
private BigDecimal weight;
/** Optional business date yyyy-MM-dd; default today */
/** yyyy-MM-dd,默认今天 */
private String bizDate;
/** Optional TMS / tenant id */
private Integer tmsId;
/**
* Agreed API identification code (same as header X-Api-Code).
* Prefer header; body is fallback.
*/
/** Header X-Api-Code 优先;Body 兜底 */
private String apiCode;
public Long getCustomerId() { return customerId; }
public void setCustomerId(Long customerId) { this.customerId = customerId; }
public String getProductCode() { return productCode; }
public void setProductCode(String productCode) { this.productCode = productCode; }
public String getCountryCode() { return countryCode; }
public void setCountryCode(String countryCode) { this.countryCode = countryCode; }
public String getCountryName() { return countryName; }
public void setCountryName(String countryName) { this.countryName = countryName; }
public BigDecimal getWeight() { return weight; }
public void setWeight(BigDecimal weight) { this.weight = weight; }
public String getBizDate() { return bizDate; }
public void setBizDate(String bizDate) { this.bizDate = bizDate; }
public Integer getTmsId() { return tmsId; }
public void setTmsId(Integer tmsId) { this.tmsId = tmsId; }
public String getApiCode() { return apiCode; }
public void setApiCode(String apiCode) { this.apiCode = apiCode; }
}
@@ -2,14 +2,14 @@ package com.ruoyi.price.domain.vo;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
* TMS freight quote response.
*
* matchSource: PACKAGE_FIXED / PACKAGE_DISCOUNT / PRODUCT_DEFAULT
*
* @author ruoyi
*/
@Data
public class TmsPriceQuoteResult implements Serializable
{
private static final long serialVersionUID = 1L;
@@ -33,77 +33,18 @@ public class TmsPriceQuoteResult implements Serializable
private BigDecimal weightMin;
private BigDecimal weightMax;
private String weightLabel;
/** bms_product_country.effective_date */
private Date effectiveDate;
private BigDecimal weight;
private BigDecimal chargeWeight;
/** Freight unit price RMB/KG (after discount if any) */
private BigDecimal freightRate;
/** Base freight before discount (DISCOUNT only) */
private BigDecimal baseFreightRate;
/** Discount percent e.g. 88 */
private BigDecimal discountPercent;
/** Registration fee RMB/pcs */
private BigDecimal registrationFee;
/** freightRate * chargeWeight */
private BigDecimal freightAmount;
/** freightAmount + registrationFee */
private BigDecimal payableTotal;
private String currency = "RMB";
/** ????? UP / DOWN / HALF_UP */
/** UP / DOWN / HALF_UP */
private String roundMode;
public String getMatchSource() { return matchSource; }
public void setMatchSource(String matchSource) { this.matchSource = matchSource; }
public String getMatchMessage() { return matchMessage; }
public void setMatchMessage(String matchMessage) { this.matchMessage = matchMessage; }
public Long getCustomerId() { return customerId; }
public void setCustomerId(Long customerId) { this.customerId = customerId; }
public Long getPriceSetId() { return priceSetId; }
public void setPriceSetId(Long priceSetId) { this.priceSetId = priceSetId; }
public String getPriceSetCode() { return priceSetCode; }
public void setPriceSetCode(String priceSetCode) { this.priceSetCode = priceSetCode; }
public String getPriceSetName() { return priceSetName; }
public void setPriceSetName(String priceSetName) { this.priceSetName = priceSetName; }
public String getSetType() { return setType; }
public void setSetType(String setType) { this.setType = setType; }
public Integer getBindPriority() { return bindPriority; }
public void setBindPriority(Integer bindPriority) { this.bindPriority = bindPriority; }
public Long getCustomerPricesetId() { return customerPricesetId; }
public void setCustomerPricesetId(Long customerPricesetId) { this.customerPricesetId = customerPricesetId; }
public String getProductCode() { return productCode; }
public void setProductCode(String productCode) { this.productCode = productCode; }
public String getProductName() { return productName; }
public void setProductName(String productName) { this.productName = productName; }
public String getCountryCode() { return countryCode; }
public void setCountryCode(String countryCode) { this.countryCode = countryCode; }
public String getCountryName() { return countryName; }
public void setCountryName(String countryName) { this.countryName = countryName; }
public Long getProductCountryId() { return productCountryId; }
public void setProductCountryId(Long productCountryId) { this.productCountryId = productCountryId; }
public BigDecimal getWeightMin() { return weightMin; }
public void setWeightMin(BigDecimal weightMin) { this.weightMin = weightMin; }
public BigDecimal getWeightMax() { return weightMax; }
public void setWeightMax(BigDecimal weightMax) { this.weightMax = weightMax; }
public String getWeightLabel() { return weightLabel; }
public void setWeightLabel(String weightLabel) { this.weightLabel = weightLabel; }
public BigDecimal getWeight() { return weight; }
public void setWeight(BigDecimal weight) { this.weight = weight; }
public BigDecimal getChargeWeight() { return chargeWeight; }
public void setChargeWeight(BigDecimal chargeWeight) { this.chargeWeight = chargeWeight; }
public BigDecimal getFreightRate() { return freightRate; }
public void setFreightRate(BigDecimal freightRate) { this.freightRate = freightRate; }
public BigDecimal getBaseFreightRate() { return baseFreightRate; }
public void setBaseFreightRate(BigDecimal baseFreightRate) { this.baseFreightRate = baseFreightRate; }
public BigDecimal getDiscountPercent() { return discountPercent; }
public void setDiscountPercent(BigDecimal discountPercent) { this.discountPercent = discountPercent; }
public BigDecimal getRegistrationFee() { return registrationFee; }
public void setRegistrationFee(BigDecimal registrationFee) { this.registrationFee = registrationFee; }
public BigDecimal getFreightAmount() { return freightAmount; }
public void setFreightAmount(BigDecimal freightAmount) { this.freightAmount = freightAmount; }
public BigDecimal getPayableTotal() { return payableTotal; }
public void setPayableTotal(BigDecimal payableTotal) { this.payableTotal = payableTotal; }
public String getCurrency() { return currency; }
public void setCurrency(String currency) { this.currency = currency; }
public String getRoundMode() { return roundMode; }
public void setRoundMode(String roundMode) { this.roundMode = roundMode; }
}
@@ -1,6 +1,7 @@
package com.ruoyi.price.mapper;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.price.domain.BmsProductCountry;
@@ -21,11 +22,13 @@ public interface BmsProductCountryMapper
public int deleteByProductCodes(String[] productCodes);
/**
* 按产品 + 国家 + 重量落入重量段匹配一条默认价
* 按产品 + 国家 + 重量落入重量段 + 计数时间过滤,匹配一条默认价
* 只取 effective_date <= bizDate 的已生效明细,多匹配时按 effective_date desc 取最新。
*/
public BmsProductCountry selectMatchByProductCountryWeight(
@Param("productCode") String productCode,
@Param("countryCode") String countryCode,
@Param("countryName") String countryName,
@Param("weight") BigDecimal weight);
@Param("weight") BigDecimal weight,
@Param("bizDate") Date bizDate);
}
@@ -69,7 +69,7 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService
Date bizDate = resolveBizDate(request.getBizDate());
BmsProductCountry base = productCountryMapper.selectMatchByProductCountryWeight(
productCode, countryCode, countryName, weight);
productCode, countryCode, countryName, weight, bizDate);
if (base == null)
{
throw new ServiceException("PRICE_NOT_HIT: no bms_product_country band for product/country/weight");
@@ -243,6 +243,7 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService
r.setWeightLabel(formatWeightLabel(base.getWeightMin(), base.getWeightMax()));
r.setWeight(weight);
r.setChargeWeight(weight);
r.setEffectiveDate(base.getEffectiveDate());
r.setFreightRate(freightRate);
r.setBaseFreightRate(baseFreightRate);
r.setDiscountPercent(discountPercent);
@@ -88,7 +88,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and 1 = 0
</otherwise>
</choose>
order by weight_min asc, detail_id asc
<if test="bizDate != null">
and effective_date &lt;= #{bizDate}
</if>
order by effective_date desc, weight_min asc, detail_id asc
limit 1
</select>