当前位置:网站首页>Material management system based on SSM (source code + document + database)

Material management system based on SSM (source code + document + database)

2022-06-24 20:22:00 Lao Yang hasn't lost his hair

Catalog

Abstract

One 、 Demand analysis

Two 、 Document directory

3、 ... and 、 Functional requirements analysis

Four 、 Non functional requirements analysis

5、 ... and 、 Project database design

  6、 ... and 、 The main function modules are realized

6.1  Login section

6.1.1 Background login core authentication code

6.1.2 The foreground login jumps to the core code

6.2 Homepage module

6.3 Administrator management module

6.4 Stock in / stock out module

6.5 Add large and small class modules

6.6 Add supplier

6.7 Query function

​6.8 Receipt / issue grouping query

6.9  Derived data

7、 ... and 、 The system test

7.1 The test method

8、 ... and 、 Conclusion and Prospect

8.1 Conclusion

8.2 Future prospects


Abstract

The development of the system project is mainly to enrich the front-end pages and cooperate with some background functions , Mainly including login function , Homepage section 、 Outbound section 、 Warehousing section 、 Modify the section 、 New product warehousing section . After demand analysis , On this basis, the overall design scheme of the system and the detailed design of each module are put forward , The design of each page is designed in detail .

The website system uses SSM frame 、Eclipse Editor 、 Data storage used mysql, It is hoped that this system can bring convenience of information sharing to people's life as designed , And record the good moments of life .

This system was developed by bloggers on 2022 year 6 month 18 Daily test , The system works perfectly , Although only the original form displays , But its function is as powerful as a website with beautification .

  The source code is at the end of the article .


One 、 Demand analysis

Understand from the theoretical basis of software engineering , Requirements analysis is the most important stage in the whole software life cycle . The quality of software requirements analysis report has a far-reaching impact on the early functional design, later maintenance and expansion of software development , Its existence is of great significance . High quality software requirements analysis will get twice the result with half the effort in the whole software development process , There's a good saying ,“ Sharpening a knife never misses a woodcutter ”. If the user requirements and product function requirements cannot be accurately determined in the early stage , Subsequent requirements modification will lead to a certain degree or even huge losses .

Two 、 Document directory

Document structure standard , Meet the design requirements .

3、 ... and 、 Functional requirements analysis

Too many functions and words , Therefore, only module titles are listed below , Actual reference document page 3 Chapter .

Four 、 Non functional requirements analysis

Too many functions and words , Therefore, only module titles are listed below , Actual reference document page 3 Chapter .

5、 ... and 、 Project database design

The overall E-R chart

  6、 ... and 、 The main function modules are realized

6.1  Login section

The logic implementation of login has been introduced in the previous system flow , Login verification failed redirect back to login page , If the login verification is successful, you will jump to the homepage .

 

6.1.1 Background login core authentication code

// User login status judgment 
Admin admin2 = as.selectOne(admin);
		String name = admin.getName();
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		if(admin2==null){// It means that we can't find , Login failed 
			admin2 = as.selectByName(name);
			if(admin2==null){// User name error 
				model.addAttribute("loginError"," The username does not exist ");
			}else {
				if(admin2.getCount()==0){// The first login failed , Record the time when the first login failed 
					as.updateFirstErrorLog(name);
					model.addAttribute("loginError"," Wrong password ");// Send data to jsp Interface 
				}else {
					Date now=sdf.parse(sdf.format(new Date()));
					Date date1=sdf.parse(admin2.getTime());
					System.out.println(now);
					System.out.println(date1);
					System.out.println(now.getTime()-date1.getTime()<24*60*60*1000);
					model.addAttribute("loginError"," Wrong password ");// Send data to jsp Interface 
					if(admin2.getCount()>0&&admin2.getCount()<4){// Login password error ,count Add one 
						as.updateErrorCount(name);
						model.addAttribute("loginError"," Wrong password ");// Send data to jsp Interface 
					}
	if(now.getTime()-date1.getTime()<24*60*60*1000&&admin2.getCount()==4){
						as.updateState(name);// Set up count by 5, And set the status to frozen , Set up time Is the currently frozen time 
						model.addAttribute("loginError"," Wrong password in one day 5 Time , The account is frozen for one day ");// Send data to jsp Interface 
					}
					if(admin2.getCount()==5&&now.getTime()-date1.getTime()<24*60*60*1000){
						model.addAttribute("loginError"," The user name is incorrect due to multiple password entries , Has been frozen ");
					}
				}
			}
			return "forward:/login.jsp";
		}if(admin2.getState()==-1) {// The account is frozen 
			Date now=sdf.parse(sdf.format(new Date()));
			Date date1=sdf.parse(admin2.getTime());
			System.out.println(now);
			System.out.println(date1);
			System.out.println(now.getTime()-date1.getTime()<24*60*60*1000);
			if(now.getTime()-date1.getTime()>24*60*60*1000){
				as.updateErrorState(name);// Frozen for more than one day , Automatic thawing 
			}
			else{
				model.addAttribute("loginError"," User is frozen ");// Send data to jsp Interface 
				return "forward:/login.jsp";
			}
		}
		as.initLog(name);
		model.addAttribute("admin",admin2); 
		request.getSession().setAttribute("admin",admin2);

6.1.2 The foreground login jumps to the core code

<form action="${pageContext.request.contextPath }/login.do" method="post" method="post" onsubmit="return checkForm()">
   				<table >
   					<tr>
   						<td><font color="white"> user name :</font></td>
   						<td><input id="userName"  value="${loginName }" name="name" size="20"/></td>
   					</tr>
   					<tr>
   						<td><font color="white"> The secret &nbsp;&nbsp;&nbsp;&nbsp; code :</font></td>
   						<td><input id="pwd" type="password" name="pwd" size="20"/></td>
   					</tr>
   					<!-- <tr>
   						<td> Verification Code :</td>
   						<td><input id="userName" name="userName" size="4"/>
   						<img  src="image.jsp" alt="" onclick="this.src='image.jsp?id='+Math.random()">
   						</td>
   					</tr> -->
   					<tr><td></td></tr>
   					<tr>
   						<td colspan="2" align="center">
   						<input type="submit" value=" Sign in "/>
   						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   						<input type="reset" value=" Reset "/>
   						</td>
   					</tr>	
   				</table>
			</form>

The rest of the code will not be explained one by one , Go straight to the renderings , Please refer to the design documents for details .

6.2 Homepage module

 6.3 Administrator management module

Addition, deletion, modification and query can be realized

6.4 Stock in / stock out module

 

 6.5 Add large and small class modules

 

 6.6 Add supplier

 6.7 Query function

 

 6.8 Receipt / issue grouping query

6.9  Derived data

7、 ... and 、 The system test

7.1 The test method

User interface testing

In accordance with ui After the front page of the design drawing is displayed , You can conduct a wave of user interface testing according to the requirements and design drawings , Check whether the front-end page meets customer requirements , Whether the combination is perfect , A good sense of experience is not unexpected input Whether the box, etc. meets the input condition limit

unit testing

Check and verify the minimum verifiable units such as modules or encapsulated methods in the scripting language , Unit tests can detect problems as early as possible , But unit testing has some limitations , The test scope is not extensive or comprehensive , Cannot overwrite all execution paths . Therefore, integration testing is required .

Performance testing

Performance test usually includes load test and stress test .

Performance test is usually used to test whether the system can meet the required performance indicators under repeated use , It can also be used to detect whether there will be memory leakage during the operation of the system .

regression testing

When the system is about finished , The whole project shall be completely tested for the project system according to the test plan and recorded and proposed bug feedback , In solving the corresponding bug when , Then we can carry out the regression test .

The acceptance test     

      After the regression test , Before the project system of this version is ready to be officially sealed , Carry out the last overall top-down detailed test , The test steps are mainly It's for the needs of users 、 Formal testing of business processes , To determine whether the system can meet the acceptance criteria .

Browser Test

(1) Test purpose : Because the project focuses on page design and foreground interaction , So browser testing is the top priority of testing .

    (2) Test object : Test the top seven browsers on the Internet

    (3) The test results are shown in the table 6-1.

8、 ... and 、 Conclusion and Prospect

In the context of the accelerated era of wide coverage of the Internet , The pace of people's life is also getting faster and faster , This system based on inventory management, no matter when it is designed , Or until now, small finished products , Its original intention and significance are to bring people some creative and non malignant profit inventory management platforms on the premise of meeting the requirements of contemporary people's life , I hope it can bring a different clean flow to the warehouse keepers .

8.1 Conclusion

From thinking about the direction of your project to today's small achievements , Come all the way , This is a learning process . In a sense , This is the first step from the design concept to the first draft of requirements 、 Overall design of the project 、 Page design 、 Background function requirements , Then finish one by one and then go to the backstage to find bug Change bug To the final conclusion . I learned a lot of excellent documents along the way , Beautiful front-end page design , And try to learn and contact the background and database that you are not good at . secondly , The whole process of the thesis makes me review many courses of study in the university again , It also gives me an opportunity to specialize in and use the fields I have not been involved in . To make a long story short , This is a learning journey , I learned a lot along the way , I have also made a lot of progress .

8.2 Future prospects

Up to now, our project has had a 1.0 Version of the , Basically, it can meet the needs of users , But with the continuous development of the Internet and in order to better advance in this ever-changing era , Our system needs constant optimization 、 to update 、 iteration , Constantly meet new needs . It's a long process , But as long as we don't forget the original design intention of this project , Our project is bound to get better and better and learn a lot from it .

In the future, I hope the following aspects can be better improved and optimized :

  1. Expand the information sources of the system , Enhance your database , Provide users with more and richer quality information and interesting stories .
  2. The information classification of the system is more extensive and comprehensive , It is no longer limited to the above modules , It can cover all aspects of life .
  3. Improve the information search efficiency and accuracy of the system , In the huge information resources , Accurate capture of information is a very important thing , Can quickly give users the feedback they want .

Source code address : be based on SSM Material management system 【 Source code + file + database 】.zip-Java Document resources -CSDN download

原网站

版权声明
本文为[Lao Yang hasn't lost his hair]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206241357245664.html