基于SSM的药店管理系统设计与实现

3 篇文章 3 订阅
3 篇文章 1 订阅

摘  要

如今采用计算机进行信息化数据管理,提高了管理的方便性、安全性等,也适应了当今社会信息化高速发展的特征随着现代科学技术的迅猛发展,计算机技术已经渗透到各个领域,成为各行业必不可少的工具,特别是Internet技术的推广和信息高速公路的建立,使IT产业在市场竞争中越发显示出其独特的优势,步入信息化时代,有巨大的数据信息等待加工处理和传输,这使得对数据库的进一步开发和利用显得尤为迫切。

随着药店规模的发展不断扩大,药品数量急剧增加,有关药品的各种信息量也成倍增长,药店管理系统成为市场常用的系统之一。它最主要的特点是能够实时的和准确的控制店内的销售、管理情况。本课题所研究的药店管理系统,实现了药物管理分类的全过程,为患者呈现出所有药品的详细信息,此系统利用计算机网络实现了在各个不同种类药品信息共享,提高了患者在选药上的准确性,为药店也解决了不小的压力。同时也合理的分配资源。同时系统将所有的药品信息透明化,不会让广大群众花冤枉钱。

本系统运用了Spring,SpringBoot,SSM流行框架技术来对业务逻辑和数据持久化操作,在划分模块及确定各模块所需实现的功能,各模块之间的功能的协调和信息沟通,模块设计结束后的整合。此系统流程相对清晰,功能上主要完成对药品的管理和各种操作,同时也实现了对系统管理员的增删操作。通过后期系统的不断完善和改造,优化界面并且修改系统漏洞,基本实现了各个功能模块。

【关键词】药店管理系统,jsp编程技术,mysql数据库,SSM,springboot

Abstract

Nowadays, the use of computers for information data management has improved the convenience and security of management, and also adapted to the characteristics of the rapid development of information technology in today's society. With the rapid development of modern science and technology, computer technology has penetrated into all fields and become an indispensable tool in all industries, especially the promotion of Internet technology and the establishment of information superhighway, It makes the IT industry more and more show its unique advantages in the market competition. Entering the information age, there is a huge amount of data information waiting for processing and transmission, which makes the further development and utilization of databases particularly urgent.

With the continuous expansion of the scale of drug stores, the number of drugs has increased sharply, and the amount of information about drugs has also doubled. The drug store management system has become one of the systems commonly used in the market. Its main feature is that it can control the sales and management in the store in real time and accurately. The pharmacy management system studied in this project realizes the whole process of drug management classification and presents the detailed information of all drugs for patients. This system uses computer network to realize the sharing of information on different types of drugs, improves the accuracy of patients in drug selection, and also solves the pressure for the pharmacy. At the same time, we should allocate resources reasonably. At the same time, the system will make all drug information transparent and will not let the masses spend money unjustly.

This system uses Spring, SpringBoot and SSM popular framework technologies to perform business logic and data persistence operations, divide modules and determine the functions that need to be implemented by each module, coordinate and communicate information between the functions of each module, and integrate after the module design. The process of this system is relatively clear. Functionally, it mainly completes the management of drugs and various operations, and also realizes the addition and deletion of system administrators. Through the continuous improvement and transformation of the system in the later stage, the interface was optimized and the system vulnerabilities were modified, and each functional module was basically realized.

[Key words] Pharmacy management system, jsp programming technology, mysql database, SSM, spring boot

       

目  录

摘  要

Abstract

第1章 绪论

1.1 课题的目的及意义

1.1.1 课题的目的

1.2 研究现状

第2章 系统分析

2.1 可行性分析

2.1.1 技术可行性

2.1.2 经济可行性

2.2 系统需求

2.2.1 用户需求

2.2.3 系统功能分析

2.2.4 功能描述

2.3 开发工具介绍

2.3.1 J2SE平台

2.3.2 IDEA简介

2.3.3 SSM简介

2.3.4 jsp嵌入式脚本

2.3.5 SpringBoot

2.3.5 数据库选型

2.4 本章小结

第3章 总体设计

3.1 系统功能模块设计

3.2 数据库设计

3.2.1 设计依据

3.2.2 数据库的概念结构设计

3.2.3 数据库的逻辑结构设计

3.3 本章小结

第4章 详细设计

4.1 用户各功能模块

4.1.2学生选课功能模块的实现

4.1.3个人信息管理模块

4.1.4修改密码模块

4.2 管理员各功能模块的实现

4.2.1 员工管理功能模块的实现

4.2.2 进货管理的模块操作实现

4.2.3药品管理模块的实现

4.3 本章小结

第5章 系统测试

5.1 系统测试的基本原则

5.2 软件测试方法

5.3 系统测试用例

5.4 本章小结

结  论

致  谢

参考文献

附 录 1

附 录 2

附 录 3

第1章 绪论

1.1 课题的目的及意义

1.1.1 课题的目的

随着计算机科学技术的发展,计算机技术已经渗透到各个领域,成为各行业必不可

少的工具,信总化管理发挥着越来越重要的作用。信息化管理工作已经渗透到各个领域

的日常工作中,无论是其自身还是所发挥的作用,都为医药或个人的创新、发展以及经

济效益做出了显著的贡献。

就药店而言,特别是一些中小型的药店,在信息化过程中的步伐要落后于大中型药

店,而对于这些药店的资源管理,信息的存储和处理也显得迫切需要,要适应市场竞争,

就需要有高效的处理方式和管理方法,因此加快药品的信息化进程是必不可少的。药店

需要处理大量的库存信息,还要时刻更新产品的销售信息,不断添加药品信息。面对不

同种类的信息,需要合理的数据库结构来保存数据信息,需要有效的程序结构支持各种

数据操作的执行。这些直接影响销售的方便性及管理的规范性。随着信息时代的发展,

对效率的要求日益提高,药店经营涉及进、销、存等多个环节,涉及药品种类繁多、业

务量大、库存管理复杂,使用手工管理已无法胜任,因而软件控制销售和管理已经取代

了传统手工方式。如果可以能够实时掌握销售流程及销售情况,则可以有效地加速药品

的周转率并提高服务质量,而且可以减少产品售价不符等所产生的问题。顾客的消费要

求的是希望在药店购物中能基本上都能购得所需的药品,并且还要既保证药品质量还要

享受优质,方便的服务。1.1.2 课题的意义

网上药店管理系统是未来药店行业的发展趋势,就现在而言它已经成为我国药店行

业发展的一种重要形态,同时为国民经济的发展发挥了重要的作用。随着药店高速的发

展,其经营管理也变得愈加复杂,早期的药店人员站柜台的形式早己不能满足现有销售

也的发展,所以网上药店管理是势在必行。

如今随着现代化信息技术的迅猛发展和普及,药品的生存和竞争环境发生了根本的

变化。药品要想在市场竞争中立于不败之地,必须进行信息化建设,所以信息化管理就

成为药店获取竞争优势的关键所在。药店的信息管理技术是保证药品内、外部信息在药

店行业中准确、快捷的流动,为决策提供依据,其关键是实现设计信息、生产信息、管

理信息的有效整合。药店信息化管理能够降低药品的成本,提高药店的整体管理水平,

获得更大的利润。为此,在选题过程中,我选择了药店管理系统设计题目,依靠现代化

的计算机信息处理技术来管理药店,使系统具有检索迅速、查找方便、可靠性高、存储

量大、保密性好、寿命长、成本低等特点,从而节省了大量的人力、物力,改善了员工

的工作条件,减轻了劳动强度,并且能够快速反映出药品的进、销、存等状况和各种反

馈信息分析,使管理人员快速对市场的变化做出相应的决策,加快药店经营管理效率。

步入数字化时代,有巨大的数据信息等待着加工处理和传输,药店系统本就需要有

一个强大的数据库支持,这就需要对数据库进行进一步的开发和利用,而对药品的进销

存管理,信息的存储和处理也显的尤其重要。要适应如今激烈的市场竞争,就需要有高

效的处理方式和管理方法,因此加快药店的信息化进程是必不可少的。

1.2 研究现状

目前,我国药店信息化状况的分布基本明朗:在高端药店,进销存核心结构体系基

本运作正常,面临的主要问题是数据的深挖掘和加工、财务业务系统的高度集成、根据

药品的并购重组保证系统和数据的统一、稳定:在中端药店,分散营运向集中管理转变,

进销存核心结构系统正在由分散单店管理、销售核算向连锁管理、进价核算过渡:在低

端药店,刚刚涉足、转向连锁零售业,对于信息化认识处于表面层次,业务流程和信息

系统建设需要一段时间的探索、认识和渐进过程。而整个零售行业对信息化的认识已经

逐渐趋向一致的认识:信息化是药店可持续发展、增强核心竞争力的必要手段。

药店管理系统从药品运营及管理的实际情况出发,结合当前中国零售业发展趋势,

顺应了零售行业对信息化的要求,为商业管理信息系统提供了系统全面的技术解决方

案。基于以上原因,药店管理系统目前在各个商业领域都发挥了很大的作用,也得到了

越来越多的大、中、小型商业药店的应用。但就目前的应用状况分析,管理系统在中、

高端药店得到了广泛的应用和重视,在小型药店、零售店的应用仅局限于信息化的表面

层次,没有得到高度的重视。同时,小药店也因资金方面问题限制了其向更高程度信息

化的应用。

随着信息化的快速发展,以及激烈的市场竞争,各药店也将在信息化上下功夫,以

高效率、低成本立足市场,获得更多的利润。1.本课题主要研究内容

本课题的设计思想是:该系统使药店的管理员,可以更加方便地使用药店管理系统

来管理将实现药物管理分类的全过程,为患者呈现出所有药品的详细信息,此系统利用

计算机网络实现了在各个不同种类药品信息共享,提高了在选药上的准确性,改善了医药分类选择管理统计因难现状。为医院也、药店解决了不小的压力,同时也合理的分配资源,同时系统将所有的药品信息透明化。

这样就提高了在WEB领域下的办公自动化的信息管理,使医药的管理员可以更加方

便地在WEB领域中对医药的各种进货产品,发货产品,库存药品,以及各种产品的进货

发货价格进行管理,使医药的管理员,更加方便地查看医药内的进货产品,发货产品,

库存产品,以及各种产品的价格等等信息进行查看。通过这些价格等等信息。进行简单

的统计计算。提高了药店管理员的工作效率,这样就使药店管理系统就会变得更加有意

义。

功能图展示  本文章附带源码和论文需要的私信
 

 

 

 

 

 

 

 以下是部分代码实现

package com.my.controller;

import com.my.pojo.User;
import com.my.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@Controller
public class LoginController {
    @Autowired
    private LoginService loginService;

    @PostMapping("login")
    public String login(User user,
                        @RequestParam String code,
                        ModelMap map,
                        HttpServletRequest request){
        String yanzhengma= (String) request.getSession().getAttribute("code");
        User user1=loginService.queryUser(user);
        if (code.equalsIgnoreCase(yanzhengma)!=false){
            if (user1!=null){
                map.put("admin",user1);
                request.getSession().setAttribute("admin",user1);
                request.getSession().setMaxInactiveInterval(6000);
                return "index";
            }else {
                map.put("state","密码错误");
                return "login";
            }
        }else {
            map.put("state", "验证码错误");
            return "login";
        }

    }


     @GetMapping("loginOut")
     public String loginOut(HttpSession session){
            session.invalidate();
            return "login";
     }

    @GetMapping("/loginT")
    public String loginT(){

        return "public/login.jsp";
    }
}

  package com.my.controller;

import com.github.pagehelper.PageInfo;
import com.my.pojo.User;
import com.my.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * 用户模块
 */
@Controller
public class UserController {
    @Autowired
    private UserService userService;


    @RequestMapping("queryUserAll")
    public String queryUser(@RequestParam int pageNum, ModelMap modelMap){
        PageInfo<User> users=userService.queryUserAll(pageNum);
        modelMap.put("page",users);
        return "select";
    }
    //更新用户信息
    @PostMapping("updateUser")
    public String updateUser( User user){
        int num=userService.updateUser(user);
        return "redirect:queryUserAll?pageNum=1";
    }
    //删除用户
    @GetMapping("delUser")
    public String delUser(@RequestParam int uid){
        int num=userService.delUser(uid);
        return "redirect:queryUserAll?pageNum=1";
    }
    //添加用户
    @PostMapping("addUser")
    public String addUser(User user){
        int num=userService.addUser(user);
        return "redirect:queryUserAll?pageNum=1";
    }
    //修改密码
    @PostMapping("/updatePassword")
    public String updatePassword(@RequestParam String password,
                                 @RequestParam String password2,
                                 @RequestParam int uid,
                                 ModelMap map, HttpSession session){

        int num=userService.upPwd(uid,password2);
        if (num>0){
            map.put("state","修改成功请重新登录!");
            session.invalidate();
            return "login";
        }else {
            map.put("msg","修改失败原密码错误");
            return  "redirect:queryUserAll?pageNum=1";
        }

    }
    //修改个人信息
    @PostMapping("upUser")
    public String upUser(User user,ModelMap modelMap,HttpSession session){
        int count=userService.updateUser(user);
        if (count>0){
            modelMap.put("state","修改信息成功请重新登录!");
            session.invalidate();
            return "login";
        }else {
            modelMap.put("msg","修改失败");
            return  "redirect:queryUserAll?pageNum=1";
        }
    }
    @PostMapping("queryUserLike")
    public String queryUser(@RequestParam String name,ModelMap modelMap){
        if (name!=null &&name!="") {
            PageInfo<User> bookBeans=userService.queryUserLike(name,1);
            modelMap.put("name",name);
            modelMap.put("page",bookBeans);
            return "select";
        }else {
            return  "redirect:queryUserAll?pageNum=1";
        }
    }
}
package com.my.controller;

import com.github.pagehelper.PageInfo;
import com.my.pojo.Employee;
import com.my.pojo.User;
import com.my.service.EmpService;
import com.sun.org.apache.xpath.internal.operations.Mod;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

/**
 * 员工管理模块
 */
@Controller
public class EmpController {
    @Autowired
    private EmpService empService;

    @RequestMapping("queryEmpAll")
    public  String queryEmpAll(@RequestParam int pageNum, ModelMap modelMap){
        PageInfo<Employee> employeePageInfo=empService.queryEmpAll(pageNum);
        modelMap.put("page",employeePageInfo);
        return "emp";
    }
    @PostMapping("addEmp")
    public String addEmp(Employee employee,ModelMap modelMap){
        int num=empService.addEmp(employee);
        modelMap.put("msg","添加成功!");
        return "redirect:queryEmpAll?pageNum=1";
    }
    @GetMapping("delEmp")
    public String delEmp(@RequestParam int eid,ModelMap modelMap){
        int count=empService.delEmp(eid);
        modelMap.put("msg","删除成功!");
        return "redirect:queryEmpAll?pageNum=1";
    }

    @PostMapping("upEmp")
    public String upEmp(Employee employee){
        int count=empService.updateEmp(employee);
        return "redirect:queryEmpAll?pageNum=1";
    }
    @PostMapping("queryEmpLike")
    public String queryEmpLike(@RequestParam String name,ModelMap modelMap){
        if (name!=null &&name!="") {
            PageInfo<Employee> employeePageInfo=empService.queryUserLike(name,1);
            modelMap.put("name",name);
            modelMap.put("page",employeePageInfo);
            return "emp";
        }else {
            return  "redirect:queryUserAll?pageNum=1";
        }
    }
}
package com.my.controller;

import com.github.pagehelper.PageInfo;
import com.my.pojo.Employee;
import com.my.pojo.User;
import com.my.service.EmpService;
import com.sun.org.apache.xpath.internal.operations.Mod;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

/**
 * 员工管理模块
 */
@Controller
public class EmpController {
    @Autowired
    private EmpService empService;

    @RequestMapping("queryEmpAll")
    public  String queryEmpAll(@RequestParam int pageNum, ModelMap modelMap){
        PageInfo<Employee> employeePageInfo=empService.queryEmpAll(pageNum);
        modelMap.put("page",employeePageInfo);
        return "emp";
    }
    @PostMapping("addEmp")
    public String addEmp(Employee employee,ModelMap modelMap){
        int num=empService.addEmp(employee);
        modelMap.put("msg","添加成功!");
        return "redirect:queryEmpAll?pageNum=1";
    }
    @GetMapping("delEmp")
    public String delEmp(@RequestParam int eid,ModelMap modelMap){
        int count=empService.delEmp(eid);
        modelMap.put("msg","删除成功!");
        return "redirect:queryEmpAll?pageNum=1";
    }

    @PostMapping("upEmp")
    public String upEmp(Employee employee){
        int count=empService.updateEmp(employee);
        return "redirect:queryEmpAll?pageNum=1";
    }
    @PostMapping("queryEmpLike")
    public String queryEmpLike(@RequestParam String name,ModelMap modelMap){
        if (name!=null &&name!="") {
            PageInfo<Employee> employeePageInfo=empService.queryUserLike(name,1);
            modelMap.put("name",name);
            modelMap.put("page",employeePageInfo);
            return "emp";
        }else {
            return  "redirect:queryUserAll?pageNum=1";
        }
    }
}
package com.my.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.imageio.ImageIO;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Random;

/**
 * 验证码模块
 */

  • 2
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 9
    评论
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值