From cb8e9359df9c1f4323eff74e6d2d3c8e047d3a75 Mon Sep 17 00:00:00 2001 From: zhangchenbiao Date: Thu, 21 Mar 2024 14:56:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=A2=E8=AF=95/=E9=9D=A2=E8=B0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/enums/WorkflowSubStageEnum.java | 52 +++++++++++++------ .../impl/LineInterviewServiceImpl.java | 7 ++- 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/WorkflowSubStageEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/WorkflowSubStageEnum.java index ffab5ccad..0fa2353ac 100644 --- a/coolstore-partner-common/src/main/java/com/cool/store/enums/WorkflowSubStageEnum.java +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/WorkflowSubStageEnum.java @@ -10,30 +10,29 @@ public enum WorkflowSubStageEnum{ /** * 流程子阶段枚举 */ - 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, "二审面试", 30, WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_125, "lineInterviewServiceImpl"); + INTEND(1, "加盟意向申请", WorkflowSubStageStatusEnum.INTENT_0,null), + INVITING_INTERVIEWS(5, "邀约面谈", WorkflowSubStageStatusEnum.INVITING_INTERVIEWS_10, "lineInterviewServiceImpl"), + FIRST_INTERVIEWS(10, "一审面试", WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_25, "lineInterviewServiceImpl"), + PAY_DEPOSIT(15, "缴纳意向金", WorkflowSubStageStatusEnum.PAY_DEPOSIT_45, null), + SIGN_INTENT_AGREEMENT(20, "签署意向协议", WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_60, null), + STORE_EXPERIENCE(25, "门店体验", WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85, null), + SECOND_INTERVIEWS(30, "二审面试", WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100, "lineInterviewServiceImpl"); private Integer code; private String message; - private Integer nextCode; + private WorkflowSubStageStatusEnum initStatus; - private WorkflowSubStageStatusEnum nextDefaultStatus; + private WorkflowSubStageEnum nextStage; private String clazz; - WorkflowSubStageEnum(Integer code, String message, Integer nextCode, WorkflowSubStageStatusEnum nextDefaultStatus, String clazz) { + WorkflowSubStageEnum(Integer code, String message, WorkflowSubStageStatusEnum initStatus, String clazz) { this.code = code; this.message = message; - this.nextCode = nextCode; - this.nextDefaultStatus= nextDefaultStatus; + this.initStatus = initStatus; this.clazz = clazz; } @@ -46,16 +45,37 @@ public enum WorkflowSubStageEnum{ return message; } - public Integer getNextCode() { - return nextCode; + public WorkflowSubStageStatusEnum getInitStatus() { + return initStatus; } public String getClazz() { return clazz; } - public WorkflowSubStageStatusEnum getNextDefaultStatus() { - return nextDefaultStatus; + public WorkflowSubStageEnum getNextStage() { + switch (this) { + case INTEND: + this.nextStage = INVITING_INTERVIEWS; + break; + case INVITING_INTERVIEWS: + this.nextStage = FIRST_INTERVIEWS; + break; + case FIRST_INTERVIEWS: + this.nextStage = PAY_DEPOSIT; + break; + case PAY_DEPOSIT: + this.nextStage = SIGN_INTENT_AGREEMENT; + break; + case SIGN_INTENT_AGREEMENT: + this.nextStage = STORE_EXPERIENCE; + break; + case STORE_EXPERIENCE: + case SECOND_INTERVIEWS: + this.nextStage = SECOND_INTERVIEWS; + break; + } + return nextStage; } public static WorkflowSubStageEnum getWorkflowSubStageEnum(Integer workflowSubStage) { diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java index 0c72875f6..3e3ab3cc5 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java @@ -240,6 +240,8 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) { InterviewTypeEnum interviewType = null; WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage()); + WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage(); + Integer nextStageInitStatus = nextStage.getInitStatus().getCode(); if(WorkflowSubStageEnum.INVITING_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){ interviewType = InterviewTypeEnum.MEET; } @@ -248,12 +250,13 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt } if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){ interviewType = InterviewTypeEnum.SECOND_INTERVIEW; + nextStageInitStatus = InterviewStatusEnum.PASS.getCode(); } LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType); interviewInfo.setAuditId(auditId); interviewInfo.setInterviewStatus(InterviewStatusEnum.PASS.getCode()); - lineInfo.setWorkflowSubStage(workflowSubStageEnum.getNextCode()); - lineInfo.setWorkflowSubStageStatus(workflowSubStageEnum.getNextDefaultStatus().getCode()); + lineInfo.setWorkflowSubStage(nextStage.getCode()); + lineInfo.setWorkflowSubStageStatus(nextStageInitStatus); return lineInterviewDAO.updateInterviewInfo(interviewInfo) > 0; }