📄 humanjoinaction.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.accphr.web.action;
import java.io.PrintWriter;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;
import com.accphr.biz.IEngageResumeBiz;
import com.accphr.biz.IHumanFileBiz;
import com.accphr.entity.EngageResume;
import com.accphr.page.PageResult;
import com.accphr.web.form.EngageResumeForm;
/*
* 录用管理
*/
public class HumanJoinAction extends DispatchAction {
private IEngageResumeBiz engageResumeBiz;
private IHumanFileBiz humanFileBiz;
public void setHumanFileBiz(IHumanFileBiz humanFileBiz) {
this.humanFileBiz = humanFileBiz;
}
public void setEngageResumeBiz(IEngageResumeBiz engageResumeBiz) {
this.engageResumeBiz = engageResumeBiz;
}
//显示
public ActionForward toList(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
EngageResumeForm engageResumeForm = (EngageResumeForm) form;
PageResult pageResult=engageResumeForm.getPageResult();
this.engageResumeBiz.setPageResult(null, pageResult);
return mapping.findForward("tolist");
}
//到添加查询页面
public ActionForward toAddFind(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
EngageResumeForm engageResumeForm = (EngageResumeForm) form;
PageResult pageResult=engageResumeForm.getPageResult();
EngageResume engageResume=new EngageResume();
//如果面试或机试通过了,才可进行申请职位
engageResume.setCheckStatus(Short.parseShort("1"));
engageResumeBiz.setPageResult(engageResume, pageResult);
return mapping.findForward("toaddfind");
}
//到添加页面
public ActionForward toAdd(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
EngageResumeForm engageResumeForm = (EngageResumeForm) form;
Short mid=Short.parseShort(request.getParameter("hid"));
EngageResume engageResume=this.engageResumeBiz.findById(mid);
engageResumeForm.setEngageResume(engageResume);
return mapping.findForward("toadd");
}
//到审核查询页面
public ActionForward toCheckFind(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
EngageResumeForm engageResumeForm = (EngageResumeForm) form;
PageResult pageResult=engageResumeForm.getPageResult();
this.engageResumeBiz.setPageResult(null, pageResult);
return mapping.findForward("tocheckfind");
}
//到审核页面
public ActionForward toCheck(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
EngageResumeForm engageResumeForm = (EngageResumeForm) form;
Short mid=Short.parseShort(request.getParameter("hid"));
EngageResume engageResume=this.engageResumeBiz.findById(mid);
engageResumeForm.setEngageResume(engageResume);
return mapping.findForward("tocheck");
}
//添加
public ActionForward doAdd(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
EngageResumeForm engageResumeForm = (EngageResumeForm) form;
EngageResume engageResume=engageResumeForm.getEngageResume();
//取登记时间
String times=request.getParameter("times");
try {
SimpleDateFormat format =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date=format.parse(times);
//设置登记时间
engageResume.setPassRegistTime(new Timestamp(date.getTime()));
} catch (ParseException e) {
e.printStackTrace();
}
this.engageResumeBiz.update(engageResume);
PrintWriter out=response.getWriter();
out.print("<script>alert('添加成功');location.href='humanJoin.do?ophj=toAddFind'</script>");
return null;
}
//审核
public ActionForward doCheck(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
EngageResumeForm engageResumeForm = (EngageResumeForm) form;
EngageResume engageResume=engageResumeForm.getEngageResume();
//取登记时间
String times=request.getParameter("times");
try {
SimpleDateFormat format =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date=format.parse(times);
//设置登记时间
engageResume.setPassCheckTime(new Timestamp(date.getTime()));
} catch (ParseException e) {
e.printStackTrace();
}
engageResume.setPassCheckStatus(Short.parseShort("1"));
this.engageResumeBiz.update(engageResume);
PrintWriter out=response.getWriter();
out.print("<script>alert('审核成功');location.href='humanJoin.do?ophj=toCheckFind'</script>");
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -