面试/面谈
This commit is contained in:
@@ -86,4 +86,35 @@ public enum WorkflowSubStageEnum{
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ public enum WorkflowSubStageStatusEnum {
|
||||
FIRST_INTERVIEWS_30(30,"待面试"),
|
||||
FIRST_INTERVIEWS_35(35,"待审核"),
|
||||
FIRST_INTERVIEWS_40(40,"一审未通过"),
|
||||
FIRST_INTERVIEWS_41(41,"一审重新预约"),
|
||||
|
||||
|
||||
//缴纳意向金
|
||||
@@ -47,7 +48,7 @@ public enum WorkflowSubStageStatusEnum {
|
||||
SECOND_INTERVIEWS_105(105,"待面试"),
|
||||
SECOND_INTERVIEWS_110(110,"待审核"),
|
||||
SECOND_INTERVIEWS_115(115,"二审未通过"),
|
||||
SECOND_INTERVIEWS_120(120,"二审重新面试"),
|
||||
SECOND_INTERVIEWS_120(120,"二审重新预约"),
|
||||
SECOND_INTERVIEWS_125(125,"二审通过"),
|
||||
;
|
||||
|
||||
@@ -69,4 +70,12 @@ public enum WorkflowSubStageStatusEnum {
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -64,4 +64,7 @@ public class LineInterviewDAO {
|
||||
return lineInterviewMapper.getInterviewInfoByRoomId(roomId);
|
||||
}
|
||||
|
||||
public Integer deleteInterviewInfo(Long interviewId) {
|
||||
return lineInterviewMapper.deleteInterviewInfo(interviewId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,4 +30,11 @@ public interface LineInterviewMapper extends Mapper<LineInterviewDO> {
|
||||
* @return
|
||||
*/
|
||||
LineInterviewDO getInterviewInfoByRoomId(@Param("roomId") String roomId);
|
||||
|
||||
/**
|
||||
* 删除面试信息
|
||||
* @param interviewId
|
||||
* @return
|
||||
*/
|
||||
Integer deleteInterviewInfo(@Param("interviewId")Long interviewId);
|
||||
}
|
||||
@@ -80,4 +80,8 @@
|
||||
select * from xfsg_line_interview where room_id = #{roomId} and deleted = '0'
|
||||
</select>
|
||||
|
||||
<update id="deleteInterviewInfo">
|
||||
update xfsg_line_interview set deleted = '1' where id = #{interviewId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -17,9 +17,6 @@ public class AppointmentTimeRequest {
|
||||
@ApiModelProperty("线索id")
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("面试类型:0面谈,1一审,2二审")
|
||||
private Integer interviewType;
|
||||
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
@ApiModelProperty("开始时间 yyyy-MM-dd HH:mm:ss")
|
||||
private String startTime;
|
||||
|
||||
@@ -26,6 +26,15 @@ public class LineInterviewPageRequest extends PageBasicInfo {
|
||||
@ApiModelProperty("流程子阶段")
|
||||
private String workflowSubStage;
|
||||
|
||||
@ApiModelProperty("意向区域")
|
||||
private Long wantShopAreaId;
|
||||
|
||||
@ApiModelProperty("面试开始时间")
|
||||
private String interviewStartTime;
|
||||
|
||||
@ApiModelProperty("面试截止时间")
|
||||
private String interviewEndTime;
|
||||
|
||||
@ApiModelProperty("面试状态")
|
||||
private Integer interviewStatus;
|
||||
|
||||
|
||||
@@ -90,4 +90,11 @@ public interface LineInterviewService {
|
||||
* @return
|
||||
*/
|
||||
Boolean uploadVideo(Long interviewId, List<String> videoUrlList);
|
||||
|
||||
/**
|
||||
* 重新预约面审
|
||||
* @param lineId
|
||||
* @return
|
||||
*/
|
||||
Integer reappointment(Long lineId);
|
||||
}
|
||||
|
||||
@@ -91,35 +91,53 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
||||
if(Objects.isNull(lineInfo)){
|
||||
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();
|
||||
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){
|
||||
throw new ServiceException(ErrorCodeEnum.TIME_OCCUPIED);
|
||||
}
|
||||
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);
|
||||
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);
|
||||
//跟新线索状态为已预约
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType);
|
||||
if(Objects.isNull(interviewInfo)){
|
||||
LineInterviewDO addInterview = LineInterviewDO.convertDO(lineInfo, startTime, endTime, UUIDUtils.get8UUID(), interviewer, interviewType.getCode(), eventId);
|
||||
lineInterviewDAO.addInterviewInfo(addInterview);
|
||||
return Boolean.FALSE;
|
||||
if(Objects.nonNull(interviewInfo)){
|
||||
if(!WorkflowSubStageStatusEnum.isReappointmentStatus(lineInfo.getWorkflowSubStageStatus())){
|
||||
log.info("当前线索状态不是重新预约状态");
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
//删除该面试记录
|
||||
lineInterviewDAO.deleteInterviewInfo(interviewInfo.getId());
|
||||
}
|
||||
interviewInfo.setInterviewDate(startTime);
|
||||
interviewInfo.setCalendarsEventId(eventId);
|
||||
interviewInfo.setStartTime(startTime);
|
||||
interviewInfo.setEndTime(endTime);
|
||||
lineInterviewDAO.updateInterviewInfo(interviewInfo);
|
||||
LineInterviewDO addInterview = LineInterviewDO.convertDO(lineInfo, startTime, endTime, UUIDUtils.get8UUID(), interviewer, interviewType.getCode(), eventId);
|
||||
lineInterviewDAO.addInterviewInfo(addInterview);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
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);
|
||||
if(Objects.isNull(interviewInfo)){
|
||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
|
||||
@@ -267,6 +285,27 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
||||
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
|
||||
protected Boolean initStage(Long auditId, LineInfoDO lineInfo) {
|
||||
|
||||
@@ -78,7 +78,13 @@ public class PCLineInterviewController {
|
||||
@ApiOperation("上传文件")
|
||||
@GetMapping("/upload/video")
|
||||
public ResponseResult uploadVideo(@RequestParam("interviewId")Long interviewId, @RequestParam("videoUrlList") List<String> videoUrlList) throws ApiException {
|
||||
lineInterviewService.uploadVideo(interviewId, videoUrlList);
|
||||
return ResponseResult.success();
|
||||
Boolean result = lineInterviewService.uploadVideo(interviewId, videoUrlList);
|
||||
return ResponseResult.success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("重新面审")
|
||||
@GetMapping("/reappointment")
|
||||
public ResponseResult reappointment(@RequestParam("lineId")Long lineId) throws ApiException {
|
||||
return ResponseResult.success(lineInterviewService.reappointment(lineId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,4 +69,10 @@ public class LineInterviewController {
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user