提交第三方接口订单同步功能
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
package com.ruoyi.price.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/** receivable bill header prc_bill */
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PrcBill extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String billId;
|
||||
private String billKey;
|
||||
private String orderNo;
|
||||
private String trackingNo;
|
||||
private Long customerId;
|
||||
private String customerCode;
|
||||
private String customerName;
|
||||
private Integer pieces;
|
||||
private BigDecimal actualWeight;
|
||||
private BigDecimal volume;
|
||||
private BigDecimal volumeWeight;
|
||||
private BigDecimal pkgLength;
|
||||
private BigDecimal pkgWidth;
|
||||
private BigDecimal pkgHeight;
|
||||
private String shipperName;
|
||||
private String consigneeName;
|
||||
private String destPostcode;
|
||||
private String warehouseCode;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date orderTime;
|
||||
private String orderRemark;
|
||||
private String productCode;
|
||||
private String productName;
|
||||
private String countryCode;
|
||||
private String countryName;
|
||||
private BigDecimal weight;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date bizDate;
|
||||
private Long tmsId;
|
||||
|
||||
private String matchSource;
|
||||
private String matchMessage;
|
||||
private Long priceSetId;
|
||||
private String priceSetCode;
|
||||
private String priceSetName;
|
||||
private String setType;
|
||||
private Integer bindPriority;
|
||||
private Long customerPricesetId;
|
||||
private Long productCountryId;
|
||||
private BigDecimal weightMin;
|
||||
private BigDecimal weightMax;
|
||||
private String weightLabel;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date effectiveDate;
|
||||
private BigDecimal chargeWeight;
|
||||
private BigDecimal freightRate;
|
||||
private BigDecimal baseFreightRate;
|
||||
private BigDecimal discountPercent;
|
||||
private BigDecimal registrationFee;
|
||||
private BigDecimal freightAmount;
|
||||
private BigDecimal surchargeAmount;
|
||||
private BigDecimal payableTotal;
|
||||
private String currency;
|
||||
private String roundMode;
|
||||
|
||||
private List<PrcBillFee> fees;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.price.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/** receivable bill fee detail prc_bill_fee */
|
||||
@Data
|
||||
public class PrcBillFee implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String feeId;
|
||||
private String billId;
|
||||
private String feeType;
|
||||
private String feeName;
|
||||
private Long scId;
|
||||
private BigDecimal amount;
|
||||
private String currency;
|
||||
private String roundMode;
|
||||
private String remark;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createdAt;
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.ruoyi.price.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.validation.constraints.AssertTrue;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/** Sync order -> receivable bill. Quote fields plus order snapshot. */
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TmsPriceBillRequest extends TmsPriceQuoteRequest
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotBlank(message = "orderNo is required")
|
||||
private String orderNo;
|
||||
|
||||
private String trackingNo;
|
||||
private String customerName;
|
||||
private Integer pieces;
|
||||
private BigDecimal actualWeight;
|
||||
private BigDecimal volume;
|
||||
private BigDecimal volumeWeight;
|
||||
private BigDecimal pkgLength;
|
||||
private BigDecimal pkgWidth;
|
||||
private BigDecimal pkgHeight;
|
||||
private String shipperName;
|
||||
private String consigneeName;
|
||||
private String destPostcode;
|
||||
private String warehouseCode;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date orderTime;
|
||||
private String orderRemark;
|
||||
|
||||
@JsonIgnore
|
||||
@AssertTrue(message = "bizDate is required")
|
||||
public boolean isBizDatePresent()
|
||||
{
|
||||
String bizDate = getBizDate();
|
||||
return bizDate != null && !bizDate.trim().isEmpty();
|
||||
}
|
||||
}
|
||||
+19
-1
@@ -53,6 +53,24 @@ public class TmsPriceQuoteResult implements Serializable
|
||||
/** 费用明细:运费/挂号费各一行,附加费按具体名称各一行 */
|
||||
private List<TmsPriceQuoteFeeLine> feeDetails;
|
||||
private String quoteId;
|
||||
/** true=命中已落库试算 */
|
||||
private String billId;
|
||||
private String orderNo;
|
||||
private String trackingNo;
|
||||
private String customerCode;
|
||||
private String customerName;
|
||||
private Integer pieces;
|
||||
private BigDecimal actualWeight;
|
||||
private BigDecimal volume;
|
||||
private BigDecimal volumeWeight;
|
||||
private BigDecimal pkgLength;
|
||||
private BigDecimal pkgWidth;
|
||||
private BigDecimal pkgHeight;
|
||||
private String shipperName;
|
||||
private String consigneeName;
|
||||
private String destPostcode;
|
||||
private String warehouseCode;
|
||||
private Date orderTime;
|
||||
private String orderRemark;
|
||||
/** true=hit stored quote */
|
||||
private Boolean fromCache;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.price.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.price.domain.PrcBillFee;
|
||||
|
||||
/** receivable bill fee detail mapper */
|
||||
public interface PrcBillFeeMapper
|
||||
{
|
||||
public List<PrcBillFee> selectByBillId(String billId);
|
||||
|
||||
public int insertPrcBillFee(PrcBillFee fee);
|
||||
|
||||
public int insertBatch(@Param("list") List<PrcBillFee> fees);
|
||||
|
||||
public int deleteByBillId(String billId);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.price.mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.price.domain.PrcBill;
|
||||
|
||||
/** receivable bill header mapper */
|
||||
public interface PrcBillMapper
|
||||
{
|
||||
public PrcBill selectPrcBillByOrderNo(String orderNo);
|
||||
|
||||
public PrcBill selectPrcBillById(String billId);
|
||||
|
||||
public List<PrcBill> selectPrcBillList(PrcBill bill);
|
||||
|
||||
public int insertPrcBill(PrcBill bill);
|
||||
|
||||
public int updatePrcBill(PrcBill bill);
|
||||
|
||||
public int updateBillAmounts(@Param("billId") String billId,
|
||||
@Param("surchargeAmount") BigDecimal surchargeAmount,
|
||||
@Param("payableTotal") BigDecimal payableTotal);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.price.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.price.domain.PrcBill;
|
||||
import com.ruoyi.price.domain.vo.TmsPriceBillRequest;
|
||||
import com.ruoyi.price.domain.vo.TmsPriceQuoteResult;
|
||||
|
||||
/** Receivable billing from synced orders. Same price match as quote, persist prc_bill. */
|
||||
public interface IPrcBillService
|
||||
{
|
||||
TmsPriceQuoteResult bill(TmsPriceBillRequest request);
|
||||
|
||||
List<PrcBill> selectBillList(PrcBill query);
|
||||
|
||||
TmsPriceQuoteResult getBill(String billId);
|
||||
|
||||
TmsPriceQuoteResult getBillByOrderNo(String orderNo);
|
||||
}
|
||||
@@ -18,6 +18,9 @@ public interface ITmsPriceQuoteService
|
||||
{
|
||||
TmsPriceQuoteResult quote(TmsPriceQuoteRequest request);
|
||||
|
||||
/** Calc only, no prc_quote persist. Used by receivable billing. */
|
||||
TmsPriceQuoteResult calculate(TmsPriceQuoteRequest request);
|
||||
|
||||
List<PrcQuote> selectQuoteList(PrcQuote query);
|
||||
|
||||
TmsPriceQuoteResult getQuote(String quoteId);
|
||||
|
||||
+291
@@ -0,0 +1,291 @@
|
||||
package com.ruoyi.price.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.sign.Md5Utils;
|
||||
import com.ruoyi.price.domain.PrcBill;
|
||||
import com.ruoyi.price.domain.PrcBillFee;
|
||||
import com.ruoyi.price.domain.vo.TmsPriceBillRequest;
|
||||
import com.ruoyi.price.domain.vo.TmsPriceQuoteFeeLine;
|
||||
import com.ruoyi.price.domain.vo.TmsPriceQuoteResult;
|
||||
import com.ruoyi.price.mapper.PrcBillFeeMapper;
|
||||
import com.ruoyi.price.mapper.PrcBillMapper;
|
||||
import com.ruoyi.price.service.IPrcBillService;
|
||||
import com.ruoyi.price.service.ITmsPriceQuoteService;
|
||||
|
||||
@Service
|
||||
public class PrcBillServiceImpl implements IPrcBillService
|
||||
{
|
||||
@Autowired
|
||||
private ITmsPriceQuoteService tmsPriceQuoteService;
|
||||
|
||||
@Autowired
|
||||
private PrcBillMapper billMapper;
|
||||
|
||||
@Autowired
|
||||
private PrcBillFeeMapper billFeeMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public TmsPriceQuoteResult bill(TmsPriceBillRequest request)
|
||||
{
|
||||
if (request == null || StringUtils.isEmpty(request.getOrderNo()))
|
||||
{
|
||||
throw new ServiceException(MessageUtils.message("price.bill.orderNoRequired"));
|
||||
}
|
||||
request.setOrderNo(request.getOrderNo().trim());
|
||||
if (StringUtils.isEmpty(request.getBizDate()))
|
||||
{
|
||||
throw new ServiceException(MessageUtils.message("price.bill.bizDateRequired"));
|
||||
}
|
||||
Date bizDate = resolveBizDate(request.getBizDate());
|
||||
BigDecimal weight = request.getWeight();
|
||||
TmsPriceQuoteResult result = tmsPriceQuoteService.calculate(request);
|
||||
persistBill(request, weight, bizDate, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PrcBill> selectBillList(PrcBill query)
|
||||
{
|
||||
return billMapper.selectPrcBillList(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmsPriceQuoteResult getBill(String billId)
|
||||
{
|
||||
if (billId == null)
|
||||
{
|
||||
throw new ServiceException(MessageUtils.message("price.bill.billIdRequired"));
|
||||
}
|
||||
PrcBill bill = billMapper.selectPrcBillById(billId);
|
||||
if (bill == null)
|
||||
{
|
||||
throw new ServiceException(MessageUtils.message("price.bill.notFound"));
|
||||
}
|
||||
return toResult(bill, billFeeMapper.selectByBillId(billId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmsPriceQuoteResult getBillByOrderNo(String orderNo)
|
||||
{
|
||||
if (StringUtils.isEmpty(orderNo))
|
||||
{
|
||||
throw new ServiceException(MessageUtils.message("price.bill.orderNoRequired"));
|
||||
}
|
||||
PrcBill bill = billMapper.selectPrcBillByOrderNo(orderNo.trim());
|
||||
if (bill == null)
|
||||
{
|
||||
throw new ServiceException(MessageUtils.message("price.bill.notFound"));
|
||||
}
|
||||
return toResult(bill, billFeeMapper.selectByBillId(bill.getBillId()));
|
||||
}
|
||||
|
||||
private void persistBill(TmsPriceBillRequest request, BigDecimal weight, Date bizDate,
|
||||
TmsPriceQuoteResult result)
|
||||
{
|
||||
String orderNo = request.getOrderNo();
|
||||
String billKey = Md5Utils.hash(orderNo);
|
||||
PrcBill existed = billMapper.selectPrcBillByOrderNo(orderNo);
|
||||
PrcBill bill = existed == null ? new PrcBill() : existed;
|
||||
if (existed == null)
|
||||
{
|
||||
bill.setBillId(UUID.randomUUID().toString());
|
||||
}
|
||||
bill.setBillKey(billKey);
|
||||
bill.setOrderNo(orderNo);
|
||||
bill.setCustomerId(request.getCustomerId() == null ? Long.valueOf(0L) : request.getCustomerId());
|
||||
bill.setCustomerCode(request.getCustomerCode());
|
||||
bill.setCustomerName(request.getCustomerName());
|
||||
bill.setTrackingNo(request.getTrackingNo());
|
||||
bill.setPieces(request.getPieces());
|
||||
bill.setActualWeight(request.getActualWeight());
|
||||
bill.setVolume(request.getVolume());
|
||||
bill.setVolumeWeight(request.getVolumeWeight());
|
||||
bill.setPkgLength(request.getPkgLength());
|
||||
bill.setPkgWidth(request.getPkgWidth());
|
||||
bill.setPkgHeight(request.getPkgHeight());
|
||||
bill.setShipperName(request.getShipperName());
|
||||
bill.setConsigneeName(request.getConsigneeName());
|
||||
bill.setDestPostcode(request.getDestPostcode());
|
||||
bill.setWarehouseCode(request.getWarehouseCode());
|
||||
bill.setOrderTime(request.getOrderTime());
|
||||
bill.setOrderRemark(request.getOrderRemark());
|
||||
bill.setProductCode(result.getProductCode());
|
||||
bill.setProductName(result.getProductName());
|
||||
bill.setCountryCode(result.getCountryCode());
|
||||
bill.setCountryName(result.getCountryName());
|
||||
bill.setWeight(weight);
|
||||
bill.setBizDate(bizDate);
|
||||
bill.setTmsId(request.getTmsId() == null ? null : Long.valueOf(request.getTmsId()));
|
||||
bill.setMatchSource(result.getMatchSource());
|
||||
bill.setMatchMessage(result.getMatchMessage());
|
||||
bill.setPriceSetId(result.getPriceSetId());
|
||||
bill.setPriceSetCode(result.getPriceSetCode());
|
||||
bill.setPriceSetName(result.getPriceSetName());
|
||||
bill.setSetType(result.getSetType());
|
||||
bill.setBindPriority(result.getBindPriority());
|
||||
bill.setCustomerPricesetId(result.getCustomerPricesetId());
|
||||
bill.setProductCountryId(result.getProductCountryId());
|
||||
bill.setWeightMin(result.getWeightMin());
|
||||
bill.setWeightMax(result.getWeightMax());
|
||||
bill.setWeightLabel(result.getWeightLabel());
|
||||
bill.setEffectiveDate(result.getEffectiveDate());
|
||||
bill.setChargeWeight(result.getChargeWeight());
|
||||
bill.setFreightRate(result.getFreightRate());
|
||||
bill.setBaseFreightRate(result.getBaseFreightRate());
|
||||
bill.setDiscountPercent(result.getDiscountPercent());
|
||||
bill.setRegistrationFee(result.getRegistrationFee());
|
||||
bill.setFreightAmount(result.getFreightAmount());
|
||||
bill.setSurchargeAmount(result.getSurchargeAmount());
|
||||
bill.setPayableTotal(result.getPayableTotal());
|
||||
bill.setCurrency(result.getCurrency());
|
||||
bill.setRoundMode(result.getRoundMode());
|
||||
if (existed == null)
|
||||
{
|
||||
billMapper.insertPrcBill(bill);
|
||||
}
|
||||
else
|
||||
{
|
||||
billMapper.updatePrcBill(bill);
|
||||
billFeeMapper.deleteByBillId(bill.getBillId());
|
||||
}
|
||||
List<PrcBillFee> fees = toFeeRows(bill.getBillId(), result);
|
||||
if (!fees.isEmpty())
|
||||
{
|
||||
billFeeMapper.insertBatch(fees);
|
||||
}
|
||||
result.setBillId(bill.getBillId());
|
||||
result.setOrderNo(orderNo);
|
||||
result.setCustomerCode(request.getCustomerCode());
|
||||
fillResultOrder(result, bill);
|
||||
result.setFromCache(Boolean.valueOf(existed != null));
|
||||
}
|
||||
|
||||
private List<PrcBillFee> toFeeRows(String billId, TmsPriceQuoteResult result)
|
||||
{
|
||||
List<PrcBillFee> fees = new ArrayList<PrcBillFee>();
|
||||
if (result.getFeeDetails() == null)
|
||||
{
|
||||
return fees;
|
||||
}
|
||||
for (TmsPriceQuoteFeeLine line : result.getFeeDetails())
|
||||
{
|
||||
PrcBillFee fee = new PrcBillFee();
|
||||
fee.setFeeId(UUID.randomUUID().toString());
|
||||
fee.setBillId(billId);
|
||||
fee.setFeeType(line.getFeeType());
|
||||
fee.setFeeName(line.getFeeName());
|
||||
fee.setScId(line.getScId() == null ? 0L : line.getScId());
|
||||
fee.setAmount(line.getAmount() == null ? BigDecimal.ZERO : line.getAmount());
|
||||
fee.setCurrency(line.getCurrency());
|
||||
fee.setRoundMode(line.getRoundMode());
|
||||
fee.setRemark(line.getRemark());
|
||||
fees.add(fee);
|
||||
}
|
||||
return fees;
|
||||
}
|
||||
|
||||
private TmsPriceQuoteResult toResult(PrcBill bill, List<PrcBillFee> fees)
|
||||
{
|
||||
TmsPriceQuoteResult r = new TmsPriceQuoteResult();
|
||||
r.setBillId(bill.getBillId());
|
||||
r.setOrderNo(bill.getOrderNo());
|
||||
r.setCustomerCode(bill.getCustomerCode());
|
||||
fillResultOrder(r, bill);
|
||||
r.setFromCache(Boolean.TRUE);
|
||||
r.setMatchSource(bill.getMatchSource());
|
||||
r.setMatchMessage(bill.getMatchMessage());
|
||||
r.setCustomerId(bill.getCustomerId());
|
||||
r.setPriceSetId(bill.getPriceSetId());
|
||||
r.setPriceSetCode(bill.getPriceSetCode());
|
||||
r.setPriceSetName(bill.getPriceSetName());
|
||||
r.setSetType(bill.getSetType());
|
||||
r.setBindPriority(bill.getBindPriority());
|
||||
r.setCustomerPricesetId(bill.getCustomerPricesetId());
|
||||
r.setProductCode(bill.getProductCode());
|
||||
r.setProductName(bill.getProductName());
|
||||
r.setCountryCode(bill.getCountryCode());
|
||||
r.setCountryName(bill.getCountryName());
|
||||
r.setProductCountryId(bill.getProductCountryId());
|
||||
r.setWeightMin(bill.getWeightMin());
|
||||
r.setWeightMax(bill.getWeightMax());
|
||||
r.setWeightLabel(bill.getWeightLabel());
|
||||
r.setEffectiveDate(bill.getEffectiveDate());
|
||||
r.setWeight(bill.getWeight());
|
||||
r.setChargeWeight(bill.getChargeWeight());
|
||||
r.setFreightRate(bill.getFreightRate());
|
||||
r.setBaseFreightRate(bill.getBaseFreightRate());
|
||||
r.setDiscountPercent(bill.getDiscountPercent());
|
||||
r.setRegistrationFee(bill.getRegistrationFee());
|
||||
r.setFreightAmount(bill.getFreightAmount());
|
||||
r.setSurchargeAmount(bill.getSurchargeAmount());
|
||||
r.setPayableTotal(bill.getPayableTotal());
|
||||
r.setCurrency(bill.getCurrency());
|
||||
r.setRoundMode(bill.getRoundMode());
|
||||
List<TmsPriceQuoteFeeLine> lines = new ArrayList<TmsPriceQuoteFeeLine>();
|
||||
if (fees != null)
|
||||
{
|
||||
for (PrcBillFee fee : fees)
|
||||
{
|
||||
TmsPriceQuoteFeeLine line = new TmsPriceQuoteFeeLine();
|
||||
line.setFeeType(fee.getFeeType());
|
||||
line.setFeeName(fee.getFeeName());
|
||||
line.setScId(fee.getScId());
|
||||
line.setAmount(fee.getAmount());
|
||||
line.setCurrency(fee.getCurrency());
|
||||
line.setRoundMode(fee.getRoundMode());
|
||||
line.setRemark(fee.getRemark());
|
||||
lines.add(line);
|
||||
}
|
||||
}
|
||||
r.setFeeDetails(lines);
|
||||
return r;
|
||||
}
|
||||
|
||||
private void fillResultOrder(TmsPriceQuoteResult r, PrcBill bill)
|
||||
{
|
||||
r.setTrackingNo(bill.getTrackingNo());
|
||||
r.setCustomerName(bill.getCustomerName());
|
||||
r.setPieces(bill.getPieces());
|
||||
r.setActualWeight(bill.getActualWeight());
|
||||
r.setVolume(bill.getVolume());
|
||||
r.setVolumeWeight(bill.getVolumeWeight());
|
||||
r.setPkgLength(bill.getPkgLength());
|
||||
r.setPkgWidth(bill.getPkgWidth());
|
||||
r.setPkgHeight(bill.getPkgHeight());
|
||||
r.setShipperName(bill.getShipperName());
|
||||
r.setConsigneeName(bill.getConsigneeName());
|
||||
r.setDestPostcode(bill.getDestPostcode());
|
||||
r.setWarehouseCode(bill.getWarehouseCode());
|
||||
r.setOrderTime(bill.getOrderTime());
|
||||
r.setOrderRemark(bill.getOrderRemark());
|
||||
}
|
||||
|
||||
private Date resolveBizDate(String bizDate)
|
||||
{
|
||||
if (StringUtils.isEmpty(bizDate))
|
||||
{
|
||||
throw new ServiceException(MessageUtils.message("price.bill.bizDateRequired"));
|
||||
}
|
||||
try
|
||||
{
|
||||
return new SimpleDateFormat("yyyy-MM-dd").parse(bizDate.trim());
|
||||
}
|
||||
catch (ParseException e)
|
||||
{
|
||||
throw new ServiceException(MessageUtils.message("price.quote.bizDateInvalid"));
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -113,6 +113,16 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmsPriceQuoteResult calculate(TmsPriceQuoteRequest request)
|
||||
{
|
||||
validateRequest(request);
|
||||
Date bizDate = resolveBizDate(request.getBizDate());
|
||||
TmsPriceQuoteResult result = doQuote(request, bizDate);
|
||||
applySurchargesAndFees(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PrcQuote> selectQuoteList(PrcQuote query)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user