Commit cf3681ef authored by Data-王博's avatar Data-王博

Merge remote-tracking branch 'origin/develop' into bug_fix

parents d5340238 1adfbeb5
...@@ -322,12 +322,20 @@ public class HuBeiServiceImpl implements IHuBeiService { ...@@ -322,12 +322,20 @@ public class HuBeiServiceImpl implements IHuBeiService {
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
String base64String = ""; String base64String = "";
List<HuBeiHistory> errorHuBeiHistoryList = new ArrayList<>(); List<HuBeiHistory> errorHuBeiHistoryList = new ArrayList<>();
Date deadline = HubeiCFCUtil.getTodayDeadLine();
if(huBeiHistoryList!=null&&huBeiHistoryList.size()>0){ if(huBeiHistoryList!=null&&huBeiHistoryList.size()>0){
int size = huBeiHistoryList.size(); int size = huBeiHistoryList.size();
for(int index=0;index<size;index++){ for(int index=0;index<size;index++){
HuBeiHistory history = huBeiHistoryList.get(index); HuBeiHistory history = huBeiHistoryList.get(index);
HuBeiJsonBean jsonBean = history.getData(); HuBeiJsonBean jsonBean = history.getData();
//提前还款文件 要过滤应还日小于等于当天
if(hubeiCFCDataType.get().compareTo(RETURN_ADVANCE_REPAYMENT.get())==0){
Date repayDate = DateUtil.dateParse(jsonBean.getRepayDate());
if(repayDate!=null&&repayDate.before(deadline)){
continue;
}
}
//应扣不等于实扣 需要发送异常邮件 //应扣不等于实扣 需要发送异常邮件
//提前还款没有实扣 //提前还款没有实扣
if(hubeiCFCDataType.get().compareTo(RETURN_ADVANCE_REPAYMENT.get())!=0){ if(hubeiCFCDataType.get().compareTo(RETURN_ADVANCE_REPAYMENT.get())!=0){
......
...@@ -291,6 +291,16 @@ public class DateUtil { ...@@ -291,6 +291,16 @@ public class DateUtil {
return DateFormat.format(date); return DateFormat.format(date);
} }
public static Date dateParse(String date){
Date d = null;
try {
d = DateFormat.parse(date);
} catch (Exception e) {
e.printStackTrace();
}
return d;
}
public static String cnDateFormat(Date date) { public static String cnDateFormat(Date date) {
return CNDateFormat.format(date); return CNDateFormat.format(date);
} }
......
...@@ -176,6 +176,19 @@ public class HubeiCFCUtil { ...@@ -176,6 +176,19 @@ public class HubeiCFCUtil {
return dates; return dates;
} }
/**
* 当天还款日零点
* @return
*/
public static Date getTodayDeadLine(){
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.MILLISECOND,0);
calendar.set(Calendar.SECOND,0);
calendar.set(Calendar.MINUTE,0);
calendar.set(Calendar.HOUR_OF_DAY,0);
return calendar.getTime();
}
public static String getDocName(HubeiCFCDataType hubeiCFCDataType,Byte seqNo){ public static String getDocName(HubeiCFCDataType hubeiCFCDataType,Byte seqNo){
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
// calendar.set(Calendar.DATE,calendar.get(Calendar.DATE)-1); // calendar.set(Calendar.DATE,calendar.get(Calendar.DATE)-1);
......
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