md
This commit is contained in:
parent
03142d6aa2
commit
023a6e0d6d
@ -464,6 +464,9 @@ public class EmisSettleBillController extends BaseController
|
||||
String declareFeeStr = "";
|
||||
String otherFeeStr = "";
|
||||
|
||||
// 是否使用复复杂模版,如果有清关费用和其他费用都需要使用复杂模版
|
||||
boolean isNeedComplexTpl=false;
|
||||
|
||||
//计算分项数据
|
||||
List<EmisSettleSubBillFeeitem> feeItemList=billItem.getFeeitemList();
|
||||
if( !CollectionUtils.isEmpty(feeItemList) ){
|
||||
@ -498,15 +501,36 @@ public class EmisSettleBillController extends BaseController
|
||||
otherFeeStr= otherFeeStr+""+feeitem.getFeeName()+":"+feeitem.getBillFee().stripTrailingZeros().toPlainString()+currencyStr+",";
|
||||
}
|
||||
|
||||
}
|
||||
if(
|
||||
cebFee.compareTo(BigDecimal.ZERO)>0
|
||||
|| declareFee.compareTo(BigDecimal.ZERO)>0
|
||||
|| otherFee.compareTo(BigDecimal.ZERO)>0
|
||||
){
|
||||
isNeedComplexTpl=true;
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(transFeeStr)){
|
||||
transFeeStr="0";
|
||||
}
|
||||
}else{
|
||||
transFeeStr=billItem.getWaybillDetail().getFreight().stripTrailingZeros().toPlainString();
|
||||
}
|
||||
|
||||
|
||||
if(StringUtils.isEmpty(transFeeStr)){
|
||||
transFeeStr="0";
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(cebFeeStr)){
|
||||
transFeeStr="0";
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(declareFeeStr)){
|
||||
declareFeeStr="0";
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(otherFeeStr)){
|
||||
otherFeeStr="0";
|
||||
}
|
||||
|
||||
voMap.put("transFee",transFeeStr);
|
||||
voMap.put("cebFee",cebFeeStr);
|
||||
voMap.put("declareFee",declareFeeStr);
|
||||
@ -515,7 +539,13 @@ public class EmisSettleBillController extends BaseController
|
||||
listMap.add(voMap);
|
||||
}
|
||||
|
||||
tplName = "tpl/bill_tpl.xlsx";
|
||||
|
||||
|
||||
if(isNeedComplexTpl) {
|
||||
tplName = "tpl/bill_tpl.xlsx";
|
||||
}else{
|
||||
tplName = "tpl/bill_tpl_simple.xlsx";
|
||||
}
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
|
||||
//账单主数据填充
|
||||
|
||||
Loading…
Reference in New Issue
Block a user