/** 更新已有职能的类别 */
update T_ORG_BIZLIST set fcategory = '1' where fid not in (1,19,20);
update T_ORG_BIZLIST set fcategory = '2' where fid in (1,19,20);
/** 非启用的职能类型不可见 */
update T_ORG_BIZLIST set fvisiable = '1';
update T_ORG_BIZLIST set fvisiable = '0' where fid in (7, 14);

/* 更新职能类型ID */
UPDATE t_org_viewschema SET ftreetypeid = isnull((SELECT max(t.fid) FROM t_org_bizlist T WHERE fnumber = t_org_viewschema.ftreetype), 0) WHERE ftreetypeid = 0;