|
|
@ -1018,6 +1018,8 @@ public class LoanTemplateService extends MybatisBaseService<LoanTemplateMapper, |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<AppLoanTemplateInfoVo> getCustomizedInfo(String sid) { |
|
|
|
//前X期月还,X为其他融的期数,前X期月还就是主方案月还+其他融的月还。
|
|
|
|
//剩余期数为主的期数-其他融期数。剩余月还为主方案月还。
|
|
|
|
ResultBean<AppLoanTemplateInfoVo> rb = ResultBean.fireFail(); |
|
|
|
AppLoanTemplateInfoVo appLoanTemplateInfoVo = new AppLoanTemplateInfoVo(); |
|
|
|
LoanTemplate loanTemplate = fetchBySid(sid); |
|
|
@ -1030,18 +1032,23 @@ public class LoanTemplateService extends MybatisBaseService<LoanTemplateMapper, |
|
|
|
if (StringUtils.isNotBlank(otherpolicy.getPeriod())) { |
|
|
|
String period = otherpolicy.getPeriod(); |
|
|
|
String[] split = period.split("/"); |
|
|
|
//其他融期数
|
|
|
|
String beforePeriod = split[0]; |
|
|
|
//剩余期数
|
|
|
|
String afterPeriod = split[1]; |
|
|
|
//其他融期数为0,且剩余期数不为0,前X期期数为剩余期数。
|
|
|
|
if (beforePeriod.equals("0") && !afterPeriod.equals("0")) { |
|
|
|
appLoanTemplateInfoVo.setTimes(afterPeriod); |
|
|
|
appLoanTemplateInfoVo.setPreviousRepay(otherpolicy.getMonthlyRepay()); |
|
|
|
} else if (!beforePeriod.equals("0") && afterPeriod.equals("0")) { |
|
|
|
//前X期期数不为0,且剩余期数为0,则表示主方案期数与其他融期数一致。前X期为其他融期数,前X期月还为主方案月还+其他融月还
|
|
|
|
String monthlyRepay = otherpolicy.getMonthlyRepay(); |
|
|
|
appLoanTemplateInfoVo.setTimes(beforePeriod); |
|
|
|
String[] splitMonthlyPepay = monthlyRepay.split("/"); |
|
|
|
String beforeMoney = splitMonthlyPepay[0]; |
|
|
|
appLoanTemplateInfoVo.setPreviousRepay(beforeMoney); |
|
|
|
} else { |
|
|
|
//前X期不为0,且剩余期数不为0,则前X期期数为其他融期数,前X期月还为主方案月还+其他融月还。剩余期数为主方案期数-其他融期数,剩余月还为主方案月还。
|
|
|
|
String monthlyRepay = otherpolicy.getMonthlyRepay(); |
|
|
|
appLoanTemplateInfoVo.setTimes(beforePeriod); |
|
|
|
String[] splitMonthlyPepay = monthlyRepay.split("/"); |
|
|
|