基于javaweb的SSM+Maven医院管理系统(java+ssm+layui+maven+mysql+jsp)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

410023122402

420023122402

430023122402

440023122402

450023122402

460023122402

基于javaweb的SSM+Maven医院管理系统(java+ssm+layui+maven+mysql+jsp)

功能介绍:

基于ssm+layui框架的小型医院后台管理系统。简单实现了病人管理、病床管理、员工管理、部门管理、药品管理、仪器管理等基础功能。 整个项目通过maven方式搭建用到的jar包通过maven导入,前端使用搭建好的Layui框架,拿来即用。后端使用SSM+MySQL,后台逻辑实现了分页、级联、多表查询。目前项目基本完成,可重构与扩展 

技术栈:

  • SSM框架 - Layui框架 - MySQL 5.7 数据库 - Maven搭建 - MD5加密 

实现功能:

  • 管理员的登录、退出与切换 - 管理员、仪器、药品、部门、员工、病床、病人各模块增删改查 - 个别模块关联查询 - 各个模块数据导出Excel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29


/**
* 导出Excel
*/
@RequestMapping(value = "/exportBedlist" , method = RequestMethod.POST)
@ResponseBody
public List<Bed> exportBedlist(){
List<Bed> beds = bedService.getAll();
return beds;
}


/**
* 部门人员信息查询
*/
@RequestMapping(value = "/findRoomT")
public String findRoomT(Room room, Model model) {
List<Bed> beds = bedService.findRoomT(room);
model.addAttribute("beds",beds);
return "roomT_list";
}
}
package com.xie.controller;



@Controller
public class SalaryController {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
    public String findClassStudent(Dept dept,Model model, HttpSession session) {
List<Dept> dep = deptService.findDeptPersonnel(dept);
model.addAttribute("dep",dep);
return "dept_Personnellist";
}

}
package com.xie.controller;



@Controller
public class BedController {
@Autowired
private BedService bedService;

/**
* 分页查询
*/
@RequestMapping("/findBed")
public String findBed(String bedNo, String bedRoomId,Integer pageIndex
, Integer pageSize, Model model,HttpSession session){
PageInfo<Bed> be = bedService.findPageInfo(bedNo,bedRoomId, pageIndex,pageSize);
model.addAttribute("be",be);
session.setAttribute("u",bedNo);
session.setAttribute("t",bedRoomId);
return "bed_list";
}

/**
* 添加病床信息
*/
@RequestMapping(value = "/addBed" ,method = RequestMethod.POST)
@ResponseBody
public String addBed(@RequestBody Bed bed) {
int a = bedService.addBed(bed);
return "bed_list";
}


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
    int a = personnelService.addPersonnel(personnel);
return "personnel_list";
}

/**
* 删除仪器信息
*/
@RequestMapping( "/deletePersonnel")
@ResponseBody
public String deletePersonnel(Integer empId) {
int a = personnelService.deletePersonnel(empId);
return "personnel_list";
}


/**
* 修改仪器信息
*/
@RequestMapping( value = "/updatePersonnel", method = RequestMethod.POST)
public String updatePersonnel(Personnel personnel) {
int a = personnelService.updatePersonnel(personnel);
return "redirect:/findPersonnel";
}

/**
* 根据管理员Id搜索;将请求数据a_id写入参数a_id
*/
@RequestMapping("/findPersonnelById")
public String findPersonnelById(Integer empId, HttpSession session) {
Personnel pe2= personnelService.findPersonnelById(empId);
session.setAttribute("pe2",pe2);
return "personnel_edit";
}



/**
* 导出Excel
*/
@RequestMapping(value = "/exportPersonnel" , method = RequestMethod.POST)
@ResponseBody
public List<Personnel> exportPersonnel(){
List<Personnel> personnel = personnelService.getAll();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40



@Controller
public class AppartusController {
@Autowired
private AppartusService appartusService;

/**
* 分页查询
*/
@RequestMapping("/findAppartus")
public String findAppartus(String appartusNo, String appartusName,Integer pageIndex
, Integer pageSize, Model model,HttpSession session){
PageInfo<Appartus> ap = appartusService.findPageInfo(appartusNo,appartusName, pageIndex,pageSize);
model.addAttribute("ap",ap);
session.setAttribute("u",appartusNo);
session.setAttribute("t",appartusName);
return "appartus_list";
}

/**
* 添加管理员信息
*/
@RequestMapping(value = "/addAppartus" ,method = RequestMethod.POST)
@ResponseBody
public String addAppartus(@RequestBody Appartus appartus) {
int a = appartusService.addAppartus(appartus);
return "admin_list";
}


/**
* 删除仪器信息
*/
@RequestMapping( "/deleteAppartus")
@ResponseBody
public String deleteAdmin(Integer appartusId) {
int a = appartusService.deleteAppartus(appartusId);
return "appartus_list";
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
    @RequestMapping(value = "/findDeptPersonnel")
public String findClassStudent(Dept dept,Model model, HttpSession session) {
List<Dept> dep = deptService.findDeptPersonnel(dept);
model.addAttribute("dep",dep);
return "dept_Personnellist";
}

}
package com.xie.controller;



@Controller
public class BedController {
@Autowired
private BedService bedService;

/**
* 分页查询
*/
@RequestMapping("/findBed")
public String findBed(String bedNo, String bedRoomId,Integer pageIndex
, Integer pageSize, Model model,HttpSession session){
PageInfo<Bed> be = bedService.findPageInfo(bedNo,bedRoomId, pageIndex,pageSize);
model.addAttribute("be",be);
session.setAttribute("u",bedNo);
session.setAttribute("t",bedRoomId);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    @RequestMapping("/findPaitientById")
public String findPaitientById(Integer paitientId, HttpSession session) {
Paitient pa2= paitientService.findPaitientById(paitientId);
session.setAttribute("pa2",pa2);
return "paitient_edit";
}



/**
* 导出Excel
*/
@RequestMapping(value = "/exportPaitientlist" , method = RequestMethod.POST)
@ResponseBody
public List<Paitient> exportPotion(){
List<Paitient> paitients = paitientService.getAll();
return paitients;
}

/**
* 部门人员信息查询
*/
@RequestMapping(value = "/findPP")
public String findPP(Personnel personnel, Model model) {
List<Paitient> paitients = paitientService.findPP(personnel);
model.addAttribute("pas",paitients);
return "PP_list";
}
}
package com.xie.controller;



@Controller
public class AppartusController {


项目链接:
https://javayms.github.io?id=291422272105200ba
https://javayms.pages.dev?id=291422272105200ba