提交 | 用户 | 时间
|
d146c0
|
1 |
-- ---------------------------- |
W |
2 |
-- 1、OPC配置 |
|
3 |
-- ---------------------------- |
|
4 |
drop table if exists sc_opc_conf; |
|
5 |
create table sc_opc_conf ( |
|
6 |
id bigint(20) not null auto_increment comment '主键id', |
|
7 |
location_code varchar(16) default null comment '工位编码', |
|
8 |
location_name varchar(32) default null comment '工位名称', |
|
9 |
node varchar(64) default '' comment '地址', |
|
10 |
type char(1) default '' comment '采集类型', |
|
11 |
subscribe char(1) default '0' comment '是否订阅', |
|
12 |
del_flag char(1) default '0' comment '删除标志(0代表存在 1代表删除)', |
|
13 |
create_by varchar(64) default '' comment '创建者', |
|
14 |
create_time datetime comment '创建时间', |
|
15 |
update_by varchar(64) default '' comment '更新者', |
|
16 |
update_time datetime comment '更新时间', |
|
17 |
primary key (id) |
|
18 |
) engine=innodb auto_increment=1 comment = 'OPC交互配置'; |
|
19 |
|
|
20 |
-- ---------------------------- |
|
21 |
-- 2、参数采集配置 |
|
22 |
-- ---------------------------- |
a36e52
|
23 |
drop table if exists sc_collection_param_conf; |
d146c0
|
24 |
create table sc_collection_param_conf ( |
W |
25 |
id bigint(20) not null auto_increment comment '主键id', |
|
26 |
product_code varchar(64) default '' comment '产品编码', |
|
27 |
product_type varchar(64) default '' comment '产品型号', |
|
28 |
location_code varchar(16) default null comment '工位编码', |
|
29 |
param_code varchar(32) default null comment '参数编码', |
|
30 |
param_name varchar(32) default null comment '参数名称', |
|
31 |
param_set_code varchar(32) default null comment '参数集编码', |
|
32 |
param_set_name varchar(32) default null comment '参数集名称', |
|
33 |
node varchar(64) default '' comment '采集地址', |
|
34 |
type char(1) default '' comment '采集类型(1物料追溯,2拧紧追溯,其他)', |
|
35 |
unit varchar(16) default '' comment '单位', |
|
36 |
param_upper varchar(64) default '' comment '上限值', |
|
37 |
param_lower varchar(64) default '' comment '下限值', |
|
38 |
param_central varchar(64) default '' comment '中心值', |
|
39 |
order_num int(4) default 0 comment '显示顺序', |
|
40 |
subscribe char(1) default '0' comment '是否订阅', |
|
41 |
del_flag char(1) default '0' comment '删除标志(0代表存在 1代表删除)', |
|
42 |
create_by varchar(64) default '' comment '创建者', |
|
43 |
create_time datetime comment '创建时间', |
|
44 |
update_by varchar(64) default '' comment '更新者', |
|
45 |
update_time datetime comment '更新时间', |
|
46 |
primary key (id) |
|
47 |
) engine=innodb auto_increment=1 comment = '参数采集配置'; |
|
48 |
|
|
49 |
-- ---------------------------- |
|
50 |
-- 1、拧紧追溯 |
|
51 |
-- ---------------------------- |
|
52 |
drop table if exists da_tighten_collection; |
|
53 |
create table da_tighten_collection ( |
|
54 |
id bigint(20) not null auto_increment comment '主键id', |
|
55 |
sfc_code varchar(64) default null comment '总成序列号', |
|
56 |
location_code varchar(16) default null comment '工位编码', |
|
57 |
param_set_code varchar(32) default null comment '参数集编码', |
|
58 |
param_set_name varchar(32) default null comment '参数集名称', |
|
59 |
torque varchar(64) default '' comment '扭矩值', |
|
60 |
torque_status char(1) default '' comment '扭矩状态', |
|
61 |
angle varchar(64) default '' comment '角度值', |
|
62 |
angle_status char(1) default '' comment '角度状态', |
|
63 |
collect_time datetime comment '采集时间', |
|
64 |
primary key (id) |
|
65 |
) engine=innodb auto_increment=1 comment = '拧紧采集'; |
|
66 |
|
|
67 |
-- ---------------------------- |
|
68 |
-- 1、物料追溯 |
|
69 |
-- ---------------------------- |
|
70 |
drop table if exists da_material_collection; |
|
71 |
create table da_material_collection ( |
|
72 |
id bigint(20) not null auto_increment comment '主键id', |
|
73 |
sfc_code varchar(64) default null comment '总成序列号', |
|
74 |
location_code varchar(16) default null comment '工位编码', |
|
75 |
param_code varchar(32) default null comment '参数编码', |
|
76 |
param_name varchar(32) default null comment '参数名称', |
|
77 |
param_value varchar(64) default '' comment '参数值', |
|
78 |
collect_time datetime comment '采集时间', |
|
79 |
primary key (id) |
|
80 |
) engine=innodb auto_increment=1 comment = '拧紧采集'; |
|
81 |
|
|
82 |
-- ---------------------------- |
|
83 |
-- 1、参数采集 |
|
84 |
-- ---------------------------- |
|
85 |
drop table if exists da_param_collection; |
|
86 |
create table da_param_collection ( |
|
87 |
id bigint(20) not null auto_increment comment '主键id', |
|
88 |
sfc_code varchar(64) default null comment '总成序列号', |
|
89 |
location_code varchar(16) default null comment '工位编码', |
|
90 |
param_code varchar(32) default null comment '参数编码', |
|
91 |
param_name varchar(32) default null comment '参数名称', |
|
92 |
param_value varchar(64) default '' comment '参数值', |
|
93 |
collect_time datetime comment '采集时间', |
|
94 |
primary key (id) |
|
95 |
) engine=innodb auto_increment=1 comment = '参数采集'; |
|
96 |
|
|
97 |
-- ---------------------------- |
|
98 |
-- 1、过站采集 |
|
99 |
-- ---------------------------- |
|
100 |
drop table if exists da_station_collection; |
|
101 |
create table da_station_collection ( |
|
102 |
id bigint(20) not null auto_increment comment '主键id', |
|
103 |
sfc_code varchar(64) default null comment '总成序列号', |
|
104 |
location_code varchar(16) default null comment '工位编码', |
|
105 |
inbound_time datetime comment '进站时间', |
|
106 |
outbound_time datetime comment '出站时间', |
|
107 |
status char(1) default '' comment '状态(1合格0不合格)', |
|
108 |
collect_time datetime comment '采集时间', |
|
109 |
primary key (id) |
|
110 |
) engine=innodb auto_increment=1 comment = '过站采集'; |