Commit 0e45e267 authored by Data-王博's avatar Data-王博

湖北消金 - 修改金额不正确时显示的错误码,修改回盘文件无论是否发送成功 都发出邮件

parent 75f2c4bb
......@@ -35,6 +35,7 @@ import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import java.io.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
......@@ -452,7 +453,7 @@ public class HuBeiServiceImpl implements IHuBeiService {
//湖北罚息
BigDecimal hubeiOverdueInterest = HubeiCFCUtil.caculateOverDueFee(repaymentPlanDetail.getDeadLine(),repayXyqbDetail.getPayCenterRepayAt(),repaymentPlanDetail.getPrincipal());
//批扣
BigDecimal reallyRepayAmount = repaymentPlanDetail.getPrincipal().add(repaymentPlanDetail.getInterest()).add(hubeiOverdueInterest);
BigDecimal reallyRepayAmount = repaymentPlanDetail.getPrincipal().add(repaymentPlanDetail.getInterest()).add(hubeiOverdueInterest).setScale(2, RoundingMode.HALF_UP);
returnHuBeiHistoryList.add(deitHuiBeiHistory(history, sendHuBeiDocName.getCreateTime(),reallyRepayAmount));
}
}else {
......@@ -472,7 +473,7 @@ public class HuBeiServiceImpl implements IHuBeiService {
RepaymentPlanDetail repaymentPlanDetail = compensationContractMapRepayPlan.get(history.getContactNo());
BigDecimal hubeiOverdueInterest = HubeiCFCUtil.caculateOverDueFee(repaymentPlanDetail.getDeadLine(),new Date(),repaymentPlanDetail.getPrincipal());
//批扣
BigDecimal reallyRepayAmount = repaymentPlanDetail.getPrincipal().add(repaymentPlanDetail.getInterest()).add(hubeiOverdueInterest);
BigDecimal reallyRepayAmount = repaymentPlanDetail.getPrincipal().add(repaymentPlanDetail.getInterest()).add(hubeiOverdueInterest).setScale(2,RoundingMode.HALF_UP);
returnHuBeiHistoryList.add(compensationHuiBeiHistory(history, sendHuBeiDocName.getCreateTime(),reallyRepayAmount));
continue;
}
......@@ -543,7 +544,7 @@ public class HuBeiServiceImpl implements IHuBeiService {
//应扣金额
huBeiJsonBean.setRepayAmount(history.getData().getRepayAmount());
//实扣金额
huBeiJsonBean.setReallyRepayAmount(reallyRepayAmount);
huBeiJsonBean.setReallyRepayAmount(reallyRepayAmount.setScale(2,RoundingMode.HALF_UP));
huBeiJsonBean.setTradeCode(HubeiCFCField.tradeCodeSuccess);
huBeiJsonBean.setTradeMsg(HubeiCFCField.tradeMsgSuccess);
compensationHuiBeiHistory.setHappenTime(happenTime);
......@@ -599,7 +600,7 @@ public class HuBeiServiceImpl implements IHuBeiService {
//湖北罚息
BigDecimal huBeiOverdueInterest = HubeiCFCUtil.caculateOverDueFee(deadLine.getTime(),repayXyqbDetail.getPayCenterRepayAt(),repayXyqbDetail.getPrincipal());
BigDecimal reallyPayment = repayXyqbDetail.getPrincipal().add(repayXyqbDetail.getInterest()).add(huBeiOverdueInterest);
huBeiJsonBean.setReallyRepayAmount(reallyPayment);
huBeiJsonBean.setReallyRepayAmount(reallyPayment.setScale(2,RoundingMode.HALF_UP));
huBeiJsonBean.setChannel(HubeiCFCField.repayChannel);
huBeiJsonBean.setApplyRepayDate(applyRepayDateFormat);
huBeiJsonBean.setRepayTotalAmount(reallyPayment);
......@@ -630,7 +631,7 @@ public class HuBeiServiceImpl implements IHuBeiService {
//应扣金额
huBeiJsonBean.setRepayAmount(history.getData().getRepayAmount());
//实扣金额 0
huBeiJsonBean.setReallyRepayAmount(reallyRepayAmount);
huBeiJsonBean.setReallyRepayAmount(reallyRepayAmount.setScale(2,RoundingMode.HALF_UP));
if(history.getData().getRepayAmount()!=null
&&reallyRepayAmount.compareTo(BigDecimal.ZERO)!=0
&&history.getData().getRepayAmount().compareTo(reallyRepayAmount)==0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment