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