面试/面谈

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

View File

@@ -10,22 +10,31 @@ public enum WorkflowSubStageEnum{
/** /**
* 流程子阶段枚举 * 流程子阶段枚举
*/ */
INTEND(1, "加盟意向申请"), INTEND(1, "加盟意向申请", 5, WorkflowSubStageStatusEnum.INVITING_INTERVIEWS_10,null),
INVITING_INTERVIEWS(5, "邀约面谈"), INVITING_INTERVIEWS(5, "邀约面谈", 10, WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_25, "lineInterviewServiceImpl"),
FIRST_INTERVIEWS(10, "一审面试"), FIRST_INTERVIEWS(10, "一审面试", 15, WorkflowSubStageStatusEnum.PAY_DEPOSIT_45, "lineInterviewServiceImpl"),
PAY_DEPOSIT(15, "缴纳意向金"), PAY_DEPOSIT(15, "缴纳意向金", 20, WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_60, null),
SIGN_INTENT_AGREEMENT(20, "签署意向协议"), SIGN_INTENT_AGREEMENT(20, "签署意向协议", 25, WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85, null),
STORE_EXPERIENCE(25, "门店体验"), STORE_EXPERIENCE(25, "门店体验", 30, WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100, null),
SECOND_INTERVIEWS(30, "二审面试"); SECOND_INTERVIEWS(30, "二审面试", null, null, "lineInterviewServiceImpl");
private Integer code; private Integer code;
private String message; 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.code = code;
this.message = message; this.message = message;
this.nextCode = nextCode;
this.nextDefaultStatus= nextDefaultStatus;
this.clazz = clazz;
} }
@@ -37,4 +46,24 @@ public enum WorkflowSubStageEnum{
return message; 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 @Data
public class EnterInterviewVO { public class EnterInterviewVO {
@ApiModelProperty("线索id")
private Long lineId;
@ApiModelProperty("加盟商id")
private String partnerId;
@ApiModelProperty("房间号")
private String roomId;
@ApiModelProperty("userSig 进入会议需要的用户签名") @ApiModelProperty("userSig 进入会议需要的用户签名")
private String userSign; private String userSign;
@@ -18,7 +27,12 @@ public class EnterInterviewVO {
@ApiModelProperty("加盟商姓名") @ApiModelProperty("加盟商姓名")
private String partnerName; 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.userSign = userSign;
this.interviewerId = interviewerId; this.interviewerId = interviewerId;
this.interviewerName = interviewerName; 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.entity.LineInfoDO;
import com.cool.store.enums.AuditResultTypeEnum; import com.cool.store.enums.AuditResultTypeEnum;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.LineStatusEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.request.AuditPassRequest; import com.cool.store.request.AuditPassRequest;
import com.cool.store.request.AuditRejectRequest; import com.cool.store.request.AuditRejectRequest;
@@ -46,7 +47,7 @@ public abstract class LineFlowService {
auditInfo.setPassReason(request.getPassReason()); auditInfo.setPassReason(request.getPassReason());
auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile())); auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile()));
Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo); 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.setRejectRealReason(request.getRejectRealReason());
auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile())); auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile()));
Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo); 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.setRejectRealReason(request.getRejectRealReason());
auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile())); auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile()));
Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo); 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 auditId
* @param lineInfo * @param lineInfo
* @param request
* @return * @return
*/ */
protected abstract Boolean auditPass(Long auditId, LineInfoDO lineInfo, AuditPassRequest request); protected abstract Boolean auditPass(Long auditId, LineInfoDO lineInfo);
/** /**
* 审核拒绝 * 审核拒绝
* @param auditId * @param auditId
* @param lineInfo * @param lineInfo
* @param request
* @return * @return
*/ */
protected abstract Boolean auditReject(Long auditId, LineInfoDO lineInfo, AuditRejectRequest request); protected abstract Boolean auditReject(Long auditId, LineInfoDO lineInfo);
/** /**
* 结束跟进 * 结束跟进
* @param auditId * @param auditId
* @param lineInfo * @param lineInfo
* @param request
* @return * @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); interviewInfo.setJoinInterviewStatus(joinInterviewStatus);
lineInterviewDAO.updateInterviewInfo(interviewInfo); lineInterviewDAO.updateInterviewInfo(interviewInfo);
String userSig = TRTCUtils.genUserSig(sdkAppId, key, interviewUserId); 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 @Override
@@ -216,6 +216,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
} }
interviewInfo.setRoomStatus(RoomStatus.CLOSED.getCode()); interviewInfo.setRoomStatus(RoomStatus.CLOSED.getCode());
interviewInfo.setActualEndTime(new Date()); interviewInfo.setActualEndTime(new Date());
interviewInfo.setInterviewStatus(InterviewStatusEnum.WAIT_AUDIT.getCode());
//更新线索状态 //更新线索状态
LineInfoDO lineInfo = new LineInfoDO(); LineInfoDO lineInfo = new LineInfoDO();
lineInfoDAO.updateLineInfo(lineInfo); lineInfoDAO.updateLineInfo(lineInfo);
@@ -224,18 +225,53 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
@Override @Override
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, AuditPassRequest request) { protected Boolean initStage(Long auditId, LineInfoDO lineInfo) {
return null; return null;
} }
@Override @Override
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo, AuditRejectRequest request) { protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) {
return null; 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 @Override
protected Boolean auditClose(Long auditId, LineInfoDO lineInfo, AuditRejectRequest request) { protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) {
return null; 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.dao.LineInfoDAO;
import com.cool.store.entity.LineInfoDO; import com.cool.store.entity.LineInfoDO;
import com.cool.store.enums.WorkflowSubStageEnum;
import com.cool.store.request.AuditPassRequest; import com.cool.store.request.AuditPassRequest;
import com.cool.store.request.AuditRejectRequest; import com.cool.store.request.AuditRejectRequest;
import com.cool.store.response.ResponseResult; 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.LineFlowService;
import com.cool.store.service.impl.LineInterviewServiceImpl; import com.cool.store.service.impl.LineInterviewServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@@ -29,39 +31,25 @@ import javax.annotation.Resource;
@RequestMapping({"/audit"}) @RequestMapping({"/audit"})
public class LineAuditController { public class LineAuditController {
private LineFlowService lineFlowService; @Resource
@Autowired private CommonService commonService;
private ApplicationContext applicationContext;
@ApiOperation("审核通过") @ApiOperation("审核通过")
@PostMapping("/pass") @PostMapping("/pass")
public ResponseResult<Boolean> auditPass(@RequestBody AuditPassRequest request){ public ResponseResult<Boolean> auditPass(@RequestBody AuditPassRequest request){
initLineFlowService(request.getWorkflowSubStage()); return ResponseResult.success(commonService.getLineFlowService(request.getWorkflowSubStage()).auditPass(request));
return ResponseResult.success(lineFlowService.auditPass(request));
} }
@ApiOperation("审核拒绝") @ApiOperation("审核拒绝")
@PostMapping("/reject") @PostMapping("/reject")
public ResponseResult<Boolean> auditReject(@RequestBody AuditRejectRequest request){ public ResponseResult<Boolean> auditReject(@RequestBody AuditRejectRequest request){
initLineFlowService(request.getWorkflowSubStage()); return ResponseResult.success(commonService.getLineFlowService(request.getWorkflowSubStage()).auditReject(request));
return ResponseResult.success(lineFlowService.auditReject(request));
} }
@ApiOperation("结束跟进") @ApiOperation("结束跟进")
@PostMapping("/close") @PostMapping("/close")
public ResponseResult<Boolean> auditClose(@RequestBody AuditRejectRequest request){ public ResponseResult<Boolean> auditClose(@RequestBody AuditRejectRequest request){
initLineFlowService(request.getWorkflowSubStage()); return ResponseResult.success(commonService.getLineFlowService(request.getWorkflowSubStage()).auditClose(request));
return ResponseResult.success(lineFlowService.auditClose(request));
} }
private void initLineFlowService(Integer workflowSubStage){
if(workflowSubStage == 1){
this.lineFlowService = (LineFlowService)applicationContext.getBean(LineInterviewServiceImpl.class);
}else{
}
}
} }