基于springboot智慧养老手表管理系统
项目描述
基于Spring Boot的智慧养老手表管理系统
运行环境
jdk1.8 + idea+vue
导入数据库
为mysql数据库建立结构并运行old.sql脚本。若成功,则在项目applicationContext.xml中更新与数据库相关的配置参数,并主要包括但不限于:修改数据库名称、用户名及相应的密码设置。
项目技术
基于 Java JDK 1.8 版本构建的应用系统将MySQL作为数据存储平台,并结合Java IDE作为开发环境。前端则采用Vue和Element UI应用框架构建界面逻辑,并整合Node.js语言与Spring Boot技术栈作为后端服务容器
后端
该项目属于Spring Boot框架,在主方法处双击即可启动,在浏览器中访问本地浏览器中的http://localhost:8087/进行操作;需要注意的是,在application.properties文件中已经配置好了该服务所需的所有参数设置,并且可以通过修改该文件来调整服务端口(默认为8087端口),具体可以根据实际需求进行设置
前端
需要npm 环境,自行百度安装
npm install 下载依赖包
npm run dev 本地运行项目
npm run build 编译项目
登录
管理员 :
账号:15179158704 密码:123456
家属:
账号:15179158705 密码:123456
效果截图:

















数据库设计:
/*
Navicat MySQL Data Transfer
源服务器地址:localhost
源服务器版本号为50022
源主机名为localhost:3306
源数据库名称为old
Target Server Type : MYSQL
Target Server Version : 50022
File Encoding : 65001
Date: 2021-02-01 15:48:48
*/
SET FOREIGN_KEY_CHECKS=0;
– Table structure for alarm_precess
删除表 alarm_precess;
– Records of alarm_precess
INSERT INTO alarm_process VALUES ('Alarm ID is number one, insertion time is number one, station ID is number one, alarm level is level one, created at "year/month/day hour:min", longitude is "degrees", latitude is "degrees");
INSERT INTO alarm_process VALUES ('Alarm ID is number two, insertion time is number two, station ID is number two, alarm level is level two, created at "year/month/day hour:min", longitude is "degrees", latitude is "degrees");
INSERT INTO alarm_process VALUES ('Alarm ID is number three, insertion time is number three, station ID is number three, alarm level is level three, created at "year/month/day hour:min", longitude is "degrees", latitudeis" degrees");
– Table structure for customer
DROP TABLE IF EXISTS customer;
CREATE TABLE customer (
customer_id int(10) primary key auto_increment not null,
customer_name varchar(20) default null,
customer_age int(5) default null,
customer_sex char(1) default null,
customer_phone varchar(12) default null,
customer_address varchar(20) default null,
PRIMARY KEY (customer_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
– Records of customer
INSERT INTO customer VALUES ('客户ID自增 1', '小黄名', '二十一岁', '男性身份者', '手机号码 15-79-87-06号', '南昌市区');
INSERT INTO customer VALUES ('客户ID自增 2', '任飞名', '二十岁', '男性身份者', '手机号码 15-79-87-08号', '南昌市区');
INSERT INTO customer VALUES ('客户ID自增 3', '赵燕名', '二十一岁', '女性身份者', '手机号码 15-63-62-598号', '南昌市区');
– Table structure for family
DROP TABLE IF EXISTS family;
CREATE TABLE 家庭信息表 family table structure
(
家庭 portraits family_portrait VARCHAR (50) DEFAULT 'kai.jpg',  -- 家庭相册
家庭ID family_id INT (10) NOT NULL AUTO_INCREMENT,  -- 家庭ID
家庭成员 person_name VARCHAR (10) DEFAULT NULL,  -- 家庭成员
家庭关系 relationship_type VARCHAR (10) DEFAULT NULL,  -- 家庭关系类型
联系电话 phone_number VARCHAR (12) DEFAULT NULL,  -- 联系电话
性别 gender CHAR (1) DEFAULT NULL,  -- 性别
家庭地址 address_address VARCHAR (20) DEFAULT NULL,  -- 家庭地址
密码 password_code VARCHAR (20) DEFAULT '123456',  -- 密码设置
PRIMARY KEY (家庭ID family_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
– Records of family
INSERT INTO family VALUES (‘kai.jpg’, ‘1’, ‘小红23岁’, ‘女儿’, ‘15179158705’, ‘女’, ‘南昌市’, ‘ID: 123456’);
INSERT INTO family VALUES (‘kai.jpg’, ‘2’, ‘张三48岁’, ‘女儿’, ‘15179158706’, ‘女’, ‘南昌市', ID: 123456);
INSERT INTO family VALUES (‘kai.jpg’, '3', '李四年龄', '女儿', '15263259856', '女', '南昌市', ID: 123456);
INSERT INTO family VALUES (‘kai.jpg', '6', '老王年龄较大', '女儿', '15263259842', '男, 年龄较大, 南昌市, ID: 123456);
INSERT INTO family VALUES (‘kai.jpg' , '7' , "没有明确年龄信息", "女儿", "无", "未知性别", "未知地区", "ID: 123456");
– Table structure for nice_count
如果存在,则删除表nice_count;
创建一个名为nice_count的新表;
该表包含以下字段:
电话号码 varchar(30) default NULL,
言论者的ID said_id int(20) default NULL,
自动递增的ID add_id int(20) NOT NULL,
主键字段(add_id)
表结构使用InnoDB引擎,默认字符集为utf8
– Records of nice_count
INSERT INTO nice_count VALUE(S) [('...')];
INSERT INTO nice_count VALUE(S) [('...')];
INSERT INTO nice_count VALUE(S) [('...')];
INSERT INTO nice_count VALUE(S) [('...')];
INSERT INTO nice_count VALUE(S) [('...')];
INSERT INTO nice_count VALUE(S) [('...')];
INSERT INTO nice_count VALUE(S) [('...')];
– Table structure for oldperson
DROP TABLE oldperson;
CREATE TABLE oldperson (
old_id INT(20) NOT NULL AUTO_INCREMENT,
name VARCHAR(10) DEFAULT NULL,
age INT(10) DEFAULT NULL,
sex CHAR(1) DEFAULT NULL,
phone VARCHAR(12) DEFAULT NULL,
room VARCHAR(5) DEFAULT NULL,
illness VARCHAR(20) DEFAULT NULL,
warn VARCHAR(5) DEFAULT NULL,
food_like VARCHAR(20) DEFAULT NULL,
food_hate VARCHAR(20) DEFAULT NULL,
drag VARCHAR(20) DEFAULT NULL,
family_id INT(20) DEFAULT NULL,
customer_id INT(20) DEFAULT NULL,
be_time DATE DEFAULT NULL,
bothdate DATE DEFAULT NULL,
device_id INT(30) DEFAULT NULL
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
– Records of oldperson
将数据插入到oldperson表中一组数值(如:年龄、性别等),其中一位患者为姜涛(男性),年龄80岁……
将数据插入到oldperson表中一组数值(如:年龄、性别等),其中一位患者为王明(男性),年龄80岁……
将数据插入到oldperson表中一组数值(如:年龄、性别等),其中一位患者为田风(男性),年龄79岁……
– Table structure for pic
删除表pic(如果存在);
创建表pic如下:
pic_id字段为整数类型(最大长度20),并且不可空;
pic_name字段为变长字符串类型(最大长度50),默认值为空;
该表采用InnoDB存储引擎,默认字符编码为utf8。
– Records of pic
执行以下插入操作到一张名为'pic'的表中:
- 插入值对(2, '一张名为Kai的图片')
 - 插入值对(2, '一张具有特定编码编号为7487939_090818211000_2的图片')
 - 插入值对(5, '一张名为1号的图片')
 - 插入值对(5, '一张名为2号的图片')
 - 插入值对(5, '一张名为5号的图片')
 - 插入值对(1, '一张名为Kai的图片')
 - 插入值对(6, '另一张Gou 2号码的图片')
 
– Table structure for pic_show
Delete table if exists pic_show;
CREATE TABLE pic_show(
id int(10) AUTO_INCREMENT NOT NULL,
pic_name varchar(50),
PRIMARY KEY(id)
);
ENGINE=InnoDB DEFAULT CHARSET=utf8;
– Records of pic_show
INSERT INTO pic_show VALUES (‘33’, ‘tuzi.jpg’);
– Table structure for ratepre
删除现有相同名称的表。
创建名为'ratepre'的新表。
该表包含以下字段:
自动生成唯一主键索引项,
ID字段,
设备ID字段,
旧ID字段,
状态评分字段,
状态评分前值字段,
创建时间字段,
HR值字段(整数类型),
BP值字段(整数类型)。
主键字段(ID)。
数据库引擎为InnoDB,默认字符集为utf8。
– Records of ratepre
Insert into ratepre values ('58','66','59','76','96'),
insert into ratepre values ('59','78','75','84','94'),
insert into ratepre values ('60','84','85','74','93'),
insert into ratepre values ('62','83','86','74','93'),
insert into ratepre values ('63','82','87','74','92'),
insert into ratepre values ('64','85','86','74','92'),
insert into ratepre values ('65','','','',''),
insert into ratepre values ('66','','','',''),
insert into ratepre values ('67','','','',''),
insert into ratepre values ('68','','','','')
– Table structure for said
【删除
– Records of said
INSERT INTO said VALUES (‘1’, ‘你好’, ‘1’, ‘你也是好…’, ‘2019-03-24 17:31:19’, ‘2019-03-24 17:31:25’, ‘小刚’, ‘15179158704’, ‘kai.jpg’, ‘6’);
INSERT INTO said VALUES (‘4’, ‘变形为钢铁侠》, ‘1’, ‘钢铁侠》, … (注意:此处对原文进行了适当的语法调整)
INSERT INTO said VALUES (‘5’, ’写的很好’)
INSERT INTO said VALUES (‘6’, ’你好’)
– Table structure for text
If the table named text exists, delete it.
Create a new table structure for text with the following fields:
- ID字段: int(10), not null, auto_increment
 - 标题: varchar(20), default null
 - 主要文本内容: varchar(50), default null
 - 发布日期: datetime, default null
 - 图片ID: int(10), default null
Primary Key: (ID字段)
Engine = InnoDB and Default Charset=utf8 
– Records of text
INSERT INTO text VALUES (‘1’, ‘老人健身活动’, ‘老人通过参与健身活动来增强体质2’, ‘2019-04-19 15:52:20’, ‘1’);
INSERT INTO text VALUES (‘2’, ‘老人饮食', '这位长者特别喜爱烹饪,他总是认真地准备着一顿丰盛的 homemade meals', '2019-03-24 17:34:51', '2');
INSERT INTO text VALUES (‘5', '这位长者特别钟爱表演,他经常组织团队共同完成一些创意表演节目', '2019-04-18 10:31:52', '5');
INSERT INTO text VALUES (‘31', '我去二(运动)', '这是一项非常受欢迎的活动,参与者通常会积极参与并享受其中的乐趣', '2019-04-26 14:53:37', '6');
– Table structure for users
删除现有名为users的表;
建立名为users的新表;
该表包含以下字段:
用户ID字段为整数类型,默认值不为空,并且自增;
用户名字段长度不超过10个字符,默认为空值;
密码字段长度不超过50个字符,默认为空值;
角色字段长度不超过10个字符,默认为空值;
手机号码字段长度不超过20个字符,默认为空值;
主键字段为用户ID,并使用该字段自增编号;
使用InnoDB存储引擎,默认字符集为utf8。
– Records of users
INSERT INTO users VALUES (‘1’, ‘小刚’, ‘123456’, ‘1’, ‘15179158704’);
– Table structure for watch_day_info
DROP TABLE IF EXISTS watch_day_info;
CREATE TABLE watch_day_info (
id int(10) NOT NULL auto_increment,
device_id int(10) default NULL,
sleep int(10) default NULL,
step int(10) default NULL,
sleep_sate char(1) default NULL,
create_time date default NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
– Records of watch_day_info
INSERT INTO watch_day_info VALUES ('46'、'2'、'9'、'577'、'678'、'26789-999999');
INSERT INTO watch_day_info VALUES ('47'、'2'、'8'、 '678', '67', '267');
INSERT INTO watch_day_info VALUES ( '48', '2', '15', '67', '67', '26');
INSERT INTO watch_day_info VALUES ( '49', '2', '6', '67', '67','  );
INSERT INTO watch_day_info VALUES (  , , , , , );
INSERT INTO watch_day_info VALUES (  , , , , , );
INSERT INTO watch_day_info VALUES (  , , , , );
– Table structure for watch_info
DROP TABLE IF EXISTS watch_info;
CREATE TABLE watch_info (
device_id int(10) NOT NULL auto_increment,
op_time date default NULL,
bpf int(10) default NULL,
bpl int(10) default NULL,
hrf int(10) default NULL,
hrl int(10) default NULL,
PRIMARY KEY (device_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
– Records of watch_info
INSERT INTO watch_info VALUES ({new_id}, 'date one day ago', 'default duration', 6, 4, 4, 8);
INSERT INTO watch_info VALUES ({new_id + 1}, 'date two days ago', 'default duration', 6, 4, 4, 8);
INSERT INTO watch_info VALUES ({new_id + 1}, 'date two days ago', 'default duration', 6, 4, 4, 8);
