增加根据线索id查询面试信息接口
This commit is contained in:
@@ -35,6 +35,7 @@ public interface HyPartnerInterviewMapper {
|
||||
* @return
|
||||
*/
|
||||
PartnerInterviewInfoVO queryByPartnerId(@Param("partnerId") String partnerId);
|
||||
PartnerInterviewInfoVO queryByPartnerLineId(@Param("partnerLineId") String partnerLineId);
|
||||
|
||||
/**
|
||||
* 根据会议 id 查询面试官 id
|
||||
|
||||
@@ -477,6 +477,14 @@
|
||||
FROM hy_partner_interview
|
||||
WHERE interview_plan_id = #{interviewPlanId}
|
||||
</select>
|
||||
<select id="queryByPartnerLineId" resultType="com.cool.store.vo.PartnerInterviewInfoVO">
|
||||
SELECT t1.id interviewId, t1.id interview_id, t2.id as interviewPlanId, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId
|
||||
FROM hy_partner_interview_plan t2
|
||||
LEFT JOIN hy_partner_interview t1 ON t1.interview_plan_id = t2.id
|
||||
WHERE t2.partner_line_id = #{partnerLineId}
|
||||
AND t1.deleted = 0
|
||||
AND t2.deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据 room_id 添加 process_info -->
|
||||
<update id="addVideoUrl">
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.cool.store.dto.partner;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LineQueryInterviewDto {
|
||||
|
||||
@ApiModelProperty("加盟商线索id")
|
||||
private String partnerLineId;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public interface HyPartnerLineInfoService {
|
||||
* @param closeFollowRequest
|
||||
* @return
|
||||
*/
|
||||
Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest);
|
||||
Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest) throws ApiException;
|
||||
|
||||
/**
|
||||
* 公海线索
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
* 转让招商经理
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入面试间的方法
|
||||
* 修改一些面试状态
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -23,7 +23,7 @@ public abstract class WorkFlowBaseService {
|
||||
* 结束流程
|
||||
* @param request
|
||||
*/
|
||||
public abstract void endProcess(CloseFollowRequest request);
|
||||
public abstract void endProcess(CloseFollowRequest request) throws ApiException;
|
||||
|
||||
/**
|
||||
* 转让招商经理
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.dto.partner.EnterInterviewDto;
|
||||
import com.cool.store.dto.partner.LineQueryInterviewDto;
|
||||
import com.cool.store.dto.partner.PartnerGetPassLetterDetailDto;
|
||||
import com.cool.store.dto.partner.PartnerQueryInterviewDto;
|
||||
import com.cool.store.exception.ApiException;
|
||||
@@ -30,12 +31,19 @@ public class InterviewController {
|
||||
@Autowired
|
||||
private InterviewService interviewBaseService;
|
||||
|
||||
@PostMapping("/queryByPartnerId")
|
||||
@ApiOperation("根据用户id查询面试信息")
|
||||
public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestBody PartnerQueryInterviewDto dto) {
|
||||
return ResponseResult.success(interviewService.queryByPartnerId(dto.getPartnerId()));
|
||||
// @PostMapping("/queryByPartnerId")
|
||||
// @ApiOperation("根据用户id查询面试信息")
|
||||
// public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestBody PartnerQueryInterviewDto dto) {
|
||||
// return ResponseResult.success(interviewService.queryByPartnerId(dto.getPartnerId()));
|
||||
// }
|
||||
|
||||
@PostMapping("/queryByPartnerLineId")
|
||||
@ApiOperation("根据线索id查询面试信息")
|
||||
public ResponseResult<PartnerInterviewInfoVO> queryByPartnerLineId(@RequestBody LineQueryInterviewDto dto) throws ApiException {
|
||||
return ResponseResult.success(interviewService.queryByPartnerLineId(dto));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/enter")
|
||||
@ApiOperation("进入面试间")
|
||||
public ResponseResult<EnterInterviewVO> enterInterviewRoom(@RequestBody EnterInterviewDto dto) throws ApiException {
|
||||
|
||||
Reference in New Issue
Block a user