﻿-- T_BUSI_HAZ_EVA 危险源安全生产评价
CREATE TABLE t_busi_haz_eva (
    guid            VARCHAR(32)   PRIMARY KEY,
    org_guid        VARCHAR(32)   NOT NULL,
    eng_num         INTEGER       DEFAULT 0,
    yb_haz          INTEGER       DEFAULT 0,
    zd_haz          INTEGER       DEFAULT 0,
    yx_yb_haz       INTEGER       DEFAULT 0,
    yx_zd_haz       INTEGER       DEFAULT 0,
    yx_yb_gk        INTEGER       DEFAULT 0,
    yx_zd_gk        INTEGER       DEFAULT 0,
    haz_bsl         NUMERIC(8,2)  DEFAULT 0,
    haz_yb_gkl      NUMERIC(8,2)  DEFAULT 0,
    haz_zd_gkl      NUMERIC(8,2)  DEFAULT 0,
    zh_gkl          NUMERIC(8,2)  DEFAULT 0,
    bsl_qz          NUMERIC(8,2)  DEFAULT 0,
    gk_qz           NUMERIC(8,2)  DEFAULT 0,
    bs_fx           NUMERIC(8,2)  DEFAULT 0,
    gk_fx           NUMERIC(8,2)  DEFAULT 0,
    haz_fx          NUMERIC(8,2)  DEFAULT 0,
    create_time     TIMESTAMP     DEFAULT CURRENT_TIMESTAMP,
    start_date      VARCHAR(20),
    end_date        VARCHAR(20),
    yb_bsl          NUMERIC(8,2)  DEFAULT 0,
    zd_bsl          NUMERIC(8,2)  DEFAULT 0,
    ybs_num         INTEGER       DEFAULT 0,
    yb_ybs          INTEGER       DEFAULT 0,
    dx_eng          INTEGER       DEFAULT 0,
    zx_eng          INTEGER       DEFAULT 0,
    lbl             NUMERIC(8,2)  DEFAULT 0,
    bsl_xs          NUMERIC(8,2)  DEFAULT 0,
    gkl_xs          NUMERIC(8,2)  DEFAULT 0,
    zd_ybs          INTEGER       DEFAULT 0,
    date_year       VARCHAR(4),
    date_quarter    VARCHAR(1),
    date_type       VARCHAR(1),
    yb_gk_haz       INTEGER       DEFAULT 0,
    zd_gk_haz       INTEGER       DEFAULT 0,
    yb_tot_gkl      NUMERIC(8,2)  DEFAULT 0,
    zd_tot_gkl      NUMERIC(8,2)  DEFAULT 0,
    tot_gkl         NUMERIC(8,2)  DEFAULT 0,
    pro_total       INTEGER       DEFAULT 0
);

COMMENT ON TABLE  t_busi_haz_eva           IS '危险源安全生产评价';
COMMENT ON COLUMN t_busi_haz_eva.guid      IS '主键';
COMMENT ON COLUMN t_busi_haz_eva.org_guid  IS '所属机构';
COMMENT ON COLUMN t_busi_haz_eva.haz_bsl   IS '辨识率';
COMMENT ON COLUMN t_busi_haz_eva.date_year IS '日期年份';
COMMENT ON COLUMN t_busi_haz_eva.date_quarter IS '日期季度';
COMMENT ON COLUMN t_busi_haz_eva.date_type IS '日期类型';

CREATE INDEX idx_busi_haz_eva_org ON t_busi_haz_eva(org_guid);
