123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- delete
- from tbl_paln;
- delete
- from tbl_paln_task;
- delete
- from tbl_incident;
- delete
- from tbl_incident_process;
- create table b_plan
- (
- id bigint not null
- primary key,
- name varchar(255),
- type integer,
- create_by varchar(64),
- create_time timestamp(0),
- create_dept varchar(64),
- update_by varchar(64),
- update_time timestamp(0),
- del_flag char default '0'
- );
- comment
- on table b_plan is '预案管理';
- comment
- on column b_plan.id is '主键id';
- comment
- on column b_plan.name is '预案名称';
- comment
- on column b_plan.type is '预案类型';
- comment
- on column b_plan.create_by is '创建人';
- comment
- on column b_plan.create_time is '创建时间';
- comment
- on column b_plan.create_dept is '创建部门';
- create table b_plan_task
- (
- id bigint not null
- primary key,
- plan_id bigint,
- level int,
- task_name varchar(255),
- task_des varchar(2550),
- create_by varchar(64),
- create_time timestamp(0),
- update_by varchar(64),
- update_time timestamp(0),
- del_flag char default '0'
- );
- comment
- on table b_plan_task is '预案任务管理';
- comment
- on column b_plan_task.id is '任务id';
- comment
- on column b_plan_task.plan_id is '所属预案id';
- comment
- on column b_plan_task.level is '预案等级';
- comment
- on column b_plan_task.task_name is '任务名称';
- comment
- on column b_plan_task.task_des is '任务描述';
- comment
- on column b_plan_task.create_by is '创建用户';
- comment
- on column b_plan_task.create_time is '创建时间';
- create table b_plan_file
- (
- id bigint not null primary key,
- plan_id bigint,
- file_name varchar(255),
- file_url varchar(255),
- create_by varchar(64),
- create_time timestamp(0),
- update_by varchar(64),
- update_time timestamp(0),
- del_flag char default '0'
- );
- comment
- on table b_plan_file is '预案文件管理';
- comment
- on column b_plan_file.id is '=id';
- comment
- on column b_plan_file.plan_id is '任务id';
- comment
- on column b_plan_file.file_name is '文件名称';
- comment
- on column b_plan_file.file_url is '文件路径';
- create table b_incident
- (
- id bigint not null primary key,
- type smallint,
- level smallint,
- addr varchar(255),
- locations varchar(255),
- create_dept varchar(64),
- create_by varchar(64),
- create_time timestamp(0),
- update_by varchar(64),
- update_time timestamp(0),
- del_flag char default '0',
- source varchar(16),
- des varchar(2550),
- pic varchar(2550),
- video varchar(2550),
- expr1 varchar(255),
- expr2 varchar(255),
- expr_json text,
- name varchar(255),
- status smallint,
- madin_dept integer,
- assist_dept varchar(255)
- );
- comment on table b_incident is '事件基础表';
- comment on column b_incident.id is '主键id';
- comment on column b_incident.type is '事件类型';
- comment on column b_incident.level is '事件等级';
- comment on column b_incident.addr is '事件地址';
- comment on column b_incident.locations is '经纬度';
- comment on column b_incident.create_dept is '上报部门';
- comment on column b_incident.create_by is '上报人';
- comment on column b_incident.create_time is '上报时间';
- comment on column b_incident.update_by is '修改人';
- comment on column b_incident.update_time is '修改时间';
- comment on column b_incident.source is '事件来源';
- comment on column b_incident.des is '事件描述';
- comment on column b_incident.pic is '上传图片地址';
- comment on column b_incident.video is '上传视频地址';
- comment on column b_incident.expr1 is '拓展1';
- comment on column b_incident.expr2 is '拓展2';
- comment on column b_incident.expr_json is 'json拓展,用于存取多出的字段';
- comment on column b_incident.name is '事件标题';
- comment on column b_incident.status is '事件状态 1:预警,2:事件 3:归档';
- comment on column b_incident.madin_dept is '主办单位';
- comment on column b_incident.assist_dept is '协办单位 多个数据用,分割';
- create table b_incident_process
- (
- id bigint not null primary key,
- incident_id bigint,
- des varchar(2550),
- create_time timestamp(0),
- create_by varchar(64),
- status smallint
- );
- comment on table b_incident_process is '事件处置流程';
- comment on column b_incident_process.id is '主键id';
- comment on column b_incident_process.incident_id is '所属事件id';
- comment on column b_incident_process.des is '处置过程';
- comment on column b_incident_process.create_time is '过程创建时间';
- comment on column b_incident_process.create_by is '过程创建人';
- comment on column b_incident_process.status is '流程进度当前状态';
- create table b_incident_task
- (
- id bigint not null primary key,
- incident_id bigint,
- task_name varchar(255),
- task_des varchar(2550),
- source int,
- create_time timestamp(0),
- create_by varchar(64),
- del_flag char default '0'
- );
- comment on table b_incident_task is '事件处置任务';
- comment on column b_incident_task.id is '主键id';
- comment on column b_incident_task.incident_id is '所属事件id';
- comment on column b_incident_task.task_name is '事件任务名称';
- comment on column b_incident_task.task_des is '任务内容';
- comment on column b_incident_task.source is '任务内容来源。1-内置。2-新增';
- comment on column b_incident_task.create_time is '过程创建时间';
- comment on column b_incident_task.create_by is '过程创建人';
- INSERT INTO sys_dict_type (dict_id, dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES (18, '应急资源', 'zhdd_resource', '0', 'admin', '2021-09-28 15:55:09', 'admin', '2021-09-28 15:55:09', null);
- INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (127, 0, '应急仓库', '1', 'zhdd_resource', null, 'default', 'N', '0', 'admin', '2021-09-28 15:57:23', 'admin', '2021-09-28 15:57:23', null);
- INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (128, 0, '应急队伍', '2', 'zhdd_resource', null, 'default', 'N', '0', 'admin', '2021-09-28 15:57:23', 'admin', '2021-09-28 15:57:23', null);
- INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (129, 0, '应急车辆', '3', 'zhdd_resource', null, 'default', 'N', '0', 'admin', '2021-09-28 15:57:23', 'admin', '2021-09-28 15:57:23', null);
|