文章摘要:工程实践项目,可以修改之后作为毕设,企业员工信息管理系统,eclipse+tomcat9+mysql这是一个基于BS架构的web项目,使用了jsp+java+mysql编写,用到的技术工具版本是eclipse、mysql8、tomcat9,资源里面包含了sql文件,项目打包war文件(直接导入eclipse即可运行),毕业设计论文,答辩ppt,设计任务书,中期检查表等等。
运行效果截图:
下面是一些主要源码:
mysql:
SET FOREIGN_KEY_CHECKS=0;-- ------------------------------ Table structure for `t_admin`-- ----------------------------DROP TABLE IF EXISTS `t_admin`;CREATE TABLE `t_admin` (`userId` int(11) NOT NULL AUTO_INCREMENT,`userName` varchar(55) DEFAULT NULL,`userPw` varchar(50) DEFAULT NULL,PRIMARY KEY (`userId`)) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;-- ------------------------------ Records of t_admin-- ----------------------------INSERT INTO `t_admin` VALUES ('1', 'a', 'aa');-- ------------------------------ Table structure for `t_chuqin`-- ----------------------------DROP TABLE IF EXISTS `t_chuqin`;CREATE TABLE `t_chuqin` (`id` int(11) NOT NULL AUTO_INCREMENT,`yuefen` varchar(55) DEFAULT NULL,`tianshu` int(11) DEFAULT NULL,`yuangong_id` int(11) DEFAULT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;-- ------------------------------ Records of t_chuqin-- ----------------------------INSERT INTO `t_chuqin` VALUES ('7', '-04', '16', '20');INSERT INTO `t_chuqin` VALUES ('8', '-04', '15', '19');INSERT INTO `t_chuqin` VALUES ('11', '-05', '22', '22');INSERT INTO `t_chuqin` VALUES ('12', '-05', '21', '23');INSERT INTO `t_chuqin` VALUES ('13', '-05', '22', '23');INSERT INTO `t_chuqin` VALUES ('14', '-06', '22', '23');-- ------------------------------ Table structure for `t_gongzi`-- ----------------------------DROP TABLE IF EXISTS `t_gongzi`;CREATE TABLE `t_gongzi` (`id` int(11) NOT NULL AUTO_INCREMENT,`yuefen` varchar(55) DEFAULT NULL,`jine` int(11) DEFAULT NULL,`yuangong_id` int(11) DEFAULT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;-- ------------------------------ Records of t_gongzi-- ----------------------------INSERT INTO `t_gongzi` VALUES ('6', '-04', '2000', '20');INSERT INTO `t_gongzi` VALUES ('7', '-04', '1900', '19');INSERT INTO `t_gongzi` VALUES ('9', '-05', '2200', '22');INSERT INTO `t_gongzi` VALUES ('10', '-05', '2100', '23');INSERT INTO `t_gongzi` VALUES ('11', '-05', '2000', '20');-- ------------------------------ Table structure for `t_organization`-- ----------------------------DROP TABLE IF EXISTS `t_organization`;CREATE TABLE `t_organization` (`id` int(11) NOT NULL AUTO_INCREMENT,`name` varchar(55) DEFAULT NULL,`description` varchar(50) DEFAULT NULL,`p_id` int(11) DEFAULT NULL,`del` varchar(50) DEFAULT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;-- ------------------------------ Records of t_organization-- ----------------------------INSERT INTO `t_organization` VALUES ('1', '后勤部', '后勤部', '0', 'no');INSERT INTO `t_organization` VALUES ('2', '生产部', '生产部', '0', 'no');INSERT INTO `t_organization` VALUES ('3', '生产一部', '生产一部', '2', 'no');INSERT INTO `t_organization` VALUES ('4', '生产二部', '生产二部', '2', 'no');INSERT INTO `t_organization` VALUES ('5', '人事部', '人事部', '0', 'yes');INSERT INTO `t_organization` VALUES ('6', '组织部', '组织部', '0', 'yes');INSERT INTO `t_organization` VALUES ('7', '后勤一部', '后勤一部', '1', 'no');INSERT INTO `t_organization` VALUES ('8', '后勤二部', '后勤二部', '1', 'no');INSERT INTO `t_organization` VALUES ('10', '人事一部', '人事一部', '5', 'yes');INSERT INTO `t_organization` VALUES ('11', '11', '11', '4', 'no');INSERT INTO `t_organization` VALUES ('12', '生产三部', '生产三部', '2', 'yes');INSERT INTO `t_organization` VALUES ('13', '22', '22', '4', 'no');INSERT INTO `t_organization` VALUES ('14', '生产三部', '', '0', 'yes');INSERT INTO `t_organization` VALUES ('15', '33', '', '4', 'yes');INSERT INTO `t_organization` VALUES ('16', '生产三部', '', '0', 'yes');INSERT INTO `t_organization` VALUES ('17', '33', '', '4', 'yes');INSERT INTO `t_organization` VALUES ('18', '人事部', '', '0', 'no');INSERT INTO `t_organization` VALUES ('19', '人事部', '', '0', 'yes');INSERT INTO `t_organization` VALUES ('20', '人事部', '', '0', 'yes');INSERT INTO `t_organization` VALUES ('21', '财务部', '', '0', 'yes');INSERT INTO `t_organization` VALUES ('22', '财务一部', '', '21', 'no');INSERT INTO `t_organization` VALUES ('23', '人事一部', '', '18', 'yes');INSERT INTO `t_organization` VALUES ('24', '财务部', '', '0', 'yes');INSERT INTO `t_organization` VALUES ('25', '财务一部', '', '24', 'yes');INSERT INTO `t_organization` VALUES ('26', '财务部', '', '0', 'yes');INSERT INTO `t_organization` VALUES ('27', '财务一部', '', '26', 'yes');INSERT INTO `t_organization` VALUES ('28', 'a', '', '0', 'yes');INSERT INTO `t_organization` VALUES ('29', 'a', '', '26', 'yes');INSERT INTO `t_organization` VALUES ('30', '23', '', '0', 'yes');INSERT INTO `t_organization` VALUES ('31', '23', '', '26', 'no');INSERT INTO `t_organization` VALUES ('32', '财务部', '', '0', 'no');INSERT INTO `t_organization` VALUES ('33', '13', '', '32', 'yes');-- ------------------------------ Table structure for `t_qingjiashenqing`-- ----------------------------DROP TABLE IF EXISTS `t_qingjiashenqing`;CREATE TABLE `t_qingjiashenqing` (`id` int(11) NOT NULL AUTO_INCREMENT,`kaishishijian` varchar(50) DEFAULT NULL,`jieshushijian` varchar(50) DEFAULT NULL,`beizhu` varchar(5000) DEFAULT NULL,`yuangong_id` int(11) DEFAULT NULL,`shenhezhuangtai` varchar(50) DEFAULT NULL,`huifuxinxi` varchar(50) DEFAULT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;-- ------------------------------ Records of t_qingjiashenqing-- ----------------------------INSERT INTO `t_qingjiashenqing` VALUES ('18', '-05-10', '-05-11', '看病', '22', 'c', '<p>不同意</p>');INSERT INTO `t_qingjiashenqing` VALUES ('19', '-05-10', '-05-11', '生病', '23', 'b', '早去早回');INSERT INTO `t_qingjiashenqing` VALUES ('22', '-06-14', '-06-15', '123', '28', 'a', '');INSERT INTO `t_qingjiashenqing` VALUES ('23', null, null, null, null, null, ' vvcc ');-- ------------------------------ Table structure for `t_yuangong`-- ----------------------------DROP TABLE IF EXISTS `t_yuangong`;CREATE TABLE `t_yuangong` (`id` int(11) NOT NULL AUTO_INCREMENT,`org_id` int(11) DEFAULT NULL,`bianhao` varchar(55) DEFAULT NULL,`name` varchar(50) DEFAULT NULL,`sex` varchar(50) DEFAULT NULL,`age` varchar(50) DEFAULT NULL,`zhiwei` varchar(50) DEFAULT NULL,`shifoubumenlingdao` varchar(50) DEFAULT NULL,`loginname` varchar(50) DEFAULT NULL,`loginpw` varchar(50) DEFAULT NULL,`del` varchar(50) DEFAULT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;-- ------------------------------ Records of t_yuangong-- ----------------------------INSERT INTO `t_yuangong` VALUES ('19', '5', '01', '张三', '男', '33', '员工', 'fou', '01', '000000', 'no');INSERT INTO `t_yuangong` VALUES ('20', '3', '02', '李四', '男', '25', '员工', 'fou', '02', '000000', 'no');INSERT INTO `t_yuangong` VALUES ('22', '24', '04', '赵六', '男', '35', '经理', 'shi', '04', '111111', 'no');INSERT INTO `t_yuangong` VALUES ('23', '18', '03', '王五', '男', '23', '员工', 'fou', '03', '000000', 'no');INSERT INTO `t_yuangong` VALUES ('25', '7', '234', '23', '男', '324', '23', 'shi', '32', '000000', 'yes');INSERT INTO `t_yuangong` VALUES ('26', '8', '06', '朱', '男', '34', '员工', 'fou', '06', '000000', 'yes');INSERT INTO `t_yuangong` VALUES ('27', '18', 'er', 'yt', '男', '32', 'rt', 'fou', '34', '000000', 'yes');INSERT INTO `t_yuangong` VALUES ('28', '18', '08', '王一', '男', '34', '员工', 'fou', '08', '000000', 'no');
前后端代码:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%><%String path = request.getContextPath();%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><style type="text/css">body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;background-color: #1D3647;}.login_top_bg {background-image: url(<%=path %>/img/login-top-bg.gif);background-repeat: repeat-x;}.body {background-color: #EEF2FB;left: 0px;top: 0px;right: 0px;bottom: 0px;}.login-buttom-bg {background-image: url(<%=path %>/img/login-buttom-bg.gif);background-repeat: repeat-x;}.login-buttom-txt {font-family: Arial, Helvetica, sans-serif;font-size: 10px;color: #ABCAD3;text-decoration: none;line-height: 20px;}.login_txt {font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 25px;color: white;}.Submit {font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #629DAE;text-decoration: none;background-image: url(<%=path %>/img/Submit_bg.gif);background-repeat: repeat-x;}.login_bg {background-image: url(<%=path %>/img/login_main.png;background-repeat: repeat-x;}.login_bg2 {background-image: url(<%=path %>/img/login-root.png);background-repeat: no-repeat;background-position: right;}.admin_txt {font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #FFFFFF;text-decoration: none;height: 38px;width: 100%;position: 固定;line-height: 38px;}.login_txt_bt {font-family: Arial, Helvetica, sans-serif;font-size: 25px;line-height: 25px;color: #666666;font-weight: bold;}.admin_topbg {background-image: url(<%=path %>/img/top-right.gif);background-repeat: repeat-x;}.txt_bt {font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 25px;font-weight: bold;color: #000000;text-decoration: none;}.left_topbg {background-image: url(<%=path %>/img/content-bg.gif);background-repeat: repeat-x;}.admin_toptxt {font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #4A8091;height: 18px;width: 100%;overflow: hidden;position: 固定;}.left_bt {font-family: Arial, Helvetica, sans-serif;font-size: 14px;font-weight: bold;color: #395a7b;}.left_bt2 {font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 25px;font-weight: bold;color: #333333;}.titlebt {font-size: 12px;line-height: 26px;font-weight: bold;color: #000000;background-image: url(<%=path %>/img/top_bt.jpg);background-repeat: no-repeat;display: block;text-indent: 15px;padding-top: 5px;}.left_txt {font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 25px;color: #666666;}.left_txt2 {font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 25px;color: #000000;}.nowtable {background-color: #e1e5ee;border-top-width: 1px;border-right-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-top-style: solid;border-top-color: #bfc4ca;border-right-color: #bfc4ca;border-bottom-color: #bfc4ca;border-left-color: #bfc4ca;}.left_txt3 {font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 25px;color: #003366;text-decoration: none;}.left_ts {font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 25px;font-weight: bold;color: #FF6600;}.line_table {border: 1px solid #CCCCCC;}.sec1 {CURSOR: hand;COLOR: #000000;font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 25px;border: 1px solid #B5D0D9;background-image: url(<%=path %>/img/right_smbg.jpg);background-repeat: repeat-x;}.sec2 {FONT-WEIGHT: bold;CURSOR: hand;COLOR: #000000;font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 25px;background-color: #e2e7ed;border: 1px solid #e2e7ed;}.main_tab {COLOR: #000000;BACKGROUND-COLOR: #e2e7ed;border: 1px solid #e2e7ed;}.MM a {font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 26px;color: #666666;background-image: url(<%=path %>/img/menu_bg.gif);background-repeat: no-repeat;list-style-type: none;list-style-image: none;}a:link {font-size: 12px;line-height: 25px;color: #333333;text-decoration: none;}a:hover {font-size: 12px;line-height: 25px;color: #666666;text-decoration: none;}a:visited {font-size: 12px;line-height: 25px;color: #333333;text-decoration: none;}.MM a:link {font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 26px;color: #666666;background-image: url(<%=path %>/img/menu_bg.gif);background-repeat: no-repeat;list-style-type: none;list-style-image: none;}</style><script type='text/javascript' src='<%=path %>/dwr/interface/loginService.js'></script><script type='text/javascript' src='<%=path %>/dwr/engine.js'></script><script type='text/javascript' src='<%=path %>/dwr/util.js'></script><script language="javascript">function check1(){ if(document.ThisForm.userName.value==""){alert("请输入用户名");document.ThisForm.userName.focus();return false;}if(document.ThisForm.userPw.value==""){alert("请输入密码");document.ThisForm.userPw.focus();return false;}if(document.ThisForm.userType.value=="-1"){alert("请选择登陆身份");document.ThisForm.userType.focus();return false;}document.getElementById("indicator").style.display="block";loginService.login(document.ThisForm.userName.value,document.ThisForm.userPw.value,document.ThisForm.userType.value,callback);}function callback(data){document.getElementById("indicator").style.display="none";if(data=="no"){alert("用户名或密码错误");}if(data=="yes"){alert("通过验证,系统登录成功");window.location.href="<%=path %>/loginSuccess.jsp";}}</script></head><body><table width="100%" height="166" border="0" cellpadding="0" cellspacing="0"><tr><td height="42" valign="top"><table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" class="login_top_bg"><tr><td width="1%" height="21"> </td><td height="42"> </td><td width="17%"> </td></tr></table></td></tr><tr><td valign="top"><table width="100%" height="532" border="0" cellpadding="0" cellspacing="0" class="login_bg"><tr><td width="49%" align="right"><table width="91%" height="532" border="0" cellpadding="0" cellspacing="0" class="login_bg2"><tr><td height="138" valign="top"><table width="89%" height="427" border="0" cellpadding="0" cellspacing="0"><tr><td height="149"> </td></tr><tr><td height="80" align="right" valign="top"></td></tr><tr><td height="198" align="right" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td width="35%"> </td><td height="25" colspan="2" class="left_txt"></td></tr><tr><td> </td><td height="25" colspan="2" class="left_txt"></td></tr><tr><td> </td><td height="25" colspan="2" class="left_txt"></td></tr><tr><td> </td><td width="30%" height="40"></td><td width="35%"></td></tr></table></td></tr></table></td></tr></table></td><td width="1%" > </td><td width="50%" valign="bottom"><table width="100%" height="59" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td width="4%"> </td><td width="96%" height="38"><span class="login_txt_bt">企业员工信息管理系统</span></td></tr><tr><td> </td><td height="21"><table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table211" height="328"><tr><td height="164" colspan="2" align="middle"><FORM name="ThisForm" action="<%=path %>/adminLogin.action" method=post><table cellSpacing="0" cellPadding="0" width="100%" border="0" height="143" id="table212"><tr><td width="13%" height="38" class="top_hui_text"><span class="login_txt">用户名: </span></td><td height="38" colspan="2" class="top_hui_text"><input name="userName" class="editbox4" value="" size="20"> </td></tr><tr><td width="13%" height="35" class="top_hui_text"><span class="login_txt"> 密 码: </span></td><td height="35" colspan="2" class="top_hui_text"><input class="editbox4" type="password" size="20" name="userPw"><img src="<%=path %>/img/luck.gif" width="19" height="18"> </td></tr><tr><td width="13%" height="35" ><span class="login_txt">登录身份:</span></td><td height="35" colspan="2" class="top_hui_text"><select class="INPUT_text" name="userType"><option value="-1">请选择</option><option value="0">管理员</option><option value="1">员 工</option></select></td></tr><tr><td height="35" > </td><td width="80%" height="35" ><input name="button" type="button" id="Submit" value="登 陆" onClick="check1()"> <input name="cs" type="reset" class="button" id="cs" value="重 置"><img id="indicator" src="<%=path %>/img/loading.gif" style="display:none"/></td><td width="20%"></td></tr></table><br></form></td></tr><tr><td width="433" height="164" align="right" valign="bottom"></td><td width="57" align="right" valign="bottom"> </td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
注意: 代码太多,完整版代码打包+ppt+论文+sql等等可以在我的资源那里下载哦