作者主页:源码空间站2022

简介:Java领域优质创作者、Java项目、学习资料、技术互助

文末获取源码

项目介绍

该系统共七个功能模块:查询模块、录入模块、删除模块、修改模块、浏览模块、打印模块和用户管理模块。

系统只有一个超级管理员,可以创建系统用户并进行权限管理,其他用户没有用户管理权限,只有其他权限。

不同的用户可以进入不同的模块进行相应操作。

管理员角色包含以下功能:

登录,信息查询,信息录入,信息删除,信息修改,信息浏览,打印报表,用户管理,权限管理,系统帮助等功能。

用户角色包含以下功能:

管理员只设置了查询功能,一些说明等功能。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;

5.数据库:MySql 5.7版本;

6.是否Maven项目:是;

技术栈

1. 后端:Spring+SpringMVC+Mybatis

2. 前端:HTML+CSS+JavaScript+easyui

使用说明

1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;

2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;

若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;

3. 将项目中jdbc.properties配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入localhost:8080/ 登录
管理员账号:admir 密码:1234

用户账号:test 密码:1201

运行截图

相关代码

AgencyController

package mms.controller;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;import mms.pojo.Agency;
import mms.pojo.EasyUIResult;
import mms.services.AgencyService;@RequestMapping("Agency")
@Controller
public class AgencyController {// 经办人controller@Autowiredprivate AgencyService agencyService;// 通过ano查询单个经办人@RequestMapping("GetAgency")@ResponseBodypublic Agency queryAgencyByAno(String ano) {Agency agency = agencyService.queryAgencyByAno(ano);return agency;}@RequestMapping(value = "DeleteAgency", produces = "text/html;charset=UTF-8")@ResponseBody// 按编号删除public String deleteAgencyByAno(String ano) {return agencyService.deleteAgencyByAno(ano);}// 批量删除@RequestMapping(value = "DeleteRows", produces = "text/html;charset=UTF-8")@ResponseBodypublic String deleteAgencyByRows(@RequestParam(value = "array[]") String[] array) {try {return agencyService.deleteAgencyByRows(array);} catch (Exception e) {// TODO: handle exception// 捕获异常,spring进行事务回滚return "操作异常,,某些经办人处理过顾客信息,无法删除该经办人,请重新选择";}}// 修改经办人信息@RequestMapping(value = "ModifyAgency", produces = "text/html;charset=UTF-8")@ResponseBodypublic String modifyAgency(Agency agency) {return agencyService.modifyAgency(agency);}// easyui数据表格返回全部经办人json@RequestMapping("GetMessage")@ResponseBodypublic EasyUIResult queryAllAgency(@RequestParam(value = "page", defaultValue = "1") Integer page,@RequestParam(value = "rows", defaultValue = "5") Integer rows) {return this.agencyService.queryAllAgency(page, rows);}// 保存经办人信息@RequestMapping(value = "SaveAgency", produces = "text/html;charset=UTF-8")@ResponseBodypublic String saveAgency(Agency agency) {return agencyService.saveAgency(agency);}// 返回所有经办人@RequestMapping("GetAllAgency")@ResponseBodypublic java.util.List<Agency> getAllAgency() {java.util.List<Agency> allAgency = agencyService.getAllAgency();return allAgency;}
}

ClientController

package mms.controller;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;import mms.pojo.Client;
import mms.pojo.EasyUIResult;
import mms.services.ClientService;@RequestMapping("Client")
@Controller
public class ClientController {// 顾客controller@Autowired// 注入serviceprivate ClientService clientService;// 按编号查询@RequestMapping("GetClient")@ResponseBodypublic Client queryClientBycno(String cno) {Client client = clientService.queryClientBycno(cno);return client;}// 按编号删除@RequestMapping("DeleteClient")@ResponseBodypublic void deleteClientBycno(String cno) {clientService.deleteClientBycno(cno);}
//  批量删除@RequestMapping(value = "DeleteRows", produces = "text/html;charset=UTF-8")@ResponseBodypublic String deleteClientByRows(@RequestParam(value = "array[]") String[] array) {return clientService.deleteClientByRows(array);//       clientService.deleteClientBycno(cno);}// 保存顾客信息@RequestMapping(value = "SaveClient", produces = "text/html;charset=UTF-8")@ResponseBodypublic String saveClient(Client client) {return clientService.saveClient(client);}@RequestMapping("GetMessage")@ResponseBody// easyui返回jsonpublic EasyUIResult queryAllClient(@RequestParam(value = "page", defaultValue = "1") Integer page,@RequestParam(value = "rows", defaultValue = "5") Integer rows) {EasyUIResult queryAllClient = clientService.queryAllClient(page, rows);return queryAllClient;}// 修改客户信息@RequestMapping(value = "ModifyClient", produces = "text/html;charset=UTF-8")@ResponseBodypublic String modifyClient(Client client) {return clientService.modifyClient(client);}
}

LoginController

package mms.controller;import java.util.Enumeration;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import mms.services.LoginService;
//处理登陆逻辑@RequestMapping("Login")
@Controller
public class LoginController {@Autowiredprivate LoginService loginService;/** 用户登陆 判断是否存在用户 存在保存session*/@RequestMapping(value = "loginUser", produces = "text/html;charset=UTF-8")@ResponseBodypublic String login(String username, String password, HttpSession session) {return loginService.login(username, password, session);}// 取出seeion的用户名@RequestMapping("GetLoginName")@ResponseBodypublic Object GetLoginName(HttpSession session) {Object username = session.getAttribute("user");return username;}// 清除session@RequestMapping("LogOff")@ResponseBodypublic void logOff(HttpSession session) {Enumeration em = session.getAttributeNames();while (em.hasMoreElements()) {session.removeAttribute(em.nextElement().toString());}}
}

MedicineController

package mms.controller;import java.util.List;import javax.servlet.http.HttpSession;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import mms.pojo.EasyUIResult;
import mms.pojo.Medicine;
import mms.services.MedicineService;@RequestMapping("Medicine")
@Controller
public class MedicineController {// 药品controller@Autowiredprivate MedicineService medicineService;// 通过mno查询药品信息@RequestMapping("QueryMedicineByMno")@ResponseBodypublic Medicine queryMedicineByMno(String mno) {Medicine medicine = medicineService.queryMedicineByMno(mno);return medicine;}/** // 多条件药品信息保存session* * @RequestMapping("QueryMultiMedicine")* * @ResponseBody public String queryMultiMedicine(Medicine* medicine,HttpSession session) { return* medicineService.queryMultiMedicine(medicine,session);* * } // 多条件药品查询url* * @RequestMapping("GetMultiMedicine")* * @ResponseBody public EasyUIResult getMultiMedicine(@RequestParam(value =* "page", defaultValue = "1") Integer page,* * @RequestParam(value = "rows", defaultValue = "5") Integer rows,* HttpSession session) { return medicineService.getMultiMedicine(page,* rows,session);* * }*//** // 通过mno删除药品信息* * @RequestMapping(value = "DeleteMedicine", produces =* "text/html;charset=UTF-8")* * @ResponseBody public String deleteMedicineByMno(String mno) { return* medicineService.deleteMedicineByMno(mno); }*/// 批量删除@RequestMapping(value = "DeleteRows", produces = "text/html;charset=UTF-8")@ResponseBodypublic String deleteMedicineByRows(@RequestParam(value = "array[]") String[] array) {try {return medicineService.deleteMedicineByRows(array);} catch (Exception e) {// TODO: handle exceptionreturn "操作异常,可能某些药品被顾客购买过," + "无法删该药品,请重新选择";}}// 保存药品信息@RequestMapping(value = "SaveMedicine", produces = "text/html;charset=UTF-8")@ResponseBodypublic String saveMedicine(Medicine medicine) {return medicineService.saveMedicine(medicine);}// 修改药品信息@RequestMapping(value = "ModifyMedicine", produces = "text/html;charset=UTF-8")@ResponseBodypublic String modifyMedicine(Medicine medicine) {return medicineService.modifyMedicine(medicine);}// easyui返回json@RequestMapping("GetMessage")@ResponseBodypublic EasyUIResult queryAllMedicine(@RequestParam(value = "page", defaultValue = "1") Integer page,@RequestParam(value = "rows", defaultValue = "5") Integer rows) {return medicineService.queryAllMedicine(page, rows);}// 获得药品信息@RequestMapping("GetAllMedicine")@ResponseBodypublic List<Medicine> getAllMedicine() {List<Medicine> allMedicine = medicineService.getAllMedicine();return allMedicine;}
}

UserController

package mms.controller;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;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.ResponseStatus;import mms.pojo.EasyUIResult;
import mms.pojo.User;
import mms.services.UserServies;//用户
@RequestMapping("User")
@Controller
public class UserController {@Autowiredprivate UserServies userServies;// 添加新用户@RequestMapping("AddUser")@ResponseBodypublic String addUser(User user) {userServies.addUser(user);return "success";}// 修改用户信息@RequestMapping("UpdateUser")@ResponseBodypublic void updateUser(User user) {userServies.updateUser(user);}// 删除用户@RequestMapping("DeleteUser")@ResponseStatus(value = HttpStatus.OK)public void deleteUser(String uUsername) {userServies.deleteUser(uUsername);}// easyui返回全部用户信息@RequestMapping("queryAllUser")@ResponseBodypublic EasyUIResult queryAllUser(@RequestParam(value = "page", defaultValue = "1") Integer page,@RequestParam(value = "rows", defaultValue = "5") Integer rows) {EasyUIResult queryAllUser = userServies.queryAllUser(page, rows);return queryAllUser;}// 通过uUsername查询用户@RequestMapping(value = "GetUUsername", produces = "text/html;charset=UTF-8")@ResponseBodypublic String queryUserByName(String uUsername) {return userServies.queryUserByName(uUsername);}@RequestMapping(value = "GetUpassword", produces = "text/html;charset=UTF-8")@ResponseBodypublic String queryPasswordByName(String uUsername) {return userServies.queryPasswordByName(uUsername);}
}

如果也想学习本系统,下面领取。关注并回复:079ssm

Java项目:SSM医药信息管理系统相关推荐

  1. Java项目ssm企业工资管理系统源码

    Java版ssm企业工资管理系统,源码免费分享,需要可私信. 项目技术:jsp+mysql+Spring+mybatis 运行环境:最好是java jdk 1.8,我们在这个平台上运行的.其他版本理论 ...

  2. Java项目:中小医院信息管理系统(java+Springboot+ssm+mysql+maven+jsp)

    源码获取:博客首页 "资源" 里下载! 一.项目简述 本系统功能包括:实现了挂号收费,门诊管理,划价收 费,药房取药,体检管理,药房管理,系统维护等各个模块功能,非常不错. 二.项 ...

  3. java基于SSM医药后台管理系统

    介绍: spring+springmvc+mybatis+mysql+eclipse. 截图: 数据库表: CREATE TABLE agency ( ano char(50) CHARACTER S ...

  4. Java SpringMVC毕业项目实战-学生信息管理系统

    目录 摘要设计: 系统功能概述: B站视频演示:java毕业设计-SSM学生信息管理系统.mp4 主要功能截图: 主要数据库设计: 论文结构目录设计 : 获取完整源码: 摘要设计:文末获取源码联系 本 ...

  5. Java毕设项目-医药信息管理系统

    题目:基于J2EE医药信息管理系统的设计与实现 文末获取联系 1.系统总体设计 1.1开发环境 操作系统:Windows10: 编程语言:Java: 运行环境:tomcat9.0      jdk1. ...

  6. 基于javaweb的医药信息管理系统(java+ssm+html+easyui+mysql)

    基于javaweb的医药信息管理系统(java+ssm+html+easyui+mysql) 运行环境 Java≥8.MySQL≥5.7.Tomcat≥8 开发工具 eclipse/idea/myec ...

  7. ssm毕设项目大学生比赛信息管理系统38iiq(java+VUE+Mybatis+Maven+Mysql+sprnig)

    ssm毕设项目大学生比赛信息管理系统38iiq(java+VUE+Mybatis+Maven+Mysql+sprnig) 项目运行 环境配置: Jdk1.8 + Tomcat8.5 + Mysql + ...

  8. 基于SSM的医药信息管理系统

    项目简介 后端框架:SSM 技术栈:Java.SpringMvc.Mybatis 数据库:Mysql 源码 :完整源码 项目介绍:这是一套基于SSM框架的医药信息管理系统,mysql作为底层数据库,使 ...

  9. java计算机毕业设计基于Ssm学生信息管理系统源码+数据库+系统+lw文档+mybatis+运行部署

    java计算机毕业设计基于Ssm学生信息管理系统源码+数据库+系统+lw文档+mybatis+运行部署 java计算机毕业设计基于Ssm学生信息管理系统源码+数据库+系统+lw文档+mybatis+运 ...

最新文章

  1. 【linux】ubuntu14.04升级dbus到1.13.8,杯具了,无法进入桌面
  2. App3种开发方式的优劣分析:原生、混合和H5
  3. 系统管理员在企业中的职业定位及发展方向 连载(三)
  4. Ubuntu Linux 16.04 xfce下最漂亮的系统字体------文鼎粗钢笔楷体安装记录
  5. 多线程中局部静态变量初始化的陷阱
  6. 经典工具 | 使用SIFT预测错义突变的有害性
  7. 001.常见监控简介
  8. mysql 并发性_MySQL 事务
  9. 签入代码(新建分支,新建推拉请求)关联工作项,却找不到自己需要的工作项...
  10. java输入学生名字输出_用java实现:输入学生个数,并输入每个学生的名字还有分数,结果输出分数最高和分数第二高的学生......
  11. for path多行变一列
  12. 【修复版】ONE兔3.0版本社交社区交友婚恋视频即时通讯双端APP原生源码
  13. vim实用技巧总结 [Linux]
  14. 第 7 章. 缓冲区资源,渲染通道,帧缓冲区以及使用 SPIR-V 的着色器
  15. 华为交换机ntp自动校时配置
  16. php pandoc,搭建Pandoc+Markdown写作环境
  17. 十二星座匹配对象_水瓶座最佳配对对象是谁
  18. 北大青鸟消防控制器组网_北大青鸟JBF-61S20防火门监控报警主机使用说明书
  19. 苹果8参数_苹果12pro max 128G新起点预售价9099元-苹果 iPhone 12 Pro Max_西安手机行情...
  20. 职场选择之大公司 VS 小公司

热门文章

  1. linux下使用微信web开发者工具
  2. 快速近似最近邻算法_数据科学家指南,以选择最佳近似最近邻算法
  3. token加密——RSA加密
  4. uniapp图片自适应显示,不裁剪
  5. HDU 4386(计算几何+婆罗摩笈多公式一般形式)
  6. 自定义控件三部曲视图篇(四)——RecyclerView系列之一简单使用
  7. 计算机界的传奇人物:高德纳
  8. cmake直接下载地址(版本列表形式)
  9. th:classappend
  10. Java程序员,15家面试,几个offer , 我的面试历程!