md
This commit is contained in:
parent
29a6eb26a4
commit
a7585cb038
@ -237,9 +237,9 @@ public class EmisSettleBillController extends BaseController
|
||||
Map<String, Object> voMap = new HashMap<>();
|
||||
voMap.put("sendDate", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,billItem.getWaybillDetail().getSendDate())) ;
|
||||
voMap.put("billCode",billItem.getBillCode());
|
||||
voMap.put("fjr",billItem.getWaybillDetail().getSendName()+"~"+billItem.getWaybillDetail().getReceiveName());
|
||||
voMap.put("fjr",billItem.getWaybillDetail().getSendName()+"--"+billItem.getWaybillDetail().getReceiveName());
|
||||
voMap.put("kjlx",billItem.getWaybillDetail().getSendSiteName()+"--"+billItem.getWaybillDetail().getDispatchUnderlingSiteName());
|
||||
voMap.put("company",billItem.getWaybillDetail().getSendCompany());
|
||||
voMap.put("company",billItem.getWaybillDetail().getCustName());
|
||||
voMap.put("paymentType", DictUtils.getDictLabel("emis_payment_type",billItem.getWaybillDetail().getPaymentType()));
|
||||
voMap.put("productTypeName", billItem.getWaybillDetail().getProductTypeName());
|
||||
voMap.put("parcelQty", billItem.getWaybillDetail().getParcelQty().toString());
|
||||
@ -251,37 +251,36 @@ public class EmisSettleBillController extends BaseController
|
||||
//计算分项数据
|
||||
List<EmisSettleSubBillFeeitem> feeItemList=billItem.getFeeitemList();
|
||||
if( !CollectionUtils.isEmpty(feeItemList) ){
|
||||
if(feeItemList.size()>1) {
|
||||
tplName = "tpl/bill_tpl.xlsx";
|
||||
BigDecimal otherFee = BigDecimal.ZERO;
|
||||
BigDecimal transFee = BigDecimal.ZERO;
|
||||
BigDecimal cebFee = BigDecimal.ZERO;
|
||||
BigDecimal declareFee = BigDecimal.ZERO;
|
||||
for (EmisSettleSubBillFeeitem feeitem : feeItemList) {
|
||||
if ("CNY".equals(feeitem.getCurrency())) {
|
||||
if ("1001".equals(feeitem.getFeeCode())) {
|
||||
transFee = transFee.add(feeitem.getBillFee());
|
||||
}
|
||||
// 报关费
|
||||
else if ("2002".equals(feeitem.getFeeCode())) {
|
||||
cebFee = cebFee.add(feeitem.getBillFee());
|
||||
}
|
||||
// 清关费
|
||||
else if ("2003".equals(feeitem.getFeeCode())) {
|
||||
declareFee = declareFee.add(feeitem.getBillFee());
|
||||
} else {
|
||||
otherFee = otherFee.add(feeitem.getBillFee());
|
||||
}
|
||||
|
||||
BigDecimal otherFee = BigDecimal.ZERO;
|
||||
BigDecimal transFee = BigDecimal.ZERO;
|
||||
BigDecimal cebFee = BigDecimal.ZERO;
|
||||
BigDecimal declareFee = BigDecimal.ZERO;
|
||||
for (EmisSettleSubBillFeeitem feeitem : feeItemList) {
|
||||
if ("CNY".equals(feeitem.getCurrency())) {
|
||||
if ("1001".equals(feeitem.getFeeCode())) {
|
||||
transFee = transFee.add(feeitem.getBillFee());
|
||||
}
|
||||
// 报关费
|
||||
else if ("2002".equals(feeitem.getFeeCode())) {
|
||||
cebFee = cebFee.add(feeitem.getBillFee());
|
||||
}
|
||||
// 清关费
|
||||
else if ("2003".equals(feeitem.getFeeCode())) {
|
||||
declareFee = declareFee.add(feeitem.getBillFee());
|
||||
} else {
|
||||
otherFee = otherFee.add(feeitem.getBillFee());
|
||||
}
|
||||
}
|
||||
|
||||
voMap.put("transFee", transFee.compareTo(BigDecimal.ZERO) == 0 ? "0" : transFee.stripTrailingZeros().toPlainString());
|
||||
}
|
||||
voMap.put("transFee", transFee.compareTo(BigDecimal.ZERO) == 0 ? "0" : transFee.stripTrailingZeros().toPlainString());
|
||||
if( cebFee.compareTo(BigDecimal.ZERO)!=0 || declareFee.compareTo(BigDecimal.ZERO)!=0 || otherFee.compareTo(BigDecimal.ZERO)!=0 ) {
|
||||
tplName = "tpl/bill_tpl.xlsx";
|
||||
voMap.put("cebFee", cebFee.compareTo(BigDecimal.ZERO) == 0 ? "0" : cebFee.stripTrailingZeros().toPlainString());
|
||||
voMap.put("declareFee", declareFee.compareTo(BigDecimal.ZERO) == 0 ? "0" : declareFee.stripTrailingZeros().toPlainString());
|
||||
voMap.put("otherFee", otherFee.compareTo(BigDecimal.ZERO) == 0 ? "0" : otherFee.stripTrailingZeros().toPlainString());
|
||||
}else{
|
||||
tplName = "tpl/bill_tpl_simple.xlsx";
|
||||
voMap.put("transFee",billItem.getWaybillDetail().getFreight().stripTrailingZeros().toPlainString());
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user