原文:java人事管理系统源代码---毕业实习(已加入数据库文件)
源代码下载地址:http://www.zuidaima.com/share/1550463722998784.htm
采用MVC模式编写的人事管理系统,我的毕业实习,今天检查,今天开源
项目截图
java build path
Project Facets
hr.sql
/* MySQL Data Transfer Source Host: localhost Source Database: hr Target Host: localhost Target Database: hr Date: 2013/9/9 星期一 9:20:54 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for administrator -- ---------------------------- CREATE TABLE `administrator` ( `admin_id` int(20) NOT NULL auto_increment, `admin_password` varchar(20) default NULL, `admin_username` varchar(20) default NULL, PRIMARY KEY (`admin_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for staff -- ---------------------------- CREATE TABLE `staff` ( `p_id` int(11) NOT NULL auto_increment, `p_name` varchar(20) default NULL, `sex` varchar(5) default NULL, `degree` varchar(20) default NULL, `department` varchar(20) default NULL, `position` varchar(20) default NULL, `state` varchar(20) default NULL, `user_name` varchar(20) default NULL, `user_password` varchar(20) default NULL, PRIMARY KEY (`p_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for staffagreement -- ---------------------------- CREATE TABLE `staffagreement` ( `agreement_id` int(11) NOT NULL auto_increment, `p_id` int(11) default NULL, `agreement_btime` varchar(20) default NULL, `agreement_etime` varchar(20) default NULL, `position` varchar(20) default NULL, `agreement_content` varchar(500) default NULL, PRIMARY KEY (`agreement_id`), KEY `FK_Relationship_4` (`p_id`), CONSTRAINT `FK_Relationship_4` FOREIGN KEY (`p_id`) REFERENCES `staff` (`p_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for staffalter -- ---------------------------- CREATE TABLE `staffalter` ( `alter_id` int(11) NOT NULL auto_increment, `p_id` int(11) default NULL, `p_name` varchar(20) default NULL, `alter_time` varchar(20) default NULL, `alter_bstate` varchar(20) default NULL, `alter_estate` varchar(20) default NULL, `alter_type` varchar(20) default NULL, `alter_content` varchar(100) default NULL, PRIMARY KEY (`alter_id`), KEY `FK_Relationship_5` (`p_id`), CONSTRAINT `FK_Relationship_5` FOREIGN KEY (`p_id`) REFERENCES `staff` (`p_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for staffcert -- ---------------------------- CREATE TABLE `staffcert` ( `cer_id` int(11) NOT NULL auto_increment, `grade_id` int(11) default NULL, `cer_name` varchar(20) default NULL, `cer_date` varchar(20) default NULL, PRIMARY KEY (`cer_id`), KEY `FK_Relationship_10` (`grade_id`), CONSTRAINT `FK_Relationship_10` FOREIGN KEY (`grade_id`) REFERENCES `traingrade` (`grade_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for stafffile -- ---------------------------- CREATE TABLE `stafffile` ( `file_id` int(11) NOT NULL auto_increment, `p_id` int(11) default NULL, `file_name` varchar(20) default NULL, `file_abstract` varchar(100) default NULL, `reward_note` varchar(500) default NULL, `experience` varchar(500) default NULL, PRIMARY KEY (`file_id`), KEY `FK_Relationship_6` (`p_id`), CONSTRAINT `FK_Relationship_6` FOREIGN KEY (`p_id`) REFERENCES `staff` (`p_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for train -- ---------------------------- CREATE TABLE `train` ( `train_name` varchar(40) default NULL, `train_id` int(11) NOT NULL auto_increment, `type_code` varchar(20) default NULL, `train_btime` varchar(20) default NULL, `train_etime` varchar(20) default NULL, `train_expense` varchar(20) default NULL, `train_location` varchar(20) default NULL, `train_host` varchar(20) default NULL, `train_master` varchar(20) default NULL, PRIMARY KEY (`train_id`), KEY `FK_Relationship_9` (`type_code`), CONSTRAINT `FK_Relationship_9` FOREIGN KEY (`type_code`) REFERENCES `traintype` (`type_code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for traingrade -- ---------------------------- CREATE TABLE `traingrade` ( `grade_id` int(11) NOT NULL auto_increment, `train_id` int(11) NOT NULL, `p_id` int(11) NOT NULL, `grade` int(11) default NULL, `subject` varchar(20) default NULL, `get_cer` varchar(20) default NULL, PRIMARY KEY (`grade_id`), KEY `FK_Relationship_7` (`p_id`), KEY `FK_Relationship_8` (`train_id`), CONSTRAINT `FK_Relationship_7` FOREIGN KEY (`p_id`) REFERENCES `staff` (`p_id`), CONSTRAINT `FK_Relationship_8` FOREIGN KEY (`train_id`) REFERENCES `train` (`train_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for traintype -- ---------------------------- CREATE TABLE `traintype` ( `type_name` varchar(10) default NULL, `type_code` varchar(20) NOT NULL, `type_info` varchar(200) default NULL, PRIMARY KEY (`type_code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records -- ---------------------------- INSERT INTO `administrator` VALUES (‘1‘, ‘1234‘, ‘james‘); INSERT INTO `staff` VALUES (‘1‘, null, null, null, null, null, null, null, null); INSERT INTO `staff` VALUES (‘2‘, null, null, null, null, null, null, null, null); INSERT INTO `staff` VALUES (‘3‘, null, null, null, null, null, null, null, null); INSERT INTO `staff` VALUES (‘14‘, ‘sdas‘, ‘dsada‘, ‘dsadas‘, ‘dasda‘, ‘dasda‘, ‘dasd‘, ‘dsadasd‘, ‘dasdasd‘); INSERT INTO `staff` VALUES (‘15‘, ‘qq‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staff` VALUES (‘18‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staff` VALUES (‘19‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staff` VALUES (‘20‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staff` VALUES (‘21‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staff` VALUES (‘22‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staff` VALUES (‘23‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staff` VALUES (‘24‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staff` VALUES (‘45‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staff` VALUES (‘47‘, ‘‘, ‘‘, ‘a‘, ‘‘, ‘x‘, ‘‘, ‘a‘, ‘‘); INSERT INTO `staff` VALUES (‘48‘, ‘a‘, ‘abc‘, ‘abc‘, ‘abc‘, ‘xbc‘, ‘abc‘, ‘abc‘, ‘a‘); INSERT INTO `staff` VALUES (‘52‘, ‘zhaoxin‘, ‘male‘, ‘asd‘, ‘dasd‘, ‘dada‘, ‘dad‘, ‘dad‘, ‘dada‘); INSERT INTO `staffagreement` VALUES (‘1‘, ‘14‘, ‘dsadas‘, ‘dasds‘, ‘dasda‘, ‘dasdad‘); INSERT INTO `staffalter` VALUES (‘21‘, ‘15‘, ‘1‘, ‘sda‘, ‘dsa‘, ‘dsa‘, ‘dsad‘, ‘dsad‘); INSERT INTO `staffalter` VALUES (‘22‘, ‘14‘, ‘sdas‘, ‘sd‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staffalter` VALUES (‘23‘, ‘14‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staffalter` VALUES (‘26‘, ‘14‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staffalter` VALUES (‘27‘, ‘14‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staffalter` VALUES (‘28‘, ‘14‘, ‘sw‘, ‘aaaaaqqqqqzzzzzddddx‘, ‘sw‘, ‘dsw‘, ‘sw‘, ‘sw‘); INSERT INTO `staffalter` VALUES (‘29‘, ‘14‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staffalter` VALUES (‘30‘, ‘14‘, ‘‘, ‘sa‘, ‘‘, ‘‘, ‘sa‘, ‘‘); INSERT INTO `staffalter` VALUES (‘31‘, ‘14‘, ‘‘, ‘sa‘, ‘‘, ‘‘, ‘sa‘, ‘‘); INSERT INTO `staffalter` VALUES (‘32‘, ‘14‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staffalter` VALUES (‘33‘, ‘14‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staffalter` VALUES (‘34‘, ‘14‘, ‘sa‘, ‘sa‘, ‘sa‘, ‘sa‘, ‘sa‘, ‘sa‘); INSERT INTO `staffalter` VALUES (‘35‘, ‘14‘, ‘21‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staffalter` VALUES (‘36‘, ‘14‘, ‘sasa‘, ‘sa‘, ‘sa‘, ‘sa‘, ‘sa‘, ‘sa‘); INSERT INTO `staffalter` VALUES (‘37‘, ‘14‘, ‘wq‘, ‘wq‘, ‘wq‘, ‘wq‘, ‘wq‘, ‘‘); INSERT INTO `staffalter` VALUES (‘38‘, ‘14‘, ‘sa‘, ‘sa‘, ‘sa‘, ‘sa‘, ‘sa‘, ‘sa‘); INSERT INTO `staffalter` VALUES (‘39‘, ‘14‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staffalter` VALUES (‘40‘, ‘14‘, ‘2‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staffalter` VALUES (‘41‘, ‘14‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘); INSERT INTO `staffalter` VALUES (‘42‘, ‘14‘, ‘sa‘, ‘sasa‘, ‘sa‘, ‘sa‘, ‘sa‘, ‘sa‘); INSERT INTO `staffalter` VALUES (‘43‘, ‘14‘, ‘a‘, ‘fdsfsfsdf‘, ‘fdsfdsf‘, ‘fsdfd‘, ‘fsdf‘, ‘fdsf‘); INSERT INTO `staffalter` VALUES (‘44‘, ‘14‘, ‘a‘, ‘fdsfsfsdf‘, ‘fdsfdsf‘, ‘fsdfd‘, ‘fsdf‘, ‘fdsf‘); INSERT INTO `staffalter` VALUES (‘45‘, ‘14‘, ‘a‘, ‘sa‘, ‘sa‘, ‘sa‘, ‘sa‘, ‘sa‘); INSERT INTO `staffalter` VALUES (‘46‘, ‘14‘, ‘a‘, ‘dazui‘, ‘dz‘, ‘dz‘, ‘dzd‘, ‘dz‘); INSERT INTO `staffcert` VALUES (‘4‘, ‘3‘, ‘33‘, ‘333‘); INSERT INTO `staffcert` VALUES (‘5‘, ‘6‘, ‘6‘, ‘20136‘); INSERT INTO `staffcert` VALUES (‘6‘, ‘1‘, ‘1‘, ‘1‘); INSERT INTO `staffcert` VALUES (‘7‘, ‘3‘, ‘3‘, ‘3‘); INSERT INTO `staffcert` VALUES (‘8‘, ‘3‘, ‘4‘, ‘3‘); INSERT INTO `stafffile` VALUES (‘1‘, ‘14‘, ‘da‘, ‘dasdd‘, ‘dada‘, ‘saddasd‘); INSERT INTO `train` VALUES (‘0.0‘, ‘2‘, ‘444‘, ‘0.0‘, ‘0.0‘, ‘0.0‘, ‘0.0‘, ‘0.0‘, ‘0.0‘); INSERT INTO `train` VALUES (‘james‘, ‘3‘, ‘233‘, ‘james‘, ‘james‘, ‘james‘, ‘james‘, ‘james‘, null); INSERT INTO `train` VALUES (‘name‘, ‘7‘, ‘233‘, ‘btime‘, ‘etime‘, ‘expense‘, ‘location‘, ‘host‘, null); INSERT INTO `traingrade` VALUES (‘1‘, ‘2‘, ‘1‘, null, null, ‘Yes‘); INSERT INTO `traingrade` VALUES (‘3‘, ‘2‘, ‘1‘, null, null, ‘Yes‘); INSERT INTO `traingrade` VALUES (‘6‘, ‘7‘, ‘2‘, ‘8‘, ‘8‘, ‘Yes‘); INSERT INTO `traingrade` VALUES (‘8‘, ‘7‘, ‘1‘, ‘100‘, ‘zhangjiaxi‘, ‘No‘); INSERT INTO `traintype` VALUES (‘222‘, ‘233‘, ‘0.0.0.0‘); INSERT INTO `traintype` VALUES (‘323‘, ‘444‘, ‘4324‘); INSERT INTO `traintype` VALUES (‘1231‘, ‘dsada‘, ‘32131‘); -- ---------------------------- -- Trigger structure for addcert -- ---------------------------- DELIMITER ;; CREATE TRIGGER `addcert` AFTER INSERT ON `staffcert` FOR EACH ROW update traingrade set get_cer ="Yes" where traingrade.grade_id = new.grade_id;; DELIMITER ; -- ---------------------------- -- Trigger structure for deleinfo -- ---------------------------- DELIMITER ;; CREATE TRIGGER `deleinfo` AFTER DELETE ON `staffcert` FOR EACH ROW update traingrade set get_cer= "No" where traingrade .grade_id not in (select grade_id from staffcert );; DELIMITER ;
java人事管理系统源代码---毕业实习(已加入数据库文件)
原文地址:http://blog.csdn.net/springmvc_springdata/article/details/45113735