md
This commit is contained in:
parent
17acf5804a
commit
03142d6aa2
@ -455,33 +455,30 @@ public class EmisSettleBillController extends BaseController
|
|||||||
voMap.put("freight", billItem.getWaybillDetail().getFreight().stripTrailingZeros().toPlainString());
|
voMap.put("freight", billItem.getWaybillDetail().getFreight().stripTrailingZeros().toPlainString());
|
||||||
voMap.put("feeRemark", billItem.getWaybillDetail().getFeeRemark());
|
voMap.put("feeRemark", billItem.getWaybillDetail().getFeeRemark());
|
||||||
|
|
||||||
//计算分项数据
|
|
||||||
List<EmisSettleSubBillFeeitem> feeItemList=billItem.getFeeitemList();
|
|
||||||
if( !CollectionUtils.isEmpty(feeItemList) ){
|
|
||||||
|
|
||||||
BigDecimal otherFee = BigDecimal.ZERO;
|
BigDecimal otherFee = BigDecimal.ZERO;
|
||||||
BigDecimal transFee = BigDecimal.ZERO;
|
BigDecimal transFee = BigDecimal.ZERO;
|
||||||
BigDecimal cebFee = BigDecimal.ZERO;
|
BigDecimal cebFee = BigDecimal.ZERO;
|
||||||
BigDecimal declareFee = BigDecimal.ZERO;
|
BigDecimal declareFee = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
|
||||||
String transFeeStr = "";
|
String transFeeStr = "";
|
||||||
String cebFeeStr = "";
|
String cebFeeStr = "";
|
||||||
String declareFeeStr = "";
|
String declareFeeStr = "";
|
||||||
String otherFeeStr = "";
|
String otherFeeStr = "";
|
||||||
|
|
||||||
|
//计算分项数据
|
||||||
|
List<EmisSettleSubBillFeeitem> feeItemList=billItem.getFeeitemList();
|
||||||
|
if( !CollectionUtils.isEmpty(feeItemList) ){
|
||||||
for (EmisSettleSubBillFeeitem feeitem : feeItemList) {
|
for (EmisSettleSubBillFeeitem feeitem : feeItemList) {
|
||||||
|
|
||||||
|
// 币种
|
||||||
String currencyStr="";
|
String currencyStr="";
|
||||||
if(StringUtils.isEmpty(feeitem.getCurrency())){
|
if(StringUtils.isEmpty(feeitem.getCurrency())){
|
||||||
feeitem.setCurrency("CNY");
|
feeitem.setCurrency("CNY");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!"CNY".equals(feeitem.getCurrency())){
|
if(!"CNY".equals(feeitem.getCurrency())){
|
||||||
currencyStr="("+feeitem.getCurrency()+")";
|
currencyStr="("+feeitem.getCurrency()+")";
|
||||||
}
|
}
|
||||||
|
|
||||||
// if ("CNY".equals(feeitem.getCurrency())) {
|
// 费用细分
|
||||||
if ("1001".equals(feeitem.getFeeCode())) {
|
if ("1001".equals(feeitem.getFeeCode())) {
|
||||||
transFee = transFee.add(feeitem.getBillFee());
|
transFee = transFee.add(feeitem.getBillFee());
|
||||||
transFeeStr= feeitem.getBillFee().stripTrailingZeros().toPlainString()+currencyStr;
|
transFeeStr= feeitem.getBillFee().stripTrailingZeros().toPlainString()+currencyStr;
|
||||||
@ -500,52 +497,25 @@ public class EmisSettleBillController extends BaseController
|
|||||||
otherFee = otherFee.add(feeitem.getBillFee());
|
otherFee = otherFee.add(feeitem.getBillFee());
|
||||||
otherFeeStr= otherFeeStr+""+feeitem.getFeeName()+":"+feeitem.getBillFee().stripTrailingZeros().toPlainString()+currencyStr+",";
|
otherFeeStr= otherFeeStr+""+feeitem.getFeeName()+":"+feeitem.getBillFee().stripTrailingZeros().toPlainString()+currencyStr+",";
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
// voMap.put("transFee", transFee.compareTo(BigDecimal.ZERO) == 0 ? "0" : transFee.stripTrailingZeros().toPlainString());
|
|
||||||
|
|
||||||
if(StringUtils.isEmpty(transFeeStr)){
|
if(StringUtils.isEmpty(transFeeStr)){
|
||||||
transFeeStr="0";
|
transFeeStr="0";
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
transFeeStr=billItem.getWaybillDetail().getFreight().stripTrailingZeros().toPlainString();
|
||||||
|
}
|
||||||
|
|
||||||
voMap.put("transFee",transFeeStr);
|
voMap.put("transFee",transFeeStr);
|
||||||
|
|
||||||
|
|
||||||
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());
|
|
||||||
|
|
||||||
if(StringUtils.isEmpty(cebFeeStr)){
|
|
||||||
cebFeeStr="0";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(StringUtils.isEmpty(declareFeeStr)){
|
|
||||||
declareFeeStr="0";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(StringUtils.isEmpty(otherFeeStr)){
|
|
||||||
otherFeeStr="0";
|
|
||||||
}
|
|
||||||
|
|
||||||
voMap.put("cebFee",cebFeeStr);
|
voMap.put("cebFee",cebFeeStr);
|
||||||
voMap.put("declareFee",declareFeeStr);
|
voMap.put("declareFee",declareFeeStr);
|
||||||
voMap.put("otherFee", StringUtils.removeEnd(otherFeeStr,","));
|
voMap.put("otherFee",otherFeeStr);
|
||||||
|
|
||||||
}else{
|
|
||||||
tplName = "tpl/bill_tpl_simple.xlsx";
|
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
|
||||||
tplName = "tpl/bill_tpl_simple.xlsx";
|
|
||||||
voMap.put("transFee",billItem.getWaybillDetail().getFreight().stripTrailingZeros().toPlainString());
|
|
||||||
|
|
||||||
}
|
|
||||||
listMap.add(voMap);
|
listMap.add(voMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tplName = "tpl/bill_tpl.xlsx";
|
||||||
ServletOutputStream outputStream = response.getOutputStream();
|
ServletOutputStream outputStream = response.getOutputStream();
|
||||||
|
|
||||||
//账单主数据填充
|
//账单主数据填充
|
||||||
|
|||||||
@ -193,6 +193,8 @@ public class EmisSettleInvoiceRecordController extends BaseController
|
|||||||
emisSettleInvoiceRecord.setAuditNote(spr.getAuditNote());
|
emisSettleInvoiceRecord.setAuditNote(spr.getAuditNote());
|
||||||
emisSettleInvoiceRecordService.auditCenterNoPass(emisSettleInvoiceRecord);
|
emisSettleInvoiceRecordService.auditCenterNoPass(emisSettleInvoiceRecord);
|
||||||
|
|
||||||
|
// 重新计算账单开票状态
|
||||||
|
|
||||||
}catch (Exception ex){
|
}catch (Exception ex){
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
// 返回子定义异常
|
// 返回子定义异常
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user