🍊作者:计算机编程-吉哥
🍊简介:专业从事JavaWeb程序开发,微信小程序开发,定制化项目、 源码、代码讲解、文档撰写、ppt制作。做自己喜欢的事,生活就是快乐的。
🍊心愿:点赞 👍 收藏 ⭐评论 📝
🍅 文末获取源码联系👇🏻 精彩专栏推荐订阅 👇🏻 不然下次找不到哟~
Java毕业设计项目~热门选题推荐《1000套》
目录
1.技术选型
2.数据库表结构
3.开发工具
4.功能
4.1【角色】
4.2【前台功能模块】
4.3【后台功能模块】
5.项目演示截图
5.1 登录
5.2 个人中心
5.3 健康信息
5.4 监控信息详情
5.5 交友互动
5.6 远程求助
5.7 老人信息管理
5.8 监控信息管理
5.9 健康信息管理
5.10 费用收缴管理
6.数据库文件设计
7.核心代码
7.1 健康信息Controller
7.2 健康信息Service
7.3 健康信息ServiceImpl
7.4 健康信息DAO
8.参考文档
1.技术选型
springboot、mybatisplus、vue、elementui、html、css、js、mysql、jdk1.8
2.数据库表结构
10张
3.开发工具
idea、navicat
4.功能
4.1【角色】
管理员、用户
4.2【前台功能模块】
- 登录注册
- 首页
- 监控信息
- 交友互动
- 公告信息
- 个人中心
- 后台管理
- 远程求助
4.3【后台功能模块】
- 登录
- 首页
- 个人中心
- 老人信息管理
- 监控信息管理
- 健康信息管理
- 费用收缴管理
- 交友互动
- 系统管理
5.项目演示截图
5.1 登录
5.2 个人中心
5.3 健康信息
5.4 监控信息详情
5.5 交友互动
5.6 远程求助
5.7 老人信息管理
5.8 监控信息管理
5.9 健康信息管理
5.10 费用收缴管理
6.数据库文件设计
CREATE TABLE `chat` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`userid` bigint(20) NOT NULL COMMENT '用户id',
`adminid` bigint(20) DEFAULT NULL COMMENT '管理员id',
`ask` longtext COMMENT '提问',
`reply` longtext COMMENT '回复',
`isreply` int(11) DEFAULT NULL COMMENT '是否回复',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8 COMMENT='远程求助';
CREATE TABLE `config` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(100) NOT NULL COMMENT '配置参数名称',
`value` varchar(100) DEFAULT NULL COMMENT '配置参数值',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='配置文件';
CREATE TABLE `feiyongshoujiao` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`jiaofeidanhao` varchar(200) DEFAULT NULL COMMENT '缴费单号',
`jiaofeimingcheng` varchar(200) DEFAULT NULL COMMENT '缴费名称',
`jiaofeileixing` varchar(200) NOT NULL COMMENT '缴费类型',
`jiaofeijine` int(11) NOT NULL COMMENT '缴费金额',
`jiaofeineirong` longtext COMMENT '缴费内容',
`xinxibeizhu` varchar(200) DEFAULT NULL COMMENT '信息备注',
`laorenxingming` varchar(200) DEFAULT NULL COMMENT '老人姓名',
`xingbie` varchar(200) DEFAULT NULL COMMENT '性别',
`lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
`ispay` varchar(200) DEFAULT '未支付' COMMENT '是否支付',
PRIMARY KEY (`id`),
UNIQUE KEY `jiaofeidanhao` (`jiaofeidanhao`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COMMENT='费用收缴';
CREATE TABLE `forum` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`title` varchar(200) DEFAULT NULL COMMENT '帖子标题',
`content` longtext NOT NULL COMMENT '帖子内容',
`parentid` bigint(20) DEFAULT NULL COMMENT '父节点id',
`userid` bigint(20) NOT NULL COMMENT '用户id',
`username` varchar(200) DEFAULT NULL COMMENT '用户名',
`isdone` varchar(200) DEFAULT NULL COMMENT '状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8 COMMENT='交友互动';
CREATE TABLE `jiankangxinxi` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`laorenxingming` varchar(200) DEFAULT NULL COMMENT '老人姓名',
`xingbie` varchar(200) DEFAULT NULL COMMENT '性别',
`nianling` int(11) DEFAULT NULL COMMENT '年龄',
`huanbingshi` varchar(200) DEFAULT NULL,
`shengao` varchar(200) DEFAULT NULL COMMENT '身高(cm)',
`tizhong` varchar(200) DEFAULT NULL COMMENT '体重(kg)',
`xinlv` varchar(200) DEFAULT NULL,
`xueya` varchar(200) DEFAULT NULL,
`shentizhibiao` longtext,
`jiankangfenxi` longtext,
`faburiqi` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COMMENT='健康信息';
CREATE TABLE `jiankongxinxi` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`jiankongmingcheng` varchar(200) NOT NULL COMMENT '监控名称',
`jiankongfengmian` varchar(200) DEFAULT NULL COMMENT '监控封面',
`jiankongshipin` varchar(200) DEFAULT NULL COMMENT '监控视频',
`jiankongshijian` datetime DEFAULT NULL,
`jiankongshuoming` longtext,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COMMENT='监控信息';
CREATE TABLE `laorenxinxi` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`laorenxingming` varchar(200) NOT NULL COMMENT '老人姓名',
`mima` varchar(200) NOT NULL COMMENT '密码',
`xingbie` varchar(200) DEFAULT NULL COMMENT '性别',
`zhaopian` varchar(200) DEFAULT NULL COMMENT '照片',
`nianling` int(11) DEFAULT NULL COMMENT '年龄',
`huanbingshi` varchar(200) DEFAULT NULL COMMENT '患病史',
`shenfenzheng` varchar(200) DEFAULT NULL COMMENT '身份证',
`lianxiren` varchar(200) DEFAULT NULL COMMENT '联系人',
`lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
`jiatingzhuzhi` varchar(200) DEFAULT NULL COMMENT '家庭住址',
PRIMARY KEY (`id`),
UNIQUE KEY `laorenxingming` (`laorenxingming`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='老人信息';
CREATE TABLE `news` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`title` varchar(200) NOT NULL COMMENT '标题',
`introduction` longtext COMMENT '简介',
`picture` varchar(200) NOT NULL COMMENT '图片',
`content` longtext NOT NULL COMMENT '内容',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8 COMMENT='公告信息';
CREATE TABLE `token` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`userid` bigint(20) NOT NULL COMMENT '用户id',
`username` varchar(100) NOT NULL COMMENT '用户名',
`tablename` varchar(100) DEFAULT NULL COMMENT '表名',
`role` varchar(100) DEFAULT NULL COMMENT '角色',
`token` varchar(200) NOT NULL COMMENT '密码',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
`expiratedtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '过期时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='token表';
CREATE TABLE `users` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`username` varchar(100) NOT NULL COMMENT '用户名',
`password` varchar(100) NOT NULL COMMENT '密码',
`role` varchar(100) DEFAULT '管理员' COMMENT '角色',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户表';
7.核心代码
7.1 健康信息Controller
package com.controller;
/**
* 健康信息
* 后端接口
* @author 计算机编程-吉哥
*/
@RestController
@RequestMapping("/jiankangxinxi")
public class JiankangxinxiController {
@Autowired
private JiankangxinxiService jiankangxinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,JiankangxinxiEntity jiankangxinxi,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date faburiqistart,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date faburiqiend,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("laorenxinxi")) {
jiankangxinxi.setLaorenxingming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<JiankangxinxiEntity> ew = new EntityWrapper<JiankangxinxiEntity>();
if(faburiqistart!=null) ew.ge("faburiqi", faburiqistart);
if(faburiqiend!=null) ew.le("faburiqi", faburiqiend);
PageUtils page = jiankangxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiankangxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,JiankangxinxiEntity jiankangxinxi,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date faburiqistart,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date faburiqiend,
HttpServletRequest request){
EntityWrapper<JiankangxinxiEntity> ew = new EntityWrapper<JiankangxinxiEntity>();
if(faburiqistart!=null) ew.ge("faburiqi", faburiqistart);
if(faburiqiend!=null) ew.le("faburiqi", faburiqiend);
PageUtils page = jiankangxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiankangxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( JiankangxinxiEntity jiankangxinxi){
EntityWrapper<JiankangxinxiEntity> ew = new EntityWrapper<JiankangxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( jiankangxinxi, "jiankangxinxi"));
return R.ok().put("data", jiankangxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(JiankangxinxiEntity jiankangxinxi){
EntityWrapper< JiankangxinxiEntity> ew = new EntityWrapper< JiankangxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( jiankangxinxi, "jiankangxinxi"));
JiankangxinxiView jiankangxinxiView = jiankangxinxiService.selectView(ew);
return R.ok("查询健康信息成功").put("data", jiankangxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
JiankangxinxiEntity jiankangxinxi = jiankangxinxiService.selectById(id);
return R.ok().put("data", jiankangxinxi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
JiankangxinxiEntity jiankangxinxi = jiankangxinxiService.selectById(id);
return R.ok().put("data", jiankangxinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody JiankangxinxiEntity jiankangxinxi, HttpServletRequest request){
jiankangxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(jiankangxinxi);
jiankangxinxiService.insert(jiankangxinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody JiankangxinxiEntity jiankangxinxi, HttpServletRequest request){
jiankangxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(jiankangxinxi);
jiankangxinxiService.insert(jiankangxinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody JiankangxinxiEntity jiankangxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(jiankangxinxi);
jiankangxinxiService.updateById(jiankangxinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
jiankangxinxiService.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<JiankangxinxiEntity> wrapper = new EntityWrapper<JiankangxinxiEntity>();
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("laorenxinxi")) {
wrapper.eq("laorenxingming", (String)request.getSession().getAttribute("username"));
}
int count = jiankangxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
7.2 健康信息Service
package com.service;
/**
* 健康信息
*
* @author 计算机编程-吉哥
*/
public interface JiankangxinxiService extends IService<JiankangxinxiEntity> {
PageUtils queryPage(Map<String, Object> params);
List<JiankangxinxiVO> selectListVO(Wrapper<JiankangxinxiEntity> wrapper);
JiankangxinxiVO selectVO(@Param("ew") Wrapper<JiankangxinxiEntity> wrapper);
List<JiankangxinxiView> selectListView(Wrapper<JiankangxinxiEntity> wrapper);
JiankangxinxiView selectView(@Param("ew") Wrapper<JiankangxinxiEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<JiankangxinxiEntity> wrapper);
}
7.3 健康信息ServiceImpl
package com.service.impl;
@Service("jiankangxinxiService")
public class JiankangxinxiServiceImpl extends ServiceImpl<JiankangxinxiDao, JiankangxinxiEntity> implements JiankangxinxiService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
Page<JiankangxinxiEntity> page = this.selectPage(
new Query<JiankangxinxiEntity>(params).getPage(),
new EntityWrapper<JiankangxinxiEntity>()
);
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<JiankangxinxiEntity> wrapper) {
Page<JiankangxinxiView> page =new Query<JiankangxinxiView>(params).getPage();
page.setRecords(baseMapper.selectListView(page,wrapper));
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<JiankangxinxiVO> selectListVO(Wrapper<JiankangxinxiEntity> wrapper) {
return baseMapper.selectListVO(wrapper);
}
@Override
public JiankangxinxiVO selectVO(Wrapper<JiankangxinxiEntity> wrapper) {
return baseMapper.selectVO(wrapper);
}
@Override
public List<JiankangxinxiView> selectListView(Wrapper<JiankangxinxiEntity> wrapper) {
return baseMapper.selectListView(wrapper);
}
@Override
public JiankangxinxiView selectView(Wrapper<JiankangxinxiEntity> wrapper) {
return baseMapper.selectView(wrapper);
}
}
7.4 健康信息DAO
package com.dao;
/**
* 健康信息
*
* @author 计算机编程-吉哥
*/
public interface JiankangxinxiDao extends BaseMapper<JiankangxinxiEntity> {
List<JiankangxinxiVO> selectListVO(@Param("ew") Wrapper<JiankangxinxiEntity> wrapper);
JiankangxinxiVO selectVO(@Param("ew") Wrapper<JiankangxinxiEntity> wrapper);
List<JiankangxinxiView> selectListView(@Param("ew") Wrapper<JiankangxinxiEntity> wrapper);
List<JiankangxinxiView> selectListView(Pagination page,@Param("ew") Wrapper<JiankangxinxiEntity> wrapper);
JiankangxinxiView selectView(@Param("ew") Wrapper<JiankangxinxiEntity> wrapper);
}
8.参考文档
你可能还有感兴趣的项目👇🏻👇🏻👇🏻
更多项目推荐:计算机毕业设计项目
如果大家有任何疑虑,请在下方咨询或评论