增加部署说明

This commit is contained in:
ahu_gq 2025-05-19 21:15:25 +08:00
parent 5e870bffd2
commit ab82ecd2a4
8 changed files with 3118 additions and 0 deletions

53
.gitignore vendored Normal file
View File

@ -0,0 +1,53 @@
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
/build
.vscode/*
.vscode/settings.json

Binary file not shown.

View File

@ -0,0 +1,112 @@
-- 设备表
CREATE TABLE IF NOT EXISTS
device(
id INTEGER PRIMARY KEY AUTOINCREMENT, --
sn TEXT(50) NOT NULL, --sn
type INTEGER NOT NULL, --
code INTEGER NOT NULL, --
name TEXT(100) NOT NULL, --
protocol_type INTEGER NOT NULL, --
template_id INTEGER NOT NULL, --Id
sort_order INTEGER, --
remark TEXT(1200), --
status TINYINT, --
UNIQUE(name), -- 设备名称唯一
UNIQUE(type, code) -- 设备类型和设备编号唯一
);
-- 点位表
CREATE TABLE IF NOT EXISTS
point(
id INTEGER PRIMARY KEY AUTOINCREMENT, --
template_id INTEGER NOT NULL, --Id
protocol_type INTEGER NOT NULL, --
dev_type INTEGER NOT NULL, --
group_type INTEGER NOT NULL, --
code INTEGER NOT NULL, --
name TEXT(100) NOT NULL, --
data_type INTEGER NOT NULL, --
attribute INTEGER NOT NULL, --
func INTEGER NOT NULL, --
reg_addr INTEGER NOT NULL, --
bit_pos INTEGER NOT NULL, --
bit_num INTEGER NOT NULL, --
endian INTEGER NOT NULL, --
precision REAL NOT NULL, --
ratio REAL NOT NULL, --
offset REAL NOT NULL, --
is_persisted TINYINT NOT NULL, --
storage_interval INTEGER NOT NULL, --
mutate_bound REAL, --
default_value REAL, --
min_value REAL, --
max_value REAL, --
unit TEXT(20), --
is_show TINYINT NOT NULL --
);
-- 设备时序数据存储表
CREATE TABLE IF NOT EXISTS
timed_data_storage(
id INTEGER PRIMARY KEY AUTOINCREMENT, --
dev_type INTEGER NOT NULL, --
dev_id INTEGER NOT NULL, --Id
point_id INTEGER NOT NULL, --Id
-- dev_name TEXT(100) NOT NULL, --设备名称
-- point_name TEXT(100) NOT NULL, --点位名称
storage_interval INTEGER NOT NULL, --
timed_value REAL NOT NULL, --
created_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP -- 备份时间
);
-- 故障数据记录表
CREATE TABLE IF NOT EXISTS
faults_record(
id INTEGER PRIMARY KEY AUTOINCREMENT, --
dev_type INTEGER NOT NULL, --
dev_id INTEGER NOT NULL, --Id
point_id INTEGER NOT NULL, --Id
faults_value TINYINT NOT NULL, --
created_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP --
);
-- MQTT断点记录
CREATE TABLE IF NOT EXISTS
break_record(
id INTEGER PRIMARY KEY AUTOINCREMENT, --
reason TEXT(100) NOT NULL, --
is_uploaded TINYINT NOT NULL, --
start_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, --
end_time TIMESTAMP, --
created_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP --
);
-- MQTT断点数据存储
CREATE TABLE IF NOT EXISTS
break_data_storage(
id INTEGER PRIMARY KEY AUTOINCREMENT, --
break_id INTEGER NOT NULL, --Id
is_uploaded TINYINT NOT NULL, --
content TEXT NOT NULL, --JSON串
created_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP --
);
-- 断联记录
CREATE TABLE IF NOT EXISTS
lost_contact_record(
id INTEGER PRIMARY KEY AUTOINCREMENT, --
connect_status TEXT NOT NULL, --/
created_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP --
);
-- 功率数据存储
CREATE TABLE IF NOT EXISTS
power_data_storage(
id INTEGER PRIMARY KEY AUTOINCREMENT, --
dev_type INTEGER NOT NULL, --
dev_code INTEGER NOT NULL, --
point_code INTEGER NOT NULL, --
value REAL NOT NULL, --
created_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP -- 存储时间
);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
手动部署说明
0、将web的部署文件
前端放到ems/web/dist中
后端放到ems/web/server中
1、将ems文件夹拖拽到opt中
2、修改权限
sudo chmod 777 /opt/* -R
3、手动执行程序
cd /opt/ems/bin
./EMS_C_V1.0.0
自动部署说明:后续追加

12
release/ems/web/dist/部署说明.txt vendored Normal file
View File

@ -0,0 +1,12 @@
手动部署说明
0、将web的部署文件
前端放到ems/web/dist中
后端放到ems/web/server中
1、将ems文件夹拖拽到opt中
2、修改权限
sudo chmod 777 /opt/* -R
3、手动执行程序
cd /opt/ems/bin
./EMS_C_V1.0.0
自动部署说明:后续追加

View File

@ -0,0 +1,12 @@
手动部署说明
0、将web的部署文件
前端放到ems/web/dist中
后端放到ems/web/server中
1、将ems文件夹拖拽到opt中
2、修改权限
sudo chmod 777 /opt/* -R
3、手动执行程序
cd /opt/ems/bin
./EMS_C_V1.0.0
自动部署说明:后续追加

12
release/部署说明.txt Normal file
View File

@ -0,0 +1,12 @@
手动部署说明
0、将web的部署文件
前端放到ems/web/dist中
后端放到ems/web/server中
1、将ems文件夹拖拽到opt中
2、修改权限
sudo chmod 777 /opt/* -R
3、手动执行程序
cd /opt/ems/bin
./EMS_C_V1.0.0
自动部署说明:后续追加