基于javaweb的JSP+Servlet高校学生党员信息管理系统(java+servlet+mysql+jdbc+tomcat+jsp+javascript)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

432224001403

442224001403

452224001403

462224001403

472224001403

482224001403

492224001403

512224001403

基于javaweb的JSP+Servlet高校学生党员信息管理系统(java+servlet+mysql+jdbc+tomcat+jsp+javascript)

项目名称:高校党员信息管理系统
技术栈:Jsp+Servlet
访问地址:http://localhost:8080/schoolweb/login.jsp
系管理员:zhangsan 密码:123456
超级管理员:admin 密码:123546
功能:
系管理员
个人管理
学院管理
支部信息管理
入党积极分子信息
预备党员信息
正式党员信息
党费信息
组织活动信息
公告信息
超级管理员
个人管理
学院管理
支部信息管理
入党积极分子信息
预备党员信息
正式党员信息
党费信息
组织活动信息
公告信息

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
/*
* $Revision: 1.1 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
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
@SuppressWarnings("unchecked")
public List<TStudentzh> getTStudentzhs(int currentpage, int pageunit,
String cond) {
List<TStudentzh> list = new ArrayList<TStudentzh>();
try {
DBWork da = new DBWork();
conn=da.getConnection();
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery("select * from t_studentzh a where 1 = 1 "+cond+" limit "+(currentpage-1)*pageunit+","+pageunit);
while(rs.next())
{
TStudentzh studentzh = new TStudentzh();
studentzh.setId(rs.getInt("id"));
studentzh.setTypeid(rs.getString("typeid"));
studentzh.setUsername(rs.getString("username"));
studentzh.setBarthday(rs.getString("barthday"));
studentzh.setClassname(rs.getString("classname"));
studentzh.setFenzhi(rs.getString("fenzhi"));
studentzh.setNation(rs.getString("nation"));
studentzh.setPlace(rs.getString("place"));
studentzh.setSixiang(rs.getString("sixiang"));
studentzh.setTypename(rs.getString("typename"));
studentzh.setSex(rs.getString("sex"));
studentzh.setApplyer(rs.getString("applyer"));
studentzh.setFadate(rs.getString("fadate"));
studentzh.setJiedate(rs.getString("jiedate"));
studentzh.setZhuandate(rs.getString("zhuandate"));
studentzh.setJieuser(rs.getString("jieuser"));
studentzh.setJueyi(rs.getString("jueyi"));
studentzh.setStatus(rs.getString("status"));
studentzh.setRudate(rs.getString("rudate"));
studentzh.setIdcard(rs.getString("idcard"));
studentzh.setNewtid(rs.getString("newtid"));
studentzh.setNewtname(rs.getString("newtname"));
studentzh.setRollstatus(rs.getInt("rollstatus"));
list.add(studentzh);
}
rs.close();
stmt.close();
conn.close();
} catch (Exception e) {
e.printStackTrace();
}
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
	} catch (Exception e) {
e.printStackTrace();
}
return list;
}
/**
*
*
* 查询
*
*/
public TZuzhi getZuzhi(String id) throws SQLException
{
DBWork da = new DBWork();
TZuzhi zuzhi = new TZuzhi();
try {
conn=da.getConnection();
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery("select * from t_zuzhi u where u.id="+id);
if(rs.next())
{
zuzhi.setId(rs.getInt("id"));
zuzhi.setTypeid(rs.getString("typeid"));
zuzhi.setApplyer(rs.getString("applyer"));
zuzhi.setCsum(rs.getString("csum"));
zuzhi.setHuodate(rs.getString("huodate"));
zuzhi.setHuouser(rs.getString("huouser"));
zuzhi.setPlace(rs.getString("place"));
zuzhi.setStatus(rs.getString("status"));
zuzhi.setTel(rs.getString("tel"));
zuzhi.setTypename(rs.getString("typename"));
zuzhi.setXiangqing(rs.getString("typename"));
zuzhi.setHuoname(rs.getString("huoname"));
}
rs.close();
stmt.close();
conn.close();
} catch (Exception e) {
e.printStackTrace();
}
return zuzhi;
}
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
				 news.setTitle(rs.getString("title"));
news.setUsername(rs.getString("username"));
news.setXiangqing(rs.getString("xiangqing"));
}
rs.close();
stmt.close();
conn.close();
} catch (Exception e) {
e.printStackTrace();
}
return news;
}
}



/**
*
*
* 功能:组织信息Servlet
*
*/
public class ZuzhiServlet extends SimpleBaseServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
this.doPost(request, response);
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
String mtype = request.getParameter("mtype");
String url = "";
ZuzhiDao zuzhiDao = new ZuzhiDao();
/**
* 添加组织信息
*/
if("add".equals(mtype)){
Date date = new Date();
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
TZuzhi zuzhi = new TZuzhi();
zuzhi.setApplyer(request.getParameter("applyer"));
zuzhi.setCsum(request.getParameter("csum"));
zuzhi.setHuodate(request.getParameter("huodate"));
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
		 ResultSet rs=stmt.executeQuery("select * from t_user u where u.id="+id);
if(rs.next())
{
user.setId(rs.getInt("id"));
user.setUsername(rs.getString("username"));
user.setRealname(rs.getString("realname"));
user.setUsertype(rs.getInt("usertype"));
user.setPassword(rs.getString("password"));
user.setUsernum(rs.getString("usernum"));
user.setAtrr(rs.getString("atrr"));
user.setPhone(rs.getString("phone"));
user.setCard(rs.getString("card"));
user.setTypeid(rs.getString("typeid"));
}
rs.close();
stmt.close();
conn.close();
} catch (Exception e) {
e.printStackTrace();
}
return user;
}
/**
*
*
* 修改密码
*
*/
public void updatepassword(String password,String userid) throws SQLException
{
DBWork da = new DBWork();

try {
conn=da.getConnection();
PreparedStatement ptst=conn.prepareStatement ("update t_user u set u.password=? where u.id=? ");
ptst.setString(1, password);
ptst.setString(2, userid);
ptst.execute();
ptst.close();
conn.close();
} catch (Exception e) {
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
	studentzh.setZhuandate(request.getParameter("zhuandate"));
studentzh.setJieuser(request.getParameter("jieuser"));
studentzh.setJueyi(request.getParameter("jueyi"));
studentzh.setStatus(request.getParameter("status"));
studentzh.setRudate(request.getParameter("rudate"));
studentzh.setIdcard(request.getParameter("idcard"));
studentzhDao.addStudentzh(studentzh);
url = "/StudentzhServlet?mtype=query&flag=success";
/**
* 初始化修改正式党员信息界面
*/
}else if("preupdate".equals(mtype)){
request.setAttribute("studentzh", studentzhDao.getStudentzh(request.getParameter("id")));
url = "/files/studentzh/update.jsp";

/**
* 修改正式党员信息
*/
}else if("update".equals(mtype)){
TStudentzh studentzh = new TStudentzh();
studentzh.setId(Integer.parseInt(request.getParameter("id")));
studentzh.setBarthday(request.getParameter("barthday"));
studentzh.setClassname(request.getParameter("classname"));
studentzh.setFenzhi(request.getParameter("fenzhi"));
studentzh.setNation(request.getParameter("nation"));
studentzh.setPlace(request.getParameter("place"));
studentzh.setSixiang(request.getParameter("sixiang"));
studentzh.setTypeid(request.getParameter("typeid"));
studentzh.setTypename(request.getParameter("typename"));
studentzh.setUsername(request.getParameter("username"));
studentzh.setSex(request.getParameter("sex"));
studentzh.setApplyer(request.getParameter("applyer"));
studentzh.setFadate(request.getParameter("fadate"));
studentzh.setJiedate(request.getParameter("jiedate"));
studentzh.setZhuandate(request.getParameter("zhuandate"));
studentzh.setJieuser(request.getParameter("jieuser"));
studentzh.setJueyi(request.getParameter("jueyi"));
studentzh.setStatus(request.getParameter("status"));
studentzh.setRudate(request.getParameter("rudate"));
studentzh.setIdcard(request.getParameter("idcard"));
studentzhDao.updateStudentzh(studentzh);
url = "/StudentzhServlet?mtype=query";
/**
* 遍历正式党员信息
*/
}else if("apply".equals(mtype)){
TStudentzh studentzh = new TStudentzh();
studentzh.setId(Integer.parseInt(request.getParameter("id")));


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