面试日程
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
package com.cool.store.utils;
|
package com.cool.store.utils;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.*;
|
import java.time.*;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
@@ -51,5 +54,16 @@ public class CoolDateUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static final Date parseDate(String dateString ){
|
||||||
|
DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_SEC);
|
||||||
|
Date date = null;
|
||||||
|
try {
|
||||||
|
date = dateFormat.parse(dateString);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dao.HyPartnerInterviewPlanDAO;
|
import com.cool.store.dao.HyPartnerInterviewPlanDAO;
|
||||||
@@ -58,13 +59,14 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
if (StringUtils.isEmpty(userId)||selectedData==null){
|
if (StringUtils.isEmpty(userId)||selectedData==null){
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
}
|
}
|
||||||
Date date = DateUtils.parseDate(selectedData);
|
Date dateTime = CoolDateUtils.parseDate(selectedData);
|
||||||
|
|
||||||
InterviewScheduleInfoVO interviewScheduleInfoVO = new InterviewScheduleInfoVO();
|
InterviewScheduleInfoVO interviewScheduleInfoVO = new InterviewScheduleInfoVO();
|
||||||
//查询面试数量
|
//查询面试数量
|
||||||
|
|
||||||
String currentDate = DateUtil.format(date, CoolDateUtils.DATE_FORMAT_DAY);
|
String currentDate = DateUtil.format(dateTime, CoolDateUtils.DATE_FORMAT_DAY);
|
||||||
String startTime = DateUtil.format(date, CoolDateUtils.DATE_FORMAT_SEC);
|
String startTime = DateUtil.format(dateTime, CoolDateUtils.DATE_FORMAT_SEC);
|
||||||
String endTime = DateUtil.format(CoolDateUtils.getDateBefore(date, 7), CoolDateUtils.DATE_FORMAT_SEC);
|
String endTime = DateUtil.format(CoolDateUtils.getDateBefore(dateTime, 7), CoolDateUtils.DATE_FORMAT_SEC);
|
||||||
SpecialDateRangeInterviewCountDTO interviewCount = hyPartnerInterviewPlanDAO.getInterviewCount(userId, currentDate, startTime, endTime);
|
SpecialDateRangeInterviewCountDTO interviewCount = hyPartnerInterviewPlanDAO.getInterviewCount(userId, currentDate, startTime, endTime);
|
||||||
|
|
||||||
interviewScheduleInfoVO.setCurrentDayInterviewCount(interviewCount.getCurrentDayInterviewCount());
|
interviewScheduleInfoVO.setCurrentDayInterviewCount(interviewCount.getCurrentDayInterviewCount());
|
||||||
|
|||||||
Reference in New Issue
Block a user