面试/面谈

This commit is contained in:
zhangchenbiao
2024-03-25 14:41:57 +08:00
parent 60b680e06f
commit 994db14b5d
11 changed files with 137 additions and 19 deletions

View File

@@ -86,4 +86,35 @@ public enum WorkflowSubStageEnum{
} }
return null; return null;
} }
/**
* 是否是面试阶段
* @param workflowSubStage
* @return
*/
public static boolean isInterviewStage(Integer workflowSubStage) {
return INVITING_INTERVIEWS.getCode().equals(workflowSubStage) || FIRST_INTERVIEWS.getCode().equals(workflowSubStage) || SECOND_INTERVIEWS.getCode().equals(workflowSubStage);
}
/**
* 是否是重新预约面试阶段
* @param workflowSubStage
* @return
*/
public static boolean isReappointmentStage(Integer workflowSubStage) {
return FIRST_INTERVIEWS.getCode().equals(workflowSubStage) || SECOND_INTERVIEWS.getCode().equals(workflowSubStage);
}
public static InterviewTypeEnum getInterviewType(Integer workflowSubStage){
if(INVITING_INTERVIEWS.getCode().equals(workflowSubStage)){
return InterviewTypeEnum.MEET;
}
if(FIRST_INTERVIEWS.getCode().equals(workflowSubStage)){
return InterviewTypeEnum.INTERVIEW;
}
if(SECOND_INTERVIEWS.getCode().equals(workflowSubStage)){
return InterviewTypeEnum.SECOND_INTERVIEW;
}
return null;
}
} }

View File

@@ -21,6 +21,7 @@ public enum WorkflowSubStageStatusEnum {
FIRST_INTERVIEWS_30(30,"待面试"), FIRST_INTERVIEWS_30(30,"待面试"),
FIRST_INTERVIEWS_35(35,"待审核"), FIRST_INTERVIEWS_35(35,"待审核"),
FIRST_INTERVIEWS_40(40,"一审未通过"), FIRST_INTERVIEWS_40(40,"一审未通过"),
FIRST_INTERVIEWS_41(41,"一审重新预约"),
//缴纳意向金 //缴纳意向金
@@ -47,7 +48,7 @@ public enum WorkflowSubStageStatusEnum {
SECOND_INTERVIEWS_105(105,"待面试"), SECOND_INTERVIEWS_105(105,"待面试"),
SECOND_INTERVIEWS_110(110,"待审核"), SECOND_INTERVIEWS_110(110,"待审核"),
SECOND_INTERVIEWS_115(115,"二审未通过"), SECOND_INTERVIEWS_115(115,"二审未通过"),
SECOND_INTERVIEWS_120(120,"二审重新面试"), SECOND_INTERVIEWS_120(120,"二审重新预约"),
SECOND_INTERVIEWS_125(125,"二审通过"), SECOND_INTERVIEWS_125(125,"二审通过"),
; ;
@@ -69,4 +70,12 @@ public enum WorkflowSubStageStatusEnum {
return message; return message;
} }
public static boolean isReappointmentStatus(Integer workflowSubStageStatus){
return FIRST_INTERVIEWS_41.getCode().equals(workflowSubStageStatus) || SECOND_INTERVIEWS_120.getCode().equals(workflowSubStageStatus);
}
public static boolean isModifyAppointmentTime(Integer workflowSubStageStatus){
return INVITING_INTERVIEWS_15.getCode().equals(workflowSubStageStatus) || FIRST_INTERVIEWS_30.getCode().equals(workflowSubStageStatus) || SECOND_INTERVIEWS_105.getCode().equals(workflowSubStageStatus);
}
} }

View File

@@ -64,4 +64,7 @@ public class LineInterviewDAO {
return lineInterviewMapper.getInterviewInfoByRoomId(roomId); return lineInterviewMapper.getInterviewInfoByRoomId(roomId);
} }
public Integer deleteInterviewInfo(Long interviewId) {
return lineInterviewMapper.deleteInterviewInfo(interviewId);
}
} }

View File

@@ -30,4 +30,11 @@ public interface LineInterviewMapper extends Mapper<LineInterviewDO> {
* @return * @return
*/ */
LineInterviewDO getInterviewInfoByRoomId(@Param("roomId") String roomId); LineInterviewDO getInterviewInfoByRoomId(@Param("roomId") String roomId);
/**
* 删除面试信息
* @param interviewId
* @return
*/
Integer deleteInterviewInfo(@Param("interviewId")Long interviewId);
} }

View File

@@ -80,4 +80,8 @@
select * from xfsg_line_interview where room_id = #{roomId} and deleted = '0' select * from xfsg_line_interview where room_id = #{roomId} and deleted = '0'
</select> </select>
<update id="deleteInterviewInfo">
update xfsg_line_interview set deleted = '1' where id = #{interviewId}
</update>
</mapper> </mapper>

View File

@@ -17,9 +17,6 @@ public class AppointmentTimeRequest {
@ApiModelProperty("线索id") @ApiModelProperty("线索id")
private Long lineId; private Long lineId;
@ApiModelProperty("面试类型:0面谈1一审2二审")
private Integer interviewType;
@NotNull(message = "开始时间不能为空") @NotNull(message = "开始时间不能为空")
@ApiModelProperty("开始时间 yyyy-MM-dd HH:mm:ss") @ApiModelProperty("开始时间 yyyy-MM-dd HH:mm:ss")
private String startTime; private String startTime;

View File

@@ -26,6 +26,15 @@ public class LineInterviewPageRequest extends PageBasicInfo {
@ApiModelProperty("流程子阶段") @ApiModelProperty("流程子阶段")
private String workflowSubStage; private String workflowSubStage;
@ApiModelProperty("意向区域")
private Long wantShopAreaId;
@ApiModelProperty("面试开始时间")
private String interviewStartTime;
@ApiModelProperty("面试截止时间")
private String interviewEndTime;
@ApiModelProperty("面试状态") @ApiModelProperty("面试状态")
private Integer interviewStatus; private Integer interviewStatus;

View File

@@ -90,4 +90,11 @@ public interface LineInterviewService {
* @return * @return
*/ */
Boolean uploadVideo(Long interviewId, List<String> videoUrlList); Boolean uploadVideo(Long interviewId, List<String> videoUrlList);
/**
* 重新预约面审
* @param lineId
* @return
*/
Integer reappointment(Long lineId);
} }

View File

@@ -91,35 +91,53 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
if(Objects.isNull(lineInfo)){ if(Objects.isNull(lineInfo)){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
} }
InterviewTypeEnum interviewType = InterviewTypeEnum.match(request.getInterviewType()); //判断是否存在当前类型的面审如果存在 删除面审信息 生成新的面审
if(!WorkflowSubStageEnum.isInterviewStage(lineInfo.getWorkflowSubStage())){
log.info("线索当前所处阶段不可预约日程");
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
}
InterviewTypeEnum interviewType = WorkflowSubStageEnum.getInterviewType(lineInfo.getWorkflowSubStage());
String interviewer = InterviewTypeEnum.MEET.equals(interviewType) ? lineInfo.getInvestmentManager() : InterviewTypeEnum.INTERVIEW.equals(interviewType) ? lineInfo.getFirstInterviewer() : lineInfo.getSecondInterviewer(); String interviewer = InterviewTypeEnum.MEET.equals(interviewType) ? lineInfo.getInvestmentManager() : InterviewTypeEnum.INTERVIEW.equals(interviewType) ? lineInfo.getFirstInterviewer() : lineInfo.getSecondInterviewer();
Boolean occupied = lineCalendarsEventDAO.isOccupied(request.getInterviewType(), lineInfo.getRegionId(), interviewer, request.getStartTime(), request.getEndTime()); Boolean occupied = lineCalendarsEventDAO.isOccupied(interviewType.getCode(), lineInfo.getRegionId(), interviewer, request.getStartTime(), request.getEndTime());
if(occupied){ if(occupied){
throw new ServiceException(ErrorCodeEnum.TIME_OCCUPIED); throw new ServiceException(ErrorCodeEnum.TIME_OCCUPIED);
} }
Date startTime = DateUtils.strToDate(request.getStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS); Date startTime = DateUtils.strToDate(request.getStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
Date endTime = DateUtils.strToDate(request.getEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS); Date endTime = DateUtils.strToDate(request.getEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
LineCalendarsEventDO calendarsEvent = LineCalendarsEventDO.convertDO(lineInfo, request.getInterviewType(), startTime, endTime, interviewer); LineCalendarsEventDO calendarsEvent = LineCalendarsEventDO.convertDO(lineInfo, interviewType.getCode(), startTime, endTime, interviewer);
Long eventId = lineCalendarsEventDAO.addCalendarsEvent(calendarsEvent); Long eventId = lineCalendarsEventDAO.addCalendarsEvent(calendarsEvent);
//跟新线索状态为已预约 //跟新线索状态为已预约
lineInfoDAO.updateLineInfo(lineInfo); lineInfoDAO.updateLineInfo(lineInfo);
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType); LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType);
if(Objects.isNull(interviewInfo)){ if(Objects.nonNull(interviewInfo)){
LineInterviewDO addInterview = LineInterviewDO.convertDO(lineInfo, startTime, endTime, UUIDUtils.get8UUID(), interviewer, interviewType.getCode(), eventId); if(!WorkflowSubStageStatusEnum.isReappointmentStatus(lineInfo.getWorkflowSubStageStatus())){
lineInterviewDAO.addInterviewInfo(addInterview); log.info("当前线索状态不是重新预约状态");
return Boolean.FALSE; throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
}
//删除该面试记录
lineInterviewDAO.deleteInterviewInfo(interviewInfo.getId());
} }
interviewInfo.setInterviewDate(startTime); LineInterviewDO addInterview = LineInterviewDO.convertDO(lineInfo, startTime, endTime, UUIDUtils.get8UUID(), interviewer, interviewType.getCode(), eventId);
interviewInfo.setCalendarsEventId(eventId); lineInterviewDAO.addInterviewInfo(addInterview);
interviewInfo.setStartTime(startTime);
interviewInfo.setEndTime(endTime);
lineInterviewDAO.updateInterviewInfo(interviewInfo);
return Boolean.TRUE; return Boolean.TRUE;
} }
@Override @Override
public Boolean modifyAppointmentTime(AppointmentTimeRequest request) { public Boolean modifyAppointmentTime(AppointmentTimeRequest request) {
InterviewTypeEnum interviewType = InterviewTypeEnum.match(request.getInterviewType()); LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
if(Objects.isNull(lineInfo)){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
if(!WorkflowSubStageEnum.isInterviewStage(lineInfo.getWorkflowSubStage())){
//当前线索状态不允许修改面审时间
log.info("当前线索所处阶段不允许修改面审时间");
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
}
if(WorkflowSubStageStatusEnum.isModifyAppointmentTime(lineInfo.getWorkflowSubStageStatus())){
log.info("当前线索所处子状态不允许修改面审时间");
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
}
InterviewTypeEnum interviewType = WorkflowSubStageEnum.getInterviewType(lineInfo.getWorkflowSubStage());
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(request.getLineId(), interviewType); LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(request.getLineId(), interviewType);
if(Objects.isNull(interviewInfo)){ if(Objects.isNull(interviewInfo)){
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
@@ -267,6 +285,27 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
return lineInterviewDAO.updateInterviewInfo(interviewInfo) > 0; return lineInterviewDAO.updateInterviewInfo(interviewInfo) > 0;
} }
@Override
public Integer reappointment(Long lineId) {
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
if(Objects.isNull(lineInfo)){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
if(!WorkflowSubStageEnum.isReappointmentStage(lineInfo.getWorkflowSubStage())){
log.info("当前线索状态不允许重新预约");
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
}
Integer workflowSubStageStatus = null;
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
workflowSubStageStatus = WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_41.getCode();
}
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
workflowSubStageStatus = WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_120.getCode();
}
lineInfo.setWorkflowSubStageStatus(workflowSubStageStatus);
return lineInfoDAO.updateLineInfo(lineInfo);
}
@Override @Override
protected Boolean initStage(Long auditId, LineInfoDO lineInfo) { protected Boolean initStage(Long auditId, LineInfoDO lineInfo) {

View File

@@ -78,7 +78,13 @@ public class PCLineInterviewController {
@ApiOperation("上传文件") @ApiOperation("上传文件")
@GetMapping("/upload/video") @GetMapping("/upload/video")
public ResponseResult uploadVideo(@RequestParam("interviewId")Long interviewId, @RequestParam("videoUrlList") List<String> videoUrlList) throws ApiException { public ResponseResult uploadVideo(@RequestParam("interviewId")Long interviewId, @RequestParam("videoUrlList") List<String> videoUrlList) throws ApiException {
lineInterviewService.uploadVideo(interviewId, videoUrlList); Boolean result = lineInterviewService.uploadVideo(interviewId, videoUrlList);
return ResponseResult.success(); return ResponseResult.success(result);
}
@ApiOperation("重新面审")
@GetMapping("/reappointment")
public ResponseResult reappointment(@RequestParam("lineId")Long lineId) throws ApiException {
return ResponseResult.success(lineInterviewService.reappointment(lineId));
} }
} }

View File

@@ -69,4 +69,10 @@ public class LineInterviewController {
return ResponseResult.success(lineInterviewService.enterInterviewRoom(interviewId, partnerUser.getPartnerId(), InterviewUserTypeEnum.LINE)); return ResponseResult.success(lineInterviewService.enterInterviewRoom(interviewId, partnerUser.getPartnerId(), InterviewUserTypeEnum.LINE));
} }
@ApiOperation("修改面审时间")
@PostMapping("/appointment/time/modify")
public ResponseResult<Boolean> modifyAppointmentTime(@RequestBody @Validated AppointmentTimeRequest request) {
return ResponseResult.success(lineInterviewService.modifyAppointmentTime(request));
}
} }