ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 财务报表案例(四)

财务报表案例(四)

原创 Linux操作系统 作者:golden_zhou 时间:2012-07-02 14:29:58 0 删除 编辑
4.相关财务表结构

CREATE TABLE TAB_TOPUP_STAT_AGENT
(
  ID            NUMBER(19),
  GROUP_ID      NUMBER(19),
  PARMONEY      NUMBER(10),
  ACTUALMONEY   NUMBER(10),
  INMONEY       NUMBER(10),
  OUTMONEY      NUMBER(10),
  CORRECTPAR    NUMBER(10),
  CORRECTPRICE  NUMBER(10),
  STATUS_ID     NUMBER(10),
  BATCH         VARCHAR2(30 BYTE),
  CREATEDATE    TIMESTAMP(6),
  LASTDATE      TIMESTAMP(6),
  AREA_ID       NUMBER(19),
  PARVALUE      NUMBER(19),
  OPERATOR_ID   NUMBER(19),
  TIME_ID       NUMBER(19),
  STATDATE      DATE
)
TABLESPACE ORDER_DATA
PCTUSED    0
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          50M
            NEXT             50M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.GROUP_ID IS '商户id';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.PARMONEY IS '交易面额';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.ACTUALMONEY IS '实际到账金额';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.INMONEY IS '进货成本';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.OUTMONEY IS '出货价格';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.CORRECTPAR IS '订正面额';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.CORRECTPRICE IS '订正金额';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.STATUS_ID IS '财务审核状态';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.BATCH IS '结算批次';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.AREA_ID IS '地区id';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.PARVALUE IS '面额';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.OPERATOR_ID IS '充值类型(移动,联通,电信)';
COMMENT ON COLUMN TAB_TOPUP_STAT_AGENT.TIME_ID IS '到账时间(10分钟,24小时)';

CREATE TABLE TAB_TOPUP_STAT_MONEY
(
  ID          NUMBER(19),
  GROUP_ID    NUMBER(19),
  ADDMONEY    NUMBER(10),
  CREATEDATE  TIMESTAMP(6),
  LASTDATE    TIMESTAMP(6),
  STATDATE    DATE,
  BALANCE     NUMBER
)
TABLESPACE ORDER_DATA
PCTUSED    0
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          50M
            NEXT             50M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
COMMENT ON COLUMN TAB_TOPUP_STAT_MONEY.ID IS '主键ID';
COMMENT ON COLUMN TAB_TOPUP_STAT_MONEY.GROUP_ID IS '商户ID';
COMMENT ON COLUMN TAB_TOPUP_STAT_MONEY.ADDMONEY IS '加款金额';
COMMENT ON COLUMN TAB_TOPUP_STAT_MONEY.CREATEDATE IS '创建时间';
COMMENT ON COLUMN TAB_TOPUP_STAT_MONEY.LASTDATE IS '变更时间';
COMMENT ON COLUMN TAB_TOPUP_STAT_MONEY.STATDATE IS '统计日期';
COMMENT ON COLUMN TAB_TOPUP_STAT_MONEY.BALANCE IS '余额';

CREATE TABLE TAB_TOPUP_STAT_SUPPLY
(
  ID            NUMBER(19),
  GROUP_ID      NUMBER(19),
  PARMONEY      NUMBER(10),
  ACTUALMONEY   NUMBER(10),
  INMONEY       NUMBER(10),
  OUTMONEY      NUMBER(10),
  CORRECTPAR    NUMBER(10),
  CORRECTPRICE  NUMBER(10),
  STATUS_ID     NUMBER(10),
  BATCH         VARCHAR2(30 BYTE),
  CREATEDATE    TIMESTAMP(6),
  LASTDATE      TIMESTAMP(6),
  OPERATOR_ID   NUMBER(19),
  PARVALUE      NUMBER(19),
  STATDATE      DATE
)
TABLESPACE ORDER_DATA
PCTUSED    0
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          50M
            NEXT             50M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
COMMENT ON COLUMN TAB_TOPUP_STAT_SUPPLY.GROUP_ID IS '商户id';
COMMENT ON COLUMN TAB_TOPUP_STAT_SUPPLY.PARMONEY IS '交易面额';
COMMENT ON COLUMN TAB_TOPUP_STAT_SUPPLY.ACTUALMONEY IS '实际到账金额';
COMMENT ON COLUMN TAB_TOPUP_STAT_SUPPLY.INMONEY IS '进货成本';
COMMENT ON COLUMN TAB_TOPUP_STAT_SUPPLY.OUTMONEY IS '出货价格';
COMMENT ON COLUMN TAB_TOPUP_STAT_SUPPLY.CORRECTPAR IS '订正面额';
COMMENT ON COLUMN TAB_TOPUP_STAT_SUPPLY.CORRECTPRICE IS '订正金额';
COMMENT ON COLUMN TAB_TOPUP_STAT_SUPPLY.STATUS_ID IS '财务审核状态';
COMMENT ON COLUMN TAB_TOPUP_STAT_SUPPLY.BATCH IS '结算批次';
COMMENT ON COLUMN TAB_TOPUP_STAT_SUPPLY.OPERATOR_ID IS '充值类型(移动,联通,电信)';

CREATE INDEX IDX_STAT_AGENT_CREATEDATE ON TAB_TOPUP_STAT_AGENT
(CREATEDATE)
LOGGING
TABLESPACE ORDER_INDX
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             100M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX IDX_STAT_AGENT_STATDATE ON TAB_TOPUP_STAT_AGENT
(STATDATE)
LOGGING
TABLESPACE ORDER_INDX
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             100M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX IDX_STAT_MONEY_CREATEDATE ON TAB_TOPUP_STAT_MONEY
(CREATEDATE)
LOGGING
TABLESPACE ORDER_INDX
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             100M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX IDX_STAT_MONEY_STATDATE ON TAB_TOPUP_STAT_MONEY
(STATDATE)
LOGGING
TABLESPACE ORDER_INDX
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             100M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX IDX_STAT_SUPPLY_CREATEDATE ON TAB_TOPUP_STAT_SUPPLY
(CREATEDATE)
LOGGING
TABLESPACE ORDER_INDX
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             100M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX IDX_STAT_SUPPLY_STATDATE ON TAB_TOPUP_STAT_SUPPLY
(STATDATE)
LOGGING
TABLESPACE ORDER_INDX
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             100M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE UNIQUE INDEX PK_TAB_TOPUP_STAT_AGENT ON TAB_TOPUP_STAT_AGENT
(ID)
LOGGING
TABLESPACE ORDER_INDX
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          50M
            NEXT             50M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE UNIQUE INDEX PK_TAB_TOPUP_STAT_MONEY ON TAB_TOPUP_STAT_MONEY
(ID)
LOGGING
TABLESPACE ORDER_INDX
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          50M
            NEXT             50M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE UNIQUE INDEX PK_TAB_TOPUP_STAT_SUPPLY ON TAB_TOPUP_STAT_SUPPLY
(ID)
LOGGING
TABLESPACE ORDER_INDX
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          50M
            NEXT             50M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

ALTER TABLE TAB_TOPUP_STAT_AGENT ADD (
  CONSTRAINT PK_TAB_TOPUP_STAT_AGENT
 PRIMARY KEY
 (ID)
    USING INDEX
    TABLESPACE ORDER_INDX
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          50M
                NEXT             50M
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
               ));
ALTER TABLE TAB_TOPUP_STAT_MONEY ADD (
  CONSTRAINT PK_TAB_TOPUP_STAT_MONEY
 PRIMARY KEY
 (ID)
    USING INDEX
    TABLESPACE ORDER_INDX
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          50M
                NEXT             50M
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
               ));
ALTER TABLE TAB_TOPUP_STAT_SUPPLY ADD (
  CONSTRAINT PK_TAB_TOPUP_STAT_SUPPLY
 PRIMARY KEY
 (ID)
    USING INDEX
    TABLESPACE ORDER_INDX
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          50M
                NEXT             50M
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
               ));

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25198367/viewspace-734343/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-03-09

  • 博文量
    238
  • 访问量
    292466