package com.wit.payroll.action;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import org.springframework.stereotype.Controller;
import com.opensymphony.xwork2.ActionSupport;
import com.wit.payroll.Services.SalaryService;
import com.wit.payroll.model.Dept;
import com.wit.payroll.model.EmpAccount;
import com.wit.payroll.model.Employee;
import com.wit.payroll.model.Salary;
@Controller
public class SalaryAction extends ActionSupport {
private static final long serialVersionUID = 1L;
private SalaryService salaryService;
private String a;
private String b;
private Double c;
private Double d;
private Double e;
public String getA() {
return a;
}
public void setA(String a) {
this.a = a;
}
public String getB() {
return b;
}
public void setB(String b) {
this.b = b;
}
public Double getC() {
return c;
}
public void setC(Double c) {
this.c = c;
}
public Double getD() {
return d;
}
public void setD(Double d) {
this.d = d;
}
public Double getE() {
return e;
}
public void setE(Double e) {
this.e = e;
}
private int eId;
private int id;
private int accId;
private int deptId;
private int active;
List<Salary> salary;
List<Salary> list;
List<Salary> list1;
public List<Salary> getList1() {
return list1;
}
public void setList1(List<Salary> list1) {
this.list1 = list1;
}
public List<Salary> getList() {
return list;
}
public void setList(List<Salary> list) {
this.list = list;
}
public List<Salary> getSalary() {
return salary;
}
public void setSalary(List<Salary> salary) {
this.salary = salary;
}
public int getActive() {
return active;
}
public void setActive(int active) {
this.active = active;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getAccId() {
return accId;
}
public void setAccId(int accId) {
this.accId = accId;
}
public int getDeptId() {
return deptId;
}
public void setDeptId(int deptId) {
this.deptId = deptId;
}
private String eName;
private Employee employee;
private EmpAccount empAccount;
private Dept dept;
public Dept getDept() {
return dept;
}
public void setDept(Dept dept) {
this.dept = dept;
}
public EmpAccount getEmpAccount() {
return empAccount;
}
public void setEmpAccount(EmpAccount empAccount) {
this.empAccount = empAccount;
}
public Employee getEmployee() {
return employee;
}
public void setEmployee(Employee employee) {
this.employee = employee;
}
public void setSalaryService(SalaryService salaryService) {
this.salaryService = salaryService;
}
public int geteId() {
return eId;
}
public void seteId(int eId) {
this.eId = eId;
}
public String geteName() {
return eName;
}
public void seteName(String eName) {
this.eName = eName;
}
public String execute() {
HttpSession session = ServletActionContext.getRequest().getSession() ;
empAccount=salaryService.selectOne(eId);
if(empAccount!=null){
employee=salaryService.selectOne(eName);
session.setAttribute("a", empAccount.getAccId());
System.out.println(empAccount.getAccId());
if(employee!=null){
System.out.println(employee.getSalarys().get(0).getAccountId());
session.setAttribute("b",employee.getName());
session.setAttribute("d", employee.getSalarys().get(0).getAccountId());
session.setAttribute("e", employee.getSalarys().get(0).getId());
int iid=employee.getDept().getId();
if(deptId==iid){
dept=salaryService.selectOne1(iid);
if(dept!=null){
session.setAttribute("c", dept.getName());
System.out.println(dept.getName());
}
}else{
employee=null;
}
}
}
return SUCCESS;
}
public String savecreate() {
//HttpSession session = ServletActionContext.getRequest().getSession() ;
salaryService.savecreate(id,accId);
return SUCCESS;
}
public String savecreate1() {
//HttpSession session = ServletActionContext.getRequest().getSession() ;
salaryService.savecreate(id,accId);
return SUCCESS;
}
public String queryacc() {
HttpSession session = ServletActionContext.getRequest().getSession() ;
empAccount=salaryService.selectOne(eId);
if(empAccount!=null){
employee=salaryService.selectOne(eName);
session.setAttribute("a", empAccount.getAccId());
System.out.println(empAccount.getAccId());
if(employee!=null){
System.out.println(employee.getSalarys().get(0).getAccountId());
session.setAttribute("b",employee.getName());
session.setAttribute("d", employee.getSalarys().get(0).getAccountId());
session.setAttribute("e", employee.getSalarys().get(0).getId());
session.setAttribute("f", employee.getId());
session.setAttribute("g", employee.getEmpAccount().getAccActive());
int iid=employee.getDept().getId();
if(deptId==iid){
dept=salaryService.selectOne1(iid);
if(dept!=null){
session.setAttribute("c", dept.getName());
System.out.println(dept.getName());
}
}else{
employee=null;
}
}
}
return SUCCESS;
}
public String saveactive() {
salaryService.saveactive(id,active);
return SUCCESS;
}
public String fmcreate() {
HttpSession session = ServletActionContext.getRequest().getSession() ;
empAccount=salaryService.selectOne(eId);
if(empAccount!=null){
employee=salaryService.selectOne(eName);
session.setAttribute("a", empAccount.getAccId());
System.out.println(empAccount.getAccId());
if(employee!=null){
System.out.println(employee.getSalarys().get(0).getAccountId());
session.setAttribute("b",employee.getName());
session.setAttribute("d", employee.getSalarys().get(0).getAccountId());
session.setAttribute("xx", employee.getSalarys().get(0).getHive());
session.setAttribute("e", employee.getSalarys().get(0).getId());
session.setAttribute("g", employee.getEmpAccount().getAccActive());
int iid=employee.getDept().getId();
if(deptId==iid){
dept=salaryService.selectOne1(iid);
if(dept!=null){
session.setAttribute("c", dept.getName());
int dd=employee.getId();
System.out.println(dd+"dddddddddddddddddddddddddddddd");
int cc=1;
Double ee=null;
salary=salaryService.fmcreate(dd);
list=salaryService.fmcreate1(dd,cc);
list1=salaryService.fmcreate2(dd,ee);
}
}
}else{
employee=null;
}
}
return SUCCESS;
}
public String show() {
dept=salaryService.selectShow(deptId);
return SUCCESS;
}
public String updatemodify() {
salaryService.updatemodify(id,a,b,c,d,e);
return SUCCESS;
}
public String savedept() {
salaryService.savedept(dept);
return SUCCESS;
}
public String selectOnedept() {
dept=salaryService.selectOnedept(id);
return SUCCESS;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
薪资管理薪资管理java
共249个文件
jsp:79个
class:51个
java:51个
4星 · 超过85%的资源 需积分: 13 13 下载量 42 浏览量
2011-03-31
23:13:36
上传
评论
收藏 590KB RAR 举报
温馨提示
薪资管理薪资管理java薪资管理薪资管理java薪资管理薪资管理java
资源推荐
资源详情
资源评论
收起资源包目录
薪资管理薪资管理java (249个子文件)
SalaryAction.class 8KB
Employee.class 7KB
SelectDaoImpl.class 6KB
ChangeAction.class 6KB
SystemAction.class 5KB
SalaryDaoImpl.class 5KB
MyInForMation.class 4KB
SelectAction.class 4KB
SaveAction.class 4KB
SystemDaoImpl.class 4KB
LoginAction.class 4KB
SelectnServiceImpl.class 3KB
Salary.class 3KB
UpdateAction.class 3KB
Dept.class 3KB
ProcessAction.class 3KB
SalaryServiceImpl.class 3KB
Leaves.class 2KB
SelectAllAction.class 2KB
UpdateDaoImpl.class 2KB
EmpAccount.class 2KB
SystemServiceImpl.class 2KB
User.class 2KB
ChangeDept.class 2KB
Bonus.class 2KB
LoginDaoImpl.class 2KB
Role.class 2KB
UpdateServiceImpl.class 1KB
SelectAllServiceImpl.class 1KB
SelectAllDaoImpl.class 1KB
ChageterEnogingFilter.class 1KB
SelectService.class 1KB
SelectDao.class 1KB
MaTest.class 1KB
LeaveContainer.class 1KB
LoginServiceImpl.class 1KB
SaveServiceImpl.class 1KB
SaveDaoImpl.class 1KB
SalaryService.class 939B
SalaryDao.class 926B
SystemService.class 676B
SystemDao.class 663B
SessionContainer.class 599B
SelectAllService.class 440B
SelectAllDao.class 426B
UpdateDao.class 325B
UpdateService.class 296B
LoginService.class 269B
LoginDao.class 256B
SaveService.class 238B
SaveDao.class 225B
.classpath 4KB
org.eclipse.wst.jsdt.ui.superType.container 49B
theme.css 6KB
mm_travel2.css 3KB
20.gif 13KB
42.gif 10KB
34.gif 9KB
33.gif 7KB
pat_041.gif 5KB
804.gif 2KB
gif-0065.gif 1KB
today-bg.gif 1KB
login.gif 253B
login.gif 253B
1.gif 210B
gif-0516.gif 132B
title-bg.gif 116B
status-bg.gif 116B
normal-bg.gif 110B
rowhover-bg.gif 110B
active-bg.gif 89B
hover-bg.gif 89B
dark-bg.gif 85B
mm_arrow.gif 74B
gif-0133.gif 64B
menuarrow.gif 49B
mm_spacer.gif 43B
SalaryAction.java 7KB
Employee.java 5KB
SelectDaoImpl.java 5KB
ChangeAction.java 4KB
SelectAction.java 3KB
SystemAction.java 3KB
SalaryDaoImpl.java 3KB
MyInForMation.java 3KB
SelectnServiceImpl.java 3KB
SaveAction.java 2KB
LoginAction.java 2KB
Salary.java 2KB
SystemDaoImpl.java 2KB
UpdateAction.java 2KB
Dept.java 2KB
ProcessAction.java 2KB
Leaves.java 2KB
SelectAllAction.java 2KB
SalaryServiceImpl.java 2KB
UpdateDaoImpl.java 1KB
EmpAccount.java 1KB
ChangeDept.java 1KB
共 249 条
- 1
- 2
- 3
资源评论
- djq1121@qq.com2012-12-03类库得自己导。程序还有点错误。
wangshengokok
- 粉丝: 2
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功