作者主页:源码空间站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. 成功解决preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is ambiguous.
  2. linux sed 找出前后三行,Linux Sed 使用示例
  3. FTP 两种传输模式 Binary 和 ASCII 的区别
  4. RACSignal的Subscription深入分析
  5. SOA研究综述(转)
  6. [cocos2dx]斗地主制作之洗牌算法
  7. js 一个关于图片onload加载的事
  8. php隐藏下载外链,教你如何去掉友荐和无觅的隐藏外链和版权链接
  9. 【管理经验】管理的本质-激发善意
  10. kafka 偏移量latest、earliest
  11. 如何定期清理DNS缓存?清理DNS缓存有什么用?
  12. 安卓应用移植鸿蒙(五):发布鸿蒙自定义组件(har包)到MavenCenter全过程,采坑无数
  13. python画太极八卦图_CAD怎么画出八卦图? cad画完整太极八卦图的教程
  14. 大疆无人机飞行+摄影测量航测不完全教程
  15. java算斜率_[Java教程]js用斜率判断鼠标进入div的四个方向
  16. 用Mysql做个人信息管理系统_个人信息管理系统数据库设计精选.doc
  17. 9.数字处理类(遗留)
  18. Revit模型转Gltf
  19. 《啊哈算法》的Java现实 | 第三章:枚举!很暴力
  20. 线程间通信方式Linux,线程间的通信、同步方式与进程间通信方式

热门文章

  1. AD进行PCB拼板设计
  2. Windows 2008 R2的备份与恢复功能
  3. 九阳破壁机轴承坏只能换刀片总成组件
  4. VPS服务器性能一键测试脚本_IP路由/CPU基准/内存读取/下载上传速率测试脚本
  5. 【Free RTOS简介】
  6. excel时间戳‘精准’转换为日期
  7. 大学四年自学走来,这些私藏的【实用工具/学习网站】我贡献出来了
  8. 错误0x8007018b,已拒绝访问云文件
  9. 三菱FX3U PLC如何开启外部输入中断
  10. 帆软堆积柱形图标签显示汇总值,标签写js,树形图系列展示汇总值占比