修改计费详情应付显示
This commit is contained in:
+3
-1
@@ -56,8 +56,10 @@ public class TmsPriceQuoteResult implements Serializable
|
||||
private String currency = "CNY";
|
||||
/** UP / DOWN / HALF_UP */
|
||||
private String roundMode;
|
||||
/** 费用明细:运费/挂号费各一行,附加费按具体名称各一行 */
|
||||
/** 应收费用明细(兼容旧字段 feeDetails) */
|
||||
private List<TmsPriceQuoteFeeLine> feeDetails;
|
||||
/** 应付费用明细 */
|
||||
private List<TmsPriceQuoteFeeLine> payFeeDetails;
|
||||
private String quoteId;
|
||||
private String billId;
|
||||
private String orderNo;
|
||||
|
||||
+57
-20
@@ -18,11 +18,13 @@ import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.sign.Md5Utils;
|
||||
import com.ruoyi.price.domain.PrcIncomeBillFee;
|
||||
import com.ruoyi.price.domain.PrcOrderBill;
|
||||
import com.ruoyi.price.domain.PrcPayBillFee;
|
||||
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.PrcIncomeBillFeeMapper;
|
||||
import com.ruoyi.price.mapper.PrcOrderBillMapper;
|
||||
import com.ruoyi.price.mapper.PrcPayBillFeeMapper;
|
||||
import com.ruoyi.price.search.EsBizLogSupport;
|
||||
import com.ruoyi.price.search.EsLogType;
|
||||
import com.ruoyi.price.search.IBillSearchStore;
|
||||
@@ -41,6 +43,9 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
||||
@Autowired
|
||||
private PrcIncomeBillFeeMapper incomeBillFeeMapper;
|
||||
|
||||
@Autowired
|
||||
private PrcPayBillFeeMapper payBillFeeMapper;
|
||||
|
||||
@Autowired
|
||||
private IBillSearchStore billSearchStore;
|
||||
|
||||
@@ -90,7 +95,8 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
||||
{
|
||||
throw new ServiceException(MessageUtils.message("price.bill.notFound"));
|
||||
}
|
||||
return toResult(bill, incomeBillFeeMapper.selectByBillId(billId));
|
||||
return toResult(bill, incomeBillFeeMapper.selectByBillId(billId),
|
||||
payBillFeeMapper.selectByBillId(billId));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -105,7 +111,8 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
||||
{
|
||||
throw new ServiceException(MessageUtils.message("price.bill.notFound"));
|
||||
}
|
||||
return toResult(bill, incomeBillFeeMapper.selectByBillId(bill.getBillId()));
|
||||
return toResult(bill, incomeBillFeeMapper.selectByBillId(bill.getBillId()),
|
||||
payBillFeeMapper.selectByBillId(bill.getBillId()));
|
||||
}
|
||||
|
||||
private void persistBill(TmsPriceBillRequest request, BigDecimal weight, Date bizDate,
|
||||
@@ -218,7 +225,8 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
||||
return fees;
|
||||
}
|
||||
|
||||
private TmsPriceQuoteResult toResult(PrcOrderBill bill, List<PrcIncomeBillFee> fees)
|
||||
private TmsPriceQuoteResult toResult(PrcOrderBill bill, List<PrcIncomeBillFee> incomeFees,
|
||||
List<PrcPayBillFee> payFees)
|
||||
{
|
||||
TmsPriceQuoteResult r = new TmsPriceQuoteResult();
|
||||
r.setBillId(bill.getBillId());
|
||||
@@ -258,26 +266,55 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
||||
r.setCurrency(bill.getCurrency());
|
||||
r.setRoundMode(bill.getRoundMode());
|
||||
r.setBizDate(bill.getBizDate());
|
||||
List<TmsPriceQuoteFeeLine> lines = new ArrayList<TmsPriceQuoteFeeLine>();
|
||||
if (fees != null)
|
||||
{
|
||||
for (PrcIncomeBillFee 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);
|
||||
r.setFeeDetails(toIncomeFeeLines(incomeFees));
|
||||
r.setPayFeeDetails(toPayFeeLines(payFees));
|
||||
return r;
|
||||
}
|
||||
|
||||
private List<TmsPriceQuoteFeeLine> toIncomeFeeLines(List<PrcIncomeBillFee> fees)
|
||||
{
|
||||
List<TmsPriceQuoteFeeLine> lines = new ArrayList<TmsPriceQuoteFeeLine>();
|
||||
if (fees == null)
|
||||
{
|
||||
return lines;
|
||||
}
|
||||
for (PrcIncomeBillFee 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);
|
||||
}
|
||||
return lines;
|
||||
}
|
||||
|
||||
private List<TmsPriceQuoteFeeLine> toPayFeeLines(List<PrcPayBillFee> fees)
|
||||
{
|
||||
List<TmsPriceQuoteFeeLine> lines = new ArrayList<TmsPriceQuoteFeeLine>();
|
||||
if (fees == null)
|
||||
{
|
||||
return lines;
|
||||
}
|
||||
for (PrcPayBillFee 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);
|
||||
}
|
||||
return lines;
|
||||
}
|
||||
|
||||
private void fillResultOrder(TmsPriceQuoteResult r, PrcOrderBill bill)
|
||||
{
|
||||
r.setTrackingNo(bill.getTrackingNo());
|
||||
|
||||
Reference in New Issue
Block a user