javaweb rail traffic inquiry system

Today we will analyze a query javaweb rail transportation system based on transport Railway Bureau discusses the importance of scheduling query system, introduced the principle and the advantages of Java Web Start technology, and real-time operating with Railway Bureau inquiry system diagram of an example the specific implementation method, a detailed description of the technical requirements for the environment, and the setting procedure is given Web site .. In this paper, a very popular B / S architecture of current to develop as JAVA technology relying on SSM technical framework, mysql database to establish the system.
Based on the railway project using the framework javaweb transportation inquiry system for the SSM (MYECLIPSE), the choice of development tools for MYECLIPSE. Javaweb railway transportation query system based on a background project.
In order to complete rail transportation javaweb based query system, we first need to analyze the needs of the system. Javaweb a railway transportation query system based on user roles should include administrator. In order to allow the user a smooth landing system to complete the related operations, landing roles you need to set up an account and password for each field.

Summary drawn javaweb railway transportation query system based on all project data: administrator (admin), Railway (tielu), public transportation (gongjiao)

Based on administrator-table query systems javaweb railway traffic

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

 

Table query based on the railway system of railway traffic javaweb

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | railway the above mentioned id 
Qidian |  VARCHAR ( 255 ) |  | start of 
Zhongdian |  VARCHAR ( 255 ) |  | end 
tujindian |  VARCHAR ( 255 ) |  | waypoint 
yingyeshijian |  VARCHAR ( 255 ) |  | Hours

 

Bus-table query based systems javaweb railway traffic

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | bus the above mentioned id 
Qidian |  VARCHAR ( 255 ) |  | start of 
Zhongdian |  VARCHAR ( 255 ) |  | end 
tujingdian |  VARCHAR ( 255 ) |  | waypoint 
yingyeshijian |  VARCHAR ( 255 ) |  | Hours

 

 

SET FOREIGN_KEY_CHECKS=0;

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

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

-- Table structure for ggjyjavawebdtljtcxxt

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

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_tielu`;

CREATE TABLE `t_tielu` (`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '铁路id' , `Qidian` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' starting point ' ,` zhongdian` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' end ' , `tujindian` VARCHAR ( 5000 ) the DEFAULT  NULL the COMMENT ' waypoint ' ,` yingyeshijian` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' hours ' , a PRIMARY  KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='铁路';

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

DROP TABLE IF EXISTS `t_gongjiao`;

CREATE TABLE `t_gongjiao` (`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '公交id',`qidian` VARCHAR(255) DEFAULT NULL COMMENT '起点',`zhongdian` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' end ' , `tujingdian` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' waypoint ' ,` yingyeshijian` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' Hours ' , a PRIMARY  KEY ( `id`) 

) ENGINE = MyISAM the DEFAULT the CHARSET = UTF8 the COMMENT = ' bus ' ;

 

 

Add railroad modules:

Defined tianjiatieluact page to receive incoming railroad parameters, defined as tielu in tieluController in. Tielu which contains fields: start, end, waypoints, hours of use tianjiatieluact the railway objects stored in the database, insert method defined in tieluMapper, the matching database insert into tielu statement to achieve the railway data stored in the database operating. The part of the core code is as follows:

The transmission of pages rail insert method by adding to the database tieludao tieludao.insert (tielu);

Add the successful railway information, save the message request, the user is given the page prompt request.setAttribute ( "message", "add the railway success");

Returns the railway Management Interface

return "forward:/tianjiatielu.action";

Railway inquiry module:

Railway query module defined in the background, in the side bar, click on railway management, you can jump to the railway management interface. In this page tieluController defined tieluguanli response railway query module. Check out all the information in tieluguanli, the return cycle through pages. Query method selectByexample method tieludao in. The part of the core code is as follows:

Generating class railway sample, defined by the example query TieluExample example = new TieluExample ();

Check out all the Railway Information List tieluall = tieludao.selectByExample (example) by selectByExample method of tieludao;

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

Returns the railway Management Interface

return "forward:/tieluguanli.action";

Modify railway module:

After filling out the page modify information, click the Modify button to submit data to xiugaitielu, the package is a railway

Use update methods to modify the railway information, synchronize data to the database, to complete the modification operation.

Modify the definition of a successful message, modifying railway successful, and save it to request specific code is as follows:

The corresponding rail tieludao.updateByPrimaryKeySelective modified by modifying the method tieludao id's (tielu);

The amendment is successful railway information, saved to the message request, the user is given prompt request.setAttribute in the page ( "message", "Modify railway information successfully");

Returns the railway Management Interface

return "forward:/tieluguanli.action";

Delete rail modules:

Delete railway function is implemented in tieluController, the implementation is shanchutielu. shanchutielu.action the page by the get method? Id form will be deleted railway id uploaded to the server in response to a corresponding method, call deleteByPrimaryKey method tieludao in complete deletion. Will delete successful message is returned to the page, complete the operation to delete data. The part of the core code:

Delete by deleting the corresponding method according tieludao id railway tieludao.deleteByPrimaryKey (id);

The railway information deleted successfully saved to the message request, the user is given prompt request.setAttribute in the page ( "message", "delete the railway success");

Returns the railway Management Interface

return "forward:/tieluguanli.action";

 

Source download

Guess you like

Origin www.cnblogs.com/ygzswdy/p/11687126.html