/*==============================================================*/
/* DBMS name:      ORACLE Version 11g                           */
/* Created on:     2019/11/19 16:30:45                          */
/*==============================================================*/


alter table IND_INDICATOR
   drop constraint FK_IND_INDI_REFERENCE_IND_UNIT;

alter table IND_INDICATOR_PRICE
   drop constraint FK_IND_PRICE_REFERENCE_INDI;

alter table IND_INDICATOR_PRICE
   drop constraint FK_IND_INDI_REFERENCE_IND_PRIC;

alter table IND_INDICATOR_STANDARD
   drop constraint FK_IND_STANDARD_REFERENCE_INDI;

alter table IND_INDICATOR_STANDARD
   drop constraint FK_IND_INDI_REFERENCE_IND_STAN;

alter table IND_MONITOR_INDICATOR
   drop constraint FK_IND_MONI_REFERENCE_IND_INDI;

alter table LYJG
   drop constraint FK_LYJG_REFERENCE_TBJL;

alter table LYJGMX
   drop constraint FK_LYJGMX_REFERENCE_LYJG;

alter table QGJGZS
   drop constraint FK_QGJGZS_REFERENCE_TBJL;

alter table QZZ
   drop constraint FK_QZZ_REFERENCE_QZJCXX;

alter table TBJL
   drop constraint FK_TBJL_REFERENCE_BBLX;

alter table ZKBBZB
   drop constraint FK_ZKBBZB_REFERENCE_BBLX;

alter table ZKBBZB
   drop constraint FK_ZKBBZB_REFERENCE_IND_INDI;

drop table BBLX cascade constraints;

drop table IND_INDICATOR cascade constraints;

drop table IND_INDICATOR_PRICE cascade constraints;

drop table IND_INDICATOR_STANDARD cascade constraints;

drop table IND_MONITOR_INDICATOR cascade constraints;

drop table IND_PRICE_TYPE cascade constraints;

drop table IND_STANDARD_INFO cascade constraints;

drop table IND_UNIT cascade constraints;

drop table LYJG cascade constraints;

drop table LYJGMX cascade constraints;

drop table QGJGZS cascade constraints;

drop table QKSC cascade constraints;

drop table QZJCXX cascade constraints;

drop table QZZ cascade constraints;

drop table TBJL cascade constraints;

drop table WZTG cascade constraints;

drop table ZBPPGG cascade constraints;

drop table ZKBBPZ cascade constraints;

drop table ZKBBZB cascade constraints;

/*==============================================================*/
/* Table: BBLX                                                  */
/*==============================================================*/
create table BBLX 
(
   ID                   VARCHAR2(36)         not null,
   BBLXMC               VARCHAR(36),
   BBQLXBM              VARCHAR(36),
   BBQLXMC              VARCHAR(36),
   SBKSSJ               VARCHAR(36),
   SBJSSJ               VARCHAR(36),
   constraint PK_BBLX primary key (ID)
);

comment on table BBLX is
'报表类型';

comment on column BBLX.BBLXMC is
'报表类型名称';

comment on column BBLX.BBQLXBM is
'报表期类型编码';

comment on column BBLX.BBQLXMC is
'报表期类型名称';

comment on column BBLX.SBKSSJ is
'上报开始时间(例如：周一)';

comment on column BBLX.SBJSSJ is
'上报结束时间（例如：周五）';

/*==============================================================*/
/* Table: IND_INDICATOR                                         */
/*==============================================================*/
create table IND_INDICATOR
(
   ID                   VARCHAR2(36)         not null,
   IND_NAME             VARCHAR2(90),
   USE_YEAR             VARCHAR2(4),
   IND_CODE             VARCHAR2(36),
   ENS_CODE             VARCHAR2(36),
   "LEVEL"              VARCHAR2(1),
   TYPE                 VARCHAR2(1),
   PPBM                 VARCHAR(36),
   PP                   VARCHAR(36),
   GGBM                 VARCHAR(36),
   GG                   VARCHAR(36),
   P_IND                VARCHAR2(36),
   IS_CHILD             VARCHAR2(1),
   DESCRIPTION          VARCHAR2(900),
   UNIT_ID              VARCHAR2(36),
   constraint PK_IND_INDICATOR primary key (ID)
);

comment on table IND_INDICATOR is
'指标管理表';

comment on column IND_INDICATOR.IND_NAME is
'指标名称';

comment on column IND_INDICATOR.USE_YEAR is
'使用年份';

comment on column IND_INDICATOR.IND_CODE is
'指标编码';

comment on column IND_INDICATOR.ENS_CODE is
'英文代码';

comment on column IND_INDICATOR."LEVEL" is
'级别';

comment on column IND_INDICATOR.TYPE is
'1：原粮； 2：成品粮；3：食用油及油料';

comment on column IND_INDICATOR.PPBM is
'品牌编码';

comment on column IND_INDICATOR.PP is
'品牌';

comment on column IND_INDICATOR.GGBM is
'规格编码';

comment on column IND_INDICATOR.GG is
'规格';

comment on column IND_INDICATOR.P_IND is
'父指标';

comment on column IND_INDICATOR.IS_CHILD is
'0:NO;1:YES';

comment on column IND_INDICATOR.DESCRIPTION is
'描述';

comment on column IND_INDICATOR.UNIT_ID is
'指标单位id';

/*==============================================================*/
/* Table: IND_INDICATOR_PRICE                                   */
/*==============================================================*/
create table IND_INDICATOR_PRICE
(
   ID                   VARCHAR2(36)         not null,
   PRICE_ID             VARCHAR2(36),
   CODE                 VARCHAR2(96),
   INDICATOR_ID         VARCHAR2(36),
   MOM_VAL              NUMBER,
   XSWS                 INTEGER,
   FDTS                 INTEGER,
   JZJG                 INTEGER,
   constraint PK_IND_INDICATOR_PRICE primary key (ID)
);

comment on table IND_INDICATOR_PRICE is
'指标与价格类型中间表';

comment on column IND_INDICATOR_PRICE.PRICE_ID is
'价格类型';

comment on column IND_INDICATOR_PRICE.CODE is
'价格类型编码';

comment on column IND_INDICATOR_PRICE.INDICATOR_ID is
'指标';

comment on column IND_INDICATOR_PRICE.MOM_VAL is
'环比伐值';

comment on column IND_INDICATOR_PRICE.XSWS is
'小数位数';

comment on column IND_INDICATOR_PRICE.FDTS is
'幅度提示';

comment on column IND_INDICATOR_PRICE.JZJG is
'基准价格';

/*==============================================================*/
/* Table: IND_INDICATOR_STANDARD                                */
/*==============================================================*/
create table IND_INDICATOR_STANDARD
(
   ID                   VARCHAR2(36)         not null,
   STANDARD_ID          VARCHAR2(36),
   INDICATOR_ID         VARCHAR2(36),
   constraint PK_IND_INDICATOR_STANDARD primary key (ID)
);

comment on table IND_INDICATOR_STANDARD is
'指标与标准中间表';

comment on column IND_INDICATOR_STANDARD.STANDARD_ID is
'指标标准';

comment on column IND_INDICATOR_STANDARD.INDICATOR_ID is
'指标';

/*==============================================================*/
/* Table: IND_MONITOR_INDICATOR                                 */
/*==============================================================*/
create table IND_MONITOR_INDICATOR
(
   ID                   VARCHAR2(36)         not null,
   INDICATOR_ID         VARCHAR2(36),
   MONITOR_ID           VARCHAR2(36),
   constraint PK_IND_MONITOR_INDICATOR primary key (ID)
);

comment on table IND_MONITOR_INDICATOR is
'监测点与指标中间表';

comment on column IND_MONITOR_INDICATOR.INDICATOR_ID is
'指标ID';

comment on column IND_MONITOR_INDICATOR.MONITOR_ID is
'监测点ID';

/*==============================================================*/
/* Table: IND_PRICE_TYPE                                        */
/*==============================================================*/
create table IND_PRICE_TYPE
(
   ID                   VARCHAR2(36)         not null,
   PRICE_TYPE_NAME      VARCHAR2(90),
   USE_YEAR             VARCHAR2(4),
   DESCRIPTION          VARCHAR2(900),
   constraint PK_IND_PRICE_TYPE primary key (ID)
);

comment on table IND_PRICE_TYPE is
'价格类型管理表';

comment on column IND_PRICE_TYPE.PRICE_TYPE_NAME is
'价格类型名称';

comment on column IND_PRICE_TYPE.USE_YEAR is
'使用年份';

comment on column IND_PRICE_TYPE.DESCRIPTION is
'描述';

/*==============================================================*/
/* Table: IND_STANDARD_INFO                                     */
/*==============================================================*/
create table IND_STANDARD_INFO
(
   ID                   VARCHAR2(36)         not null,
   IND_STANDARD_NAME    VARCHAR2(90),
   DESCRIPTION          VARCHAR2(900),
   constraint PK_IND_STANDARD_INFO primary key (ID)
);

comment on table IND_STANDARD_INFO is
'指标标准信息管理表';

comment on column IND_STANDARD_INFO.IND_STANDARD_NAME is
'指标标准名称';

comment on column IND_STANDARD_INFO.DESCRIPTION is
'描述';

/*==============================================================*/
/* Table: IND_UNIT                                              */
/*==============================================================*/
create table IND_UNIT
(
   ID                   VARCHAR2(36)         not null,
   IND_UNIT_NAME        VARCHAR2(90),
   DESCRIPTION          VARCHAR2(900),
   constraint PK_IND_UNIT primary key (ID)
);

comment on table IND_UNIT is
'指标单位管理表';

comment on column IND_UNIT.IND_UNIT_NAME is
'指标单位名称';

comment on column IND_UNIT.DESCRIPTION is
'描述';

/*==============================================================*/
/* Table: LYJG                                                  */
/*==============================================================*/
create table LYJG
(
   ID                   VARCHAR(36)          not null,
   TBJL_ID              VARCHAR(36),
   XH                   NUMBER,
   ZBLBBM               VARCHAR(36),
   PZLB                 VARCHAR(36),
   ZBBM                 VARCHAR(36),
   PZMC                 VARCHAR(36),
   JLBZBM               VARCHAR(36),
   JLBZ                 VARCHAR(36),
   JLDWBM               VARCHAR(36),
   JLDW                 VARCHAR(36),
   DJBM                 VARCHAR(36),
   DJ                   VARCHAR(36),
   PPBM                 VARCHAR(36),
   PP                   VARCHAR(36),
   GGBM                 VARCHAR(36),
   GG                   VARCHAR(36),
   CDXZQHBM             VARCHAR(36),
   CD                   VARCHAR(500),
   BDYY                 VARCHAR(500),
   constraint PK_LYJG primary key (ID)
);

comment on table LYJG is
'粮油价格';

comment on column LYJG.TBJL_ID is
'填报记录ID';

comment on column LYJG.XH is
'序号';

comment on column LYJG.ZBLBBM is
'指标类别编码';

comment on column LYJG.PZLB is
'指标类别';

comment on column LYJG.ZBBM is
'指标编码';

comment on column LYJG.PZMC is
'指标名称';

comment on column LYJG.JLBZBM is
'计量标准编码';

comment on column LYJG.JLBZ is
'计量标准';

comment on column LYJG.JLDWBM is
'计量单位编码';

comment on column LYJG.JLDW is
'计量单位';

comment on column LYJG.DJBM is
'等级编码';

comment on column LYJG.DJ is
'等级';

comment on column LYJG.PPBM is
'品牌编码';

comment on column LYJG.PP is
'品牌';

comment on column LYJG.GGBM is
'规格编码';

comment on column LYJG.GG is
'规格';

comment on column LYJG.CDXZQHBM is
'产地行政区划编码';

comment on column LYJG.CD is
'产地';

comment on column LYJG.BDYY is
'变动原因（备注）';

/*==============================================================*/
/* Table: LYJGMX                                                */
/*==============================================================*/
create table LYJGMX
(
   ID                   VARCHAR(36)          not null,
   JGLX                 VARCHAR(36),
   SQZGJG               NUMBER(10,8),
   SQZDJG               NUMBER(10,8),
   SQJG                 NUMBER(10,8),
   SBSL                 NUMBER(10,8),
   BQJG                 NUMBER(10,8),
   BQSL                 NUMBER(10,8),
   JGZS                 NUMBER(10,8),
   HBZZL                NUMBER(10,8),
   TBZZL                NUMBER(10,8),
   LYJG_ID              VARCHAR(36)          not null,
   constraint PK_LYJGMX primary key (ID)
);

comment on column LYJGMX.JGLX is
'价格类型';

comment on column LYJGMX.SQZGJG is
'上期最高价格';

comment on column LYJGMX.SQZDJG is
'上期最低价格';

comment on column LYJGMX.SQJG is
'上期价格';

comment on column LYJGMX.SBSL is
'上期数量';

comment on column LYJGMX.BQJG is
'本期价格';

comment on column LYJGMX.BQSL is
'本期数量';

comment on column LYJGMX.JGZS is
'价格指数';

comment on column LYJGMX.HBZZL is
'环比增长率';

comment on column LYJGMX.TBZZL is
'同比增长率';

comment on column LYJGMX.LYJG_ID is
'主表ID';

/*==============================================================*/
/* Table: QGJGZS                                                */
/*==============================================================*/
create table QGJGZS
(
   ID                   VARCHAR(36)          not null,
   TBJL_ID              VARCHAR(36),
   PZLB                 VARCHAR(36),
   PZMC                 VARCHAR(36),
   ZS                   NUMBER,
   HB                   NUMBER,
   TB                   NUMBER,
   constraint PK_QGJGZS primary key (ID)
);

comment on column QGJGZS.TBJL_ID is
'填报记录ID';

comment on column QGJGZS.PZLB is
'品种类别';

comment on column QGJGZS.PZMC is
'品种名称';

comment on column QGJGZS.ZS is
'指数';

comment on column QGJGZS.HB is
'环比';

comment on column QGJGZS.TB is
'同比';

/*==============================================================*/
/* Table: QKSC                                                  */
/*==============================================================*/
create table QKSC
(
   ID                   VARCHAR2(36)         not null,
   CREATE_BY            VARCHAR(36),
   CREATE_TIME          TIMESTAMP,
   UPDATE_BY            VARCHAR(36),
   UPDATE_TIME          TIMESTAMP,
   DELETE_BY            VARCHAR(36),
   DELETE_TIME          TIMESTAMP,
   ORG_ID               VARCHAR2(36),
   ORG_NAME             VARCHAR2(36),
   DEPT_ID              VARCHAR2(36),
   DEPT_NAME            VARCHAR2(99),
   AREA_CODE            VARCHAR2(36),
   AREA_NAME            VARCHAR2(99),
   BT                   VARCHAR2(99),
   FJ                   VARCHAR2(999),
   constraint PK_QKSC primary key (ID)
);

comment on table QKSC is
'期刊上传';

comment on column QKSC.CREATE_BY is
'创建人';

comment on column QKSC.CREATE_TIME is
'创建时间';

comment on column QKSC.UPDATE_BY is
'编辑人';

comment on column QKSC.UPDATE_TIME is
'编辑时间';

comment on column QKSC.DELETE_BY is
'删除人';

comment on column QKSC.DELETE_TIME is
'删除时间';

comment on column QKSC.ORG_ID is
'组织机构id';

comment on column QKSC.ORG_NAME is
'组织机构name';

comment on column QKSC.DEPT_ID is
'部门ID';

comment on column QKSC.DEPT_NAME is
'部门name';

comment on column QKSC.AREA_CODE is
'行政区划code';

comment on column QKSC.AREA_NAME is
'行政区划name';

comment on column QKSC.BT is
'标题';

comment on column QKSC.FJ is
'附件';

/*==============================================================*/
/* Table: QZJCXX                                                */
/*==============================================================*/
create table QZJCXX
(
   ID                   VARCHAR2(36)         not null,
   QZDM                 VARCHAR(999),
   QZMC                 VARCHAR(999),
   QZLX                 VARCHAR(1),
   WHRQ                 DATE,
   ZT                   VARCHAR(1),
   CJSJ                 TIMESTAMP,
   CJR                  VARCHAR2(36),
   XGSJ                 TIMESTAMP,
   XGR                  VARCHAR2(36),
   SCSJ                 TIMESTAMP,
   SCR                  VARCHAR2(36),
   ZZID                 VARCHAR2(36),
   BMID                 VARCHAR2(36),
   constraint PK_QZJCXX primary key (ID)
);

comment on table QZJCXX is
'权重基础信息表';

comment on column QZJCXX.QZDM is
'权重代码';

comment on column QZJCXX.QZMC is
'权重名称';

comment on column QZJCXX.QZLX is
'权重类别';

comment on column QZJCXX.WHRQ is
'维护日期';

comment on column QZJCXX.ZT is
'应用状态（0：禁用；1：启用）';

comment on column QZJCXX.CJSJ is
'创建时间';

comment on column QZJCXX.CJR is
'创建人id';

comment on column QZJCXX.XGSJ is
'修改时间';

comment on column QZJCXX.XGR is
'修改人';

comment on column QZJCXX.SCSJ is
'删除时间';

comment on column QZJCXX.SCR is
'删除人';

comment on column QZJCXX.ZZID is
'组织机构id';

comment on column QZJCXX.BMID is
'部门ID';

/*==============================================================*/
/* Table: QZZ                                                   */
/*==============================================================*/
create table QZZ
(
   ID                   VARCHAR2(36)         not null,
   QZDM                 VARCHAR(99),
   PZ                   VARCHAR(999),
   BZ                   VARCHAR(999),
   QZZ                  INTEGER,
   constraint PK_QZZ primary key (ID)
);

comment on table QZZ is
'指标权重值表';

comment on column QZZ.QZDM is
'权重代码';

comment on column QZZ.PZ is
'品种';

comment on column QZZ.BZ is
'备注';

comment on column QZZ.QZZ is
'权重值';

/*==============================================================*/
/* Table: TBJL                                                  */
/*==============================================================*/
create table TBJL
(
   ID                   VARCHAR(36)          not null,
   BBLXID               VARCHAR(36),
   CREATE_BY            VARCHAR(36),
   CREATE_TIME          TIMESTAMP,
   UPDATE_BY            VARCHAR(36),
   UPDATE_TIME          TIMESTAMP,
   DELETE_BY            VARCHAR(36),
   DELETE_TIME          TIMESTAMP,
   SBDQ                 VARCHAR(36),
   XZQHBM               VARCHAR(36),
   JCD                  VARCHAR(36),
   SBKSSJ               TIMESTAMP,
   SBJSSJ               TIMESTAMP,
   LCID                 VARCHAR(36),
   ORG_ID               VARCHAR2(36),
   DEPT_ID              VARCHAR2(36),
   ORG_NAME             VARCHAR2(36),
   DEPT_NAME            VARCHAR2(99),
   AREA_CODE            VARCHAR2(36),
   AREA_NAME            VARCHAR2(99),
   IS_CREATE            VARCHAR2(36),
   constraint PK_TBJL primary key (ID)
);

comment on table TBJL is
'填报记录';

comment on column TBJL.BBLXID is
'报表类型ID';

comment on column TBJL.CREATE_BY is
'创建人';

comment on column TBJL.CREATE_TIME is
'创建时间';

comment on column TBJL.UPDATE_BY is
'编辑人';

comment on column TBJL.UPDATE_TIME is
'编辑时间';

comment on column TBJL.DELETE_BY is
'删除人';

comment on column TBJL.DELETE_TIME is
'删除时间';

comment on column TBJL.SBDQ is
'上报地区';

comment on column TBJL.XZQHBM is
'行政区划编码';

comment on column TBJL.JCD is
'上报监测点';

comment on column TBJL.SBKSSJ is
'上报开始时间';

comment on column TBJL.SBJSSJ is
'上报结束时间';

comment on column TBJL.LCID is
'流程ID';

comment on column TBJL.ORG_ID is
'组织机构ID';

comment on column TBJL.DEPT_ID is
'部门ID';

comment on column TBJL.ORG_NAME is
'组织机构name';

comment on column TBJL.DEPT_NAME is
'部门name';

comment on column TBJL.AREA_CODE is
'行政区划code';

comment on column TBJL.AREA_NAME is
'行政区划name';

comment on column TBJL.IS_CREATE is
'是否生成本级数据 1是';

/*==============================================================*/
/* Table: WZTG                                                  */
/*==============================================================*/
create table WZTG
(
   ID                   VARCHAR2(36)         not null,
   CREATE_BY            VARCHAR(36),
   CREATE_TIME          TIMESTAMP,
   UPDATE_BY            VARCHAR(36),
   UPDATE_TIME          TIMESTAMP,
   DELETE_BY            VARCHAR(36),
   DELETE_TIME          TIMESTAMP,
   ORG_ID               VARCHAR2(36),
   DEPT_ID              VARCHAR2(36),
   ORG_NAME             VARCHAR2(36),
   DEPT_NAME            VARCHAR2(99),
   AREA_CODE            VARCHAR2(36),
   AREA_NAME            VARCHAR2(99),
   BT                   VARCHAR2(99),
   NR                   CLOB,
   FJ                   VARCHAR2(999),
   MS                   VARCHAR2(999),
   ZT                   VARCHAR(36)          default '0',
   BHYJ                 VARCHAR2(999),
   SHR                  VARCHAR2(999),
   SHSJ                 TIMESTAMP,
   constraint PK_WZTG primary key (ID)
);

comment on table WZTG is
'文章投稿';

comment on column WZTG.CREATE_BY is
'创建人';

comment on column WZTG.CREATE_TIME is
'创建时间';

comment on column WZTG.UPDATE_BY is
'编辑人';

comment on column WZTG.UPDATE_TIME is
'编辑时间';

comment on column WZTG.DELETE_BY is
'删除人';

comment on column WZTG.DELETE_TIME is
'删除时间';

comment on column WZTG.ORG_ID is
'组织机构id';

comment on column WZTG.DEPT_ID is
'部门ID';

comment on column WZTG.ORG_NAME is
'组织机构name';

comment on column WZTG.DEPT_NAME is
'部门name';

comment on column WZTG.AREA_CODE is
'行政区划code';

comment on column WZTG.AREA_NAME is
'行政区划name';

comment on column WZTG.BT is
'标题';

comment on column WZTG.NR is
'内容';

comment on column WZTG.FJ is
'附件';

comment on column WZTG.MS is
'描述';

comment on column WZTG.ZT is
'流程id';

comment on column WZTG.BHYJ is
'驳回意见';

comment on column WZTG.SHR is
'审核人';

comment on column WZTG.SHSJ is
'审核时间';

/*==============================================================*/
/* Table: ZBPPGG                                                */
/*==============================================================*/
create table ZBPPGG
(
   ID                   VARCHAR2(36)         not null,
   ZB_NAME              VARCHAR2(90),
   ZB_ID                VARCHAR2(36),
   PP_NAME              VARCHAR2(90),
   PP_ID                VARCHAR2(36),
   GG_NAME              VARCHAR2(90),
   GG_ID                VARCHAR2(36),
   CD                   VARCHAR2(96),
   constraint PK_ZBPPGG primary key (ID)
);

comment on table ZBPPGG is
'指标品牌规格管理表';

comment on column ZBPPGG.ZB_NAME is
'指标名称';

comment on column ZBPPGG.ZB_ID is
'指标ID';

comment on column ZBPPGG.PP_NAME is
'品牌名称';

comment on column ZBPPGG.PP_ID is
'品牌ID';

comment on column ZBPPGG.GG_NAME is
'规格名称';

comment on column ZBPPGG.GG_ID is
'规格ID';

comment on column ZBPPGG.CD is
'产地';

/*==============================================================*/
/* Table: ZKBBPZ                                                */
/*==============================================================*/
create table ZKBBPZ
(
   ID                   VARCHAR2(36)         not null,
   ZKBBLXBM             VARCHAR2(36),
   ZKBBLXM              VARCHAR2(36),
   ZKBBZB               VARCHAR2(36),
   ZKBBZBM              VARCHAR2(36),
   ZKBBJG               VARCHAR2(36),
   ZKBBJGM              VARCHAR2(36),
   XZQHBM               VARCHAR2(36),
   XZQH                 VARCHAR2(36),
   JCD_ID               VARCHAR2(36),
   JCDMC                VARCHAR2(36),
   ZBBM                 VARCHAR2(36),
   ZBMC                 VARCHAR2(36),
   JGLXBM               VARCHAR2(36),
   JGLX                 VARCHAR2(36),
   ZBBZBM               VARCHAR2(36),
   ZBBZ                 VARCHAR2(36),
   constraint PK_ZKBBPZ primary key (ID)
);

comment on table ZKBBPZ is
'报表配置';

comment on column ZKBBPZ.ZKBBLXBM is
'周刊报表类型编码';

comment on column ZKBBPZ.ZKBBLXM is
'周刊报表类型名';

comment on column ZKBBPZ.ZKBBZB is
'周刊报表指标';

comment on column ZKBBPZ.ZKBBZBM is
'周刊报表指标名';

comment on column ZKBBPZ.ZKBBJG is
'周刊报表价格';

comment on column ZKBBPZ.ZKBBJGM is
'周刊报表价格名';

comment on column ZKBBPZ.XZQHBM is
'行政区划编码';

comment on column ZKBBPZ.XZQH is
'行政区划';

comment on column ZKBBPZ.JCD_ID is
'监测点ID';

comment on column ZKBBPZ.JCDMC is
'监测点名称';

comment on column ZKBBPZ.ZBBM is
'指标编码';

comment on column ZKBBPZ.ZBMC is
'指标名称';

comment on column ZKBBPZ.JGLXBM is
'价格类型编码';

comment on column ZKBBPZ.JGLX is
'价格类型';

comment on column ZKBBPZ.ZBBZBM is
'指标标准编码';

comment on column ZKBBPZ.ZBBZ is
'指标标准';

/*==============================================================*/
/* Table: ZKBBZB                                                */
/*==============================================================*/
create table ZKBBZB
(
   ID                   VARCHAR2(36)         not null,
   BBLXID               VARCHAR(36),
   ZBID                 VARCHAR(36),
   constraint PK_ZKBBZB primary key (ID)
);

comment on table ZKBBZB is
'报表指标';

comment on column ZKBBZB.BBLXID is
'报表类型ID';

comment on column ZKBBZB.ZBID is
'指标ID';

alter table IND_INDICATOR
   add constraint FK_IND_INDI_REFERENCE_IND_UNIT foreign key (UNIT_ID)
      references IND_UNIT (ID);

alter table IND_INDICATOR_PRICE
   add constraint FK_IND_PRICE_REFERENCE_INDI foreign key (INDICATOR_ID)
      references IND_INDICATOR (ID);

alter table IND_INDICATOR_PRICE
   add constraint FK_IND_INDI_REFERENCE_IND_PRIC foreign key (PRICE_ID)
      references IND_PRICE_TYPE (ID);

alter table IND_INDICATOR_STANDARD
   add constraint FK_IND_STANDARD_REFERENCE_INDI foreign key (INDICATOR_ID)
      references IND_INDICATOR (ID);

alter table IND_INDICATOR_STANDARD
   add constraint FK_IND_INDI_REFERENCE_IND_STAN foreign key (STANDARD_ID)
      references IND_STANDARD_INFO (ID);

alter table IND_MONITOR_INDICATOR
   add constraint FK_IND_MONI_REFERENCE_IND_INDI foreign key (INDICATOR_ID)
      references IND_INDICATOR (ID);

alter table LYJG
   add constraint FK_LYJG_REFERENCE_TBJL foreign key (TBJL_ID)
      references TBJL (ID);

alter table LYJGMX
   add constraint FK_LYJGMX_REFERENCE_LYJG foreign key (LYJG_ID)
      references LYJG (ID);

alter table QGJGZS
   add constraint FK_QGJGZS_REFERENCE_TBJL foreign key (TBJL_ID)
      references TBJL (ID);

alter table QZZ
   add constraint FK_QZZ_REFERENCE_QZJCXX foreign key (QZDM)
      references QZJCXX (ID);

alter table TBJL
   add constraint FK_TBJL_REFERENCE_BBLX foreign key (BBLXID)
      references BBLX (ID);

alter table ZKBBZB
   add constraint FK_ZKBBZB_REFERENCE_BBLX foreign key (BBLXID)
      references BBLX (ID);

alter table ZKBBZB
   add constraint FK_ZKBBZB_REFERENCE_IND_INDI foreign key (ZBID)
      references IND_INDICATOR (ID);
--天津报表类型初始化值
INSERT INTO "INDICATOR"."BBLX" VALUES ('98DkNr2aD9qrIgi7giu', '全国价格指数', null, null, null, null);
INSERT INTO "INDICATOR"."BBLX" VALUES ('BPgRZ6VVTcJs0sVmQ9S', '集贸零售价格', 'DAY', '日报', null, null);
INSERT INTO "INDICATOR"."BBLX" VALUES ('JAqcOZ136Tp8lFyuFlV', '集贸批发价格', 'DAY', '日报', null, null);
INSERT INTO "INDICATOR"."BBLX" VALUES ('z8QzYg0qMJ8sakXrjz0', '超市价格', 'DAY', '日报', null, null);
INSERT INTO "INDICATOR"."BBLX" VALUES ('cut3fCrNQrUiRuzVLal', '集贸零售价格', 'WEEK', '周报', null, null);
INSERT INTO "INDICATOR"."BBLX" VALUES ('FEZfIMPXjg0e58jhj03', '集贸批发价格', 'WEEK', '周报', null, null);
INSERT INTO "INDICATOR"."BBLX" VALUES ('oVXpqGVmt5m78GnCJTg', '超市价格', 'WEEK', '周报', null, null);
INSERT INTO "INDICATOR"."BBLX" VALUES ('XXzDEKxWnuvvcdX7c2H', '集贸零售价格', 'MONTH', '月报', null, null);
INSERT INTO "INDICATOR"."BBLX" VALUES ('nOClfCRJdCR3hIDLb9Z', '超市价格', 'MONTH', '月报', null, null);
INSERT INTO "INDICATOR"."BBLX" VALUES ('Te9PwGQFJvoPK63B5Ck', '集贸批发价格', 'MONTH', '月报', null, null);