大家好!我是职场程序猿,感谢您阅读本文,欢迎一键三连哦。
💞当前专栏:Java毕业设计
精彩专栏推荐👇🏻👇🏻👇🏻
开发运行环境
- 框架:ssm
- JDK版本:JDK1.8
- 服务器:tomcat7
- 数据库:mysql 5.7
- 数据库工具:Navicat12
- 开发软件:eclipse/myeclipse/idea
- Maven包:Maven3.3.9
- 浏览器:谷歌浏览器
源码下载地址:
https://download.csdn.net/download/m0_46388260/89271083
论文目录
【如需全文请按文末获取联系】
一、项目简介
职工健康每日申报系统使用Java语言进行编码,使用Mysql创建数据表保存本系统产生的数据。系统可以提供信息显示和相应服务,其管理员管理员工的健康登记信息,管理员工,省份以及市区信息。员工登记健康信息,管理健康登记信息,包括修改,查询。
二、系统设计
2.1软件功能模块设计
在前面分析的管理员功能的基础上,进行接下来的设计工作,最终展示设计的管理员结构图(见下图)。管理员管理员工的健康登记信息,管理员工,省份以及市区信息。
在前面分析的员工功能的基础上,进行接下来的设计工作,最终展示设计的员工结构图(见下图)。员工登记健康信息,管理健康登记信息,包括修改,查询。
2.2数据库设计
(1)下图是健康信息实体和其具备的属性。
(2)下图是员工实体和其具备的属性。
(3)下图是管理员实体和其具备的属性。
(5)下图为上述各实体间相互之间的关系。
三、系统项目部分截图
3.1管理员功能实现
员工管理
管理员进入指定功能操作区之后可以管理员工。其页面见下图。管理员在当前页面新增员工信息,修改员工的身份证,手机,邮箱,照片等资料,删除指定的员工资料。
健康登记管理
管理员进入指定功能操作区之后可以管理员工的健康登记信息。其页面见下图。管理员可以查询员工的健康登记信息,可以修改员工的健康登记信息,包括省份,市区,详细地址以及员工的体温等信息,可以删除指定的员工健康登记信息。
省份管理
管理员进入指定功能操作区之后可以管理省份信息。其页面见下图。管理员在本页面可以新增省份,修改与删除省份信息。
3.2员工功能实现
员工注册
员工可以先注册获取职工健康每日申报系统的账号,密码。其页面见下图。员工需要登记的信息包括姓名,邮箱,密码,工号等信息。
新增健康信息
员工进入指定功能操作区之后可以新增健康信息。其页面见下图。员工登记自己的体温,身体状况,所在省份以及市区,详细住址等信息,最后提交健康登记信息。
健康登记管理
员工进入指定功能操作区之后可以管理健康登记信息。其页面见下图。员工查看自己的身体状况信息,可以在本页面修改健康登记信息,查询健康登记信息。
四、部分核心代码
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.ShiquEntity;
import com.entity.view.ShiquView;
import com.service.ShiquService;
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-08 17:43:15
*/
@RestController
@RequestMapping("/shiqu")
public class ShiquController {
@Autowired
private ShiquService shiquService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ShiquEntity shiqu,
HttpServletRequest request){
EntityWrapper<ShiquEntity> ew = new EntityWrapper<ShiquEntity>();
PageUtils page = shiquService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shiqu), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ShiquEntity shiqu, HttpServletRequest request){
EntityWrapper<ShiquEntity> ew = new EntityWrapper<ShiquEntity>();
PageUtils page = shiquService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shiqu), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ShiquEntity shiqu){
EntityWrapper<ShiquEntity> ew = new EntityWrapper<ShiquEntity>();
ew.allEq(MPUtil.allEQMapPre( shiqu, "shiqu"));
return R.ok().put("data", shiquService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ShiquEntity shiqu){
EntityWrapper< ShiquEntity> ew = new EntityWrapper< ShiquEntity>();
ew.allEq(MPUtil.allEQMapPre( shiqu, "shiqu"));
ShiquView shiquView = shiquService.selectView(ew);
return R.ok("查询市区成功").put("data", shiquView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ShiquEntity shiqu = shiquService.selectById(id);
return R.ok().put("data", shiqu);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ShiquEntity shiqu = shiquService.selectById(id);
return R.ok().put("data", shiqu);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ShiquEntity shiqu, HttpServletRequest request){
shiqu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shiqu);
shiquService.insert(shiqu);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ShiquEntity shiqu, HttpServletRequest request){
shiqu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shiqu);
shiquService.insert(shiqu);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ShiquEntity shiqu, HttpServletRequest request){
//ValidatorUtils.validateEntity(shiqu);
shiquService.updateById(shiqu);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
shiquService.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<ShiquEntity> wrapper = new EntityWrapper<ShiquEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = shiquService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
获取源码或论文
如需对应的论文或源码,以及其他定制需求,也可以下方微信联系我。