create table CODE_SET
(
    ID         VARCHAR2(36),
    TABLE_NAME VARCHAR2(100),
    KV_SQL     VARCHAR2(4000),
    COD_SQL    VARCHAR2(4000),
    JNDI       VARCHAR2(200),
    NOTE       VARCHAR2(4000),
    IS_DEFAULT VARCHAR2(1)
)
/

INSERT INTO AG_DEV_ORACLE.CODE_SET (ID, TABLE_NAME, KV_SQL, COD_SQL, JNDI, NOTE, IS_DEFAULT) VALUES ('00430DLTP9GDI', 'S_CODE', 'select SYS_CATEGORY KEY_NAME, SYS_KEY K,SYS_VALUE V, ''default'' TENANCY_ID from S_CODE', 'SELECT SYS_CATEGORY KEY_NAME,SYS_KEY K,SYS_VALUE V, SYS_NAME COMV, NOTES COMV2, '''' TENANCY_ID  FROM S_CODE', 'default', '基础代码表', '0');
INSERT INTO AG_DEV_ORACLE.CODE_SET (ID, TABLE_NAME, KV_SQL, COD_SQL, JNDI, NOTE, IS_DEFAULT) VALUES ('004BODX3T2C33', 'C_BASE_CHARGING_ITEM', 'select ''C_BASE_CHARGING_ITEM'' KEY_NAME, ID k, DESCRIPTION v, TENANCY_ID  from C_BASE_CHARGING_ITEM', 'select ''C_BASE_CHARGING_ITEM'' KEY_NAME, ID k, DESCRIPTION v, '''' COMV,'''' COMV2, TENANCY_ID  from C_BASE_CHARGING_ITEM', 'default', '基础费目', null);
INSERT INTO AG_DEV_ORACLE.CODE_SET (ID, TABLE_NAME, KV_SQL, COD_SQL, JNDI, NOTE, IS_DEFAULT) VALUES ('004F4HQZIAZFU', 'C_BASE_DICT', '1', 'select ''C_BASE_DICT'' KEY_NAME, DICT_ALP_CODE K, DICT_NAME V, '''' COMV, '''' COMV2, '''' TENANCY_ID   from C_BASE_DICT', '1', '费率字典', '0');
INSERT INTO AG_DEV_ORACLE.CODE_SET (ID, TABLE_NAME, KV_SQL, COD_SQL, JNDI, NOTE, IS_DEFAULT) VALUES ('004F4HQZIAZG1', 'C_BASE_CATEGORY', '1', 'select ''C_BASE_CATEGORY'' KEY_NAME, ID K, DESCRIPTION V, '''' COMV, '''' COMV2,   TENANCY_ID from C_BASE_CATEGORY', '1', null, null);
INSERT INTO AG_DEV_ORACLE.CODE_SET (ID, TABLE_NAME, KV_SQL, COD_SQL, JNDI, NOTE, IS_DEFAULT) VALUES ('004GE06RLAUTF', 'C_CLIENT', 'select  ''C_CLIENT''  KEY_NAME,CLIENT_CODE k,CLIENT_NAME v ,'''' COMV, '''' COMV2, TENANCY_ID  from C_CLIENT', 'select  ''C_CLIENT''  KEY_NAME,CLIENT_CODE k,CLIENT_NAME v ,'''' COMV, '''' COMV2, TENANCY_ID  from C_CLIENT', null, null, '1');
INSERT INTO AG_DEV_ORACLE.CODE_SET (ID, TABLE_NAME, KV_SQL, COD_SQL, JNDI, NOTE, IS_DEFAULT) VALUES ('004GE06RLAUTM', 'C_CLIENT_TYPE', 'select ''C_CLIENT_TYPE'' KEY_NAME,TYPE_CODE k,TYPE_NAME v , '''' COMV , '''' COMV2,null TENANCY_ID  from C_CLIENT_TYPE', 'select ''C_CLIENT_TYPE'' KEY_NAME,TYPE_CODE k,TYPE_NAME v , '''' COMV , '''' COMV2,'''' TENANCY_ID  from C_CLIENT_TYPE', null, null, '0');
INSERT INTO AG_DEV_ORACLE.CODE_SET (ID, TABLE_NAME, KV_SQL, COD_SQL, JNDI, NOTE, IS_DEFAULT) VALUES ('004HM5MLEUBY3', 'C_CONTRACT', 'select ''C_CONTRACT'' KEY_NAME, ID k, DESCRIPTION v, '''' COMV,'''' COMV2, TENANCY_ID from C_CONTRACT', 'select ''C_CONTRACT'' KEY_NAME, ID k, DESCRIPTION v, '''' COMV,'''' COMV2, TENANCY_ID from C_CONTRACT', 'default', '合同', null);
INSERT INTO AG_DEV_ORACLE.CODE_SET (ID, TABLE_NAME, KV_SQL, COD_SQL, JNDI, NOTE, IS_DEFAULT) VALUES ('004IPCU4MJM4S', 'WB_TENANCY', 'select ''WB_TENANCY'' KEY_NAME, TENANCY_CODE k, TENANCY_NAME v, '''' COMV,'''' COMV2, '''' TENANCY_ID from WB_TENANCY', 'select ''WB_TENANCY'' KEY_NAME, TENANCY_CODE k, TENANCY_NAME v, '''' COMV,'''' COMV2, '''' TENANCY_ID from WB_TENANCY', null, '租户', '0');
