package com.ssh.action;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.UUID;
import org.apache.struts2.ServletActionContext;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.ssh.utils.ExportExcelUtil;
import com.ssh.dao.ClockDAO;
import com.ssh.dao.WagesDAO;
import com.ssh.domain.Clock;
import com.ssh.domain.Wages;
import com.ssh.dao.EmployeeDAO;
import com.ssh.domain.Employee;
@Controller @Scope("prototype")
public class WagesAction extends ActionSupport {
/*图片字段wagesPhoto参数接收*/
private File wagesPhotoFile;
private String wagesPhotoFileFileName;
private String wagesPhotoFileContentType;
public File getWagesPhotoFile() {
return wagesPhotoFile;
}
public void setWagesPhotoFile(File wagesPhotoFile) {
this.wagesPhotoFile = wagesPhotoFile;
}
public String getWagesPhotoFileFileName() {
return wagesPhotoFileFileName;
}
public void setWagesPhotoFileFileName(String wagesPhotoFileFileName) {
this.wagesPhotoFileFileName = wagesPhotoFileFileName;
}
public String getWagesPhotoFileContentType() {
return wagesPhotoFileContentType;
}
public void setWagesPhotoFileContentType(String wagesPhotoFileContentType) {
this.wagesPhotoFileContentType = wagesPhotoFileContentType;
}
/*界面层需要查询的属性: 图书条形码*/
private String wagesid;
private int employeeid;
public int getEmployeeid() {
return employeeid;
}
public void setEmployeeid(int employeeid) {
this.employeeid = employeeid;
}
public String getWagesid() {
return wagesid;
}
public void setWagesid(String wagesid) {
this.wagesid = wagesid;
}
private String barcode;
public void setBarcode(String barcode) {
this.barcode = barcode;
}
public String getBarcode() {
return this.barcode;
}
/*界面层需要查询的属性: 图书名称*/
private String wagesname;
public void setWagesName(String wagesName) {
this.wagesname = wagesName;
}
public String getWagesName() {
return this.wagesname;
}
/*界面层需要查询的属性: 图书所在类别*/
private Employee employee;
public void setEmployee(Employee employee) {
this.employee = employee;
}
public Employee getEmployee() {
return this.employee;
}
/*界面层需要查询的属性: 出版日期*/
private String publishDate;
public void setPublishDate(String publishDate) {
this.publishDate = publishDate;
}
public String getPublishDate() {
return this.publishDate;
}
/*当前第几页*/
private int currentPage;
public void setCurrentPage(int currentPage) {
this.currentPage = currentPage;
}
public int getCurrentPage() {
return currentPage;
}
/*一共多少页*/
private int totalPage;
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getTotalPage() {
return totalPage;
}
/*当前查询的总记录数目*/
private int recordNumber;
public void setRecordNumber(int recordNumber) {
this.recordNumber = recordNumber;
}
public int getRecordNumber() {
return recordNumber;
}
/*业务层对象*/
@Resource WagesDAO wagesDAO;
@Resource ClockDAO clockDAO;
@Resource EmployeeDAO employeeDAO;
/*待操作的Wages对象*/
private Wages wages;
public void setWages(Wages wages) {
this.wages = wages;
}
public Wages getWages() {
return this.wages;
}
/*跳转到添加Wages视图*/
public String AddView() {
ActionContext ctx = ActionContext.getContext();
/*查询所有的Employee信息*/
List<Employee> employeeList = employeeDAO.QueryAllEmployeeInfo();
ctx.put("employeeList", employeeList);
return "add_view";
}
public String Addcsh() {
ActionContext ctx = ActionContext.getContext();
/*查询所有的Employee信息*/
List<Employee> employeeList = employeeDAO.QueryAllEmployeeInfo();
ctx.put("employeeList", employeeList);
return "add_csh";
}
//####初始化工资信息
/*添加Wages信息*/
@SuppressWarnings("deprecation")
public String AddWagescsh() {
ActionContext ctx = ActionContext.getContext();
List yuefen=new ArrayList();
yuefen.add("201701");
yuefen.add("201702");
yuefen.add("201703");
yuefen.add("201704");
yuefen.add("201705");
yuefen.add("201706");
yuefen.add("201707");
yuefen.add("201708");
yuefen.add("201709");
yuefen.add("201710");
yuefen.add("201711");
yuefen.add("201712");
try {
if(true) {
Employee employee = employeeDAO.GetEmployeeByLoadId(wages.getEmployee().getEmployeeid());
wages.setEmployee(employee);
}
//String id=employee.getEmployeeid().toString();
//List<Employee> employeeList = employeeDAO.QueryAllEmployeeInfo();
for (int i = 0; i < yuefen.size(); i++) {
wages.setWagesid(wages.getEmployee().getEmployeeid().toString()+yuefen.get(i));
wages.setEmployee(employeeDAO.GetEmployeeByLoadId(wages.getEmployee().getEmployeeid()));
wages.setZf("未支付");
wagesDAO.AddWages(wages);
}
ctx.put("message", java.net.URLEncoder.encode("Wages添加成功!"));
return "add_success";
} catch (Exception e) {
e.printStackTrace();
ctx.put("error", java.net.URLEncoder.encode("Wages添加失败!"));
return "error";
}
}
//当前日期
SimpleDateFormat sdfdb=new SimpleDateFormat("yyyy-MM");
java.util.Date datedb=new java.util.Date();
String strdb=sdfdb.format(datedb);
//当前日期
SimpleDateFormat sdfjs=new SimpleDateFormat("yyyy-MM-dd");
java.util.Date datejs=new java.util.Date();
String strjs=sdfjs.format(datejs);
private String id;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
//####计算本月工资全勤信息
/*添加Wages信息*/
@SuppressWarnings("deprecation")
public String AddWagesjs() {
ActionContext ctx = ActionContext.getContext();
try {
//查询全部人员
List<Employee> employeeList = employeeDAO.QueryAllEmployeeInfo();
//查询全部签到
for(Employee employeetem:employeeList){
int sum=0;
List<Clock> clocllist=(List<Clock>)clockDAO.QueryAllClockInfojs(employeetem.getEmployeeid(),strdb);
for(Clock clocktem:clocllist){
long strsb=Long.valueOf(clocktem.getSbdate().replaceAll("[-\\s:]",""));
long strxb=Long.valueOf(clocktem.getXbdate().replaceAll("[-\\s:]",""));
String sb="09:00:00";
String xb="18:00:00";
long strsbsj=Long.valueOf(sb.replaceAll("[-\\s:]",""));
long strxbsj=Long.valueOf(xb.replaceAll("[-\\s:]",""));
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
JAVA人力资源管理系统源码(含数据库).rar (1234个子文件)
treeBigData.ashx 2KB
treeDeptData.ashx 1KB
treeData.ashx 865B
treeData2.ashx 422B
WagesAction.class 15KB
ClockAction.class 10KB
EmployeeAction.class 9KB
DepartmentAction.class 7KB
ExportExcelUtil.class 7KB
ClockDAO.class 7KB
CcpxAction.class 7KB
CardAction.class 6KB
PostAction.class 6KB
EmployeeDAO.class 6KB
WagesDAO.class 6KB
PostDAO.class 5KB
CcpxDAO.class 5KB
CardDAO.class 5KB
DepartmentDAO.class 4KB
ChangeEmployeePasswordAction.class 3KB
ChangePasswordAction.class 3KB
CardIdFieldValidator.class 3KB
HibernateUtil.class 2KB
EmloyeeloginDAO.class 2KB
Employee.class 2KB
AdminDAO.class 2KB
Wages.class 2KB
CloginAction.class 2KB
Clock.class 2KB
LoginAction.class 2KB
Ccpx.class 2KB
Card.class 1KB
TestUtil.class 1022B
Department.class 842B
Post.class 788B
Admin.class 726B
UserAction.class 564B
Pb.class 464B
.classpath 4KB
org.eclipse.wst.common.component 450B
org.eclipse.wst.jsdt.ui.superType.container 49B
public.css 41KB
jquery-ui.css 32KB
ligerui-form.css 19KB
ligerui-grid.css 15KB
ligerui-dialog.css 14KB
form.css 10KB
form.css 9KB
form.css 9KB
grid.css 8KB
ligerui-layout.css 7KB
grid.css 7KB
grid.css 7KB
ligerui-common.css 7KB
ligerui-tab.css 6KB
tab.css 6KB
layout.css 5KB
form.css 5KB
layout.css 5KB
dialog.css 4KB
dialog.css 4KB
tab.css 4KB
dialog.css 4KB
ligerui-icons.css 4KB
demo.css 3KB
ligerui-tree.css 3KB
index.css 2KB
style.css 2KB
common.css 2KB
iconfont.css 2KB
grid.css 2KB
ligerui-menu.css 2KB
lab.css 2KB
tab.css 2KB
layout.css 1KB
desk.css 841B
style.css 587B
common.css 480B
common.css 480B
ligerui-all.css 278B
all.css 188B
all.css 163B
all.css 107B
style.css 81B
example.css 66B
iconfont.eot 20KB
logo.gif 81KB
login_03.gif 30KB
login_08.gif 25KB
login_03 - 副本.gif 19KB
closeAll.gif 13KB
dialog-winbtns.gif 13KB
dialog-winbtns.gif 13KB
dialog-winbtns.gif 13KB
button-bg-over.gif 13KB
icon-unselect.gif 13KB
button-disabled.gif 13KB
button-over.gif 13KB
button-disabled.gif 13KB
button-over.gif 13KB
共 1234 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13
资源评论
- m0_751126362023-07-23非常有用的资源,有一定的参考价值,受益匪浅,值得下载。
等天晴i
- 粉丝: 3386
- 资源: 10万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功