⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 engageresumeaction.java

📁 hr伯乐管理系统!非常适合java学员做学习参考用!是用集成框架开发的Struts+hrbernet+Spring 开发的
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
		{
			int len = path.length - 1;
			er.setAttachmentName(path[len]); //设置附件名称
		}
              
		HashMap map = this.getConfigpubliccharBiz().listForHumanFile(null);
		request.setAttribute("map", map);
		er.setStr_humanBirthday(Util.formatDate(er.getHumanBirthday()));
		myForm.setItem(er);
		
		return mapping.findForward("check");
	}
	
	/**
	 * 执行筛选,既"推荐面试"按钮
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return
	 */
	public ActionForward doEdit(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws HrException
	{
		EngageResumeForm myForm = (EngageResumeForm)form;
		EngageResume item = myForm.getItem(); //新的简历对象(含有新表单值)
		
		short id = Short.valueOf(request.getParameter("id"));
		EngageResume condition = this.getEngageresumeBiz().getERbyID(id); //老的简历对象
		
		try
		{
			CopyBean.copyProperties(condition, item); //该方法将表单上需要修改的值重新存入原来的对象相应属性中,而其他值不变
		}
		catch(Exception ce)
		{
			ce.printStackTrace();
		}
		
		condition.setCheckTime(Util.parseDate(condition.getStr_checkTime()));  //设置筛选时间
		condition.setCheckStatus(Short.valueOf("1")); //将简历复核状态设置为1,表示该简历被推荐面试
		condition.setHumanBirthday(Util.parseDate(condition.getStr_humanBirthday())); 
		
		this.getEngageresumeBiz().update(condition);
		
		return mapping.findForward("check_success");
	}
	
	/**
	 * 由等待变更的职位列表中的超链"删除"调用,跳转到删除确认页面
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return
	 */
	public ActionForward toDelete(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws HrException
	{
		/**
		 * 得到点击"删除"时传入的职位编号存入内置对象中,以便下个页面根据该编号删除职位
		 */
		short id = Short.valueOf(request.getParameter("id")); //得到所申请职位的编号
		request.setAttribute("id", id);
		return mapping.findForward("delete");
	}

	/**
	 * 执行删除
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return
	 */
	public ActionForward doDelete(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws HrException
	{
		
		return mapping.findForward("del_success");
	}
	
	/**
	 * 在面试结果登记,点击开始按钮时调用此方法
	 * @param mapping
	 * @param form
	 * @param request
	 * @param messages
	 * @return
	 */
	public ActionForward list(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) 
								throws HrException
	{
		Short checkStatus = null;
		Short interviewStatus = null;
		Short passStatus = null;
		if(request.getParameter("checkStatus") != null)
			checkStatus = Short.valueOf(request.getParameter("checkStatus"));//得到复核状态
		if(request.getParameter("interviewStatus") != null)
			interviewStatus = Short.valueOf(request.getParameter("interviewStatus"));//得到面试状态
		if(request.getParameter("passStatus") != null)
			passStatus = Short.valueOf(request.getParameter("passStatus"));//得到录用状态
		
		EngageResumeForm myForm = (EngageResumeForm)form;
		EngageResume er = myForm.getItem();
		er.setCheckStatus(checkStatus);
		er.setInterviewStatus(interviewStatus);
		er.setPassCheckStatus(passStatus);

		List list = this.getEngageresumeBiz().list(er);
		request.setAttribute("list", list);
		String method = request.getParameter("method");
		if(method.equals("check"))
			return mapping.findForward("check_list");
		else if(method.equals("query"))
			return mapping.findForward("query_list");
		else if(method.equals("interview"))
			return mapping.findForward("interview_list");
		else
			return mapping.findForward("pass");  //到register_list.jsp
	}
	
	/**
	 * 录用申请,审批,查询到的显示列表
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return
	 * @throws HrException
	 */
	public ActionForward passList(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) 
	throws HrException
	{
		short passStatus = -1;
		
		if(request.getParameter("passStatus") != null)
			passStatus = Short.valueOf(request.getParameter("passStatus"));//得到录用状态
		/**
		 * 查询engageinterview表中interviewstatus=3(建议录用)、checkstatus=1(已被筛选)的记录
		 */
		EngageInterview condition = new EngageInterview();
		condition.setInterviewStatus(Short.valueOf("3"));
		condition.setCheckStatus(Short.valueOf("1"));
		List interviewList = this.getEngageinterviewBiz().list(condition);
		short resumeid;
		
		List resumeList = new ArrayList();
		for(int i = 0; i < interviewList.size(); i++)
		{
			resumeid = ((EngageInterview)interviewList.get(i)).getResumeId();//得到面试信息表中的简历编号
			EngageResume resume = this.getEngageresumeBiz().getERbyID(resumeid);
			if(resume.getCheckStatus() == 1 && resume.getInterviewStatus() == 1 && resume.getPassCheckStatus() == passStatus)
				resumeList.add(resume);
		}	
		request.setAttribute("list", resumeList); 
		String method = request.getParameter("method");
		if(method.equals("register"))
			return mapping.findForward("pass_register_list");
		else if(method.equals("check"))
			return mapping.findForward("pass_check_list");
		else
			return mapping.findForward("pass_query_list");
	}
	
	/**
	 * 显示详细信息
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return
	 * @throws HrException
	 */
	public ActionForward toView(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) 
								throws HrException
	{
		EngageResumeForm myForm = (EngageResumeForm)form;
		short id = Short.valueOf(request.getParameter("id"));
		EngageResume er = this.getEngageresumeBiz().getERbyID(id);
		String path[] = Util.splitPath(er.getAttachmentName());
		if(path != null)
		{
			int len = path.length - 1;
			er.setAttachmentName(path[len]); //设置附件名称
		}
		
		myForm.setItem(er);
		
		return mapping.findForward("query");
	}
	
	/**
	 * 跳转到输入查询条件的页面
	 */
	public ActionForward locate(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) 
								throws HrException
	{
		List list_majorkind = this.getConfigmajorkindBiz().list(null);
		List list_major = this.getConfigmajorBiz().list(null);
		
		request.setAttribute("list_majorkind", list_majorkind);
		request.setAttribute("list_major", list_major);
		
		String method = request.getParameter("method");
		
		if(method.equals("check"))
			return mapping.findForward("check_locate");
		else if(method.equals("query"))
			return mapping.findForward("query_locate");
		else
			return mapping.findForward("interview_locate");
	}
	
	/**
	 * 	录用申请
	 */
	public ActionForward topassApply(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)
	{
		short resid = Short.valueOf(request.getParameter("resid"));//得到简历编号
		try
		{
			EngageInterview ei = new EngageInterview();
			ei.setResumeId(resid);
			List list = this.getEngageinterviewBiz().list(ei);//在面试表中查询建立编号为resid的记录
			EngageInterview lastEI = (EngageInterview)list.get(0); //得到最后一条面试记录
			EngageResume er = this.getEngageresumeBiz().getERbyID(resid);
			
			String path[] = Util.splitPath(er.getAttachmentName());
			if(path != null )
			{
				int len = path.length - 1;
				er.setAttachmentName(path[len]); //设置附件名称
			}
			/**
			 * 把根据resid得到的简历对象和最后一条面试对象存入内存
			 */
			request.setAttribute("lastEI", lastEI);
			request.setAttribute("er", er);

			return mapping.findForward("pass_register");
			
		}catch(Exception ce)
		{
			System.out.println("topassApply出错!错误原因:"+ce.getMessage());
		}
		
		return null;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -