当前位置: 首页 > news >正文

基于SSM和VUE的药品管理系统(含源码+sql+视频导入教程+文档)

👉文末查看项目功能视频演示+获取源码+sql脚本+视频导入教程视频

1 、功能描述

  基于SSM和VUE的药品管理系统2拥有两种角色

管理员:药品管理、出库管理、入库管理、销售员管理、报损管理等

销售员:登录注册、入库、出库、销售、报损等

功能架构

1.1 背景描述

  随着医疗领域的快速发展和人们对健康管理的需求不断增加,药店在社会中的地位日益重要。然而,传统的药店管理方式存在着库存管理困难、药品销售不透明、客户信息管理混乱等问题。为了解决这些挑战,我们开发了一款全新的药店管理系统,通过整合先进的信息技术和管理理念,实现了药品采购、库存管理、销售记录、客户健康档案管理等多项功能的一体化管理。我们致力于提高药店管理的效率、提升客户体验,并且确保药品管理的安全性和合规性,为药店经营者提供了更便捷、高效和可靠的管理工具,助力药店实现更加稳健可持续的发展。

2、项目技术

后端框架:SSM(Spring、SpringMVC、Mybatis)

前端技术:VUE

2.1 SSM

  SSM(Spring+SpringMVC+MyBatis)是目前比较主流的Java EE企业级框架,适用于搭建各种大型的企业级应用系统。其中,Spring就像是整个项目中的粘合剂,负责装配bean并管理其生命周期,实现控制反转(IoC)的功能。SpringMVC负责拦截用户请求,通过DispatcherServlet将请求匹配到相应的Controller并执行。而MyBatis则是对JDBC的封装,让数据库底层操作变得透明,通过配置文件关联到各实体类的Mapper文件,实现了SQL语句映射。

2.2 mysql

  MySQL是一款Relational Database Management System,直译过来的意思就是关系型数据库管理系统,MySQL有着它独特的特点,这些特点使他成为目前最流行的RDBMS之一,MySQL想比与其他数据库如ORACLE、DB2等,它属于一款体积小、速度快的数据库,重点是它符合本次毕业设计的真实租赁环境,拥有成本低,开发源码这些特点,这也是选择它的主要原因。

3、开发环境

  • JAVA版本:JDK1.8(最佳)
  • IDE类型:IDEA、Eclipse都可运行
  • 数据库类型:MySql(5.7、8.x版本都可)
  • tomcat版本:Tomcat 7-10版本均可
  • maven版本:无限制
  • 硬件环境:Windows

4、功能截图+视频演示+文档目录

4.1 登录

登录

4.2 管理员模块

管理员-报损申报管理

管理员-药品分类管理
管理员-出库记录

管理员-入库管理

管理员-药品管理

管理员-销售员管理

4.3 销售员模块

销售员-药品管理

4.4 文档目录

文档目录

5 、核心代码实现

5.1 配置代码


spring:datasource:username: rootpassword: rootdriver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://127.0.0.1:3306/chuangmeng?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true&allowPublicKeyRetrieval=trueservlet:multipart:max-file-size: 50MBmax-request-size: 50MB
server:port: 521
redis:open: false
shiro:redis: false
logging:level:com:mh: debug
mybatis-plus:type-aliases-package: com.mh.*.entitymapper-locations: classpath*:/mapper/*/*.xml

5.2 其它核心代码


package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@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("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@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("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@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("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@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);}/*** 列表*/@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));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@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);}/*** 保存*/@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("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {return R.error("用户名已存在。");}userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}

6 、获取方式

👇 大家点赞、收藏、关注、评论啦 👇🏻获取联系方式,后台回复关键词:药店👇🏻

请添加图片描述

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • 解锁全球机遇:澳大利亚服务器租用市场的独特魅力
  • 音视频入门基础:WAV专题(9)——FFmpeg源码中计算WAV音频文件每个packet的duration和duration_time的实现
  • 网络原理(3)—— 应用层、传输层(TCP)
  • Redis 是否存在线程安全问题:深入解析与技术分析
  • Robust Image Denoising through Adversarial Frequency Mixup
  • “他人笑我太疯癫,我笑他人看不穿“,关于做知识分享,被Diss,哇哦,真厉害
  • MongoDB 的适用场景
  • SM7015非隔离电磁炉/电饭煲电源芯片12V/18V输出
  • Java设计模式之责任链模式详细讲解和案例示范
  • 1.初识ChatGPT:AI聊天机器人的革命(1/10)
  • 一段代码搞懂String被final修饰的影响
  • 【UI】element ui table(表格)expand实现点击一行展开功能
  • 【Moveit2官方教程】使用 MoveIt Task Constructor (MTC) 框架来定义和执行一个机器人任务
  • Windows下SDL2创建最简单的一个窗口
  • laravel 11 区分多模块的token
  • [LeetCode] Wiggle Sort
  • - C#编程大幅提高OUTLOOK的邮件搜索能力!
  • DOM的那些事
  • Elasticsearch 参考指南(升级前重新索引)
  • ES6, React, Redux, Webpack写的一个爬 GitHub 的网页
  • idea + plantuml 画流程图
  • Java应用性能调优
  • js ES6 求数组的交集,并集,还有差集
  • puppeteer stop redirect 的正确姿势及 net::ERR_FAILED 的解决
  • springMvc学习笔记(2)
  • XML已死 ?
  • 阿里中间件开源组件:Sentinel 0.2.0正式发布
  • 每个JavaScript开发人员应阅读的书【1】 - JavaScript: The Good Parts
  • 时间复杂度与空间复杂度分析
  • 使用common-codec进行md5加密
  • 提升用户体验的利器——使用Vue-Occupy实现占位效果
  • 通过git安装npm私有模块
  • #HarmonyOS:基础语法
  • (delphi11最新学习资料) Object Pascal 学习笔记---第7章第3节(封装和窗体)
  • (LeetCode 49)Anagrams
  • (二) Windows 下 Sublime Text 3 安装离线插件 Anaconda
  • (二)JAVA使用POI操作excel
  • (附源码)springboot电竞专题网站 毕业设计 641314
  • (附源码)计算机毕业设计ssm基于B_S的汽车售后服务管理系统
  • (机器学习-深度学习快速入门)第一章第一节:Python环境和数据分析
  • (一)WLAN定义和基本架构转
  • (已解决)报错:Could not load the Qt platform plugin “xcb“
  • *上位机的定义
  • .bashrc在哪里,alias妙用
  • .NET Core 成都线下面基会拉开序幕
  • .Net 中的反射(动态创建类型实例) - Part.4(转自http://www.tracefact.net/CLR-and-Framework/Reflection-Part4.aspx)...
  • .NET/C# 使窗口永不获得焦点
  • .NET的数据绑定
  • @GetMapping和@RequestMapping的区别
  • @reference注解_Dubbo配置参考手册之dubbo:reference
  • [ 网络通信基础 ]——网络的传输介质(双绞线,光纤,标准,线序)
  • []Telit UC864E 拨号上网
  • [20171101]rman to destination.txt
  • [AI]文心一言爆火的同时,ChatGPT带来了这么多的开源项目你了解吗
  • [Angular] 笔记 9:list/detail 页面以及@Output