package com.coe.action;
import java.io.UnsupportedEncodingException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
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.coe.dto.Information;
import com.coe.dto.Trainingapproval;
import com.coe.dto.Trainingplan;
import com.coe.service.IIformationService;
import com.coe.service.ITrainingMangment;
public class TrainingMangmentAction extends DispatchAction {
private ITrainingMangment trainService;
private IIformationService informationService;
public IIformationService getInformationService() {
return informationService;
}
public void setInformationService(IIformationService informationService) {
this.informationService = informationService;
}
public ITrainingMangment getTrainService() {
return trainService;
}
public void setTrainService(ITrainingMangment trainService) {
this.trainService = trainService;
}
public ActionForward Trainingapproval(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
List list = this.trainService.findAllapproval();
request.setAttribute("list", list);
List listPlan = this.getTrainService().findAllplan();
HttpSession session = request.getSession();
session.setAttribute("listPlan", listPlan);
String level = (String) session.getAttribute("level");
String name = (String) session.getAttribute("username");
if (level.equals("超级管理员")) {
return mapping.findForward("Trainingapproval");
} else if (level.equals("一般管理员")) {
return mapping.findForward("yb_Trainingapproval");
} else {
List listapp = this.getTrainService().findTrapp(
"from Trainingapproval as ta where ta.information.username='"
+ name + "'");
session.setAttribute("listapp", listapp);
return mapping.findForward("pt_Trainingapproval");
}
}
public ActionForward EditApproval(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws UnsupportedEncodingException {
String id = request.getParameter("taid");
String userid = request.getParameter("userid");
String trf = request.getParameter("trf");
trf = java.net.URLDecoder.decode(trf, "utf-8");
String trmark = request.getParameter("trmark");
Information information = this.getInformationService()
.findInformationByid(new Integer(userid));
Trainingplan trainingplan = this.getTrainService()
.findTrainingplanbyId(new Integer(trf));
Trainingapproval trainingapproval = new Trainingapproval();
trainingapproval.setTaid(new Integer(id));
trainingapproval.setInformation(information);
trainingapproval.setTrainingplan(trainingplan);
trainingapproval.setTrmark(new Integer(trmark));
trainingapproval.setEval("请输入评价");
trainingapproval.setFb("请输入反馈");
this.getTrainService().update(trainingapproval);
return null;
}
public ActionForward DelApproval(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
String id = request.getParameter("taid");
this.trainService.delapproval(new Integer(id));
return null;
}
public ActionForward saveApproval(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
String userid = request.getParameter("userid");
String trid = request.getParameter("trid");
Information information = this.getInformationService()
.findInformationByid(new Integer(userid));
Trainingplan trainingplan = this.getTrainService()
.findTrainingplanbyId(new Integer(trid));
Trainingapproval trainingapproval = new Trainingapproval();
trainingapproval.setInformation(information);
trainingapproval.setTrainingplan(trainingplan);
trainingapproval.setTrmark(new Integer(0));
trainingapproval.setEval("请输入评价");
trainingapproval.setFb("请输入反馈");
this.getTrainService().saveapp(trainingapproval);
List list = this.getTrainService().findAllapproval();
request.setAttribute("list", list);
return this.Trainingapproval(mapping, form, request, response);
}
public ActionForward findApproval(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
String username = request.getParameter("username");
String department = request.getParameter("department");
String fzr = request.getParameter("fzr");
String trf = request.getParameter("trf");
String trmark = request.getParameter("trmark");
String hql = "from Trainingapproval as t where 1=1 ";
if (username != null && !username.equals("")) {
hql += "and t.information.username like '%" + username + "%'";
}
if (department != null && !department.equals("")) {
hql += " and t.information.department = '" + department + "'";
}
if (fzr != null && !fzr.equals("")) {
hql += " and t.trainingplan.fzr.username like '%" + fzr + "%'";
}
if (trf != null && !trf.equals("")) {
hql += " and t.trainingplan.trf like '%" + trf + "%'";
}
if (trmark != null && !trmark.equals("")) {
hql += " and t.trmark = '" + trmark + "'";
}
List list = this.getTrainService().findTrapp(hql);
request.setAttribute("list", list);
HttpSession session = request.getSession();
String level = (String) session.getAttribute("level");
if (level.equals("超级管理员")) {
return mapping.findForward("appSuc");
} else {
return mapping.findForward("yb_appSuc");
}
}
public ActionForward addplan(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
String department = request.getParameter("department");
String trf = request.getParameter("trf");
String trd = request.getParameter("trd");
String trn = request.getParameter("trn");
String trst = request.getParameter("trst");
String trc = request.getParameter("trc");
String fzr = request.getParameter("fzr");
Trainingplan trainingplan = new Trainingplan();
Information information = this.getInformationService()
.findInformationByid(new Integer(fzr));
trainingplan.setDepartment(department);
trainingplan.setFzr(information);
trainingplan.setTrc(trc);
trainingplan.setTrf(trf);
trainingplan.setTrd(trd);
trainingplan.setTrn(trn);
trainingplan.setTrst(trst);
this.getTrainService().saveplan(trainingplan);
return Trainingplan(mapping, form, request, response);
}
public ActionForward Trainingplan(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
List list = this.trainService.findAllplan();
request.setAttribute("list", list);
HttpSession session = request.getSession();
String level = (String) session.getAttribute("level");
if (level.equals("超级管理员")) {
return mapping.findForward("Trainingplan");
} else
return mapping.findForward("yb_Trainingplan");
}
public ActionForward updateTrainingplan(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws UnsupportedEncodingException {
String trid = request.getParameter("trid");
String trd = request.getParameter("trd");
trd = java.net.URLDecoder.decode(trd, "utf-8");
String department = request.getParameter("department");
department = java.net.URLDecoder.decode(department, "utf-8");
String trf = request.getParameter("trf");
trf = java.net.URLDecoder.decode(trf, "utf-8");
String trn = request.getParameter("trn");
trn = java.net.URLDecoder.decode(trn, "utf-8");
String userid = request.getParameter("userid");
String trst = request.getParameter("trst");
Stri
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Java 人力资源管理系统 (634个子文件)
TrainingMangmentAction.class 13KB
InformationAction.class 13KB
DynaChartAction.class 13KB
SalaryAction.class 6KB
AttendanceAction.class 6KB
ContractAction.class 6KB
NoticeAction.class 6KB
CandidatesAction.class 6KB
RecruitmentinfoAction.class 5KB
InformationServiceImp.class 4KB
TrainingMangment.class 4KB
Information.class 4KB
BaseDao.class 3KB
SalaryServiceImp.class 3KB
CandidatesServiceImp.class 3KB
TrainplanDao.class 2KB
Salary.class 2KB
TrainingapprovalDao.class 2KB
RecruitmentinfoServiceImp.class 2KB
Trainingplan.class 2KB
Recruitmentinfo.class 2KB
Contract.class 2KB
RecruitmentinfoDaoImp.class 2KB
InformationDaoImp.class 2KB
Trainingapproval.class 2KB
CharEncodingFilter.class 2KB
Candidates.class 2KB
AttendanceServiceImp.class 2KB
Attendance.class 2KB
AttendancetDaoImp.class 2KB
ContractDaoImp.class 2KB
CandidatesDaoImp.class 2KB
Notice.class 2KB
SalaryDaoImp.class 2KB
NoticeDaoImp.class 2KB
ContractServiceImp.class 1KB
BaseDao$1.class 1KB
NoticeServiceImp.class 1KB
BaseDao$3.class 1KB
BaseDao$2.class 1KB
Person.class 1KB
ITrainingMangment.class 910B
IIformationService.class 725B
ISalaryService.class 592B
IRecruitmentinfoService.class 545B
ICandidatesService.class 514B
IRecruitmentinfoDao.class 454B
IInformationDao.class 442B
ITrainplanDao.class 440B
ICandidatesDao.class 439B
ITrainingapprovalDao.class 430B
IContractService.class 394B
IAttendanceService.class 383B
INoticeService.class 377B
IAttendanceDao.class 355B
IConnectDao.class 337B
INoticeDao.class 333B
ISalaryDao.class 333B
.classpath 4KB
org.eclipse.wst.common.component 459B
org.eclipse.wst.jsdt.ui.superType.container 49B
ui.theme.css 17KB
fox.css 7KB
skin.css 4KB
ui.datepicker.css 4KB
common.css 4KB
ui.core.css 1KB
table1.css 722B
style.css 416B
ui.base.css 62B
ui.all.css 47B
Thumbs.db 177KB
Thumbs.db 63KB
Thumbs.db 59KB
人力管理系统需求文档.doc 1.5MB
~$人事管理系统需求文档.doc 162B
login-welcome.gif 51KB
login-content-bg.gif 20KB
src.gif 9KB
login-wel.gif 9KB
logo.gif 7KB
menu_bg2.gif 4KB
servicezhgb2312.gif 3KB
0031.gif 3KB
buttom-right.gif 2KB
ershou_1.gif 2KB
ershou_2.gif 2KB
menu_bgs.gif 2KB
title.gif 2KB
sitebackup.gif 2KB
DefaultDocs.gif 2KB
menu_bg.gif 2KB
tool-down-pic.gif 2KB
qianjin.gif 2KB
buttom-left.gif 2KB
houtui.gif 2KB
out.gif 2KB
mime.gif 2KB
shouye.gif 2KB
password.gif 2KB
共 634 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
北顾丶
- 粉丝: 147
- 资源: 42
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 31-31.渗透测试SQL注入盲注
- 老板必备实体门店超常规营销获客,218套实体店落地方案解析-课程网盘链接提取码下载 .txt
- 基于Python+Flask+MySQL+SWPU数据库原理开发最流行的外卖订餐系统+源码+开发文档(高分优秀项目)
- ESG的同群效应数据集(2010-2022年).xlsx
- 华为OD机试机考题库Go语言实现36道题(含题目描述、详细解题报告).zip
- 新能源锂电池行业创业的财富方案,锂电池回收高阶课-课程网盘链接提取码下载 .txt
- 30-30.渗透测试SQL注入基础(下)、工具和POST类型(上)
- ssm(老年公寓管理系统)
- TP179-V1.1.2-51单片机蓝牙遥控车.zip
- auto-sqladmin
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功