基于javaweb的SSH医院挂号系统(java+ssh+mysql+jsp)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

022223122309

032223122309

052223122309

062223122309

072223122309

082223122309

092223122309

102223122309

132024403108

基于javaweb的SSH医院挂号系统(java+ssh+mysql+jsp)

管理员(后台):
admin 123456

医生(后台):
doctor1 123456
doctor2 123456

用户(前台预约+后台查看):
user1 123456
user2 123456
user3 123456

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
46
47
48
49
50
51
52
53
	String sql="from TUser ";
List userList=userDAO.getHibernateTemplate().find(sql);
for (int i=0;i<userList.size();i++)
{
TUser user = (TUser) userList.get(i);
user.setYiyuan(yiyuanDAO.findById(Integer.parseInt(user.getBeizhu()) ));
user.setKeshi(keshiDAO.findById(Integer.parseInt(user.getBeizhu2()) ));
}
Map request=(Map)ServletActionContext.getContext().get("request");
request.put("userList", userList);
return ActionSupport.SUCCESS;
}
public String userManaType1ByBeizhu()
{
//String sql="from TUser where del='no'";
String sql="from TUser where type='1' and beizhu='"+beizhu+"'";
List userList=userDAO.getHibernateTemplate().find(sql);
for (int i=0;i<userList.size();i++)
{
TUser user = (TUser) userList.get(i);
user.setYiyuan(yiyuanDAO.findById(Integer.parseInt(user.getBeizhu()) ));
user.setKeshi(keshiDAO.findById(Integer.parseInt(user.getBeizhu2()) ));
}
Map request=(Map)ServletActionContext.getContext().get("request");
request.put("userList", userList);
return ActionSupport.SUCCESS;
}

public String userManaType1ByBeizhuAndBeizhu2()
{
//String sql="from TUser where del='no'";
String sql="from TUser where type='1' and beizhu='"+beizhu+"' and beizhu2='"+beizhu2+"'";
List userList=userDAO.getHibernateTemplate().find(sql);
for (int i=0;i<userList.size();i++)
{
TUser user = (TUser) userList.get(i);
user.setYiyuan(yiyuanDAO.findById(Integer.parseInt(user.getBeizhu()) ));
user.setKeshi(keshiDAO.findById(Integer.parseInt(user.getBeizhu2()) ));
}
Map request=(Map)ServletActionContext.getContext().get("request");
request.put("userList", userList);
return ActionSupport.SUCCESS;
}
public String userManaType0()
{
//String sql="from TUser where del='no'";
String sql="from TUser where type='0'";
List userList=userDAO.getHibernateTemplate().find(sql);

Map request=(Map)ServletActionContext.getContext().get("request");
request.put("userList", userList);
return ActionSupport.SUCCESS;
}
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
46
47
	//String sql="from TUser where del='no'";
String sql="from TUser where type='"+type+"'";
List userList=userDAO.getHibernateTemplate().find(sql);

Map request=(Map)ServletActionContext.getContext().get("request");
request.put("userList", userList);
return ActionSupport.SUCCESS;
}

public String userXinxi()
{

TUser user=userDAO.findById(id);

Map request=(Map)ServletActionContext.getContext().get("request");
request.put("user", user);
return ActionSupport.SUCCESS;
}

public String userGet()
{

TUser user=userDAO.findById(id);

Map request=(Map)ServletActionContext.getContext().get("request");
request.put("user", user);
return ActionSupport.SUCCESS;
}

public String userDetailQian()
{

TUser user=userDAO.findById(id);
user.setYiyuan(yiyuanDAO.findById(Integer.parseInt(user.getBeizhu())));
user.setKeshi(keshiDAO.findById(Integer.parseInt(user.getBeizhu2())));
Map request=(Map)ServletActionContext.getContext().get("request");
request.put("user", user);
return ActionSupport.SUCCESS;
}

public String userSet()
{
TUser user=userDAO.findById(id);
//user.setShenhe("yes");
user.setLoginname(loginname);
user.setLoginpw(loginpw);
user.setXingming(xingming);
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








public class loginService
{

private TUserDAO userDAO;
private TKeshiDAO keshiDAO;
private TYiyuanDAO yiyuanDAO;



public TUserDAO getUserDAO()
{
return userDAO;
}

public TYiyuanDAO getYiyuanDAO()
{
return yiyuanDAO;
}
public void setYiyuanDAO(TYiyuanDAO yiyuanDAO)
{
this.yiyuanDAO = yiyuanDAO;
}
public void setUserDAO(TUserDAO userDAO)
{
this.userDAO = userDAO;
}


public TKeshiDAO getKeshiDAO() {
return keshiDAO;
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
46
47
48
49
50
51

public String getXingming() {
return xingming;
}

public void setXingming(String xingming) {
this.xingming = xingming;
}

public String getLianxi() {
return lianxi;
}

public void setLianxi(String lianxi) {
this.lianxi = lianxi;
}

public String getZt() {
return zt;
}

public void setZt(String zt) {
this.zt = zt;
}

public String getHuifu() {
return huifu;
}

public void setHuifu(String huifu) {
this.huifu = huifu;
}

public TGuahaoDAO getGuahaoDAO() {
return guahaoDAO;
}

public void setGuahaoDAO(TGuahaoDAO guahaoDAO) {
this.guahaoDAO = guahaoDAO;
}

public TUserDAO getUserDAO() {
return userDAO;
}

public void setUserDAO(TUserDAO userDAO) {
this.userDAO = userDAO;
}

public String getMessage() {
return message;
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
46
47
48
	catch (InterruptedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
String sql="from TUser where loginpw='"+loginpw+"'";
List list=userDAO.getHibernateTemplate().find(sql);
if(list.size()>0)
{
return "no";
}
else
{
return "yes";
}
}
public void logout()
{
WebContext ctx = WebContextFactory.get();
HttpSession session=ctx.getSession();
session.setAttribute("userType", null);
session.setAttribute("user", null);

}


public String userLogout()
{

WebContext ctx = WebContextFactory.get();
HttpSession session=ctx.getSession();

session.setAttribute("userType", null);
session.setAttribute("user", null);

return "yes";
}


public List keshiAll()
{
String sql="from TKeshi where del='no'";
List keshiList=keshiDAO.getHibernateTemplate().find(sql);
return keshiList;
}


public List yiyuanAll()


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