Java graduation project design and implementation based on spingboot+vue drug bidding and procurement system

Collect and follow to avoid getting lost, end of source code article

Article directory

  • Preface
  • 1. Project introduction
  • 2. Development environment
  • 3. Function introduction
  • 4. Core code
  • 5. Effect drawing
  • 6. Article Table of Contents

Foreword

However, there are certain problems in the current hospital drug management system. With the rapid growth of the amount of data used in HIS, it is closely related to patient diagnosis and treatment information and the hospital’s drug consumption. However, the current pharmaceutical drug management system is still in the low-level stage of use, and its use is mostly the most basic operations such as data query, addition, deletion and modification. It cannot analyze the data and provide relevant personnel with the information they need to make decisions.

1. Project introduction

This system starts from studying the business requirements functional module of drug bidding and procurement, describes the structural design ideas of the database through the comparative analysis of paradigmatic design and de-paradigm design of project examples, and describes the drug bidding and procurement based on the demand analysis. Database structure design, the system is mainly divided into the following modules: procurement management, bidding management, sales management, warehousing management, basic information maintenance, statistical information, and system maintenance. Based on these modules, this article carries out relevant model design for the three main business function modules of procurement, bidding and warehousing. Taking the extended function of pharmaceutical bidding and procurement as an example, class diagrams and sequence diagrams are used to describe the related work. process.
The system adopts the “divide and conquer” idea of the object-oriented model for collaborative development, which effectively ensures simple scalability for subsequent function expansion and greatly improves the portability and coupling of the system.
The system has the following features:
(1) Economical and applicable. This system can greatly save manpower and material resources, reduce the cost of drug bidding, and has certain scalability. However, so far, its shortcomings are also more prominent, such as a lack of flexibility and versatility. .
(2) This system, like most medical institutions, must not only take into account the interests of the hospital and drug suppliers and sellers, but also protect the rights and interests of patients. Therefore, some problems will be encountered during actual operation. The process of drug bidding is a very complicated process. Currently, there are no universally recognized quantitative indicators and many factors are involved.
(3) The main advantages of computer management are concentrated in data statistics, query, and storage. The principles and methods of bid evaluation are not yet optimal. That is to say, in a short period of time, it is not possible to achieve a complete computer management system for drug bidding. Versatility.

2. Development environment

Development language: Java
Framework: springboot
JDK version: JDK1.8
Server: tomcat7
Database: mysql
Database tool: Navicat11
Development software: eclipse/myeclipse/idea
Maven package: Maven
—————-

3. Function introduction

The main functions are: system home page, personal center, bidding unit management; management of bidders, bid evaluation experts and suppliers; information management of bidding, bidding and bid evaluation; bid winner information management, drug information management, drug information management Classification; management of drug procurement, sales, message boards; appropriate management of the system, etc.

4. Core code

Part of the code:

package com.example.controller;

import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.SecureUtil;
import com.example.common.Result;
import com.example.common.ResultCode;
import com.example.entity.Caiwu;
import com.example.exception.CustomException;
import com.example.service.CaiwuService;
import com.example.utils.MapWrapperUtils;
import com.example.utils.jwt.JwtUtil;
import com.example.vo.CaiwuVo;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping(value = "/caiwu")
public class CaiwuController {<!-- -->

    @Resource
    private CaiwuService caiwuService;

    @PostMapping
    public Result<Caiwu> add(@RequestBody CaiwuVo caiwu) {<!-- -->
        caiwuService.add(caiwu);
           return Result.success(caiwu);
    }
\t
\t

    @PostMapping("/deleteList")
    public Result<Caiwu> deleteList(@RequestBody CaiwuVo caiwu) {<!-- -->
        caiwuService.deleteList(caiwu.getList());
        return Result.success();
    }

    @DeleteMapping("/{id}")
    public Result delete(@PathVariable Long id) {<!-- -->
        caiwuService.delete(id);
        return Result.success();
    }

    @PutMapping
    public Result update(@RequestBody CaiwuVo caiwu) {<!-- -->
        caiwuService.update(caiwu);
        return Result.success();
    }

    @GetMapping("/{id}")
    public Result<Caiwu> detail(@PathVariable Integer id) {<!-- -->
        Caiwu caiwu = caiwuService.findById(id);
        return Result.success(caiwu);
    }

    @GetMapping
    public Result<List<Caiwu>> all() {<!-- -->
        return Result.success(caiwuService.list());
    }

    @PostMapping("/page")
    public Result<CaiwuVo> page(@RequestBody CaiwuVo caiwuVo) {<!-- -->
        return Result.success(caiwuService.findPage(caiwuVo));
    }
@PostMapping("/login")
    public Result login(@RequestBody Caiwu caiwu, HttpServletRequest request) {<!-- -->
        if (StrUtil.isBlank(caiwu.getZhanghao()) || StrUtil.isBlank(caiwu.getMima())) {<!-- -->
            throw new CustomException(ResultCode.PARAM_LOST_ERROR);
        }
        Caiwu login = caiwuService.login(caiwu);
// if(!login.getStatus()){<!-- -->
// return Result.error("1001","Status restriction, unable to log in to the system");
// }
        if(login != null) {<!-- -->
            HashMap hashMap = new HashMap();
            hashMap.put("user", login);
            Map<String, Object> map = MapWrapperUtils.builder(MapWrapperUtils.KEY_USER_ID,caiwu.getId());
            String token = JwtUtil.creatToken(map);
            hashMap.put("token", token);
            return Result.success(hashMap);
        }else {<!-- -->
            return Result.error();
        }
    }
    @PutMapping("/updatePassword")
    public Result updatePassword(@RequestBody Caiwu info, HttpServletRequest request) {<!-- -->
        Caiwu caiwu = caiwuService.findById(info.getId());
        String oldPassword = SecureUtil.md5(info.getMima());
        if (!oldPassword.equals(caiwu.getMima())) {<!-- -->
            return Result.error(ResultCode.PARAM_PASSWORD_ERROR.code, ResultCode.PARAM_PASSWORD_ERROR.msg);
        }
        info.setMima(SecureUtil.md5(info.getNewPassword()));
        Caiwu caiwu1 = new Caiwu();
        BeanUtils.copyProperties(info, caiwu1);
        caiwuService.update(caiwu1);
        return Result.success();
    }
}

5. Renderings

Please add an image description
Please add image description
Please add an image description
Please add a picture description
Please add a picture description
Please add image description

6. Article directory

Table of contents
Chapter 1 Introduction 1
1.1 Background and significance 1
1.2 Overview of research at home and abroad 2
1.3 Contents of the study 2
Chapter 2 Research on Key Technologies 3
2.1 Related technologies 3
2.2 Java technology 3
2.3 ECLIPSE development environment 4
2.4 Introduction to Tomcat 4
2.5 Spring Boot Framework 5
Chapter 3 System Analysis 5
3.1 System design goals 6
3.2 System feasibility analysis 6
3.3 System function analysis and description 7
3.4 System UML use case analysis 8
3.4.1 Administrator use case 9
3.4.2 User use cases 9
3.5 System process analysis 10
3.5.1 Add information process 11
3.5.2 Operation process 12
3.5.3 Deletion of information process 13
Chapter 4 System Design 14
4.1 System Architecture 15
4.2 Database design principles 16
4.3 Data sheet 17
Chapter 5 System Implementation 18
5.1 User function module 18
5.2 Administrator function module 19
5.3 User function module 19
5.4 Front page function module 19
Chapter 6 System Test 20
6.1 Test definition and purpose 21
6.2 Performance Test 22
6.3 Test module 23
6.4 Test results 24
Summary 25
Acknowledgments 27