create table code_set
(
    ID         varchar(36)  not null comment 'ZHUJIAN'
        primary key,
    TABLE_NAME varchar(100) not null comment '字典名',
    KV_SQL     text         null comment '无效',
    COD_SQL    text         not null comment '查询sql',
    JNDI       varchar(200) null comment '无效',
    NOTE       text         null comment '备注',
    IS_DEFAULT varchar(1)   null comment '是否集团租户1=是'
);

INSERT INTO ag_devmysql.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_devmysql.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_devmysql.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_devmysql.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_devmysql.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_devmysql.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_devmysql.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_devmysql.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');
