获取14天的是否有面试情况及获取近7日和当天面试数量

This commit is contained in:
feng.li
2023-12-27 18:21:00 +08:00
parent ac81c9111b
commit 3702e7000b
3 changed files with 4 additions and 6 deletions

View File

@@ -272,8 +272,8 @@
<select id="getInterviewCount" resultType="com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO">
select
ifnull(sum(if(interview_date = '2023-11-27' and room_status!=2,1,0)),0) as currentDayInterviewCount,
ifnull(sum(if(start_time &gt; '2023-11-01 00:00:00' and end_time &lt; '2023-11-30 23:59:59',1,0)),0) as lastSevenDayInterviewCount
ifnull(sum(if(interview_date = #{currentDate} and room_status!=2,1,0)),0) as currentDayInterviewCount,
ifnull(sum(if(start_time &gt; #{startTime} and end_time &lt;= #{endTime} ,1,0)),0) as lastSevenDayInterviewCount
FROM hy_partner_interview_plan t1
LEFT JOIN hy_partner_exhibition t2 ON t1.id = t2.interview_plan_id
where interviewer = #{userId}

View File

@@ -1,6 +1,5 @@
package com.cool.store.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.HyPartnerInterviewPlanDAO;
@@ -21,7 +20,6 @@ import com.cool.store.vo.InterviewPlanVO;
import com.cool.store.vo.InterviewScheduleInfoVO;
import com.cool.store.vo.StageCountVO;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.utils.DateUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -51,7 +49,7 @@ public class DeskServiceImpl implements DeskService {
public HashMap<String, InterviewPlanVO> getInterviewPlan(String userId) {
String currentDate = DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_DAY);
String endDate = DateUtil.format(CoolDateUtils.getDateFormatDay(new Date(), 6), CoolDateUtils.DATE_FORMAT_DAY);
String endDate = DateUtil.format(CoolDateUtils.getDateFormatDay(new Date(), 13), CoolDateUtils.DATE_FORMAT_DAY);
List<AdvanceLineDTO> currentDateInterviewList = hyPartnerInterviewPlanDAO.getCurrentDateInterviewCount(userId, currentDate,endDate);
Map<String, Integer> dateIntegerMap = currentDateInterviewList.stream().collect(Collectors.toMap(AdvanceLineDTO::getDate, AdvanceLineDTO::getCount));
//临期数量

View File

@@ -716,7 +716,7 @@ public class InterviewServiceImpl implements InterviewService {
//3.3 装到槽里并返回
//3.3.1 外层循环每一天
for (CalendarInfo daySlot : daySlots) {
//3.3.2 内循环每一天的每个时间段
//3.3.2 内循环每一天的每个时间段
List<FreeBusyInfo> freeBusyList = daySlot.getFreeBusyList();
for (FreeBusyInfo freeBusyInfo : freeBusyList) {
//把日期和时间拼接成yyyy-MM-dd HH:mm格式