文末获取源码


开发语言:Java

开发工具:IDEA /Eclipse

数据库:MYSQL5.7

应用服务:Tomcat7/Tomcat8

使用框架:springboot+vue

JDK版本:jdk1.8

本疫情防控系统是结合当前新冠疫情期间的具体需求而开发的,本系统使用Java语言,springboot框架和MySQL数据库来进行开发,通过本系统可以对新冠疫情期间居家防护的人提供更多的资讯,从而在一定程度上防止了疫情的蔓延。

疫情防控系统分为前台和后台两部分,其中前台部分主要是给用户使用的,主要功能包括,用户的注册登录,查看疫情公告,在线交流,志愿者报名,体温上报管理,行踪上报管理,健康码上传管理,异常上报管理等功能,后台管理员功能主要包括个人中心,用户管理,体温上报管理,轨迹上报管理,健康码上传管理,收费类型管理,收费信息管理,收费信息,志愿者报名管理,报名信息管理,异常上报管理,系统论坛,系统管理等功能,通过这些功能可以更好的对疫情进行防控。

系统结构

疫情防控系统分为前台和后台两部分,其中前台部分主要是给用户使用的,主要功能包括,用户的注册登录,查看疫情公告,在线交流,志愿者报名,体温上报管理,行踪上报管理,健康码上传管理,异常上报管理等功能,后台管理员功能主要包括个人中心,用户管理,体温上报管理,轨迹上报管理,健康码上传管理,收费类型管理,收费信息管理,收费信息,志愿者报名管理,报名信息管理,异常上报管理,系统论坛,系统管理等功能,通过这些功能可以更好的对疫情进行防控。具体功能如下图所示

Springboot+vue项目疫情社区防控系统_java

疫情防控系统前台部分设计

系统首页

本系统是一个让用户疫情期间居家防护的系统,首页设计的时候我们加入了banner和图片轮播,并对最新的一些信息进行了推荐,方便用户更加直观方便的了解到想要的信息 ,疫情防控系统首页部分如图

Springboot+vue项目疫情社区防控系统_后端_02 

Springboot+vue项目疫情社区防控系统_前端_03 

用户在上一部分中点击了疫情公告的图片之后可以看到疫情公告的详情信息,在疫情公告的详情信息中可以了解到其具体的内容,疫情公告详情界面如图 

Springboot+vue项目疫情社区防控系统_vue_04 

在线论坛

本系统中的用户通过点击导航菜单的论坛交流信息可以看到本系统内相关的最新论坛交流信息,在论坛交流列表中我们通过列表的形式展示了论坛交流的摘要内容,这样论坛交流看起来更加的丰富多彩,论坛列表界面如图 

Springboot+vue项目疫情社区防控系统_后端_05

用户在上一部分中点击了论坛交流的标题之后可以看到论坛交流的详情信息,在论坛交流的详情信息中可以了解到其具体的内容,并且可以进行评论回复,论坛详情界面如图 

Springboot+vue项目疫情社区防控系统_java_06 

疫情防控系统后台部分设计

管理员登录模块的实现

 疫情防控系统中的管理员通过登录后可以系统的所有信息进行管理,在管理登录界面我们是通过用户名+密码的方式进行验证的,当用户输入登录信息并点击[登录]按钮之后系统将这些信息提交给login.jsp并到管理员信息表中查询信息是否存在,如果输入的用户名+密码正确即可成功的登录到系统中,否则系统给出提示要求重新登录。疫情防控系统管理员登陆界面如图 

Springboot+vue项目疫情社区防控系统_vue_07

Springboot+vue项目疫情社区防控系统_vue_08 

Springboot+vue项目疫情社区防控系统_spring boot_09 

Springboot+vue项目疫情社区防控系统_前端_10 

Springboot+vue项目疫情社区防控系统_前端_11 

Springboot+vue项目疫情社区防控系统_vue_12 

用户 

Springboot+vue项目疫情社区防控系统_vue_13

 Springboot+vue项目疫情社区防控系统_spring boot_14

Springboot+vue项目疫情社区防控系统_后端_15 

 部分核心代码:

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.format.annotation.DateTimeFormat;
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.BaomingxinxiEntity;
import com.entity.view.BaomingxinxiView;

import com.service.BaomingxinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
* 报名信息
* 后端接口
* @author
* @email
* @date 2021-04-07 16:26:16
*/
@RestController
@RequestMapping("/baomingxinxi")
public class BaomingxinxiController {
@Autowired
private BaomingxinxiService baomingxinxiService;



/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,BaomingxinxiEntity baomingxinxi,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
baomingxinxi.setZhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<BaomingxinxiEntity> ew = new EntityWrapper<BaomingxinxiEntity>();
PageUtils page = baomingxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, baomingxinxi), params), params));

return R.ok().put("data", page);
}

/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,BaomingxinxiEntity baomingxinxi, HttpServletRequest request){
EntityWrapper<BaomingxinxiEntity> ew = new EntityWrapper<BaomingxinxiEntity>();
PageUtils page = baomingxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, baomingxinxi), params), params));
return R.ok().put("data", page);
}

/**
* 列表
*/
@RequestMapping("/lists")
public R list( BaomingxinxiEntity baomingxinxi){
EntityWrapper<BaomingxinxiEntity> ew = new EntityWrapper<BaomingxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( baomingxinxi, "baomingxinxi"));
return R.ok().put("data", baomingxinxiService.selectListView(ew));
}

/**
* 查询
*/
@RequestMapping("/query")
public R query(BaomingxinxiEntity baomingxinxi){
EntityWrapper< BaomingxinxiEntity> ew = new EntityWrapper< BaomingxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( baomingxinxi, "baomingxinxi"));
BaomingxinxiView baomingxinxiView = baomingxinxiService.selectView(ew);
return R.ok("查询报名信息成功").put("data", baomingxinxiView);
}

/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
BaomingxinxiEntity baomingxinxi = baomingxinxiService.selectById(id);
return R.ok().put("data", baomingxinxi);
}

/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
BaomingxinxiEntity baomingxinxi = baomingxinxiService.selectById(id);
return R.ok().put("data", baomingxinxi);
}




/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody BaomingxinxiEntity baomingxinxi, HttpServletRequest request){
baomingxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(baomingxinxi);
baomingxinxiService.insert(baomingxinxi);
return R.ok();
}

/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody BaomingxinxiEntity baomingxinxi, HttpServletRequest request){
baomingxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(baomingxinxi);
baomingxinxiService.insert(baomingxinxi);
return R.ok();
}

/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody BaomingxinxiEntity baomingxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(baomingxinxi);
baomingxinxiService.updateById(baomingxinxi);//全部更新
return R.ok();
}


/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
baomingxinxiService.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<BaomingxinxiEntity> wrapper = new EntityWrapper<BaomingxinxiEntity>();
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("yonghu")) {
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}

int count = baomingxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}



}