JSP Personnel Information Management System

Record learning every day, have a good mood every day. * ^ _ ^ *

Thinking today, to complete a JSP-based development and implementation of project personnel information management system, which features need to achieve?
Such common items are described below:
using currently very popular B / S architecture, as developed in JSP technology relying on SSM technical framework, mysql database to establish the system.
SSM (MYECLIPSE) framework for the development and implementation of JSP and personnel information management system based on the idea of using the MVC can greatly reduce duplication of effort. And SSM (MYECLIPSE) framework with the best development tools is MYECLIPSE. MYECLIPSE integrates a large number of plug-ins, you can better use the SSM (MYECLIPSE) for development projects, while making more effective project development.
Through careful analysis of the JSP-based development and realization of personnel information management system can be drawn JSP personnel information management system development and implementation of the system is based on a background item.
In such a project, the system login role is essential for each login role is set account and password. To ensure the system can log in normal use. SSM (MYECLIPSE) contained in the project administrator login role, employees.
In the function of the system, the wage is an important table. This table makes up the staff association. Wages of employees in the payroll and employee mingzi corresponding field, wages and employee id id corresponding to the field staff
, they have a relationship. In the function of the system, the employee is an important table. This table makes up the associated department. The corresponding field in the employee table mingzi departmental employees, department id id field corresponds with the department staff
, they have a relationship.

Summary drawn JSP-based development and implementation of project personnel information management system of all data: administrator (admin), wages (gongzi), employees (yuangong), department (bumen)

Based administrator table Development and Implementation of JSP personnel information management system

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | administrator the above mentioned id 
username |  VARCHAR ( 255 ) |  | account 
password |  VARCHAR ( 255 ) |  | password

 

Based on the development and implementation of payroll JSP personnel information management system

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | pay the above mentioned id 
yuangong |  VARCHAR ( 255 ) |  | staff 
yuangongid |  VARCHAR ( 255 ) |  | staff of the above mentioned id 
yuefen |  VARCHAR ( 255 ) |  | month 
jichugongzi |  VARCHAR ( 255 ) |  |Base salary 
Ticheng |  VARCHAR ( 255 ) |  | royalty

 

Based on employee development and implementation of JSP table of Personnel Information Management System

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | staff of the above mentioned id 
mingzi |  VARCHAR ( 255 ) |  | name 
username |  VARCHAR ( 255 ) |  | account 
password |  VARCHAR ( 255 ) |  | password 
bumen |  VARCHAR ( 255 ) |  |Department 
bumenid |  VARCHAR ( 255 ) |  | department id

 

Based on the department table of JSP development and implementation of personnel information management system

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | departments the above mentioned id 
mingzi |  VARCHAR ( 255 ) |  | name

 

 

 

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------

-- ----------------------------

-- Table structure for ggjyJSPdrsxxglxtdkfysx

-- ----------------------------

DROP TABLE IF EXISTS `t_admin`;

CREATE TABLE `t_admin` (`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '管理员id',`username` VARCHAR(255) DEFAULT NULL COMMENT '账号',`password` VARCHAR(255) DEFAULT NULL COMMENT '密码',PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='管理员';

-- ----------------------------

DROP TABLE IF EXISTS `t_gongzi`;

CREATE TABLE `t_gongzi` (`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '工资id' , `Yuangong` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' employees ' ,` yuangongid` INT ( 11 ) the DEFAULT  NULL the COMMENT ' staff of the above mentioned id ' , `yuefen` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' month ' ,` jichugongzi` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' base salary ' , `ticheng` VARCHAR ( 255) DEFAULT NULL COMMENT '提成',PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='工资';

-- ----------------------------

DROP TABLE IF EXISTS `t_yuangong`;

CREATE TABLE `t_yuangong` (`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '员工id',`mingzi` VARCHAR(255 ) the DEFAULT  NULL the COMMENT ' name ' , `username` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' account ' ,` password` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' password ' , `bumen` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' department ' , `bumenid` INT ( 11 ) the DEFAULT  NULL the COMMENT'部门id',PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='员工';

-- ----------------------------

DROP TABLE IF EXISTS `t_bumen`;

CREATE TABLE `t_bumen` (`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '部门id',`mingzi` VARCHAR(255) DEFAULT NULLThe COMMENT ' name ' , PRIMARY  KEY ( `id`) 

) ENGINE = MyISAM the DEFAULT CHARSET = utf8 the COMMENT = ' department ' ;

 

 

 

Add department modules:

There is added to the system department function, you can jump to the function module by clicking the Add department, the function module, fill in the corresponding information department. Contains information department name, after all the information filled out by the post method to submit data to tianjiabumen.action, the address will respond in the server tianjiabumenact method bumenController in class. Response result, for all the acquired information sectors, a package bumen class, bumendao bumenController using the insert method defined in the class, the sector data is inserted into bumen database table. And gives the user message, add a department is successful, save the information to the message request, this information will be shown on the page. The part of the core code is as follows:

Through the pages of the insert method bumendao transport sector added to the database bumendao.insert (bumen);

Add the information department of success, to save the message request, the user is given prompt request.setAttribute in the page ( "message", "add the department successfully");

Return sector management interface

return "forward:/tianjiabumen.action";

Query module department:

In the background is defined sector inquiry module, clicking sector management sidebar, you can jump to the department management interface. Bumenguanli response is defined by bumenController sector query module in the page. Check out all the information in bumenguanli, the return cycle through pages. Query method selectByexample method bumendao in. The part of the core code is as follows:

Generating a sector-based sample, defined by the example query BumenExample example = new BumenExample ();

Check out all the information department List bumenall = bumendao.selectByExample (example) by selectByExample method of bumendao;

The department information stored in the request, on display request.setAttribute ( "bumenall", bumenall) page by foreach method;

Return sector management interface

return "forward:/bumenguanli.action";

Modify department modules:

Click the Edit button, you can jump to the department to modify the page. In the department to modify the page, it will initialize all of the information in the sector, and the information is filled with correspondence to the corresponding edit field. After completion of editing sector information, page by post method of encapsulating data to a sector entities, passed into the bumenController. In xiugaibumen the reception, after reception is completed, the call updateByPrimaryKeySelective method bumenMapper modified. The part of the code as follows:

Corresponding modified by modifying the method according bumendao id sector bumendao.updateByPrimaryKeySelective (bumen);

The department successfully modify the information, save it to request the message, the user is given prompt request.setAttribute in the page ( "message", "modify the information department of success");

Return sector management interface

return "forward:/bumenguanli.action";

Delete the department modules:

Implementation remove a department function is, by clicking the Delete button department, to get the server to initiate the request. Request includes information sector id using int accept the id, and the id of incoming deleteByPrimaryKey method bumendao in the bumenController. The role of this method is to delete the corresponding departments under id. Finally, remove the message department successful return to the page, the part of the core code is as follows:

Delete by deleting the corresponding method according bumendao id sector bumendao.deleteByPrimaryKey (id);

The department successfully delete information stored in the message request, give the user prompt request.setAttribute in the page ( "message", "Delete department successfully");

Return sector management interface

return "forward:/bumenguanli.action";

Guess you like

Origin www.cnblogs.com/xkummye/p/11615927.html