主页 > 其他  > 

C#基于ASP.NET的人事薪资管理系统

C#基于ASP.NET的人事薪资管理系统

ASP.NET20003人事薪资管理系统,SQL数据库:VS2010开发环境,包含员工管理,部门管理,工资管理,绩效管理等功能,并且包含五险一金的计算 3.3 功能需求

3.3.1 员工部分 1:查看工资:以列表的形式查看系统现存的员工工资信息。 2:查看个人信息:查看员工个人信息。 3:退出系统:退出系统。 3.3.2 管理员部分 1:员工考勤管理:添加、删除员工考勤,以列表的形式显示。 2:部门管理:添加部门、删除部门,并可对其进行相关操作。 3:员工信息管理:以列表的形式查看系统现存的员工信息。 4:工资信息管理:针对具体的员工工资信息进行管理。 5:用户管理:进行个人信息管理,包括个人密码管理。 6:绩效考核管理:绩效考核添加、删除,并可对其进行相关操作。

package com.controller; import java.io.File; import java.io.IOException; import java.sql.Timestamp; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.io.PrintWriter; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; import com.entity.Allusers; //import com.chengxusheji.po.News; import com.server.AllusersServer; import com.util.PageBean; import net.sf.json.JSONObject; @Controller public class AllusersController { @Resource private AllusersServer allusersService; // @RequestMapping("showAllusers.do") public String showAllusers(int id,ModelMap map,HttpSession session){ /* Map<String,Object> bmap=new HashMap<String,Object>(); bmap.put("uid", id);*/ // map.put("blist", allusersService.getAll(bmap)); map.put("allusers", allusersService.getById(id)); return "read"; } @RequestMapping("addAllusers.do") public String addAllusers(HttpServletRequest request,Allusers allusers,HttpSession session){ Timestamp time=new Timestamp(System.currentTimeMillis()); //Users u=(Users)session.getAttribute("user"); /*if(u==null||u.equals("")){ return "redirect:showIndex.do"; }else{*/ //bbs.setUid(u.getId()); /*bbs.setPubtime(time.toString()); bbs.setIsdel("1");*/ allusers.setAddtime(time.toString().substring(0, 19)); allusersService.add(allusers); return "redirect:allusersList.do"; /*}*/ } // 处理编辑 @RequestMapping("doUpdateAllusers.do") public String doUpdateAllusers(int id,ModelMap map,Allusers allusers){ allusers=allusersService.getById(id); map.put("allusers", allusers); return "allusers_updt"; } // @RequestMapping("updateAllusers.do") public String updateAllusers(int id,ModelMap map,Allusers allusers){ allusersService.update(allusers); return "redirect:allusersList.do"; } // 所有List // @RequestMapping("allusersList.do") // public String allusersList(ModelMap map,HttpSession session){ // map.put("list", allusersService.getAll(null)); // map.put("clist", allusersService.getAll(null)); // return "allusers"; // } // 分页查询 @RequestMapping("allusersList.do") public String goodList(@RequestParam(value="page",required=false)String page, ModelMap map,HttpSession session,Allusers allusers, String username, String pwd, String cx){ /*if(session.getAttribute("user")==null){ return "login"; }*/ if(page==null||page.equals("")){ page="1"; } PageBean pageBean=new PageBean(Integer.parseInt(page), 15); Map<String, Object> pmap=new HashMap<String,Object>(); pmap.put("pageno", pageBean.getStart()); pmap.put("pageSize", 15); Map<String, Object> bmap=new HashMap<String, Object>(); Map<String,Object> cmap=new HashMap<String,Object>(); /*pmap.put("uid", ((Users)session.getAttribute("user")).getId()); bmap.put("uid", ((Users)session.getAttribute("user")).getId());*/ if(username==null||username.equals("")){pmap.put("username", null);cmap.put("username", null);}else{pmap.put("username", username);cmap.put("username", username);} if(pwd==null||pwd.equals("")){pmap.put("pwd", null);cmap.put("pwd", null);}else{pmap.put("pwd", pwd);cmap.put("pwd", pwd);} if(cx==null||cx.equals("")){pmap.put("cx", null);cmap.put("cx", null);}else{pmap.put("cx", cx);cmap.put("cx", cx);} int total=allusersService.getCount(bmap); pageBean.setTotal(total); List<Allusers> list=allusersService.getByPage(pmap); map.put("page", pageBean); map.put("list", list); session.setAttribute("p", 1); return "allusers_list"; } // 分页模糊查询 @RequestMapping("vagueAllusersList.do") public String vagueAllusersList(@RequestParam(value="page",required=false)String page, ModelMap map,HttpSession session){ if(page==null||page.equals("")){ page="1"; } PageBean pageBean=new PageBean(Integer.parseInt(page),PageBean.PAGESIZE); Map<String, Object> pmap=new HashMap<String,Object>(); pmap.put("pageno", pageBean.getStart()); pmap.put("pageSize", pageBean.getPageSize()); Map<String, Object> bmap=new HashMap<String, Object>(); /*pmap.put("uid", ((Users)session.getAttribute("user")).getId()); bmap.put("uid", ((Users)session.getAttribute("user")).getId());*/ int total=allusersService.getCount(bmap); pageBean.setTotal(total); List<Allusers> list=allusersService.getByPage(pmap); map.put("page", pageBean); map.put("list", list); session.setAttribute("p", 2); return "queryallusers"; } @RequestMapping("deleteAllusers.do") public String deleteAllusers(int id){ allusersService.delete(id); return "redirect:allusersList.do"; } @RequestMapping("quchongAllusers.do") public void quchongAllusers(Allusers allusers,HttpServletResponse response){ Map<String,Object> map=new HashMap<String,Object>(); map.put("username", allusers.getUsername()); System.out.println("username==="+allusers.getUsername()); System.out.println("username222==="+allusersService.quchongAllusers(map)); JSONObject obj=new JSONObject(); if(allusersService.quchongAllusers(map)!=null){ obj.put("info", "ng"); }else{ obj.put("info", "username可以用!"); } response.setContentType("text/html;charset=utf-8"); PrintWriter out=null; try { out=response.getWriter(); out.print(obj); out.flush(); } catch (IOException e) { e.printStackTrace(); }finally{ out.close(); } } @RequestMapping("Alluserslogin.do") public String checkAllusersLogin(Allusers allusers, HttpSession session) { Map<String,Object> u=new HashMap<String,Object>(); System.out.println("name===" + allusers.getUsername()); u.put("username",allusers.getUsername()); //u.put("utype", "用户"); //Md5.MD5HexEncode(user.getPassword()) u.put("pwd",allusers.getPwd()); allusers = allusersService.allusersLogin(u); if (allusers != null) { session.setAttribute("username", allusers); System.out.println("username=" + allusers); session.removeAttribute("suc"); return "redirect:index.do"; } else { System.out.println("usernafwfwwme="); session.setAttribute("suc", "登录失败!用户名或密码错误!"); return "login"; } } }

目录 1 绪论 1 1.1课题背景 1 1.2课题研究现状 1 1.3初步设计方法与实施方案 2 1.4本文研究内容 2 2 系统开发环境 4 2.1 使用工具简介 4 2.2 环境配置 4 2.3 B/S结构简介 4 2.4 MySQL数据库 5 2.5 框架介绍 5 3 系统分析 6 3.1系统可行性分析 6 3.1.1经济可行性 6 3.1.2技术可行性 6 3.1.3运行可行性 6 3.2系统现状分析 6 3.3功能需求分析 7 3.4系统设计规则与运行环境 8 3.5系统流程分析 8 3.5.1操作流程 8 3.5.2添加信息流程 9 3.5.3删除信息流程 10 4 系统设计 11 4.1系统设计主要功能 11 4.2数据库设计 11 4.2.1数据库设计规范 11 4.2.2 E/R图 11 4.2.3数据表 12 5 系统实现 25 5.1系统功能模块 25 5.2后台模块 27 5.2.1管理员功能模块 27 5.2.2用户功能模块 30 6 系统测试 33 6.1功能测试 33 6.2可用性测试 33 6.3性能测试 34 6.4测试结果分析 34 7结 论 35 参考文献 36 致 谢 37

标签:

C#基于ASP.NET的人事薪资管理系统由讯客互联其他栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“C#基于ASP.NET的人事薪资管理系统