基于javaweb的SSM简单医院信息管理系统(java+ssm+javascript+jsp+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

380023142402

400023142402

410023142402

420023142402

430023142402

440023142402

基于javaweb的SSM简单医院信息管理系统(java+ssm+javascript+jsp+mysql)

项目介绍

管理员角色: 登录,个人资料管理,用户管理,科室管理,医生管理,患者管理,科室项目管理,患者诊疗记录管理等功能。 医生角色包含以下功能: 医生角色登录,个人资料密码修改,科室查看,医生列表,患者信息查看,科室项目查看,添加患者诊疗记录等功能。

环境需要

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版本;

技术栈

  1. 后端:Spring+SpringMVC+Mybatis 2. 前端:HTML+CSS+JavaScript+jsp

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录

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
			huanzheguanliMapper.updateObject(util);
}
return this.getAllUtil(request, model);
}
}
package graduation.design.controller;



@Controller
@RequestMapping(value = "Keshixiangmuguanli")
public class KeshixiangmuguanliController {
@Autowired
private KeshixiangmuguanliMapper keshixiangmuguanliMapper;
@Autowired
private KeshiguanliMapper keshiguanliMapper;

@RequestMapping(value = "/initUtil.do")
public String initUtil(HttpServletRequest request, Model model) {
List<Keshiguanli> listKeshiguanli = keshiguanliMapper.getObjectList(null, null);
model.addAttribute("listKeshiguanli", listKeshiguanli);
return "Keshixiangmuguanli/saveOrUpdate";
}

@RequestMapping(value = "/selectUtil.do")
public String selectUtil(HttpServletRequest request, Keshixiangmuguanli util, Model model) {
util = keshixiangmuguanliMapper.selectObject(util.getId());
model.addAttribute("util", util);
List<Keshiguanli> listKeshiguanli = keshiguanliMapper.getObjectList(null, null);
model.addAttribute("listKeshiguanli", listKeshiguanli);
return "Keshixiangmuguanli/saveOrUpdate";
}

@SuppressWarnings({ "rawtypes", "unchecked" })
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
				model.addAttribute("errMsg", "该信息已存在!");
return "Sexguanli/saveOrUpdate";
}
sexguanliMapper.insertObject(util);
} else {
if (list.size() > 1) {
model.addAttribute("util", util);
model.addAttribute("errMsg", "该信息已存在!");
return "Sexguanli/saveOrUpdate";
}
sexguanliMapper.updateObject(util);
}
return this.getAllUtil(request, model);
}
}
package com.baidu.ueditor;




public class ActionEnter {

private HttpServletRequest request = null;

private String rootPath = null;
private String contextPath = null;

private String actionType = null;

private ConfigManager configManager = null;

public ActionEnter ( HttpServletRequest request, String rootPath ) {

this.request = request;
this.rootPath = rootPath;
this.actionType = request.getParameter( "action" );
this.contextPath = request.getContextPath();
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
44
45
		for (YishengFile temp : list) {
if (user_id == temp.getUser().getId()) {
listYishengFile.add(temp);
}
}
if (!"admin".equals(user_type)) {
//list = listYishengFile;
}

PageModel pageModel = new PageModel();
pageModel = pageModel.getUtilByController(list, currentPageNo);
model.addAttribute("pageModel", pageModel);
model.addAttribute("fieldValue", fieldValue);
model.addAttribute("field", field);
return "YishengFile/find";
}

@RequestMapping(value = "/deleteUtil.do")
public String deleteUtil(HttpServletRequest request, YishengFile util, Model model) {
try{
yishengFileMapper.deleteObject(util.getId());
}catch(Exception e){
}
return this.getAllUtil(request, model);
}

@RequestMapping(value = "/deleteManyUtil.do")
public String deleteManyUtil(HttpServletRequest request, User util,
Model model) {
String ids[] = request.getParameterValues("id");
for (String id : ids) {
util = new User();
util.setId(Integer.parseInt(id));
try{
yishengFileMapper.deleteObject(util.getId());
}catch(Exception e){}
}
return this.getAllUtil(request, model);
}

@RequestMapping(value = "/saveOrUpdateObject.do")
public String saveOrUpdateObject(HttpServletRequest request, YishengFile util, Model model) {
List<YishengFile> list = yishengFileMapper.getObjectList("s_0", util.getS_0());
List<User> listUser = userMapper.getObjectList(null, null);
model.addAttribute("listUser", listUser);
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


@Controller
@RequestMapping(value = "Sexguanli")
public class SexguanliController {
@Autowired
private SexguanliMapper sexguanliMapper;

@RequestMapping(value = "/initUtil.do")
public String initUtil(HttpServletRequest request, Model model) {
return "Sexguanli/saveOrUpdate";
}

@RequestMapping(value = "/selectUtil.do")
public String selectUtil(HttpServletRequest request, Sexguanli util, Model model) {
util = sexguanliMapper.selectObject(util.getId());
model.addAttribute("util", util);
return "Sexguanli/saveOrUpdate";
}

@SuppressWarnings({ "rawtypes", "unchecked" })
@RequestMapping(value = "/getAllUtil.do")
public String getAllUtil(HttpServletRequest request, Model model) {
String field = request.getParameter("field");
String fieldValue = request.getParameter("fieldValue");
try {
fieldValue = new String(fieldValue.getBytes("iso-8859-1"), "utf-8");
} catch (Exception e) {}
String pageNo = request.getParameter("pageModel.currentPageNo");
int currentPageNo = 1;
try{
currentPageNo = Integer.parseInt(pageNo);
}catch(Exception e){
}
List<Sexguanli> list = sexguanliMapper.getObjectList(field, fieldValue);
PageModel pageModel = new PageModel();
pageModel = pageModel.getUtilByController(list, currentPageNo);
model.addAttribute("pageModel", pageModel);
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




@Controller
@RequestMapping(value = "User")
public class UserController {
@Autowired
private UserMapper userMapper;

@RequestMapping(value = "/login.do")
public String login(HttpServletRequest request, User util, Model model) {

HttpSession session = request.getSession();
String code = (String) session.getAttribute("code");
String userCode = request.getParameter("code");

if (!code.equals(userCode)) {
model.addAttribute("errMsg", "验证码错误");
return "../login";
}
User user = userMapper.getObjectByName(util);
if (null == user) {
model.addAttribute("errMsg", "登录失败");
return "../login";
}
boolean flag = user.getS_1().equals(util.getS_1());
if (!flag) {
model.addAttribute("errMsg", "登录失败");
return "../login";
}

if (flag && !SysUtil.getSysFlag()) {
model.addAttribute("errMsg", "无法登陆,请联系管理员");
return "../login";
}

session.setAttribute("user_id", user.getId());
session.setAttribute("user_type", user.getS_11());
session.setAttribute("type1", "admin");
session.setAttribute("type2", "admin");
session.setAttribute("name", user.getS_2());
session.setAttribute("username", user.getS_0());
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
44
		pageModel = pageModel.getUtilByController(list, currentPageNo);
model.addAttribute("pageModel", pageModel);
model.addAttribute("fieldValue", fieldValue);
model.addAttribute("field", field);
return "Sexguanli/find";
}

@RequestMapping(value = "/deleteUtil.do")
public String deleteUtil(HttpServletRequest request, Sexguanli util, Model model) {
try{
sexguanliMapper.deleteObject(util.getId());
}catch(Exception e){
}
return this.getAllUtil(request, model);
}

@RequestMapping(value = "/deleteManyUtil.do")
public String deleteManyUtil(HttpServletRequest request, User util,
Model model) {
String ids[] = request.getParameterValues("id");
for (String id : ids) {
util = new User();
util.setId(Integer.parseInt(id));
try{
sexguanliMapper.deleteObject(util.getId());
}catch(Exception e){}
}
return this.getAllUtil(request, model);
}

@RequestMapping(value = "/saveOrUpdateObject.do")
public String saveOrUpdateObject(HttpServletRequest request, Sexguanli util, Model model) {
List<Sexguanli> list = sexguanliMapper.getObjectList("s_0", util.getS_0());
if (0 == util.getId()) {
if (list.size() > 0) {
model.addAttribute("util", util);
model.addAttribute("errMsg", "该信息已存在!");
return "Sexguanli/saveOrUpdate";
}
sexguanliMapper.insertObject(util);
} else {
if (list.size() > 1) {
model.addAttribute("util", util);
model.addAttribute("errMsg", "该信息已存在!");


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