增加根据线索id查询面试信息接口

This commit is contained in:
俞扬
2023-06-28 18:20:36 +08:00
parent c696b33d65
commit d16331560d
14 changed files with 74 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
package com.cool.store.service;
import com.cool.store.exception.ApiException;
import com.cool.store.vo.InterviewDetailInfoVO;
import com.cool.store.vo.PartnerInterviewInfoVO;
import com.github.pagehelper.PageInfo;
@@ -46,7 +47,7 @@ public interface HyPartnerInterviewPlanService {
* updateInterviewOverTime
* @return
*/
void updateInterviewOverTime();
void updateInterviewOverTime() throws ApiException;
/**
* 批量打开十分钟之内开始的面试房间
@@ -60,5 +61,5 @@ public interface HyPartnerInterviewPlanService {
* updateInterviewOverTime
* @return
*/
void updateAbsentInterview();
void updateAbsentInterview() throws ApiException;
}

View File

@@ -100,7 +100,7 @@ public interface HyPartnerLineInfoService {
* @param closeFollowRequest
* @return
*/
Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest);
Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest) throws ApiException;
/**
* 公海线索

View File

@@ -1,6 +1,7 @@
package com.cool.store.service;
import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.dto.partner.LineQueryInterviewDto;
import com.cool.store.exception.ApiException;
import com.cool.store.request.ModifyInterviewTimeReq;
import com.cool.store.vo.EnterInterviewVO;
@@ -16,6 +17,8 @@ public interface PartnerInterviewService {
*/
PartnerInterviewInfoVO queryByPartnerId(String partnerId);
PartnerInterviewInfoVO queryByPartnerLineId(LineQueryInterviewDto request) throws ApiException;
/**
* 进入面试间的方法
* 修改一些面试状态
@@ -35,4 +38,6 @@ public interface PartnerInterviewService {
*/
void modifyInterviewTime(ModifyInterviewTimeReq request) throws ApiException;
}

View File

@@ -18,7 +18,7 @@ public interface WorkFlowService {
* @param workflowStage
* @param request
*/
void endProcess(WorkflowStageEnum workflowStage, CloseFollowRequest request);
void endProcess(WorkflowStageEnum workflowStage, CloseFollowRequest request) throws ApiException;
/**
* 转让招商经理

View File

@@ -8,6 +8,7 @@ import com.cool.store.entity.*;
import com.cool.store.enums.RoomStatus;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.exception.ApiException;
import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.cool.store.mapper.HyPartnerLineInfoMapper;
@@ -170,7 +171,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
@Override
@Transactional
public void updateInterviewOverTime() {
public void updateInterviewOverTime() throws ApiException {
List<HyPartnerLineInfoDO> overTimeReserveLineList = hyPartnerLineInfoMapper.getOverTimeReserveLineList(new Date(), WorkflowStageEnum.RESERVATION.getCode(), WorkflowStatusEnum.RESERVATION_0.getCode());
if(CollectionUtils.isEmpty(overTimeReserveLineList)){
return;
@@ -201,7 +202,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
@Override
@Transactional
public void updateAbsentInterview() {
public void updateAbsentInterview() throws ApiException {
Date now = new Date();
//查询当天未参加的面试
String startTime = DateUtil.formatDateTime(DateUtil.offsetHour(now,-6));
@@ -223,7 +224,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
* @param interviewBaseInfoList
* @param rejectPublicReason
*/
public void handleOverTimeInterview(List<HyPartnerInterviewDO> interviewBaseInfoList,String rejectPublicReason){
public void handleOverTimeInterview(List<HyPartnerInterviewDO> interviewBaseInfoList,String rejectPublicReason) throws ApiException {
//1.更新面试信息表中超时的面试信息
List<Long> interviewIds = interviewBaseInfoList.stream().map(HyPartnerInterviewDO::getId).distinct().collect(Collectors.toList());
hyPartnerInterviewMapper.batchUpdateInterviewStatus(interviewIds,Integer.valueOf(WorkflowStatusEnum.RESERVATION_8.getCode()),1);

View File

@@ -318,7 +318,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest) {
public Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest) throws ApiException {
HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(closeFollowRequest.getLineId());
if (hyPartnerLineInfoDO==null){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);

View File

@@ -7,6 +7,7 @@ import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dao.HyInterviewDAO;
import com.cool.store.dto.log.ModifyInterviewTimeDTO;
import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.dto.partner.LineQueryInterviewDto;
import com.cool.store.entity.HyPartnerInterviewDO;
import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.enums.ErrorCodeEnum;
@@ -68,6 +69,11 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
return interviewMapper.queryByPartnerId(partnerId);
}
@Override
public PartnerInterviewInfoVO queryByPartnerLineId(LineQueryInterviewDto request) throws ApiException {
return interviewMapper.queryByPartnerLineId(request.getPartnerLineId());
}
/**
* 进入面试间的方法
* 修改一些面试状态

View File

@@ -35,7 +35,7 @@ public class WorkFlowServiceImpl implements WorkFlowService{
@Override
public void endProcess(WorkflowStageEnum workflowStage, CloseFollowRequest request) {
public void endProcess(WorkflowStageEnum workflowStage, CloseFollowRequest request) throws ApiException {
getWorkflowService(workflowStage).endProcess(request);
}

View File

@@ -24,6 +24,7 @@ import com.cool.store.utils.CoolDateUtils;
import com.cool.store.vo.interview.InterviewVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -61,7 +62,7 @@ public class InterviewWorkFlowService extends WorkFlowBaseService {
}
@Override
public void endProcess(CloseFollowRequest request) throws ServiceException{
public void endProcess(CloseFollowRequest request) throws ApiException {
Long lineId = request.getLineId();
//根据线索id查询面试信息
List<HyPartnerInterviewDO> interviewBaseInfos = hyPartnerInterviewMapper.getInterviewBaseInfoListByLineIds(Arrays.asList(lineId));
@@ -69,6 +70,22 @@ public class InterviewWorkFlowService extends WorkFlowBaseService {
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
}
HyPartnerInterviewDO interviewBaseInfo = interviewBaseInfos.get(0);
InterviewVO interviewInfo = hyPartnerInterviewPlanMapper.getInterviewInfo(String.valueOf(interviewBaseInfo.getInterviewPlanId()));
if(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_2.getCode()) == interviewBaseInfo.getStatus()
&& StringUtils.isNotEmpty(interviewInfo.getRoomStatus())
&& String.valueOf(RoomStatus.WAIT_FOR_OPEN.getCode()).equals(interviewInfo.getRoomStatus())
&& StringUtils.isNotEmpty(interviewInfo.getFeishuCalendarId())
&& StringUtils.isNotEmpty(interviewInfo.getFeishuScheduleId())){
// 原面试官日程删除
DeleteCalendarEventDTO deleteCalendarEventDTO = new DeleteCalendarEventDTO();
deleteCalendarEventDTO.setCalendarId(interviewInfo.getFeishuCalendarId());
deleteCalendarEventDTO.setEventId(interviewInfo.getFeishuScheduleId());
deleteCalendarEventDTO.setUserId(interviewInfo.getInterviewerId());
UserCalendarsEventDTO userCalendarsEventDTO = isvHttpRequest.deleteUserCalendarEvent(deleteCalendarEventDTO);
if(userCalendarsEventDTO == null ){
throw new ApiException(ErrorCodeEnum.FEISHU_DELETE_SCHEDULE_ERROR);
}
}
interviewService.rejectInterviewAndSuspendLine(interviewBaseInfo.getId(),interviewBaseInfo.getInterviewPlanId(),null);
//记录日志
LoginUserInfo operator = CurrentUserHolder.getUser();

View File

@@ -23,7 +23,7 @@ public abstract class WorkFlowBaseService {
* 结束流程
* @param request
*/
public abstract void endProcess(CloseFollowRequest request);
public abstract void endProcess(CloseFollowRequest request) throws ApiException;
/**
* 转让招商经理