作者主页:源码空间站2022
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
项目介绍
本项目为后台管理系统;
管理员角色包含以下功能:
登录,首页,考勤记录增删改查,假期申请记录增删改查,出差申请记录增删改查,加班申请记录增删改查,调休申请,考勤查询,查看考勤详情,员工管理增删改查等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.数据库:MySql 5.7版本;
6.是否Maven项目:否;
技术栈
HTML+JSP+CSS+JavaScript+LayUI+Servlet+Mysql
使用说明
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中c3p0-config.xml与utils/C3P0Utils.java配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入http://localhost:8080/kaoqin 登录
管理员账号/密码:admin/123456
运行截图
相关代码
TiaoxiushenqingList
package cn.itheima.web;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.itheima.domain.PageBean;
import cn.itheima.domain.Tiaoxiushenqing;
import cn.itheima.service.TiaoxiushenqingService;
/**
* Servlet implementation class TiaoxiushenqingList
*/
public class TiaoxiushenqingList extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public TiaoxiushenqingList() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
TiaoxiushenqingService service = new TiaoxiushenqingService();
String currentPageStr =request.getParameter("currentPage");
if(currentPageStr==null) currentPageStr="1";
int currentPage = Integer.parseInt(currentPageStr);
int currentCount=4;
Long count = null;
PageBean<Tiaoxiushenqing> pageBean = null;
List<Tiaoxiushenqing> tiaoxiushenqingList = null;
try {
pageBean = service.findPageBean(currentPage,currentCount);
tiaoxiushenqingList = service.findAllTiaoxiushenqing();
count = service.Count();
request.setAttribute("pageBean", pageBean);
request.setAttribute("tiaoxiushenqingList", tiaoxiushenqingList);
request.setAttribute("count", count);
request.getRequestDispatcher("view/views/kaoqin/tiaoxiushenqing.jsp").forward(request, response);
}catch (SQLException e) {
e.printStackTrace();
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
如果也想学习本系统,下面领取。关注并回复:082jsp