Design and implementation of the sales system of the excavator parts marketing center (opening report + thesis + PPT + source code)

Opening report

Thesis (Design) Topic Design and Realization of Sales System of Hualiu Excavator Spare Parts Marketing Center
student name major computer science and Technology mentor
The purpose and significance of choosing the topic: With the development of the economy and the continuous expansion of the Chinese auto market, the types of auto parts are constantly updated, and the types of spare parts are also increasing. For example, the classification and management of parts is chaotic, and errors are prone to occur by relying on artificial memory. The situation is difficult to count. While selling auto parts, due to the increase in workload and more detailed business, the previous manual processing method will inevitably have loopholes in business and financial aspects, but now various sales management systems are gradually becoming mature, and its use It can reduce the labor intensity of staff in various departments of auto parts enterprises and improve their work quality and efficiency. It is convenient for financial statistics and business tracking of sales personnel. Shanxi Hualiu Excavator Parts Marketing Center is a sales center based on excavator parts. Since there is no complete sales management system, it is difficult to make statistics on the classification of parts, inventory status and customer information management, and can only rely on artificial memory. , so the advantage of this system is that it can classify and manage different types of accessories, and can check inventory information and customer information in time, so that employees can improve work quality while improving work efficiency.
Summary of technologies and methods related to this topic: The system adopts AngularJS development technology, JDK1.6 as development tool, Tomcat as server and MySql as background database development tool. AngularJS Technology Introduction AngularJS was born in 2009, created by Misko Hevery and others, and later acquired by Google. It is an excellent front-end JS framework that has been used in many Google products. AngularJS has many features, the core of which is: MVC, modularization, automatic two-way data binding, semantic tags, dependency injection and so on. AngularJS is a structural framework designed for dynamic web applications. It allows you to use HTML as a template language, and by extending the syntax of HTML, you can build your application components more clearly and concisely. Its innovation lies in the use of data binding and dependency injection, which can save you from writing a lot of code. These are all implemented through browser-side Javascript, which also makes it perfectly integrated with any server-side technology. Introduction to JDK1.6 JDK (Java Development Kit) is Sun Microsystems' product for java developers. Since the introduction of Java, JDK has become the most widely used Java SDK. JDK is the core of the entire Java, including the Java runtime environment, Java tools, and Java-based class libraries. JDK is the first step to learn Java well. Jrocket, which runs exclusively on the x86 platform, is much more efficient on the server side than Sun JDK. Starting from SUN's JDK5.0, It provides very useful functions such as generics, and its version is constantly updated, and its operating efficiency has been greatly improved. Introduction to MySql MySql is a small relational database management system developed by MySql AB in Sweden. It was acquired by Sun on January 16, 2008, and in 2009, Sun was acquired by Oracle. MySql is a relational database management system. The relational database stores data in different tables instead of putting all the data in a large warehouse. This increases speed and improves flexibility. MySql's SQL is "Structured Query Language". SQL is the most commonly used standardized language for accessing databases. MySql software uses the GPL (GNU General Public License). Due to its small size, speed, low total cost of ownership and especially open source

Opening report

Main design content: This system has three modules: sales management module, inventory management module and user management module. The inventory management module includes: inventory check, when customers consult or need to purchase, they can check whether there is any stock in the current inventory through inventory inquiry. Parts information management, managing all parts information in the system. Purchase accessories, update inventory, and increase inventory of accessories. The sales management module includes accessories sales, and sells accessories. Parts return, if the user is not satisfied or within the return period, the part return operation can be carried out. Profit statistics, statistics and viewing of sales profits in the system, can also be exported to EXCEL. The user management module includes: employee information management, which contains information about administrators and ordinary employees. Customer information record management, this part can manage all the customer information in the sales system who have bought accessories and consulted, so as to facilitate follow-up records and return visits in the later period.
Design environment, methods and measures: Hardware environment: CPU: 2.0GHz and above. Memory: 2GB and above Software environment: (1) System software: Windows 2000 and above operating system; (2) Development software: Tomcat, MySql, PhotoShop, etc. (3) Background database: MySql database; Methods and measures: ①User needs analysis ; ② Analyze the database, draw the ER diagram, and design the database; ③ Construct the program module diagram, and establish the program body and framework according to the module diagram; ④ Design and realize the functions of each module; ⑤ Link the program and database, debug and run; ⑥ Multiple tests , until the program runs stably.
Opinions and Suggestions of Instructors: Signature: Year Month Day

Note: 1. This form is to be filled out by the students and submitted to the instructor for signature, otherwise the topic cannot be opened; this form is used as the basis for grading the graduation thesis (design). 2. The part filled by students can be entered by computer, and the part filled by teachers must be filled in by hand.

 directory

1 Introduction 11

2 Development Tools and Technologies 22

2.1 Introduction to JSP 22

2.2 Introduction to MYSQL 22

2.3 SQL statement 22

2.4 AngularJS Technology 22

3 Needs Analysis 22

3.1 Functional requirements analysis 22

3.2 Feasibility Analysis 33

3.3 Database requirements analysis 33

4 Overall Design 55

4.1 Functional module design 55

4.2 Database logical structure design 55

5 Detailed Design 66

5.1 Detailed Design of the Database 66

5.2 Detailed design of the interface 77

5.3 Personal information module design 88

5.4 Employee Management Module Design 99

5.5 Parts management module design 99

5.6 Incoming module design 1111

5.7 Parts Sales Module Design 1212

5.8 Return module design 1515

5.9 Data Statistics Module Design 1616

6 System Test 1717

6.1 Purpose of testing 1717

6.2 Description of test methods 1717

6.3 Test case design 1717

6.4 System Test 1818

6.5 Analysis of test results 1818

7 Conclusion 1818

References 1919

Sales system of Hualiu Excavator Parts Marketing Center

design and implementation

Abstract: With the development of China, the construction speed of various cities is also amazingly fast. Of course, the use of excavators is indispensable, and the business opportunities that follow are self-evident. The types of various spare parts Also increase. As the workload and business become more refined, the previous manual processing method will inevitably have loopholes in business and financial aspects. Now that various sales systems have gradually matured, its use can reduce the labor intensity of enterprise employees and improve While improving employee work efficiency, it also facilitates financial statistics.

This time, the sales system of Hualiu Excavator Parts Marketing Center is mainly developed using JSP language. The designed functions include inventory management, sales management, user management and query statistics. Starting from needs analysis, analyze first and then program development. The completed system has beautiful interface and perfect functions, which will bring great convenience to Hualiu Enterprise.

Keywords: spare parts excavator sales management system

  1. Introduction
    It is obvious to all that science and technology are developing very rapidly. Nowadays, computer applications have been fully integrated into people's production and life, especially in enterprises, almost all of which are inseparable from computer management, such as document editing, picture making, table statistics and so on. On the other hand, people are more and more fond of using computers for information management, which is convenient and fast. With the advent of the Internet age, the channels for people to obtain information are not only newspapers or TV, but some high-tech electronic products, such as mobile phones, computers and other equipment. Nowadays, online shopping is also very hot, and the business of switching to brick-and-mortar stores has become increasingly difficult. Now, enterprises that give priority to the use of information systems will have an absolute advantage in the market. The use of information systems can not only strengthen the management of enterprises, but also effectively maintain customer information and expand the scope of business.
    The subject of this graduation project is the sales system of Hualiu Excavator Parts Marketing Center, so first of all, let me introduce the background of the subject. According to statistics, the United States is the first country to use information management, and now 80% of management is basically done by computers. It can be seen that with the advent of the Internet age, information management has become the core of the computer industry. At present, our country is a big country of excavators, and excavators are used in various places, so there are no less than a thousand manufacturers of excavator accessories. And now the demand for excavator parts in my country is also growing, and the competition in the entire excavator parts industry is still very fierce. For some accessories companies, if they want to win a seat in this field, they must be in line with the society and keep up with the progress of the society. Let’s talk about the business model of excavator accessories. Due to the variety of accessories and cumbersome maintenance, they were managed manually in the past, and the investment in time and labor costs was relatively large. If you use the information management system, you can easily complete these tasks and save labor costs. And the advantages of using computers for enterprises are self-evident, it is more efficient, easier to manage, faster and more transparent than manual work. The use of the information management system has brought great convenience to the enterprise and improved the work quality of the employees. Therefore, the development of the sales system of the excavator parts marketing center is very necessary. The main problem to be solved by developing this system is the management and sales of accessories. These are the two core parts. I will use the JSP language to implement it together with the MySQL database.
  2. Development tools and technology
    The sales system of Hualiu Excavator Parts Marketing Center is realized through the development tool myeclipse. The environment is built using JSP+JDK1.6+TOMCAT6.0+MySQL. The server is Tomcat, JDK is the development environment virtual machine necessary for java, and MySQL is the database used by the system.
    1. Introduction to JSP
      JSP has been developed for a long time, and many aspects have been very perfect. The full name of Jsp is JAVA SERVER PAGER, which means that java programs can be run on the page. Its scalability is very good.
    2. MYSQL introduces
      Mysql as data is a very cool database. It occupies a small space, and the version 5.0 is only less than 30M. Although Mysql is small, its performance is very good, and it can efficiently implement relational query and other operations. When using it, we will manage it based on some third-party plug-ins, such as sqlyog, navicat and other software.
    3. SQL statement
      SQL statement is the basic statement and syntax for us to use mysql data. SQL statements include basic functions such as adding, deleting, modifying, and checking. Using these commands can complete most of the database operations on the database.
    4. AngularJS technology
      AngularJS was born in 2009. It has many features, the core of which is: MVC, modularization, automatic two-way data binding, semantic tags, dependency injection and so on.

  1. Needs Analysis
    "Needs analysis" is to analyze the needs of customers. Our target is the customers who use this website. What we want to analyze is what functions they want to use this website and what conveniences we provide them with. How to design the interface is the most convenient for them. In the past, we wanted to develop the feasibility of some economic and other aspects involved in this program. This is called needs analysis.
    1. Functional Requirements Analysis

Excavator parts sales management system analyzes the system according to the process of excavator parts sales. The system is divided into three modules.

Inventory management modules include:

  1. Inventory check, when customers make inquiries or need to purchase, they can check whether there is any goods in the current inventory through inventory check.
  2. Parts information management, managing all parts information in the system.
  3. Parts purchase, according to the actual situation, update the inventory in time, expand the supply of accessories, and increase the inventory.

Sales management modules include:

  1. Sales of accessories, sales of accessories.
  2. Parts return, if the user is not satisfied or within the return period, the part return operation can be carried out.
  3. Profit statistics, statistics and viewing of sales profits in the system, can also be exported to EXCEL.

User management module:

  1. Employee information management, this part mainly contains the information of administrators and ordinary employees.

(2) Customer information record management, this part mainly manages all new and old customer information in the system, which is convenient for follow-up records and return visits in the later period.

  1. Feasibility Analysis
    (1) Technical
    Feasibility To analyze the technical feasibility, the first thing that needs to be introduced is the technology I used to develop this system. The development technology used this time is JSP. JSP is believed to be familiar to everyone. Now it is very mature and has a very high utilization rate. Now a large part of the programs on the market are developed using this system. And we have learned JSP technology in the university, and the library also has a lot of information about JSP technology, so it is very feasible in terms of development technology.
    (2) Economic feasibility
    The capital investment of this program will not be too much. Since it is used as a graduation project in the early stage, I can develop it by myself. In terms of hardware, I have a computer, so I don’t need to buy equipment separately. Many of the software involved in the development of this system can also be downloaded directly from the Internet, and they are all free, so it does not need too much money at present. Not too much, including the price of the website domain name and server, etc., it may be a few thousand yuan a year. Therefore, based on the above analysis, the economic aspect of this system is also feasible.
    (3) Operational feasibility
    In the performance analysis at the beginning, we mentioned that the design of the system interface should be exquisite and concise, and the designed system has also achieved this. The interface of the whole system is very intuitive, and the design of each module is also It is very clear that it is very easy for a user to log in to the system to find the modules he wants to know, and for the background, only the administrator needs to know basic computer operations to maintain the system, so it is also very feasible in terms of operation .
  2. Database Requirements Analysis

The entities involved in this system are: order details, accessory type information, accessory information, accessory inventory information, order detail information, user information, etc.

  1. The ER diagram of the order details entity is shown in Figure 1:
    Figure 1 ER diagram of the order details entity
  2. The ER diagram of the accessory type entity is shown in Figure 2:
    Figure 2 The ER diagram of the accessory type entity
  3. The ER diagram of the accessory information entity is shown in Figure 3:
    Figure 3 ER diagram of the accessory information entity
  4. The ER diagram of the accessory details entity is shown in Figure 4:
    Figure 4 The ER diagram of the accessory details entity
  5. The user information entity ER diagram is shown in Figure 5:
    Figure 5 User information entity ER diagram
  6. The ER diagram of the order entity is shown in Figure 6:

Figure 6 Order Entity ER Diagram

  1. Overall design
    The overall design is the design of the overall layout of the related system, that is, a general processing plan for the design related system, also known as the system outline design.
    The overall design of the system includes functional module design and database logic structure design.
    1. Functional module design
      The users of this system are mainly divided into ordinary employees and administrators. The administrator mainly adds some management operations, and the ordinary employees mainly perform customer-oriented operations. Its main modules include: spare parts sales, spare parts return, inventory check, customer information entry, user management, spare parts type management, spare parts information management, stock update and profit statistics.
      The functional block diagram of the system is shown in Figure 7:


Figure 7 System function module diagram

    1. Database logic structure design
      The database management system selected by this system is MySql database management system, and the MySql database is a relational database [1].
      According to the rules, the relational schema that converts the conceptual structure design of the database into is as follows:
      Parts information (ID, name, price, quantity, remarks, production address, contact number, type);
      Parts details (ID, quantity, parts, production date, expiration date, number, price);
      order details (ID, number, quantity, price, order);
      order information (ID, amount, user, note, time, role);
      user information (ID, username, password, name, Phone,Gender,Role);
      AccessoryType(ID,TypeName);

  1. Detailed Design
    The detailed design of the sales system includes the following: detailed design of the database, detailed design of the interface, personal information module design, employee management module design, accessory management module design, purchase module design, accessory sales module design, return module design, Data statistics module design.
    1. Detailed design of the database
      The database management system used in this system is MySQL, and there are 6 tables in the database. The descriptions of each table are as follows:
      Table 1 Order information table
column name type of data allow empty illustrate
Id int(11) no ID
Money double(200) yes the amount
But int(11) yes user
Note sheet text(25) yes Remark
Time varchar(200) yes time
Status int(11) yes Role

Table 2 Accessories information table
Table 3 Accessories details table

column name type of data allow empty illustrate
Id int(11) no ID
Pname varchar(100) no name
Price double(100) yes price
Pcount int(11) yes quantity
Remark text(100) yes Remark
Address varchar(100) yes Production address
Phone varchar(100) no contact number
Typeld int(11) no type
column name type of data allow empty illustrate
Id int(11) no ID
Pdcount int(11) no quantity
Fkpid int(11) no Accessories
starTime varchar(100) no Production Date
endTime varchar(11) no expiration date
Pno varchar(11) no serial number
Price double(100) no price

Form 4 Order Details Form
Form 5 User Information Form

column name type of data allow empty illustrate
Id int(11) no ID
Pno varchar(100) no serial number
Pcount int(11) yes quantity
Price double(100) yes price
Fkoid int(11) yes Order
column name type of data allow empty illustrate
Id int(11) no ID
Username varchar(11) no username
Password varchar(11) no password
Nickname varchar(100) no Name
Phone varchar(11) no Telephone
Sex varchar(11) no gender
Status int(11) no Role

Table 6 Accessory Type List

    1. Detailed design of the interface
column name type of data allow empty illustrate
Id int(11) no ID
Typename varchar(11) no type name


The interface of the entire system needs to meet the requirements of cleanliness and benign communication and interaction between various subjects.

      1. Login interface design


Figure 8 Login interface
The login interface is the initial interface to open the system. There are three input boxes on the interface, user, password, and verification code. After entering the information, click Login to be verified by the program.

      1. System main interface design
        After logging in through the login page, the system will automatically jump to the personal data page of the system's main interface. The following is an example of the main interface of the administrator's operation login. As shown in Figure 9.


图9 后台主界面
后台主界面采用的是左右布局,左边是我们的菜单栏,右边则是我们的内容页,通过frameset框架进行加载展示。界面是模仿windowsXP文件管理的样式,看起来非常好看。

    1. 个人信息模块设计
      1. 个人中心
        在系统主界面点击左侧操作栏中的“我的资料”就可以进入该页面,个人中心可以修改个人资料。程序效果图如图10所示。


图10 个人中心

      1. 修改密码
        用户在系统主界面点击左侧操作栏中的“修改密码”进入该页面,该页面可以修改用户密码。在修改密码的时候angularjs会通过表单验证用户输入的信息是否符合标准。如图11所示。


图11 修改密码

    1. 员工管理模块设计
      1. 员工管理
        在系统主界面点击员工管理模块下的“员工管理”链接后,右边的内容页就会展示出员工管理列表,该列表通过angularjs的http.get方法进行获取列表数据,通过返回的json数据进行解析然后利用静态分页的原理展示到页面上。在页面上可以根据姓名和角色来进行数据过滤,数据过滤采用的anguljs的filter。程序效果图如图12所示:


图12 员工管理界面

      1. 员工添加
        在系统主界面点击员工管理模块下的“员工添加”链接后,右边的内容页就会展示出员工添加界面。在员工添加界面需要输入各种不同的信息,输入完成之后点击添加按钮表示员工添加成功,该页面如图13所示。


图13员工添加

    1. 配件管理模块设计
      1. 配件类型管理
        在系统主界面点击配件管理模块下的“配件类型管理”链接后,右边的页面就会显示出配件类型管理列表。该界面也是采用的angularjs的数据获取以及静态分页效果,同时使用了bootstrap的分页样式表,程序效果图如图14所示。


图14配件类型管理

      1. 配件管理
        在系统主界面点击配件管理模块下的“配件管理”链接后,右边的页面就会显示出配件管理列表。该界面也是采用的angularjs的数据获取以及静态分页效果,同时使用了bootstrap的分页样式表。在界面上可以根据配件类型、配件名称进行filter过滤,同时可以导出表格中的数据为excel。程序效果图如图15所示。


图15配件管理

      1. 配件添加
        在配件管理界面点击“添加配件”按钮进入配件添加页面。界面上需要填入配件名称、配件类型、销售价格、备注、生产厂家、厂家电话,表单验证采用的是angularjs的表单验证,信息输入无误后点击添加表示添加成功。程序效果图如图16所示。


图16配件添加

      1. 库存明细
        在配件管理界面可以点击每一行后面的库存明细查看进行浏览该配件的库存明细。也可以点击配件管理模块下面的库存明细,这里是展示所有的配件配件库存,可以根据配件编号和配件进行数据过滤。程序效果图如图17所示。


图17库存明细

    1. 进货模块设计
      1. 填写进货单明细
        在系统主界面点击进货管理模块下的“填写进货单”链接后,右边的页面就会显示出进货单明细添加页面,依次输入进货数量、配件、生产日期、进价信息,点击添加即可完成进货。程序效果图如图18所示。


图18填写进货单明细

      1. 本次进货单明细查看
        在上一步填写进货单明细后会自动跳转到进货单明细查看界面,该界面可以查看本次进货单所有的配件明细。程序效果图如图19所示。


图19本次进货单明细

      1. 进货单登记
        确认本次所有的进货单明细都填写完毕后,点击进货管理模块下的“进货单登记”链接,右侧内容页会展示出当前进货单的总价,输入备注后点击添加按钮即可完成本次进货单登记的流程。程序效果图如图20所示。


图20进货单登记

      1. 进货单查看
        在系统主界面点击配件管理模块下的“进货管理”链接后,右边的内容页就会展示出进货单管理列表,列表中会展示出所有的进货单,可以根据创建时间进行数据过滤。每一条进货单记录右边有查看明细按钮,点击该按钮可以查看该进货单的进货明细数据。程序效果图如图21,22所示。


图21进货单查看


图22进货单明细

    1. 配件销售模块设计
      1. 配件销售设计
        在系统主界面点击出货管理模块下的“配件销售”链接后,右边的内容页就会展示出配件销售界面。在该销售界面需要填入配件编码和数量,如果不填的话angularjs会进行红色字体提示。填好后点击“添加”按钮,程序会使用angularjs的$http.get函数去后台进行查询,如果编码不对则会提示“没有该编码对应的配件”,如果输入的数量超过了库存则会提示“该配件库存不足了”,添加成功后会调用angularjs的列表刷新函数刷新我们下方的销售列表。需要销售的配件添加完后点击“结账”按钮进行结账,程序会计算该批次销售的配件的总额。程序效果图如图23所示。


图23网站公告列表
配件销售核心代码如下:
<script type="text/javascript">
var contentApp = angular.module('myApp', []);
contentApp.controller('myContent', function($scope, $http) {
$scope.delx = function($index){
if($index>=0){
$http.get("orderDetailDel.do?id="+$index).success(function(response) {
$scope.loadInfo();
});
}
}
//添加配件
$scope.addOrderDetail = function(){
if ($scope.loginForm.$valid) {
$http.get("angularOrderDetailInsert.do?pno="+$scope.pno+"&pcount="+$scope.pcount).success(function(response) {
var obj = angular.fromJson(response.result);
if(obj.status=="nocount"){
alert("该配件库存不足了");
}else if(obj.status=="nopno"){
alert("没有找到该编码的配件");
}else if(obj.status=="error"){
alert("系统内部错误");
}else{
$scope.loadInfo();
$scope.pno = "";
$scope.pcount = "";
$scope.loginForm.pno.$dirty = false;
$scope.loginForm.pcount.$dirty = false;
}
});
} else {
$scope.loginForm.pno.$dirty = true;
$scope.loginForm.pcount.$dirty = true;
}
}

$scope.loadInfo = function(){
$http.get("angularSellList.do").success(function (response) {
var obj = angular.fromJson(response.result);
//数据源
$scope.data = obj;
//分页总数
$scope.pageSize = 5;
$scope.pages = Math.ceil($scope.data.length / $scope.pageSize); //分页数
$scope.newPages = $scope.pages > 5 ? 5 : $scope.pages;
$scope.pageList = [];
$scope.selPage = 1;
//设置表格数据源(分页)
$scope.setData = function () {
$scope.items = $scope.data.slice(($scope.pageSize * ($scope.selPage - 1)), ($scope.selPage * $scope.pageSize));//通过当前页数筛选出表格当前显示数据
}
$scope.items = $scope.data.slice(0, $scope.pageSize);
//分页要repeat的数组
for (var i = 0; i < $scope.newPages; i++) {
$scope.pageList.push(i + 1);
}
//打印当前选中页索引
$scope.selectPage = function (page) {
//不能小于1大于最大
if (page < 1 || page > $scope.pages) return;
//最多显示分页数5
if (page > 2) {
//因为只显示5个页数,大于2页开始分页转换
var newpageList = [];
for (var i = (page - 3) ; i < ((page + 2) > $scope.pages ? $scope.pages : (page + 2)) ; i++) {
newpageList.push(i + 1);
}
$scope.pageList = newpageList;
}
$scope.selPage = page;
$scope.setData();
$scope.isActivePage(page);
console.log("选择的页:" + page);
};
//设置当前选中页样式
$scope.isActivePage = function (page) {
return $scope.selPage == page;
};
//上一页
$scope.Previous = function () {
$scope.selectPage($scope.selPage - 1);
}
//下一页
$scope.Next = function () {
$scope.selectPage($scope.selPage + 1);
};
});
}
$scope.loadInfo();
});
</script>

      1. 出货单管理
        在系统主界面点击出货管理模块下的“出货单管理”链接后,右边的内容页就会展示出出货单管理列表,列表中会展示出所有的出货单,可以根据创建时间进行数据过滤。每一条出货单记录右边有查看明细按钮,点击该链接可以查看该出货单的出货明细数据。程序效果图如图24所示。


图24出货单管理

    1. 退货模块设计
      1. 配件退货设计
        在系统主界面点击退货管理模块下的“配件退货”链接后,右边的内容页就会展示出配件退货界面。在该退货界面需要填入配件编码和数量,如果不填的话angularjs会进行红色字体提示。填好后点击“添加”按钮,程序会使用angularjs的$http.get函数去后台进行查询,如果编码不对则会提示“没有该编码对应的配件”,添加成功后会调用angularjs的列表刷新函数刷新我们下方的退货列表。需要退货的配件添加完后点击“退货”按钮进行统一退货。程序效果图如图25所示。


图25配件退货

      1. 退货单管理
        在系统主界面点击退货管理模块下的“退货单管理”链接后,右边的内容页就会展示出退货单管理列表,列表中会展示出所有的退货单,可以根据创建时间进行数据过滤。每一条退货单记录右边有查看明细按钮,点击该按钮可以查看该出货单的退货明细数据程序。效果图如图26所示。


图26退货单管理

    1. 数据统计模块设计
      1. 进货统计
        在系统主界面点击统计管理模块下的“进货统计”链接后,右边的内容页就会展示出进货统计的数据列表。程序效果图如图27所示。


图27进货统计
进货统计的核心代码其实就是sql语句,其核心代码如下:
String sqlString = "select c.pname,sum(a.pcount) as allcount,sum(a.price*a.pcount) as allprice from t_OrderDetail a left join t_ProductDetail b on a.pno=b.pno left join t_Product c on b.fkpid=c.id left join t_Order d on a.fkoid=d.id where a.id<>0 ";
if (null != map.get("status")) {
sqlString = sqlString + " and d.status = '" + map.get("status")+ "'";
}

sqlString = sqlString + " group by c.pname";
Query query = ht.getSessionFactory().getCurrentSession()
.createSQLQuery(sqlString);
query.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);

      1. 出货统计
        在系统主界面点击统计管理模块下的“出货统计”链接后,右边的内容页就会展示出出货统计的数据列表。效果图如图28所示。


图28出货统计

  1. 系统测试
    1. 测试目的
      每一个项目的最后都要经过反复无数次的测试才能放心的投入使用。通过测试我们可以了解到系统存在哪些不足,哪些功能还不能够实现,哪些性能还可以再优化。其实在程序开发的过程中,我们一般也是边写程序边测试的,每做完一个模块,就会刷新页面看是否能实现,这也叫测试。测试的目的就是为了更好的呈现系统,使系统达到我们的预期效果。
    2. 测试方法说明
      当然 ,测试的方法有很多种,在大学的课程中,我们听到的最多的就是白盒和黑盒测试,下面对这两种方法进行说明:
      黑盒测试是在程序接口进行的测试,它只检查程序是否能适当的接收输入的数据并产生正确的输出信息,程序运行过程中能否保持外部信息的完整性。黑盒测试又称为功能测试[9]。
      白盒测试法和黑盒测试法相反,它的前提是可以把程序看成装在一个透明的白盒子里,测试者完全知道程序的结构和处理算法。白盒测试又称为结构测试[10]。
    3. 测试用例设计
      本次介绍的用例是验证用户名和密码错误时,系统是否提示并阻止登录。如果说登录功能都有问题的话,那后面的大块功能则无法正常使用,所以我们进行了这个测试用例的设计。测试表如表7所示。
      表7 用户名密码错误的测试用例
用例名称 用户名密码错误的测试用例 用例标识 YL-01
用例说明 验证用户名和密码输入错误,系统是否自动提示错误。
操作过程
序号 输入及操作说明 期望的测试结果 实际结果 备注
1 输入用户名admin 可在文本框中显示输入内容 可在文本框中显示输入内容
输入密码000 可在文本框中显示输入内容 可在文本框中显示输入内容
点击“登录”按钮 登录失败,系统弹出“用户名或密码错误”的提示框 登录失败,系统弹出“用户名或密码错误”的提示框
前提和约束 系统能成功打开并显示登录页面
过程终止条件 登录成功或者登录失败
结果评价标准 登录失败,并弹出信息提示框
设计人员 设计日期 2017年04月20日
    1. 系统测试
      1. 功能测试
        (1)对用户登录模块的功能测试。用户首先进行登录,登录的时候需要验证用户,每个员工都有自己对应的用户名和密码,只有当用户名和密码都正确时才能登录成功。用户登录时还会有验证码,验证码为2个数字,随机给出。
        (2)数据删除测试。点击删除按钮时可以删除数据,
        (3)数据编辑测试。点击编辑按钮时可以修改相关数据,
      2. 页面交互测试
        经过页面交互测试,华柳挖掘机配件营销中心销售系统中的所有功能都可以按照要求链接到应当跳转的页面。
      3. 系统性能测试
        在稳定性方面,采用多人多次登录该系统的方式,每次登录后进行用户及简单应用的扫描,等全部功能的测试。经过多次测试,系统功能总体比较稳定,但由于环境限制,无法测试更多。

    1. 测试结果分析
      通过不断的对每一个模块进行测试,还是发现了一些问题,比如有时候提示404,进入不了页面,有时候按钮点击没反应,在发现这一些错误和漏洞后,会及时将这些错误加以修改,并且这些问题解决之后,再对系统进行集成测试。测试结果表明系统可以达到所需要求,各部分测试都能达到理想状态。其实不光是最后的测试,在系统的开发过程中,我也边开发边测试,只要做好了一个功能,都会运行看看,如果有错误就及时修改。通过对这些错误的修改,发现更多的错误来源于对语法的理解不够透彻,所以在以后的开发过程中会尽量避免类似的错误。

  1. 结论

经过数月程序的开发学习,我把以前在课堂上所学的知识都运用在了系统上,且对数据库也进行了系统的研究,终于完成了我的毕业设计华柳挖掘机配件营销中心销售系统。经过测试,网站已经全部实现了一开始所设计的所有功能,如注册登录、重置密码、销售管理、配件管理和查找统计等。系统性能良好,运行正常,具有较强的可移植性和安全性。通过对华柳挖掘机配件营销中心销售系统的开发,体会了一次完整的项目开发后,使得我对软件开发有了更加真实的感受。

论文一开始从管理系统的现状出发,再结合目前挖掘机配件销售市场的情况,总结出目前开发这个系统的必要性与它能起到的实际作用。然后通过做需求分析,从多个方面来剖析开发这个系统需要做哪些前期准备,也罗列出了自己的需求分析细节。再次向大家介绍了整个系统的结构,以及数据库怎么设计表的,以及具体到每张表的字段设计。然后再介绍个整个系统的实现,通过各个模块截图的方式向大家进行了展示。最后是测试结果。系统虽然已经完成,但是还是有很多不完善的地方,这在以后还需要继续进修与学习,一开始我根本不知道从哪方面下手,在纠结之际,多亏了我的指导老师和同学,在他们的帮助下,我开始有了方向,着手进行项目的开发。在项目开发的过程中,我也遇到了很多难题,不过通过我的不断探索,在图书馆查询资料最终一一解决。通过这次毕业设计,我发现要开发一个程序不是一个简单的事情,它所涉及到的知识有很多,需要不断的学习。当然这个系统也还有很多不足的地方,在系统的界面方面还可以多设计,让整个界面系统可以更美观。

参考文献

[1]肖金秀.JSP程序设计教程[M].冶金工业出版社,2003.9.

[2]施伯乐等.数据库实用教程(第二版).清华大学出版社 2003.11.

[3]史济民 顾春华等.软件工程——原理、方法与应用(第二版).高等教育出版社,2002.12.

[4]飞思科技产品研发中心.JSP应用开发祥解(第二版).电子工业出版社,2004.01.

[5]王国立、李国立等.JSP数据库系统开发完全手册.人民邮电出版社,2006.03.

[6]林杰斌,刘明德.MIS管理信息系统:交叉与发展[M].北京:清华大学出版社,2006.

[7]卫红春,方明.信息系统分析与设计[M].西安:西安电子科技大学出版社,2003,

[8]王克宏,郝建文.Java技术教程(基础篇) [M] .北京:清华大学出版社,2002,

[9]David Flanagan著,林剑、王宇飞译.Java实例技术手册[M].北京:中国电力出版社,2005.

[10]汤化平.SQL Server实训教程[M].北京:清华大学出版社,2005.

Design and Realization of Sales System of Hua Liu 's Excavator Parts Marketing Center

Abstract: Along with the development of Chinese, each city construction speed is faster, the use of the excavator is of course essential, the ensuing opportunities are self-evident, the kinds of various accessories are also many. With the workload and the business is more refined, artificial processing before inevitably in the business and financial aspects of a loophole, because now all kinds of sales system has been gradually mature, so it can be put into use to reduce the labor intensity of employees, improve work efficiency and convenient financial statistics.

In the whole system development process, the use of the basic concepts of software engineering, related technologies and methods. And the use of the system life cycle of the structured programming method, which will be the entire system development stage (demand analysis, system design, basic realization) of the basic activities throughout.

Key Words:Accessories; excavator; sales management system

Guess you like

Origin blog.csdn.net/m0_66999594/article/details/128665951