提交 | 用户 | 时间
|
6a5cf8
|
1 |
create table t_dm_module |
f154f0
|
2 |
( |
潘 |
3 |
id varchar(36) not null, |
|
4 |
modulename varchar(50), |
|
5 |
moduletype varchar(30), |
|
6 |
cycle decimal(5, 0), |
|
7 |
modulenavconfig varchar(3072), |
|
8 |
predicttime datetime, |
|
9 |
collecttime datetime, |
|
10 |
create_time datetime default current_timestamp, |
|
11 |
update_time datetime default current_timestamp, |
|
12 |
traintime datetime, |
|
13 |
primary key (id), |
6a5cf8
|
14 |
UNIQUE INDEX idx_moduletype (moduletype) |
潘 |
15 |
) engine = innodb default character set utf8mb4 COMMENT = '管网表'; |
f154f0
|
16 |
|
潘 |
17 |
|
6a5cf8
|
18 |
create table t_dm_module_item |
f154f0
|
19 |
( |
潘 |
20 |
id varchar(36) not null, |
|
21 |
moduleid varchar(36), |
|
22 |
itemid varchar(36), |
|
23 |
itemorder bigint, |
|
24 |
status bigint, |
|
25 |
categoryid varchar(64), |
|
26 |
primary key (id), |
|
27 |
key idx_moduleid (moduleid) |
6a5cf8
|
28 |
) engine = innodb default character set utf8mb4 COMMENT = '管网预测项关系表'; |
f154f0
|
29 |
|
潘 |
30 |
create table t_mm_item_output |
|
31 |
( |
|
32 |
id varchar(36) not null, |
|
33 |
itemid varchar(36), |
|
34 |
pointid varchar(36), |
|
35 |
resulttableid varchar(36), |
|
36 |
tagname varchar(50), |
|
37 |
outputorder decimal(5, 0), |
|
38 |
primary key (id), |
6a5cf8
|
39 |
INDEX idx_itemid (itemid) |
潘 |
40 |
) engine = innodb default character set utf8mb4 COMMENT = '预测项输出表'; |
f154f0
|
41 |
|
6a5cf8
|
42 |
create table t_mm_item_result |
f154f0
|
43 |
( |
潘 |
44 |
id varchar(36) not null, |
|
45 |
outputid varchar(36), |
|
46 |
datatime datetime, |
|
47 |
datavalue decimal(19, 3), |
|
48 |
primary key (id), |
6a5cf8
|
49 |
INDEX idx_outputid (outputid), |
潘 |
50 |
INDEX idx_datatime (datatime) |
f154f0
|
51 |
) engine = innodb |
6a5cf8
|
52 |
default character set utf8mb4 COMMENT = '预测结果表'; |
f154f0
|
53 |
|
6a5cf8
|
54 |
create table t_mm_item_type |
f154f0
|
55 |
( |
潘 |
56 |
id varchar(36) not null, |
|
57 |
itemtypename varchar(50), |
|
58 |
itemclasstype varchar(100), |
|
59 |
assemblyname varchar(64), |
|
60 |
primary key (id) |
6a5cf8
|
61 |
) engine = innodb default character set utf8mb4 COMMENT = '预测项类型表'; |
f154f0
|
62 |
|
6a5cf8
|
63 |
create table t_mm_model_arith_settings |
f154f0
|
64 |
( |
6a5cf8
|
65 |
id varchar(36) not null, |
潘 |
66 |
modelid varchar(36), |
|
67 |
`key` varchar(36), |
f154f0
|
68 |
value varchar(256), |
6a5cf8
|
69 |
name varchar(36), |
潘 |
70 |
valuetype varchar(36), |
f154f0
|
71 |
primary key (id), |
6a5cf8
|
72 |
INDEX idx_modelid (modelid) |
潘 |
73 |
) engine = innodb default character set utf8mb4 COMMENT = '预测模型设置参数表'; |
f154f0
|
74 |
|
6a5cf8
|
75 |
create table t_mm_model_param |
f154f0
|
76 |
( |
6a5cf8
|
77 |
id varchar(36) not null, |
潘 |
78 |
modelid varchar(36), |
|
79 |
modelparamname varchar(36), |
|
80 |
modelparamid varchar(36), |
f154f0
|
81 |
modelparamorder integer, |
潘 |
82 |
modelparamportorder integer, |
|
83 |
datalength integer, |
6a5cf8
|
84 |
modelparamtype varchar(36), |
f154f0
|
85 |
primary key (id), |
6a5cf8
|
86 |
INDEX idx_modelid (modelid) |
潘 |
87 |
) engine = innodb default character set utf8mb4 COMMENT = '预测模型输入参数表'; |
f154f0
|
88 |
|
6a5cf8
|
89 |
create table t_mm_model_resultstr |
f154f0
|
90 |
( |
潘 |
91 |
id varchar(64) not null, |
|
92 |
resultstr varchar(64), |
6a5cf8
|
93 |
primary key (id) |
潘 |
94 |
) engine = innodb default character set utf8mb4 COMMENT = '预测模型结果字符串表'; |
f154f0
|
95 |
|
潘 |
96 |
create table |
|
97 |
t_mm_predict_item |
|
98 |
( |
|
99 |
id varchar(36) not null, |
|
100 |
itemno varchar(16), |
|
101 |
itemname varchar(50), |
|
102 |
caltypeid varchar(36), |
|
103 |
itemtypeid varchar(36), |
|
104 |
predictlength decimal(5, 0), |
|
105 |
granularity decimal(5, 0), |
|
106 |
status decimal(5, 0), |
|
107 |
isfuse decimal(5, 0), |
|
108 |
predictphase decimal(5, 0), |
|
109 |
workchecked decimal(5, 0), |
|
110 |
unittransfactor decimal(31, 6), |
|
111 |
create_time datetime default current_timestamp, |
|
112 |
update_time datetime default current_timestamp, |
|
113 |
saveindex varchar(16), |
|
114 |
primary key (id), |
6a5cf8
|
115 |
UNIQUE INDEX uk_itemno (itemno) |
潘 |
116 |
) engine = innodb default character set utf8mb4 COMMENT = '预测模型结果字符串表'; |
f154f0
|
117 |
|
潘 |
118 |
create table |
|
119 |
t_mm_predict_merge_item |
|
120 |
( |
|
121 |
id varchar(36) not null, |
|
122 |
itemid varchar(36), |
6a5cf8
|
123 |
expression varchar(255), |
f154f0
|
124 |
num integer, |
潘 |
125 |
primary key (id), |
6a5cf8
|
126 |
UNIQUE INDEX uk_itemid (itemid) |
潘 |
127 |
) engine = innodb default character set utf8mb4 COMMENT = '合并预测项表'; |
f154f0
|
128 |
|
潘 |
129 |
create table |
|
130 |
t_mm_predict_model |
|
131 |
( |
|
132 |
id varchar(36) not null, |
|
133 |
modelno varchar(32), |
|
134 |
modelname varchar(50), |
|
135 |
itemid varchar(36), |
|
136 |
arithid varchar(36), |
|
137 |
trainsamplength decimal(5, 0), |
|
138 |
predictsamplength decimal(5, 0), |
|
139 |
isonlinetrain decimal(5, 0), |
|
140 |
modelpath varchar(256), |
|
141 |
isnormal decimal(5, 0), |
|
142 |
normalmax decimal(19, 3), |
|
143 |
normalmin decimal(19, 3), |
|
144 |
status decimal(5, 0), |
|
145 |
classname varchar(256), |
|
146 |
methodname varchar(64), |
|
147 |
modelparamstructure varchar(128), |
|
148 |
resultstrid varchar(64), |
|
149 |
settingmap varchar(256), |
|
150 |
trainmodelpath varchar(256), |
|
151 |
pathstatus decimal(5, 0), |
|
152 |
pdim smallint, |
|
153 |
traninip varchar(16), |
|
154 |
comparisonclassname varchar(256), |
|
155 |
primary key (id), |
6a5cf8
|
156 |
INDEX idx_modelno (modelno), |
潘 |
157 |
UNIQUE INDEX idx_itemid (itemid) |
f154f0
|
158 |
) engine = innodb |
6a5cf8
|
159 |
default character set utf8mb4 COMMENT = '预测项模型表'; |
f154f0
|
160 |
|
6a5cf8
|
161 |
create table t_mm_result_table |
f154f0
|
162 |
( |
潘 |
163 |
id varchar(36) not null, |
|
164 |
tablename varchar(30), |
|
165 |
primary key (id) |
6a5cf8
|
166 |
) engine = innodb default character set utf8mb4 COMMENT = '预测结果存放表'; |
f154f0
|
167 |
|
潘 |
168 |
|
6a5cf8
|
169 |
create table t_mm_item_result_json |
f154f0
|
170 |
( |
6a5cf8
|
171 |
id varchar(36) not null, |
潘 |
172 |
outputid varchar(36), |
|
173 |
predicttime datetime, |
|
174 |
jsonvalue varchar(6400), |
|
175 |
cumulant varchar(36), |
f154f0
|
176 |
primary key (id), |
6a5cf8
|
177 |
INDEX idx_outputid (outputid), |
潘 |
178 |
INDEX idx_predicttime (predicttime) |
|
179 |
) engine = innodb default character set utf8mb4 COMMENT = '预测JSON数据表'; |
f154f0
|
180 |
|
潘 |
181 |
create table |
6a5cf8
|
182 |
t_mm_item_result_last_point |
f154f0
|
183 |
( |
6a5cf8
|
184 |
id varchar(36) not null, |
潘 |
185 |
outputid varchar(36), |
|
186 |
datatime datetime, |
|
187 |
datavalue decimal(19, 3), |
f154f0
|
188 |
primary key (id), |
6a5cf8
|
189 |
INDEX idx_outputid (outputid), |
潘 |
190 |
INDEX idx_datatime (datatime) |
|
191 |
) engine = innodb default character set utf8mb4 COMMENT = '预测T+L数据表'; |
f154f0
|
192 |
|
6a5cf8
|
193 |
create table t_mm_item_accuracy_rate |
f154f0
|
194 |
( |
6a5cf8
|
195 |
id varchar(36) not null, |
潘 |
196 |
item_id varchar(36) not null COMMENT '预测项ID', |
|
197 |
sample_length integer COMMENT '样本长度', |
|
198 |
value_type integer COMMENT '值类型', |
|
199 |
in_deviation decimal(8, 3) COMMENT '精准误差', |
|
200 |
in_accuracy_rate decimal(6, 4) COMMENT '精准度', |
|
201 |
out_deviation decimal(8, 3) COMMENT '不可信误差', |
|
202 |
out_accuracy_rate decimal(6, 4) COMMENT '不可信率', |
|
203 |
is_enable tinyint, |
|
204 |
update_time datetime, |
|
205 |
begin_time datetime, |
f154f0
|
206 |
primary key (id), |
6a5cf8
|
207 |
INDEX idx_item_id (item_id) |
f154f0
|
208 |
) engine = innodb |
6a5cf8
|
209 |
default character set utf8mb4 COMMENT = '预测精准度表'; |
f154f0
|
210 |
|
7fd198
|
211 |
create table t_mm_predict_alarm_config |
f154f0
|
212 |
( |
7fd198
|
213 |
id varchar(36) not null, |
6a5cf8
|
214 |
title varchar(20) COMMENT '消息标题', |
7fd198
|
215 |
alarm_obj varchar(36) COMMENT '监控对象', |
潘 |
216 |
item_id varchar(36) COMMENT '预测项ID', |
|
217 |
comp_length int COMMENT '比较长度', |
|
218 |
upper_limit decimal(10, 4) COMMENT '上限', |
|
219 |
lower_limit decimal(10, 4) COMMENT '下限', |
|
220 |
unit varchar(10) COMMENT '单位', |
|
221 |
coefficient decimal(10, 4) COMMENT '转换系数', |
|
222 |
model_id varchar(36) COMMENT '调度建议模型', |
|
223 |
is_enable tinyint NOT NULL COMMENT '是否启用(0禁用 1启用)', |
|
224 |
`creator` varchar(64) NOT NULL DEFAULT '' COMMENT '创建者', |
|
225 |
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
|
226 |
`updater` varchar(64) DEFAULT '' COMMENT '更新者', |
|
227 |
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
|
228 |
primary key (id) |
|
229 |
) engine = innodb |
|
230 |
default character set utf8mb4 COMMENT = '预警配置表'; |
|
231 |
|
|
232 |
create table t_mm_predict_alarm_message |
|
233 |
( |
|
234 |
id varchar(36) not null, |
|
235 |
title varchar(36) COMMENT '消息标题', |
|
236 |
content varchar(128) COMMENT '消息内容', |
|
237 |
alarm_obj varchar(36) COMMENT '监控对象', |
|
238 |
point_id varchar(36) COMMENT '监控点位ID', |
|
239 |
item_id varchar(36) COMMENT '预测项ID', |
|
240 |
current_value decimal(18, 4) COMMENT '当前值', |
|
241 |
out_time datetime COMMENT '超出时间', |
|
242 |
out_value decimal(18, 4) COMMENT '超出值', |
|
243 |
alarm_type varchar(10) COMMENT '预警类型', |
|
244 |
alarm_time datetime COMMENT '预警时间', |
|
245 |
create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
f154f0
|
246 |
primary key (id), |
6a5cf8
|
247 |
INDEX idx_item_id (item_id), |
潘 |
248 |
INDEX idx_alarm_obj (alarm_obj), |
|
249 |
INDEX idx_alarm_time (alarm_time) |
f154f0
|
250 |
) engine = innodb |
7fd198
|
251 |
default character set utf8mb4 COMMENT = '预警消息表'; |
f154f0
|
252 |
|
6a5cf8
|
253 |
|
潘 |
254 |
-- 调度模块 |
|
255 |
|
|
256 |
create table t_st_schedule_scheme |
f154f0
|
257 |
( |
6a5cf8
|
258 |
`id` varchar(36) not null COMMENT 'ID', |
潘 |
259 |
`code` varchar(20) COMMENT '编号', |
|
260 |
`name` varchar(20) COMMENT '名称', |
|
261 |
`trigger_method` varchar(20) COMMENT '触发方式', |
|
262 |
`trigger_condition` varchar(20) COMMENT '触发条件', |
|
263 |
`schedule_obj` varchar(20) COMMENT '调整对象', |
|
264 |
`schedule_type` varchar(20) COMMENT '调整类型', |
|
265 |
`schedule_strategy` varchar(20) COMMENT '调整策略', |
|
266 |
`model_id` varchar(36) COMMENT '调度模型', |
|
267 |
`schedule_time` datetime COMMENT '调度时间', |
|
268 |
`status` tinyint NOT NULL DEFAULT 0 COMMENT '方案状态(0正常 1停用)', |
|
269 |
`remark` varchar(100) COMMENT '备注', |
|
270 |
`creator` varchar(64) NOT NULL DEFAULT '' COMMENT '创建者', |
|
271 |
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
|
272 |
`updater` varchar(64) NULL DEFAULT '' COMMENT '更新者', |
|
273 |
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
bbc1ee
|
274 |
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
f154f0
|
275 |
primary key (id), |
6a5cf8
|
276 |
UNIQUE INDEX `uk_code` (`code` ASC) USING BTREE |
f154f0
|
277 |
) engine = innodb |
6a5cf8
|
278 |
default character set utf8mb4 COMMENT = '调度方案表'; |
潘 |
279 |
|
|
280 |
create table t_st_schedule_model |
|
281 |
( |
|
282 |
`id` varchar(36) not null COMMENT 'ID', |
bbc1ee
|
283 |
`model_code` varchar(64) COMMENT '模型编号', |
潘 |
284 |
`model_name` varchar(64) COMMENT '模型名称', |
6a5cf8
|
285 |
`model_type` varchar(64) COMMENT '模型类型', |
潘 |
286 |
`class_name` varchar(128) COMMENT '类名', |
|
287 |
`method_name` varchar(64) COMMENT '方法名', |
|
288 |
`port_length` integer COMMENT '输入数量', |
|
289 |
`param_structure` varchar(256) COMMENT '参数构造', |
|
290 |
`model_path` varchar(256) COMMENT '路径', |
|
291 |
`result_str_id` varchar(64) COMMENT '结果ID', |
|
292 |
`invocation` varchar(64) COMMENT '调用方式', |
|
293 |
`status` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0正常 1停用)', |
|
294 |
`creator` varchar(64) NOT NULL DEFAULT '' COMMENT '创建者', |
|
295 |
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
|
296 |
`updater` varchar(64) NULL DEFAULT '' COMMENT '更新者', |
|
297 |
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
bbc1ee
|
298 |
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
6a5cf8
|
299 |
primary key (id), |
潘 |
300 |
UNIQUE INDEX `uk_model_code` (`model_code` ASC) USING BTREE |
bbc1ee
|
301 |
) engine = innodb default character set utf8mb4 COMMENT = '调度模型表'; |
f154f0
|
302 |
|
潘 |
303 |
create table |
6a5cf8
|
304 |
t_st_schedule_model_param |
f154f0
|
305 |
( |
6a5cf8
|
306 |
id varchar(36) not null, |
潘 |
307 |
modelid varchar(64), |
|
308 |
modelparamname varchar(64), |
|
309 |
modelparamid varchar(64), |
|
310 |
modelparamorder integer, |
|
311 |
modelparamportorder integer, |
|
312 |
datalength integer, |
|
313 |
modelparamtype varchar(64), |
|
314 |
primary key (id) |
f154f0
|
315 |
) engine = innodb |
6a5cf8
|
316 |
default character set utf8mb4 COMMENT = '调度模型输入参数表'; |
潘 |
317 |
|
f154f0
|
318 |
|
潘 |
319 |
create table |
6a5cf8
|
320 |
t_st_schedule_model_setting |
潘 |
321 |
( |
|
322 |
`id` varchar(36) not null, |
|
323 |
`modelid` varchar(64), |
|
324 |
`key` varchar(64), |
|
325 |
`value` varchar(64), |
|
326 |
`valuetype` varchar(64), |
|
327 |
`name` varchar(64), |
bbc1ee
|
328 |
`sort` integer, |
6a5cf8
|
329 |
primary key (id), |
潘 |
330 |
key idx_modelid (modelid) |
|
331 |
) engine = innodb |
|
332 |
default character set utf8mb4 COMMENT = '调度模型设置参数表'; |
|
333 |
|
|
334 |
create table |
bbc1ee
|
335 |
t_st_schedule_suggest |
f154f0
|
336 |
( |
潘 |
337 |
id varchar(36) not null, |
6a5cf8
|
338 |
title varchar(50) COMMENT '标题', |
潘 |
339 |
content varchar(256) COMMENT '内容', |
|
340 |
sort integer COMMENT '排序', |
|
341 |
scheme_id varchar(36) COMMENT '方案ID', |
|
342 |
alarm_id varchar(36) COMMENT '预警ID', |
|
343 |
item_id varchar(36) COMMENT '预测项ID', |
|
344 |
model_id varchar(36) COMMENT '模型ID', |
|
345 |
schedule_obj varchar(20) COMMENT '调整对象', |
|
346 |
schedule_type varchar(20) COMMENT '调整类型', |
|
347 |
schedule_strategy varchar(20) COMMENT '调整策略', |
|
348 |
adjust_mode varchar(20) COMMENT '调整方式', |
|
349 |
adjust_value decimal(18, 4) COMMENT '调整值', |
|
350 |
adjust_unit varchar(20) COMMENT '调整单位', |
|
351 |
adjust_times decimal(18, 4) COMMENT '持续时长', |
|
352 |
adjust_start datetime COMMENT '调整开始时间', |
|
353 |
adjust_end datetime COMMENT '调整结束时间', |
|
354 |
schedule_time datetime COMMENT '调度时间', |
|
355 |
status tinyint NOT NULL COMMENT '状态(0未处理 1已采纳 2已忽略)', |
|
356 |
handler varchar(36) COMMENT '处理人', |
|
357 |
handle_time datetime COMMENT '处理时间', |
|
358 |
create_time datetime default current_timestamp COMMENT '创建时间', |
f154f0
|
359 |
primary key (id), |
6a5cf8
|
360 |
INDEX idx_scheme_id (scheme_id), |
潘 |
361 |
INDEX idx_alarm_id (alarm_id), |
|
362 |
INDEX idx_item_id (item_id), |
|
363 |
INDEX idx_model_id (model_id), |
|
364 |
INDEX idx_schedule_obj (schedule_obj), |
|
365 |
INDEX idx_schedule_type (schedule_type) |
f154f0
|
366 |
) engine = innodb |
6a5cf8
|
367 |
default character set utf8mb4 COMMENT = '调度建议表'; |
潘 |
368 |
|
f154f0
|
369 |
|
潘 |
370 |
create table |
6a5cf8
|
371 |
t_st_schedule_record |
f154f0
|
372 |
( |
6a5cf8
|
373 |
`id` varchar(36) not null, |
潘 |
374 |
`scheme_id` varchar(36) COMMENT '方案ID', |
|
375 |
`model_id` varchar(36) COMMENT '模型ID', |
bbc1ee
|
376 |
`model_name` varchar(64) COMMENT '模型名称', |
6a5cf8
|
377 |
`schedule_time` datetime COMMENT '调度时间', |
潘 |
378 |
`create_time` datetime default current_timestamp COMMENT '创建时间', |
f154f0
|
379 |
primary key (id), |
6a5cf8
|
380 |
INDEX idx_scheme_id (scheme_id), |
潘 |
381 |
INDEX idx_model_id (model_id), |
|
382 |
INDEX idx_schedule_time (schedule_time) |
f154f0
|
383 |
) engine = innodb |
6a5cf8
|
384 |
default character set utf8mb4 COMMENT = '调度记录表'; |
潘 |
385 |
|
|
386 |
|
|
387 |
create table |
|
388 |
t_st_schedule_record_detail |
|
389 |
( |
|
390 |
`id` varchar(36) not null, |
|
391 |
`record_id` varchar(36), |
|
392 |
`scheme_id` varchar(64), |
|
393 |
`model_id` varchar(36) COMMENT '模型ID', |
|
394 |
`result_key` varchar(64), |
|
395 |
`result_value` text, |
|
396 |
`schedule_time` datetime COMMENT '调度时间', |
|
397 |
primary key (id), |
|
398 |
key idx_record_id (record_id), |
|
399 |
key idx_scheme_id (scheme_id), |
|
400 |
key idx_model_id (model_id) |
|
401 |
) engine = innodb |
|
402 |
default character set utf8mb4 COMMENT = '调度记录详情表'; |