ssm学院党员管理系统源码和论文PPT002
开发工具:idea
数据库mysql5.7+(mysql5.7最佳)
数据库链接工具:navcat,小海豚等
开发技术:java ssm tomcat8.5
选题意义、价值和目标:
随着鄂尔多斯应用技术学院招生规模的不断扩大,学院党员的数量也在不断增加,以往采用的人工管理党员信息的方式,在数据共享、存储、查询、管理、汇总等工作中都存在很多困难。并且传统方式管理党员信息无法满足新时期的工作需求,暴露出很多弊端,因此,需要针对鄂尔多斯应用技术学院实际的情况,设计开发出一款鄂尔多斯应用技术学院党员管理系统。该系统可以使党员信息管理工作规范化,还可以提高党建工作效率,增强党员工作考核的严谨度和透明度。
写作提纲:
本论文将会从以下几部分撰写:
(1)绪论。主要介绍研究背景及意义,以及研究内容。
(2)相关技术。介绍此系统使用到的技术与工具。
(3)系统分析。主要分析系统可行性与功能需求等。
(4)系统设计。主要对系统功能和数据库进行设计。
(5)系统功能实现。主要介绍系统界面的实现。
(6)系统测试。阐述系统的功能测试。
(7)结论。对本系统的不足做出总结,分析系统需要改进与完善的方面。
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.DangyuanEntity;
import com.entity.view.DangyuanView;import com.service.DangyuanService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 党员* 后端接口* @author * @email * @date 2023-12-17 17:40:13*/
@RestController
@RequestMapping("/dangyuan")
public class DangyuanController {@Autowiredprivate DangyuanService dangyuanService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {DangyuanEntity user = dangyuanService.selectOne(new EntityWrapper<DangyuanEntity>().eq("zhanghao", username));if(user==null || !user.getMima().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(), username,"dangyuan", "党员" );return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@RequestMapping("/register")public R register(@RequestBody DangyuanEntity dangyuan){//ValidatorUtils.validateEntity(dangyuan);DangyuanEntity user = dangyuanService.selectOne(new EntityWrapper<DangyuanEntity>().eq("zhanghao", dangyuan.getZhanghao()));if(user!=null) {return R.error("注册用户已存在");}Long uId = new Date().getTime();dangyuan.setId(uId);dangyuanService.insert(dangyuan);return R.ok();}/*** 退出*/@RequestMapping("/logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");DangyuanEntity user = dangyuanService.selectById(id);return R.ok().put("data", user);}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){DangyuanEntity user = dangyuanService.selectOne(new EntityWrapper<DangyuanEntity>().eq("zhanghao", username));if(user==null) {return R.error("账号不存在");}user.setMima("123456");dangyuanService.updateById(user);return R.ok("密码已重置为:123456");}/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,DangyuanEntity dangyuan, HttpServletRequest request){EntityWrapper<DangyuanEntity> ew = new EntityWrapper<DangyuanEntity>();PageUtils page = dangyuanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dangyuan), params), params));request.setAttribute("data", page);return R.ok().put("data", page);}/*** 前端列表*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,DangyuanEntity dangyuan, HttpServletRequest request){EntityWrapper<DangyuanEntity> ew = new EntityWrapper<DangyuanEntity>();PageUtils page = dangyuanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dangyuan), params), params));request.setAttribute("data", page);return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( DangyuanEntity dangyuan){EntityWrapper<DangyuanEntity> ew = new EntityWrapper<DangyuanEntity>();ew.allEq(MPUtil.allEQMapPre( dangyuan, "dangyuan")); return R.ok().put("data", dangyuanService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(DangyuanEntity dangyuan){EntityWrapper< DangyuanEntity> ew = new EntityWrapper< DangyuanEntity>();ew.allEq(MPUtil.allEQMapPre( dangyuan, "dangyuan")); DangyuanView dangyuanView = dangyuanService.selectView(ew);return R.ok("查询党员成功").put("data", dangyuanView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){DangyuanEntity dangyuan = dangyuanService.selectById(id);return R.ok().put("data", dangyuan);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") String id){DangyuanEntity dangyuan = dangyuanService.selectById(id);return R.ok().put("data", dangyuan);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody DangyuanEntity dangyuan, HttpServletRequest request){dangyuan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(dangyuan);DangyuanEntity user = dangyuanService.selectOne(new EntityWrapper<DangyuanEntity>().eq("zhanghao", dangyuan.getZhanghao()));if(user!=null) {return R.error("用户已存在");}dangyuan.setId(new Date().getTime());dangyuanService.insert(dangyuan);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody DangyuanEntity dangyuan, HttpServletRequest request){dangyuan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(dangyuan);DangyuanEntity user = dangyuanService.selectOne(new EntityWrapper<DangyuanEntity>().eq("zhanghao", dangyuan.getZhanghao()));if(user!=null) {return R.error("用户已存在");}dangyuan.setId(new Date().getTime());dangyuanService.insert(dangyuan);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody DangyuanEntity dangyuan, HttpServletRequest request){//ValidatorUtils.validateEntity(dangyuan);dangyuanService.updateById(dangyuan);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){dangyuanService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<DangyuanEntity> wrapper = new EntityWrapper<DangyuanEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = dangyuanService.selectCount(wrapper);return R.ok().put("count", count);}}
主要参考文献:
[1]许丹丹,卢珍.浅析高职院校党员信息化系统的模块设计[J].通讯世界,2020,27(04):212-213.
[2]李军.新时代高校发展学生党员管理信息系统的思考[J].西南林业大学学报(社会科学),2020,4(01):51-53.
[3]宋丽娜.基于JSP的Web开发中文乱码问题的研究与解决[J].电子技术,2015,42(11):5-7.
[4]汪君宇.基于JSP的Web应用软件开发技术分析[J].科技创新与应用,2018(16):158-160.
[5]赵钢.JSP Servlet+EJB的Web模式应用研究[J].电子设计工程,2016,21(13):47-49.
[6]肖英.解决JSP/Servlet开发中的中文乱码问题[J].科技传播,2017,(1)11-25.
[7]朱钧.基于角色的jsp通用权限系统设计与实现[D].山东大学,2014.
[8]康牧.JSP动态网站开发实用教程[M].清华大学出版社,2014.
[9]王建国.数据库设计在网站开发中的应用[J].山东农业工程学院学报,2017,34(04):158-159+164.
[10]张知青.基于关系数据库的查询方法及优化技术分析[J].煤炭技术,2015,31(05):218-220.
[11]Konstantins Gusarovs. An Analysis on Java Programming Language Decompiler Capabilities[J]. Applied Computer Systems,2018,23(2).
[12]Tan Yiyu. A Hardware-oriented Object Model for Java in an Embedded Processor[J]. Microprocessors and Microsystems,2018.
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.JiangchengjiluEntity;
import com.entity.view.JiangchengjiluView;import com.service.JiangchengjiluService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 奖惩记录* 后端接口* @author * @email * @date 2023-12-17 17:40:13*/
@RestController
@RequestMapping("/jiangchengjilu")
public class JiangchengjiluController {@Autowiredprivate JiangchengjiluService jiangchengjiluService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,JiangchengjiluEntity jiangchengjilu, HttpServletRequest request){String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("dangyuan")) {jiangchengjilu.setZhanghao((String)request.getSession().getAttribute("username"));}EntityWrapper<JiangchengjiluEntity> ew = new EntityWrapper<JiangchengjiluEntity>();PageUtils page = jiangchengjiluService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiangchengjilu), params), params));request.setAttribute("data", page);return R.ok().put("data", page);}/*** 前端列表*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,JiangchengjiluEntity jiangchengjilu, HttpServletRequest request){EntityWrapper<JiangchengjiluEntity> ew = new EntityWrapper<JiangchengjiluEntity>();PageUtils page = jiangchengjiluService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiangchengjilu), params), params));request.setAttribute("data", page);return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( JiangchengjiluEntity jiangchengjilu){EntityWrapper<JiangchengjiluEntity> ew = new EntityWrapper<JiangchengjiluEntity>();ew.allEq(MPUtil.allEQMapPre( jiangchengjilu, "jiangchengjilu")); return R.ok().put("data", jiangchengjiluService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(JiangchengjiluEntity jiangchengjilu){EntityWrapper< JiangchengjiluEntity> ew = new EntityWrapper< JiangchengjiluEntity>();ew.allEq(MPUtil.allEQMapPre( jiangchengjilu, "jiangchengjilu")); JiangchengjiluView jiangchengjiluView = jiangchengjiluService.selectView(ew);return R.ok("查询奖惩记录成功").put("data", jiangchengjiluView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){JiangchengjiluEntity jiangchengjilu = jiangchengjiluService.selectById(id);return R.ok().put("data", jiangchengjilu);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") String id){JiangchengjiluEntity jiangchengjilu = jiangchengjiluService.selectById(id);return R.ok().put("data", jiangchengjilu);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody JiangchengjiluEntity jiangchengjilu, HttpServletRequest request){jiangchengjilu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(jiangchengjilu);jiangchengjiluService.insert(jiangchengjilu);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody JiangchengjiluEntity jiangchengjilu, HttpServletRequest request){jiangchengjilu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(jiangchengjilu);jiangchengjiluService.insert(jiangchengjilu);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody JiangchengjiluEntity jiangchengjilu, HttpServletRequest request){//ValidatorUtils.validateEntity(jiangchengjilu);jiangchengjiluService.updateById(jiangchengjilu);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){jiangchengjiluService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<JiangchengjiluEntity> wrapper = new EntityWrapper<JiangchengjiluEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("dangyuan")) {wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));}int count = jiangchengjiluService.selectCount(wrapper);return R.ok().put("count", count);}}