fix: 分期管理,已还期数修改。
This commit is contained in:
@@ -98,7 +98,7 @@ public class InstallmentHistoryServiceImpl implements IInstallmentHistoryService
|
||||
if(!"4".equals(installmentHistory.getType())){
|
||||
Calendar calendarStart = Calendar.getInstance();
|
||||
calendarStart.setTime(installmentHistory.getInstallmentDate());
|
||||
//如果是信用卡,第一期账单是分期日期,如果是网点,第一期账单是下个月
|
||||
//如果是信用卡,第一期账单是分期日期,如果是贷款,第一期账单是下个月
|
||||
if(installmentHistory.getType().equals("2")){
|
||||
calendarStart.add(Calendar.MONTH, installmentHistory.getPeriod()-1);
|
||||
}else if(installmentHistory.getType().equals("3")){
|
||||
@@ -127,6 +127,7 @@ public class InstallmentHistoryServiceImpl implements IInstallmentHistoryService
|
||||
{
|
||||
List<InstallmentHistoryDetail> detailList=new ArrayList<>();
|
||||
Long id = installmentHistory.getId();
|
||||
int repaidPeriod=installmentHistory.getRepaidPeriod();
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#.##");
|
||||
for (int i=1;i<=installmentHistory.getPeriod();i++)
|
||||
{
|
||||
@@ -151,7 +152,13 @@ public class InstallmentHistoryServiceImpl implements IInstallmentHistoryService
|
||||
detail.setPeriods(i);
|
||||
detail.setType(installmentHistory.getType());
|
||||
detail.setDelFlag("0");
|
||||
detail.setPostingState("0");
|
||||
if(i<=repaidPeriod){
|
||||
detail.setPostingState("1");
|
||||
}
|
||||
else {
|
||||
detail.setPostingState("0");
|
||||
}
|
||||
|
||||
detail.setCreateBy(SecurityUtils.getUsername());
|
||||
detail.setCreateTime(DateUtils.getNowDate());
|
||||
installmentHistoryDetailMapper.insertInstallmentHistoryDetail(detail);
|
||||
|
||||
Reference in New Issue
Block a user