增加试算功能

This commit is contained in:
wuweihua
2026-09-07 14:42:27 +08:00
parent a083a0dece
commit ea2bc6f33e
17 changed files with 1060 additions and 0 deletions
@@ -0,0 +1,60 @@
package com.ruoyi.price.domain.vo;
import java.io.Serializable;
import java.math.BigDecimal;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
/**
* TMS freight quote request.
*
* @author ruoyi
*/
public class TmsPriceQuoteRequest implements Serializable
{
private static final long serialVersionUID = 1L;
@NotNull(message = "customerId is required")
private Long customerId;
@NotBlank(message = "productCode is required")
private String productCode;
/** ISO2 country code; provide countryCode or countryName */
private String countryCode;
/** Country CN name; provide countryCode or countryName */
private String countryName;
@NotNull(message = "weight is required")
private BigDecimal weight;
/** Optional business date yyyy-MM-dd; default today */
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.
*/
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; }
}
@@ -0,0 +1,105 @@
package com.ruoyi.price.domain.vo;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* TMS freight quote response.
*
* matchSource: PACKAGE_FIXED / PACKAGE_DISCOUNT / PRODUCT_DEFAULT
*
* @author ruoyi
*/
public class TmsPriceQuoteResult implements Serializable
{
private static final long serialVersionUID = 1L;
private String matchSource;
private String matchMessage;
private Long customerId;
private Long priceSetId;
private String priceSetCode;
private String priceSetName;
private String setType;
private Integer bindPriority;
private Long customerPricesetId;
private String productCode;
private String productName;
private String countryCode;
private String countryName;
private Long productCountryId;
private BigDecimal weightMin;
private BigDecimal weightMax;
private String weightLabel;
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";
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; }
}