DROP VIEW IF EXISTS t_video_catalog;
CREATE OR REPLACE VIEW "public"."t_video_catalog" AS
SELECT t1.xh AS fd_id,
t1.fzmc AS fd_catalogname,
t1.yhz AS fd_catalogid,
t1.ylzd1 AS fd_parentcatalogid,
calculatecataloglevel(t1.yhz) AS fd_cataloglevel,
calculatecatalogdevicestatus(t1.yhz, 'ALL'::character varying) AS fd_all,
calculatecatalogdevicestatus(t1.yhz, 'ONLINE'::character varying) AS fd_online,
calculatecatalogdevicestatus(t1.yhz, 'OFFLINE'::character varying) AS fd_offline,
calculatecatalogdevicestatus(t1.yhz, 'OTHER'::character varying) AS fd_other
FROM b_spjk_spfzb t1;
ALTER TABLE "public"."t_video_catalog" OWNER TO "postgres";