Commit 5e9e1ad3 by 谢海旭

202601月中版本 招聘管理:增加状态校验

1 parent 16b54af5
...@@ -550,12 +550,21 @@ public class RecruitmentDemandService { ...@@ -550,12 +550,21 @@ public class RecruitmentDemandService {
updateDTO.setStartTime(new Date()); updateDTO.setStartTime(new Date());
if (Objects.equals(currentStatus, RecruitmentDemandStatusEnum.WAIT_SUPERVISOR_CONFIRM.getValue())) { if (Objects.equals(currentStatus, RecruitmentDemandStatusEnum.WAIT_SUPERVISOR_CONFIRM.getValue())) {
operationType = RecruitmentDemandLogOperationTypeEnum.SUPERVISOR_CONFIRM.getValue(); operationType = RecruitmentDemandLogOperationTypeEnum.SUPERVISOR_CONFIRM.getValue();
} else { } else if (Objects.equals(currentStatus, RecruitmentDemandStatusEnum.WAIT_HUMAN_CONFIRM.getValue())) {
operationType = RecruitmentDemandLogOperationTypeEnum.CONFIRM.getValue(); operationType = RecruitmentDemandLogOperationTypeEnum.CONFIRM.getValue();
} else {
log.error("数据状态已变更 currentStatus:{}", currentStatus);
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, "需求状态已过期,请确认后重新操作。");
} }
} else if (status.compareTo(RecruitmentDemandStatusEnum.COMPLETED.getValue()) == 0) { } else if (status.compareTo(RecruitmentDemandStatusEnum.COMPLETED.getValue()) == 0) {
operationType = RecruitmentDemandLogOperationTypeEnum.FINISH.getValue(); operationType = RecruitmentDemandLogOperationTypeEnum.FINISH.getValue();
} else if (status.compareTo(RecruitmentDemandStatusEnum.REJECTED.getValue()) == 0) { } else if (status.compareTo(RecruitmentDemandStatusEnum.REJECTED.getValue()) == 0) {
if (!Objects.equals(currentStatus, RecruitmentDemandStatusEnum.WAIT_HUMAN_CONFIRM.getValue())
&& !Objects.equals(currentStatus, RecruitmentDemandStatusEnum.WAIT_SUPERVISOR_CONFIRM.getValue())) {
log.error("数据状态已变更 currentStatus:{}", currentStatus);
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, "需求状态已过期,请确认后重新操作。");
}
operationType = RecruitmentDemandLogOperationTypeEnum.REJECT.getValue(); operationType = RecruitmentDemandLogOperationTypeEnum.REJECT.getValue();
} else { } else {
log.error("状态值非法 status:{}", status); log.error("状态值非法 status:{}", status);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!