保后日期处理

master
shijie 4 years ago
parent a7af6de58c
commit 68b9a8b5d0
  1. 19
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java

@ -177,6 +177,8 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date four = null; Date four = null;
Date three = null;
Date two = null;
Date now = new Date(); Date now = new Date();
try { try {
@ -188,10 +190,23 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
//遍历list取出应还款日,计算逾期天数=当前时间-应还款日 //遍历list取出应还款日,计算逾期天数=当前时间-应还款日
for (AlRepaymentEntryRes res:list) { for (AlRepaymentEntryRes res:list) {
long times2 = res.getRepaymentDate().getTime();//应还款日 try {
two = formatter2.parse(formatter.format(res.getRepaymentDate())+" 00:00:00");
} catch (ParseException e) {
e.printStackTrace();
}
long times2 = two.getTime();//应还款日
//long times2 = res.getRepaymentDate().getTime();//应还款日
long times3=0L; long times3=0L;
if(res.getActualRepaymentDate()!=null){ if(res.getActualRepaymentDate()!=null){
times3 = res.getActualRepaymentDate().getTime();//实际还款日
try {
three = formatter2.parse(formatter.format(res.getActualRepaymentDate())+" 00:00:00");
} catch (ParseException e) {
e.printStackTrace();
}
times3 = three.getTime();//实际还款日
//times3 = res.getActualRepaymentDate().getTime();//实际还款日
} }
AlRepaymentEntry entry = new AlRepaymentEntry(); AlRepaymentEntry entry = new AlRepaymentEntry();

Loading…
Cancel
Save