面试/面谈

This commit is contained in:
zhangchenbiao
2024-03-20 19:10:38 +08:00
parent 1c08fad191
commit b07be9cde8
7 changed files with 143 additions and 53 deletions

View File

@@ -5,22 +5,18 @@ package com.cool.store.enums;
* @Date: 2023-06-13 20:22
* @Description: 面试状态枚举
*/
public enum InteviewStatusEnum {
public enum InterviewStatusEnum {
WAIT_APPOINTMENT(0, "待预约"),
WAIT_APPOINTMENT_TIME_CONFIRM(1, "面试时间待审核"),
WAIT_INTERVIEW(2, "待面试"),
INTERVIEWING(3, "已开始"),
WAIT_AUDIT(4, "待审核"),
AUDITING(5, "审批中"),
AUDIT_PASS(6, "审批通过"),
REFUSE(7, "拒绝");
WAIT_INTERVIEW(1, "待面试"),
WAIT_AUDIT(2, "待审核"),
PASS(3, "审批通过"),
NOT_PASS(4, "不通过");
private Integer code;
private String message;
InteviewStatusEnum(Integer code, String message) {
InterviewStatusEnum(Integer code, String message) {
this.code = code;
this.message = message;
}

View File

@@ -10,22 +10,31 @@ public enum WorkflowSubStageEnum{
/**
* 流程子阶段枚举
*/
INTEND(1, "加盟意向申请"),
INVITING_INTERVIEWS(5, "邀约面谈"),
FIRST_INTERVIEWS(10, "一审面试"),
PAY_DEPOSIT(15, "缴纳意向金"),
SIGN_INTENT_AGREEMENT(20, "签署意向协议"),
STORE_EXPERIENCE(25, "门店体验"),
SECOND_INTERVIEWS(30, "二审面试");
INTEND(1, "加盟意向申请", 5, WorkflowSubStageStatusEnum.INVITING_INTERVIEWS_10,null),
INVITING_INTERVIEWS(5, "邀约面谈", 10, WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_25, "lineInterviewServiceImpl"),
FIRST_INTERVIEWS(10, "一审面试", 15, WorkflowSubStageStatusEnum.PAY_DEPOSIT_45, "lineInterviewServiceImpl"),
PAY_DEPOSIT(15, "缴纳意向金", 20, WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_60, null),
SIGN_INTENT_AGREEMENT(20, "签署意向协议", 25, WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85, null),
STORE_EXPERIENCE(25, "门店体验", 30, WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100, null),
SECOND_INTERVIEWS(30, "二审面试", null, null, "lineInterviewServiceImpl");
private Integer code;
private String message;
WorkflowSubStageEnum(Integer code, String message) {
private Integer nextCode;
private WorkflowSubStageStatusEnum nextDefaultStatus;
private String clazz;
WorkflowSubStageEnum(Integer code, String message, Integer nextCode, WorkflowSubStageStatusEnum nextDefaultStatus, String clazz) {
this.code = code;
this.message = message;
this.nextCode = nextCode;
this.nextDefaultStatus= nextDefaultStatus;
this.clazz = clazz;
}
@@ -37,4 +46,24 @@ public enum WorkflowSubStageEnum{
return message;
}
public Integer getNextCode() {
return nextCode;
}
public String getClazz() {
return clazz;
}
public WorkflowSubStageStatusEnum getNextDefaultStatus() {
return nextDefaultStatus;
}
public static WorkflowSubStageEnum getWorkflowSubStageEnum(Integer workflowSubStage) {
for (WorkflowSubStageEnum workflowSubStageEnum : WorkflowSubStageEnum.values()) {
if (workflowSubStageEnum.getCode().equals(workflowSubStage)) {
return workflowSubStageEnum;
}
}
return null;
}
}

View File

@@ -6,6 +6,15 @@ import lombok.Data;
@Data
public class EnterInterviewVO {
@ApiModelProperty("线索id")
private Long lineId;
@ApiModelProperty("加盟商id")
private String partnerId;
@ApiModelProperty("房间号")
private String roomId;
@ApiModelProperty("userSig 进入会议需要的用户签名")
private String userSign;
@@ -18,7 +27,12 @@ public class EnterInterviewVO {
@ApiModelProperty("加盟商姓名")
private String partnerName;
public EnterInterviewVO(String userSign, String interviewerId, String interviewerName, String partnerName) {
public EnterInterviewVO(Long lineId, String partnerId, String roomId, String userSign, String interviewerId, String interviewerName, String partnerName) {
this.lineId = lineId;
this.partnerId = partnerId;
this.roomId = roomId;
this.userSign = userSign;
this.interviewerId = interviewerId;
this.interviewerName = interviewerName;

View File

@@ -0,0 +1,24 @@
package com.cool.store.service.impl;
import com.cool.store.enums.WorkflowSubStageEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
/**
* @author zhangchenbiao
* @FileName: CommonService
* @Description:
* @date 2024-03-20 17:09
*/
@Service
public class CommonService {
@Autowired
private ApplicationContext applicationContext;
public LineFlowService getLineFlowService(Integer workflowSubStage){
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(workflowSubStage);
return (LineFlowService)applicationContext.getBean(workflowSubStageEnum.getClazz());
}
}

View File

@@ -7,6 +7,7 @@ import com.cool.store.entity.LineAuditInfoDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.enums.AuditResultTypeEnum;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.LineStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.request.AuditPassRequest;
import com.cool.store.request.AuditRejectRequest;
@@ -46,7 +47,7 @@ public abstract class LineFlowService {
auditInfo.setPassReason(request.getPassReason());
auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile()));
Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo);
return auditPass(auditId, lineInfo, request);
return auditPass(auditId, lineInfo);
}
/**
@@ -68,7 +69,7 @@ public abstract class LineFlowService {
auditInfo.setRejectRealReason(request.getRejectRealReason());
auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile()));
Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo);
return auditReject(auditId, lineInfo, request);
return auditReject(auditId, lineInfo);
}
/**
@@ -90,35 +91,37 @@ public abstract class LineFlowService {
auditInfo.setRejectRealReason(request.getRejectRealReason());
auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile()));
Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo);
return auditClose(auditId, lineInfo, request);
lineInfo.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
lineInfoDAO.updateLineInfo(lineInfo);
return auditClose(auditId, lineInfo);
}
protected abstract Boolean initStage(Long auditId, LineInfoDO lineInfo);
/**
* 审核通过 流转到下一阶段
* @param auditId
* @param lineInfo
* @param request
* @return
*/
protected abstract Boolean auditPass(Long auditId, LineInfoDO lineInfo, AuditPassRequest request);
protected abstract Boolean auditPass(Long auditId, LineInfoDO lineInfo);
/**
* 审核拒绝
* @param auditId
* @param lineInfo
* @param request
* @return
*/
protected abstract Boolean auditReject(Long auditId, LineInfoDO lineInfo, AuditRejectRequest request);
protected abstract Boolean auditReject(Long auditId, LineInfoDO lineInfo);
/**
* 结束跟进
* @param auditId
* @param lineInfo
* @param request
* @return
*/
protected abstract Boolean auditClose(Long auditId, LineInfoDO lineInfo, AuditRejectRequest request);
protected abstract Boolean auditClose(Long auditId, LineInfoDO lineInfo);
}

View File

@@ -201,7 +201,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
interviewInfo.setJoinInterviewStatus(joinInterviewStatus);
lineInterviewDAO.updateInterviewInfo(interviewInfo);
String userSig = TRTCUtils.genUserSig(sdkAppId, key, interviewUserId);
return new EnterInterviewVO(userSig, interviewInfo.getInterviewer(), userName, lineInfo.getUsername());
return new EnterInterviewVO(interviewInfo.getLineId(), lineInfo.getPartnerId(), interviewInfo.getRoomId(), userSig, interviewInfo.getInterviewer(), userName, lineInfo.getUsername());
}
@Override
@@ -216,6 +216,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
}
interviewInfo.setRoomStatus(RoomStatus.CLOSED.getCode());
interviewInfo.setActualEndTime(new Date());
interviewInfo.setInterviewStatus(InterviewStatusEnum.WAIT_AUDIT.getCode());
//更新线索状态
LineInfoDO lineInfo = new LineInfoDO();
lineInfoDAO.updateLineInfo(lineInfo);
@@ -224,18 +225,53 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
@Override
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, AuditPassRequest request) {
protected Boolean initStage(Long auditId, LineInfoDO lineInfo) {
return null;
}
@Override
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo, AuditRejectRequest request) {
return null;
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) {
InterviewTypeEnum interviewType = null;
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
if(WorkflowSubStageEnum.INVITING_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
interviewType = InterviewTypeEnum.MEET;
}
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
interviewType = InterviewTypeEnum.INTERVIEW;
}
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
interviewType = InterviewTypeEnum.SECOND_INTERVIEW;
}
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType);
interviewInfo.setAuditId(auditId);
interviewInfo.setInterviewStatus(InterviewStatusEnum.PASS.getCode());
lineInfo.setWorkflowSubStage(workflowSubStageEnum.getNextCode());
lineInfo.setWorkflowSubStageStatus(workflowSubStageEnum.getNextDefaultStatus().getCode());
return lineInterviewDAO.updateInterviewInfo(interviewInfo) > 0;
}
@Override
protected Boolean auditClose(Long auditId, LineInfoDO lineInfo, AuditRejectRequest request) {
return null;
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) {
InterviewTypeEnum interviewType = null;
if(WorkflowSubStageEnum.INVITING_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
interviewType = InterviewTypeEnum.MEET;
}
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
interviewType = InterviewTypeEnum.INTERVIEW;
}
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
interviewType = InterviewTypeEnum.SECOND_INTERVIEW;
}
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType);
interviewInfo.setAuditId(auditId);
interviewInfo.setInterviewStatus(InterviewStatusEnum.NOT_PASS.getCode());
return lineInterviewDAO.updateInterviewInfo(interviewInfo) > 0;
}
@Override
protected Boolean auditClose(Long auditId, LineInfoDO lineInfo) {
auditReject(auditId, lineInfo);
return true;
}
}

View File

@@ -2,9 +2,11 @@ package com.cool.store.controller.webb;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.enums.WorkflowSubStageEnum;
import com.cool.store.request.AuditPassRequest;
import com.cool.store.request.AuditRejectRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.impl.CommonService;
import com.cool.store.service.impl.LineFlowService;
import com.cool.store.service.impl.LineInterviewServiceImpl;
import io.swagger.annotations.Api;
@@ -29,39 +31,25 @@ import javax.annotation.Resource;
@RequestMapping({"/audit"})
public class LineAuditController {
private LineFlowService lineFlowService;
@Autowired
private ApplicationContext applicationContext;
@Resource
private CommonService commonService;
@ApiOperation("审核通过")
@PostMapping("/pass")
public ResponseResult<Boolean> auditPass(@RequestBody AuditPassRequest request){
initLineFlowService(request.getWorkflowSubStage());
return ResponseResult.success(lineFlowService.auditPass(request));
return ResponseResult.success(commonService.getLineFlowService(request.getWorkflowSubStage()).auditPass(request));
}
@ApiOperation("审核拒绝")
@PostMapping("/reject")
public ResponseResult<Boolean> auditReject(@RequestBody AuditRejectRequest request){
initLineFlowService(request.getWorkflowSubStage());
return ResponseResult.success(lineFlowService.auditReject(request));
return ResponseResult.success(commonService.getLineFlowService(request.getWorkflowSubStage()).auditReject(request));
}
@ApiOperation("结束跟进")
@PostMapping("/close")
public ResponseResult<Boolean> auditClose(@RequestBody AuditRejectRequest request){
initLineFlowService(request.getWorkflowSubStage());
return ResponseResult.success(lineFlowService.auditClose(request));
return ResponseResult.success(commonService.getLineFlowService(request.getWorkflowSubStage()).auditClose(request));
}
private void initLineFlowService(Integer workflowSubStage){
if(workflowSubStage == 1){
this.lineFlowService = (LineFlowService)applicationContext.getBean(LineInterviewServiceImpl.class);
}else{
}
}
}