/** * <b>[WebAction]</b> <br> * 面试历史记录 */ public ActionForward pageMyInterviewHistory( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { try { PagingBean pagingBean = this.getPagingBean(request); PaginationSupport<ModelHrmJobHireInterview> interviews = this.getMyInterviewsByStatus( new Integer[] { ModelHrmJobHireInterview.EInterviewState.ABSENCE.getValue(), ModelHrmJobHireInterview.EInterviewState.PASSED.getValue(), ModelHrmJobHireInterview.EInterviewState.ELIMINATED.getValue() }, pagingBean); request.setAttribute("interviews", interviews); // 输出分页信息至客户端 outWritePagination(request, pagingBean, interviews); // 设置历史查看状态 request.setAttribute("op", "history"); return mapping.findForward("page.my.interview.index"); } catch (Exception e) { LOGGER.error("Exception raised when open my interview TODO page.", e); return ajaxPrint(response, getErrorCallback(e.getMessage())); } }
/** * <b>[WebAction]</b> <br> * 面试意见保存 */ public ActionForward actionDoComment( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { try { String interviewId = request.getParameter("interviewId"); if (this.isObjectIdValid(interviewId)) { ModelHrmJobHireInterview jobHireInterview = this.serviceHrmJobHireInterview.get(interviewId); if (jobHireInterview != null) { Integer interviewStatus = Integer.parseInt(request.getParameter("interviewStatus")); String interviewComments = request.getParameter("interviewComments"); jobHireInterview.setInterviewStatus(interviewStatus); jobHireInterview.setInterviewComments(interviewComments); if (interviewStatus.equals(ModelHrmJobHireInterview.EInterviewState.ABSENCE.getValue()) || interviewStatus.equals( ModelHrmJobHireInterview.EInterviewState.ELIMINATED.getValue())) { // 当面试被淘汰或者未到时, 设置应聘状态为待处理 jobHireInterview .getJobHireIssue() .setCurrentStatus(ModelHrmJobHireIssue.EJobHireIssueStatus.TODO.getValue()); } else if (interviewStatus.equals( ModelHrmJobHireInterview.EInterviewState.PASSED.getValue())) { // 当面试被淘汰或者未到时, 设置应聘状态为待安排 jobHireInterview .getJobHireIssue() .setCurrentStatus(ModelHrmJobHireIssue.EJobHireIssueStatus.TOPLAN.getValue()); } // 设置面试附件 this.handleFileAttachments(jobHireInterview, request); this.serviceHrmJobHireInterview.save(jobHireInterview); // 推送至客户端, 进行数字提醒更新. this.messagePush.pushMessage( jobHireInterview.getInterviewer().getEmployee().getId(), WebActionUtil.scriptMessageNotify, WebActionUtil.MENU_ITEM_INTERVIEW_COMMIT.getKey(), -1); // 保存后关闭dialog页面并刷新navTab. return ajaxPrint( response, getSuccessCallback("面试意见提交成功!", CALLBACK_TYPE_CLOSE, CURRENT_NAVTABID, null, false)); } else { return ajaxPrint(response, getErrorCallback("当前面试信息不存在!")); } } else { return ajaxPrint(response, getErrorCallback("非法面试ID信息被传入.")); } } catch (Exception e) { LOGGER.error("Exception raised when do save the interview comment.", e); return ajaxPrint(response, getErrorCallback("面试意见保存失败:" + e.getMessage())); } }