System management will also carry out overall intelligent operation through the computer. There are a lot of management and data storage involved in the drug management system, such as administrators: home page, personal center, user management, employee management, drug category management, drug management Information management, drug storage management, drug delivery management, online consultation management, message board management, system management, order management, user: home page, personal center, online consultation management, my collection management, order management, staff: home page, Personal center, drug information management, drug storage management, drug delivery management, online consultation management, front home page: home page, drug information, medical guide, message feedback, personal center, background management, shopping cart, etc. The work brings huge challenges. In the face of a large amount of information, the traditional management system is to collect detailed information by taking notes. Later, computers appeared, and the paper-based information was counted on the computer through computer input software. This method is more traditional, and it is more troublesome to obtain statistical data information, and it is also affected by time and space, so a drug management system has been developed for this purpose.
environmental needs
1. Operating environment: preferably java jdk 1.8, which is currently the most stable JDK and the most used JDK version.
2.IDE environment: IDEA, Eclipse can be. IDEA is recommended;
3.tomcat environment: Tomcat7/Tomcat8/Tomcat9 versions are available
4. Hardware environment: Windows 7/8/10 with more than 1G memory; or Mac OS;
5. Database: MySql version 5.7;
6. Whether Maven project: yes;
technology stack
Backend: Spring+SpringMVC+Mybatis+Springboot
Front-end: vue+CSS+JavaScript+jQuery+elementui
SpringBoot is the most popular framework at present. Its configuration is simpler, making development easier and faster.
The infrastructure of Spring Boot consists of three files, as follows:
src/main/java: program development and main program entry;
src/main/resources: configuration file;
src/test/java: Test program.
The SpringBoot project supports two formats of configuration files by default
1,application.properties
2,application.yaml
Front-end technology: nodejs+vue+elementui.
The module includes the main interface, home page, personal center, user management, employee management, drug category management, drug information management, drug storage management, drug delivery management, online consultation management, message board management, system management, order management, etc. operation.
Front page home function module
Drug management system, you can view the home page, drug information, drug guide, message feedback, personal center, background management, shopping cart, etc. on the home page of the system
User registration, on the registration page, you can fill in the user name, password, name, contact number and other information to register
User login, complete the login by filling in the account number, password and other information on the login page, as shown in Figure 1. On the drug information page, add to cart and buy immediately by viewing the drug name, drug category, picture, specification, manufacturer, expiry date, quantity, price and other information
User function module
- The user clicks to enter the system operation interface, and can control functional modules such as home page, personal center, online consultation management, my collection management, order management, etc.
- Online consultation management: Through the list, you can get the title, consultation content, consultation time, user name, contact number, review reply, review status and modify it
- Order management: Through the list, you can get the order number, product name, product image, purchase quantity, price/points, discounted price, total price/total points, total discounted price, payment type, status, address and other information, and perform detailed operations
- My collection management: You can get the collection name, collection picture and other information through the list, and perform details and delete operations
Administrator function module
a) The administrator logs in after filling in the user name, password and role as shown. After successfully logging in, the administrator enters the system operation interface, and can manage the home page, personal center, user management, employee management, drug category management, drug information management, drug storage management, drug delivery management, online consultation management, message board management, System management, order management and other functional modules perform corresponding operations.
2. User management: User name, name, gender, avatar, contact number, etc. can be obtained through the list, and can be modified or deleted
3. Employee management: Through the list, you can obtain the employee's job number, employee name, gender, avatar, mobile phone, ID card and other information, and delete or modify the operation.
4. Drug category management: Through the list, you can obtain information such as drug categories, modify or delete operations
-
Drug information management: Through the list, you can obtain information such as drug name, drug category, picture, specification, manufacturer, expiration date, quantity, price, etc., and modify or delete it.
-
Medical guide: The administrator can obtain the title, introduction, picture and other information through the list, and modify or delete it
-
Drug warehousing management: The administrator can obtain the warehousing order number, drug name, drug category, specification, manufacturer, quantity, remarks, warehousing time, employee number, employee name and other information through the list, and modify or delete it.
-
Message board management: The administrator can obtain the user name, message content, reply content and other information through the list, and modify or delete it
-
Order management: The administrator can obtain the order number, product name, product image, purchase quantity, price/points, discounted price, total price/total points, total discounted price, payment type, status, address and other information through the list, and modify or delete operation
Employee function module
- Employees click to enter the system operation interface, and can control functional modules such as home page, personal center, drug information management, drug storage management, drug delivery management, and online consultation management.
- Drug information management: Through the list, you can obtain the drug name, drug category, picture, specification, manufacturer, expiration date, quantity, price and modify it
- Drug warehousing management: Through the list, you can obtain the warehousing order number, drug name, drug category, specification, manufacturer, quantity, remarks, warehousing time, employee number, employee name and other information, and perform details, modification, and deletion operations.
- Drug delivery management: Through the list, you can obtain information such as drug name, drug category, specification, manufacturer, quantity, remarks, delivery date, employee number, employee name, etc., and perform details, modification, and deletion operations.
- Online consultation management: Through the list, you can get the title, consultation content, consultation time, user name, contact number, review reply, review status, review and other information, and perform detailed operations
/** * Login related */ @RequestMapping("users") @RestController public class UserController{ @Autowired private UserService userService; @Autowired private TokenService tokenService; /** * Log in */ @IgnoreAuth @PostMapping(value = "/login") public R login(String username, String password, String captcha, HttpServletRequest request) { UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username)); if(user==null || !user.getPassword().equals(password)) { return R.error("Incorrect account or password"); } String token = tokenService.generateToken(user.getId(),username, "users", user.getRole()); return R.ok().put("token", token); } /** * register */ @IgnoreAuth @PostMapping(value = "/register") public R register(@RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user); if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) { return R.error("user already exists"); } userService.insert(user); return R.ok(); } /** * quit */ @GetMapping(value = "logout") public R logout(HttpServletRequest request) { request.getSession().invalidate(); return R.ok("exit successfully"); } /** * reset Password */ @IgnoreAuth @RequestMapping(value = "/resetPass") public R resetPass(String username, HttpServletRequest request){ UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username)); if(user==null) { return R.error("Account does not exist"); } user.setPassword("123456"); userService.update(user,null); return R.ok("Password reset to: 123456"); } /** * list */ @RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,UserEntity user){ EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>(); PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params)); return R.ok().put("data", page); } /** * list */ @RequestMapping("/list") public R list( UserEntity user){ EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>(); ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew)); } /** * information */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") String id){ UserEntity user = userService.selectById(id); return R.ok().put("data", user); } /** * Get the user's session user information */ @RequestMapping("/session") public R getCurrUser(HttpServletRequest request){ Long id = (Long)request.getSession().getAttribute("userId"); UserEntity user = userService.selectById(id); return R.ok().put("data", user); } /** * save */ @PostMapping("/save") public R save(@RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user); if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) { return R.error("user already exists"); } userService.insert(user); return R.ok(); } /** * Revise */ @RequestMapping("/update") public R update(@RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user); userService.updateById(user);//Update all return R.ok(); } /** * delete */ @RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ userService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); } }
Table of contents
1 Introduction 1
1.1 Subject Background 1
1.2 Current status of subject research 1
1.3 Preliminary design method and implementation plan 2
1.4 The research content of this paper 2
2 System Development Environment 4
2.1 Introduction to using tools 4
2.2 Environment configuration 4
2.3 Introduction to B/S structure 4
2.4 MySQL database 5
2.5 Introduction to the framework 5
3 System Analysis 6
3.1 System Feasibility Analysis 6
3.1.1 Economic feasibility 6
3.1.2 Technical feasibility 6
3.1.3 Operational Feasibility 6
3.2 System Status Analysis 6
3.3 Functional Requirements Analysis 7
3.4 System Design Rules and Operating Environment 8
3.5 System flow analysis 8
3.5.1 Operation process 8
3.5.2 Adding information flow 9
3.5.3 Delete information flow 10
4 System Design 11
4.1 Main functions of system design 11
4.2 Database Design 11
4.2.1 Database Design Specifications 11
4.2.2 E/R diagram 11
4.2.3 Data Sheet 12
5 System Implementation 25
5.1 System function module 25
5.2 Background module 27
5.2.1 Administrator function module 27
5.2.2 User Function Module 30
6 System Test 33
6.1 Functional testing 33
6.2 Usability Testing 33
6.3 Performance testing 34
6.4 Analysis of test results 34
7 Conclusion 35
References 36
Thanks 37