create table safe_penetration_workspace ( id bigint auto_increment primary key, project_id bigint comment '项目ID', node_name varchar(100) null comment '节点名称', node_type int null comment '节点类型', workspace_type int null comment '工点类型', sorted int not null comment '排序', state int null, remark int null, create_by varchar(64) default '' comment '创建者', create_time datetime comment '创建时间', update_by varchar(64) default '' comment '更新者', update_time datetime comment '更新时间' )comment '工点'; create table safe_penetration_grid ( id bigint auto_increment primary key, project_id bigint comment '项目ID', grid_name varchar(200) comment '网格名称', grid_no int comment '网格号', security_check int comment '安监专务', grid_user int comment '网格安全员', grid_leader int comment '网格长', emergency_contact int comment '应急联系人', worker_count int comment '高峰期作业人员数', sorted int not null comment '排序', state int null, remark int null, create_by varchar(64) default '' comment '创建者', create_time datetime comment '创建时间', update_by varchar(64) default '' comment '更新者', update_time datetime comment '更新时间' ) comment '网格'; create table safe_penetration_grid_worker( id bigint auto_increment primary key, grid_id bigint comment '网格ID', user_id BIGINT comment '施工员' ) comment '网格-施工员'; create table safe_penetration_grid_site_leader( id bigint auto_increment primary key, grid_id bigint comment '网格ID', user_id BIGINT comment '施工员' ) comment '网格-现场负责人'; create table safe_penetration_grid_group( id bigint auto_increment primary key, grid_id bigint comment '网格ID', group_id BIGINT comment '施工员' ) comment '网格-现场负责人'; create table safe_penetration_range( id bigint auto_increment primary key, grid_id bigint comment '网格ID', engineering_type int comment '工程类型', workspace_id int comment '工点', position int default 0 comment '部位 0-上部结构 1-下部结构', dk1a int comment '里程DK1-a', dk1b int comment '里程DK1-b', dk2a int comment '里程DK2-a', dk2b int comment '里程DK2-b' ) comment '网格-范围'; create table safe_penetration_item( id bigint auto_increment primary key, project_id bigint comment '项目ID', `parent_id` bigint DEFAULT '0' COMMENT '父部门id', item_type int COMMENT '条目类型0-条目 1-分类 2-事故', item_desc varchar(100), item_catetory int COMMENT '条目类目 1-横向检查 2-纵向检查 3-跟班作业', item_key int COMMENT '外部id', risk_factor varchar(500) COMMENT '风险因素', risk_level int COMMENT '风险等级 1.低风险 2一般风险 3.较大风险', control_measure VARCHAR(500) COMMENT '控制措施', sorted int ) COMMENT '网格管理配置项'; create table safe_penetration_check( id bigint auto_increment primary key, project_id bigint comment '项目ID', check_type int COMMENT '检查类型 1-横向检查 2-班前 3-班后 4-关键施工', check_date date COMMent '检查时间', dept_id int COMMENT '检查部门', checked_person int COMMENT '被检查人', checked_imgs VARCHAR(1024) COMMent '检查图片', grid_id int COMMENT '网格点', grid_range_id int comment '施工部位', inspection_opinion int default 0 comment '检查意见 0-不同意 1-同意', state int null, remark int null, create_by varchar(64) default '' comment '创建者', create_time datetime comment '创建时间', update_by varchar(64) default '' comment '更新者', update_time datetime comment '更新时间' )COMMENT '检查数据'; create table safe_penetration_check_data( id bigint auto_increment primary key, check_id int COMMENT '检查ID', item_id int COMMENT '检查项ID', is_pass int default 0 comment '是否通过 0-不通过 1-通过' )COMMENT '检查数据项';