基于javaweb和mysql的springboot医院管理系统平台(java+springboot+mybaits+vue+elementui+mysql)
基于javaweb和mysql的springboot医院管理系统平台(java+springboot+mybaits+vue+elementui+mysql)基于javaweb的SpringBoot医院管理系统平台(java+springboot+mybaits+vue+elementui+mysql)前台地址:http://localhost:8080/springbootrpj39/front
基于javaweb和mysql的springboot医院管理系统平台(java+springboot+mybaits+vue+elementui+mysql)
私信源码获取及调试交流
私信源码获取及调试交流
运行环境
Java≥8、MySQL≥5.7、Node.js≥14
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SpringBoot医院管理系统平台(java+springboot+mybaits+vue+elementui+mysql)
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 5.7/8.0版本均可;
5.是否Maven项目:是;
技术栈
后端:SpringBoot+Mybaits
前端:Vue + elementui
使用说明
项目运行:
-
使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
-
使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;
-
将项目中application.yml配置文件中的数据库配置改为自己的配置;
-
运行项目,在浏览器中输入地址:
前台地址:http://localhost:8080/springbootrpj39/front/index.html
后台地址
http://localhost:8080/springbootrpj39/admin/dist/index.html
管理员 abo 密码 abo
用户:用户1 密码: 123456
注意项目文件路径中不能含有中文、空格、特殊字符等,否则图片会上传不成功。
List<User> users = userService.selectAll();
model.addAttribute("users", users);
System.out.println("Controller" + users);
return "home";
@RequestMapping(value = "json1", produces = "application/json")
public @ResponseBody
List<User> getJson() {
List<User> list = userService.selectAll();
System.out.println(list);
return list;
@RequestMapping(value="delete" ,method=RequestMethod.POST)
public String delete(@RequestParam("id") int id){
userService.deleteById(id);
System.out.println(id);
return "getByDoctorInfo";
//, method = RequestMethod.POST
@RequestMapping(value = "Ddelete")
public String delete( String dNumber) {
doctorService.deleteById(dNumber);
return "redirect:/getAllDoctor?pageNum=1&pageSize=2";
//, method = RequestMethod.POST
@RequestMapping(value = "addDoctor",method = RequestMethod.POST)
public String register(@RequestParam("image") MultipartFile image,
HttpServletRequest request,
@RequestParam("dNumber") String dNumber,
@RequestParam("name") String name,
@RequestParam("dPwd") String dPwd,
@RequestParam("cNumber") String cNumber,
// }
@RequestMapping(value = "delByid")
public String delById(String cNumber) {
System.out.println(cNumber);
departmentService.delById(cNumber);
return "redirect:/getDepart?pageNum=1&pageSize=2";
@RequestMapping(value = "find")
public String findName(@RequestParam("pageNum") int pageNum,@RequestParam("pageSize") int pageSize,Model model, String info, String chose) {
// chose=1,按照科室搜索
// 2姓名搜索
System.out.println(info + chose);
if (chose.equals("1")) {
List<Department> departments = departmentService.findId(info,pageNum,pageSize);
return "index";
if(status.equals("2")){
boolean result = doctorService.checklogin(name, pwd);
if (result) {
model.addAttribute("name", name);
model.addAttribute("pwd", pwd);
return "dindex";
return "login";
@RequestMapping(value="addDepart", method = RequestMethod.POST)
public String adDepart(@RequestParam(value="cNumber") String cNumber,@RequestParam(value="dName") String dName,@RequestParam(value="dDec") String dDec){
Department department = new Department(cNumber,dName,dDec);
System.out.println(department);
public void setAdministorService(IAdministorService administorService) {
this.administorService = administorService;
@Resource
public void setDoctorService(IDoctorService doctorService) {
this.doctorService = doctorService;
public IDoctorService getDoctorService() {
return doctorService;
//method = RequestMethod.POST)
@RequestMapping(value = "index")
public String login(@RequestParam("name") String name,
@RequestMapping(value = "findDoctor")
public String findDoctor(@RequestParam("pageNum") int pageNum,@RequestParam("pageSize") int pageSize,Model model, String info, String chose) {
// chose=1,按照科室搜索
// 2姓名搜索
System.out.println(info + chose);
if (chose.equals("1")) {
List<DoctorInfo> dInfos = doctorService.findId(info,pageNum,pageSize);
PageInfo<DoctorInfo> list = new PageInfo<DoctorInfo>(dInfos);
model.addAttribute("PageInfo",list);
return "allDoctor";
if (chose.equals("2")) {
List<DoctorInfo> dInfos = doctorService.findName(info,pageNum,pageSize);
PageInfo<DoctorInfo> list = new PageInfo<DoctorInfo>(dInfos);
public class DoctorController {
@Autowired
private IDoctorService doctorService;
private IDepartmentService departmentService;
public IDoctorService getDoctorService() {
return doctorService;
public void setDoctorService(IDoctorService doctorService) {
this.doctorService = doctorService;
public void setDepartmentService(IDepartmentService departmentService) {
this.departmentService = departmentService;
public IDepartmentService getDepartmentService() {
return doctorService;
public void setDoctorService(IDoctorService doctorService) {
this.doctorService = doctorService;
public void setDepartmentService(IDepartmentService departmentService) {
this.departmentService = departmentService;
public IDepartmentService getDepartmentService() {
return departmentService;
@RequestMapping(value = "Djson", produces = "application/json")
public @ResponseBody List<DoctorInfo> getJson() {
List<DoctorInfo> list = doctorService.selectAll(1,4);
System.out.println("DoctorController" + list);
return list;
@RequestMapping(value = "getAllDoctor")
@RequestMapping("update")
public String update(@RequestParam("cNumber") String cNumber,
@RequestParam("dName") String dName,
@RequestParam("dDec") String dDec) {
Department department = new Department(cNumber, dName, dDec);
departmentService.update(department);
return "redirect:/getDepart?pageNum=1&pageSize=2";
用户管理控制层:
@Controller
@RequestMapping("/")
public class UserController {
@Autowired
} catch (Exception e) {
return "second";
@RequestMapping(value = "updateUser", method = RequestMethod.POST)
public void updateUser(@RequestParam("username") String username,
@RequestParam("password") String pwd,
@RequestParam("tel") String tel,
@RequestParam("info") String info,
@RequestParam("id") Integer id,
Model model,HttpSession session,HttpServletResponse response,HttpServletRequest request) {
User user = new User(username, pwd, id, tel, info);
try {
userService.updateUser(user);
List<User> list = userService.checkLogin(user.getUname(),user.getPwd());
@Resource
public void setAdministorService(IAdministorService administorService) {
this.administorService = administorService;
@Resource
public void setDoctorService(IDoctorService doctorService) {
this.doctorService = doctorService;
public IDoctorService getDoctorService() {
return doctorService;
//method = RequestMethod.POST)
@RequestMapping(value = "index")
public String login(@RequestParam("name") String name,
@RequestParam("pwd") String pwd,@RequestParam("status") String status, Model model) {
System.out.println(name+pwd);
/*@RequestMapping(value="addDoctor", method = RequestMethod.POST)
public String adDoctor(@RequestParam(value="cNumber") String cNumber,@RequestParam(value="dName") String dName,@RequestParam(value="dDec") String dDec){
Department department = new Department(cNumber,dName,dDec);
System.out.println(department);
int result = administorService.addDepart(department);
System.out.println(result);
// if(result==1){
return "redirect:/getDepart";
// }
// return "404";
}*/
@RequestMapping(value="updatePwd")
@RequestParam("name") String name,
@RequestParam("dPwd") String dPwd,
@RequestParam("cNumber") String cNumber,
@RequestParam("dInfo") String dInfo,
@RequestParam("dResume") String dResume,
@RequestParam("dTel") String dTel,
@RequestParam("dEmail") String dEmail,
Model model) {
// 获取项目的根路径,将上传图片的路径与我们的资源路径在一起,才能显示
HttpSession session = request.getSession();
String path = session.getServletContext().getRealPath("/");
System.out.println("getRealPath('/'):" + path);
int end = path.indexOf("t", 19);
return "register";
@RequestMapping(value = "login.action", method = RequestMethod.POST)
public String login(@RequestParam("username") String username,
@RequestParam("pwd") String pwd, Model model,HttpSession session) {
List<User> list = userService.checkLogin(username,pwd);
try {
list.get(0);
model.addAttribute("name", username);
model.addAttribute("pwd", pwd);
session.setAttribute("user", list);
return "uindex";
public String getByDoctor(String dNumber,Model model){
List<Doctor> doctors = doctorService.getById(dNumber);
model.addAttribute("doctor", doctors);
System.out.println("doctor的信息"+doctors);
return "getByDoctorInfo";
//, method = RequestMethod.POST
@RequestMapping(value = "Ddelete")
public String delete( String dNumber) {
doctorService.deleteById(dNumber);
return "redirect:/getAllDoctor?pageNum=1&pageSize=2";
//, method = RequestMethod.POST
@RequestMapping(value = "addDoctor",method = RequestMethod.POST)
public String register(@RequestParam("image") MultipartFile image,
List<Doctor> doctors = doctorService.getById(dNumber);
model.addAttribute("doctor", doctors);
System.out.println("doctor的信息"+doctors);
return "updateDoctor";
@RequestMapping(value="getByDoctor")
public String getByDoctor(String dNumber,Model model){
List<Doctor> doctors = doctorService.getById(dNumber);
model.addAttribute("doctor", doctors);
System.out.println("doctor的信息"+doctors);
return "getByDoctorInfo";
//, method = RequestMethod.POST
@RequestMapping(value = "Ddelete")
return "redirect:/getAllDoctor?pageNum=1&pageSize=2";
//, method = RequestMethod.POST
@RequestMapping(value = "addDoctor",method = RequestMethod.POST)
public String register(@RequestParam("image") MultipartFile image,
HttpServletRequest request,
@RequestParam("dNumber") String dNumber,
@RequestParam("name") String name,
@RequestParam("dPwd") String dPwd,
@RequestParam("cNumber") String cNumber,
@RequestParam("dInfo") String dInfo,
@RequestParam("dResume") String dResume,
@RequestParam("dTel") String dTel,
@RequestParam("dEmail") String dEmail,
更多推荐
所有评论(0)