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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
| create table
| t_dm_module
| (
| id varchar(36) not null,
| modulename varchar(50),
| moduletype varchar(30),
| cycle decimal(5, 0),
| modulenavconfig varchar(3072),
| predicttime datetime,
| collecttime datetime,
| create_time datetime default current_timestamp,
| update_time datetime default current_timestamp,
| traintime datetime,
| primary key (id),
| key idx_moduletype (moduletype)
| ) engine = innodb
| default character set utf8mb4;
|
|
| create table
| t_dm_module_item
| (
| id varchar(36) not null,
| moduleid varchar(36),
| itemid varchar(36),
| itemorder bigint,
| status bigint,
| categoryid varchar(64),
| primary key (id),
| key idx_moduleid (moduleid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table t_mm_item_output
| (
| id varchar(36) not null,
| itemid varchar(36),
| pointid varchar(36),
| resulttableid varchar(36),
| tagname varchar(50),
| outputorder decimal(5, 0),
| primary key (id),
| key idx_itemid (itemid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_mm_item_result
| (
| id varchar(36) not null,
| outputid varchar(36),
| datatime datetime,
| datavalue decimal(19, 3),
| primary key (id),
| key idx_outputid (outputid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_mm_item_type
| (
| id varchar(36) not null,
| itemtypename varchar(50),
| itemclasstype varchar(100),
| assemblyname varchar(64),
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_mm_model_arith_settings
| (
| id varchar(64) not null,
| modelid varchar(64),
| `key` varchar(64),
| value varchar(256),
| name varchar(64),
| valuetype varchar(64),
| primary key (id),
| key idx_modelid (modelid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_mm_model_param
| (
| id varchar(56) not null,
| modelid varchar(56),
| modelparamname varchar(64),
| modelparamid varchar(56),
| modelparamorder integer,
| modelparamportorder integer,
| datalength integer,
| modelparamtype varchar(32),
| primary key (id),
| key idx_modelid (modelid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_mm_model_resultstr
| (
| id varchar(64) not null,
| resultstr varchar(64),
| constraint p_key_1 primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_mm_predict_item
| (
| id varchar(36) not null,
| itemno varchar(16),
| itemname varchar(50),
| caltypeid varchar(36),
| itemtypeid varchar(36),
| predictlength decimal(5, 0),
| granularity decimal(5, 0),
| status decimal(5, 0),
| isfuse decimal(5, 0),
| predictphase decimal(5, 0),
| workchecked decimal(5, 0),
| unittransfactor decimal(31, 6),
| create_time datetime default current_timestamp,
| update_time datetime default current_timestamp,
| saveindex varchar(16),
| primary key (id),
| key idx_itemno (itemno)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_mm_predict_merge_item
| (
| id varchar(36) not null,
| itemid varchar(36),
| expression varchar(200),
| num integer,
| primary key (id),
| key idx_itemid (itemid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_mm_predict_model
| (
| id varchar(36) not null,
| modelno varchar(32),
| modelname varchar(50),
| itemid varchar(36),
| arithid varchar(36),
| trainsamplength decimal(5, 0),
| predictsamplength decimal(5, 0),
| isonlinetrain decimal(5, 0),
| modelpath varchar(256),
| isnormal decimal(5, 0),
| normalmax decimal(19, 3),
| normalmin decimal(19, 3),
| status decimal(5, 0),
| classname varchar(256),
| methodname varchar(64),
| modelparamstructure varchar(128),
| resultstrid varchar(64),
| settingmap varchar(256),
| trainmodelpath varchar(256),
| pathstatus decimal(5, 0),
| pdim smallint,
| traninip varchar(16),
| comparisonclassname varchar(256),
| primary key (id),
| key idx_modelno (modelno),
| key idx_itemid (itemid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_mm_result_table
| (
| id varchar(36) not null,
| tablename varchar(30),
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule
| (
| id varchar(64) not null,
| name varchar(64),
| scheduletime datetime,
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
| create table
| t_st_schedule_energy_type
| (
| id varchar(64) not null,
| energytypename varchar(64),
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_model
| (
| id varchar(64) not null,
| modelname varchar(64),
| scheduleid varchar(64),
| objectid varchar(64),
| classname varchar(128),
| methodname varchar(64),
| modelpath varchar(256),
| portlength integer,
| modelstatus integer,
| resultstrid varchar(64),
| modelparamstructure varchar(128),
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_model_accuracy_rate
| (
| id varchar(36) not null,
| accuracy_rate_num varchar(36) not null,
| schedule_model_id varchar(36) not null,
| result_key varchar(36) not null,
| point_id varchar(36) not null,
| rate_type varchar(36) not null,
| hour_accuracy_rate decimal(6, 4),
| day_accuracy_rate decimal(6, 4),
| is_enable integer,
| update_time datetime,
| begin_time datetime,
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
|
| create table
| t_st_schedule_result
| (
| id varchar(64),
| scheduleid varchar(64),
| modelid varchar(64),
| result varchar(64),
| scheduletime datetime,
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_result_str
| (
| id varchar(64),
| resultstr varchar(32),
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_model_user_param
| (
| id varchar(64) not null,
| modelid varchar(64),
| userid varchar(64),
| energytypeid varchar(64),
| paramid varchar(64),
| modelsatus integer,
| userorder integer,
| energyorder integer,
| isadjust integer,
| upadjlimit decimal(30, 6),
| downadjlimit decimal(30, 6),
| adjorder integer,
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_object
| (
| id varchar(64) not null,
| name varchar(64),
| `order` integer,
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_param
| (
| id varchar(64) not null,
| modelid varchar(64),
| modelparamname varchar(64),
| modelparamid varchar(64),
| modelparamorder integer,
| modelparamportorder integer,
| datalength integer,
| modelparamtype varchar(64),
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_param_setting
| (
| id varchar(64) not null,
| modelid varchar(64),
| `key` varchar(64),
| value varchar(64),
| valuetype varchar(64),
| name varchar(64),
| primary key (id),
| key idx_modelid (modelid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_scheme
| (
| id varchar(64) not null,
| modelid varchar(64),
| starttime datetime,
| endtime datetime,
| scheduletime datetime,
| objectvalue decimal(30, 6),
| schemeorder integer,
| isadjust integer,
| primary key (id),
| key idx_modelid (modelid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_scheme_detailes
| (
| id varchar(64) not null,
| adjustuserid varchar(64),
| schemid varchar(64),
| value text,
| isadjust decimal(30, 0),
| modelid varchar(64),
| scheduletime datetime,
| resultkey varchar(64),
| primary key (id),
| key idx_modelid (modelid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_scheme_detailes_max
| (
| id varchar(64) not null,
| adjustuserid varchar(64),
| schemid varchar(64),
| value text,
| isadjust decimal(30, 0),
| modelid varchar(64),
| scheduletime datetime,
| resultkey varchar(64),
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
|
| create table
| t_st_schedule_scheme_eval_type
| (
| id varchar(64) not null,
| evalname varchar(64),
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_scheme_eval_value
| (
| id varchar(64) not null,
| schemid varchar(64),
| evalid varchar(64),
| schprevalue decimal(30, 6),
| schedvalue decimal(30, 6),
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_user
| (
| id varchar(64) not null,
| username varchar(64),
| adjuststatus integer,
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
|
| create table
| t_tm_model_param
| (
| id varchar(56) not null,
| modelid varchar(56),
| modelparamname varchar(64),
| modelparamid varchar(56),
| modelparamorder integer,
| modelparamportorder integer,
| datalength integer,
| modelparamtype varchar(32),
| comparisonlength integer,
| replacethreshold decimal(5, 3),
| comparisonthreshold decimal(5, 3),
| primary key (id),
| key idx_modelid (modelid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_predict_item
| (
| id varchar(64) not null,
| name varchar(64),
| title varchar(64),
| predictitemid varchar(64),
| schedulemodelid varchar(64),
| maxvaluekey varchar(64),
| minvaluekey varchar(64),
| min_predict_length integer,
| meaunit varchar(10),
| adjustkey varchar(36),
| adjustindex integer,
| adjustparam varchar(128),
| create_time datetime default current_timestamp,
| update_time datetime default current_timestamp,
| suggestkey varchar(36),
| primary key (id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table t_mm_predict_alarm_config
| (
| id varchar(36) not null,
| title varchar(36) COMMENT '消息标题',
| alarm_obj varchar(36) COMMENT '监控对象',
| item_id varchar(36) COMMENT '预测项ID',
| comp_length int COMMENT '比较长度',
| upper_limit decimal(10, 4) COMMENT '上限',
| lower_limit decimal(10, 4) COMMENT '下限',
| unit varchar(10) COMMENT '单位',
| coefficient decimal(10, 4) COMMENT '转换系数',
| model_id varchar(36) COMMENT '调度建议模型',
| is_enable tinyint NOT NULL COMMENT '是否启用(0禁用 1启用)',
| `creator` varchar(64) NOT NULL DEFAULT '' COMMENT '创建者',
| `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
| `updater` varchar(64) DEFAULT '' COMMENT '更新者',
| `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
| primary key (id)
| ) engine = innodb
| default character set utf8mb4 COMMENT = '预警配置表';
|
| create table t_mm_predict_alarm_message
| (
| id varchar(36) not null,
| title varchar(36) COMMENT '消息标题',
| content varchar(128) COMMENT '消息内容',
| alarm_obj varchar(36) COMMENT '监控对象',
| point_id varchar(36) COMMENT '监控点位ID',
| item_id varchar(36) COMMENT '预测项ID',
| current_value decimal(18, 4) COMMENT '当前值',
| out_time datetime COMMENT '超出时间',
| out_value decimal(18, 4) COMMENT '超出值',
| alarm_type varchar(10) COMMENT '预警类型',
| alarm_time datetime COMMENT '预警时间',
| create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
| primary key (id),
| key idx_item_id (item_id),
| key idx_alarm_obj (alarm_obj),
| key idx_alarm_time (alarm_time)
| ) engine = innodb
| default character set utf8mb4 COMMENT = '预警消息表';
|
| create table
| t_mm_item_result_json
| (
| id varchar(36) not null,
| outputid varchar(36),
| predicttime datetime,
| jsonvalue varchar(6400),
| cumulant varchar(36),
| primary key (id),
| key idx_outputid (outputid),
| key idx_predicttime (predicttime)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_mm_item_result_last_point
| (
| id varchar(36) not null,
| outputid varchar(36),
| datatime datetime,
| datavalue decimal(19, 3),
| primary key (id),
| key idx_outputid (outputid)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_mm_item_accuracy_rate
| (
| id varchar(36) not null,
| item_id varchar(36) not null,
| sample_length integer,
| value_type integer,
| in_deviation decimal(8, 3),
| in_accuracy_rate decimal(6, 4),
| out_deviation decimal(8, 3),
| out_accuracy_rate decimal(6, 4),
| is_enable integer,
| update_time datetime,
| begin_time datetime,
| primary key (id),
| key idx_item_id (item_id)
| ) engine = innodb
| default character set utf8mb4;
|
| create table
| t_st_schedule_suggest
| (
| id varchar(36) not null,
| title varchar(50) COMMENT '标题',
| content varchar(256) COMMENT '内容',
| sort integer COMMENT '排序',
| alarm_id varchar(36) COMMENT '预警ID',
| item_id varchar(36) COMMENT '预测项ID',
| model_id varchar(36) COMMENT '模型ID',
| adjust_obj varchar(20) COMMENT '调整对象',
| adjust_medium varchar(20) COMMENT '调整介质',
| adjust_strategy varchar(20) COMMENT '调整策略',
| adjust_mode varchar(20) COMMENT '调整方式',
| adjust_value decimal(18, 4) COMMENT '调整值',
| adjust_unit varchar(20) COMMENT '调整单位',
| adjust_times decimal(18, 4) COMMENT '持续时长',
| adjust_start datetime COMMENT '调整开始时间',
| adjust_end datetime COMMENT '调整结束时间',
| suggest_time datetime COMMENT '建议时间',
| status tinyint NOT NULL COMMENT '状态(0未处理 1已采纳 2已忽略)',
| create_time datetime default current_timestamp COMMENT '创建时间',
| primary key (id),
| key idx_model_id (model_id),
| key idx_type (type)
| ) engine = innodb
| default character set utf8mb4 COMMENT = '调度建议表';
|
|