|
|
@ -5579,6 +5579,10 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
} |
|
|
|
} |
|
|
|
List<LoanRepaymentSchedule> schedules = saveHistoryRecord(list, userSid); |
|
|
|
System.out.println("============================"); |
|
|
|
System.out.println(schedules); |
|
|
|
System.out.println("============================"); |
|
|
|
|
|
|
|
generateHistoryData(schedules, userSid); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
@ -6004,7 +6008,6 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
jrList.add(jr); |
|
|
|
} |
|
|
|
} |
|
|
|
if (T.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
int M = maxInt(M1, M2); //取最大还款期数
|
|
|
|
for (int i = M; i <= M && i > 0; i--) { |
|
|
|
BigDecimal m1i = BigDecimal.ZERO; //主产品月还
|
|
|
@ -6021,7 +6024,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
D1 = T1.compareTo(m1i) >= 0 ? m1i : T1; |
|
|
|
BigDecimal L1 = BigDecimal.ZERO; |
|
|
|
if (D1.compareTo(T) >= 0) { |
|
|
|
L1 = T; |
|
|
|
L1 = L; |
|
|
|
} else { |
|
|
|
BigDecimal bigDecimal = D1.divide(T, 2, BigDecimal.ROUND_HALF_UP); |
|
|
|
L1 = L.multiply(bigDecimal); |
|
|
@ -6049,7 +6052,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
temp = Q1.compareTo(m1i) >= 0 ? m1i : Q1; |
|
|
|
BigDecimal B1 = BigDecimal.ZERO; |
|
|
|
if (temp.compareTo(Q) >= 0) { |
|
|
|
B1 = Q; |
|
|
|
B1 = B; |
|
|
|
} else { |
|
|
|
BigDecimal bigDecimal = temp.divide(Q, 2, BigDecimal.ROUND_HALF_UP); |
|
|
|
B1 = B.multiply(bigDecimal); |
|
|
@ -6129,7 +6132,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
D1 = T1.compareTo(m2i) >= 0 ? m2i : T1; |
|
|
|
BigDecimal L1 = BigDecimal.ZERO; |
|
|
|
if (D1.compareTo(T) >= 0) { |
|
|
|
L1 = T; |
|
|
|
L1 = L; |
|
|
|
} else { |
|
|
|
BigDecimal bigDecimal = D1.divide(T, 2, BigDecimal.ROUND_HALF_UP); |
|
|
|
L1 = L.multiply(bigDecimal); |
|
|
@ -6157,7 +6160,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
temp = Q1.compareTo(m2i) >= 0 ? m2i : Q1; |
|
|
|
BigDecimal B1 = BigDecimal.ZERO; |
|
|
|
if (temp.compareTo(Q) >= 0) { |
|
|
|
B1 = Q; |
|
|
|
B1 = B; |
|
|
|
} else { |
|
|
|
BigDecimal bigDecimal = temp.divide(Q, 2, BigDecimal.ROUND_HALF_UP); |
|
|
|
B1 = B.multiply(bigDecimal); |
|
|
@ -6227,7 +6230,6 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
M2 = getDiffPeriod(new Date(), schedule.getOtherRepayDate()); |
|
|
@ -6335,7 +6337,6 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
jrList.add(jr); |
|
|
|
} |
|
|
|
} |
|
|
|
if (T.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
int M = maxInt(M1, M2); //取最大还款期数
|
|
|
|
for (int i = M; i <= M && i > 0; i--) { |
|
|
|
BigDecimal m1i = BigDecimal.ZERO; //主产品月还
|
|
|
@ -6352,7 +6353,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
D1 = T1.compareTo(m1i) >= 0 ? m1i : T1; |
|
|
|
BigDecimal L1 = BigDecimal.ZERO; |
|
|
|
if (D1.compareTo(T) >= 0) { |
|
|
|
L1 = T; |
|
|
|
L1 = L; |
|
|
|
} else { |
|
|
|
BigDecimal bigDecimal = D1.divide(T, 2, BigDecimal.ROUND_HALF_UP); |
|
|
|
L1 = L.multiply(bigDecimal); |
|
|
@ -6380,7 +6381,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
temp = Q1.compareTo(m1i) >= 0 ? m1i : Q1; |
|
|
|
BigDecimal B1 = BigDecimal.ZERO; |
|
|
|
if (temp.compareTo(Q) >= 0) { |
|
|
|
B1 = Q; |
|
|
|
B1 = B; |
|
|
|
} else { |
|
|
|
BigDecimal bigDecimal = temp.divide(Q, 2, BigDecimal.ROUND_HALF_UP); |
|
|
|
B1 = B.multiply(bigDecimal); |
|
|
@ -6460,7 +6461,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
D1 = T1.compareTo(m2i) >= 0 ? m2i : T1; |
|
|
|
BigDecimal L1 = BigDecimal.ZERO; |
|
|
|
if (D1.compareTo(T) >= 0) { |
|
|
|
L1 = T; |
|
|
|
L1 = L; |
|
|
|
} else { |
|
|
|
BigDecimal bigDecimal = D1.divide(T, 2, BigDecimal.ROUND_HALF_UP); |
|
|
|
L1 = L.multiply(bigDecimal); |
|
|
@ -6488,7 +6489,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
temp = Q1.compareTo(m2i) >= 0 ? m2i : Q1; |
|
|
|
BigDecimal B1 = BigDecimal.ZERO; |
|
|
|
if (temp.compareTo(Q) >= 0) { |
|
|
|
B1 = Q; |
|
|
|
B1 = B; |
|
|
|
} else { |
|
|
|
BigDecimal bigDecimal = temp.divide(Q, 2, BigDecimal.ROUND_HALF_UP); |
|
|
|
B1 = B.multiply(bigDecimal); |
|
|
@ -6559,7 +6560,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|