|
楼主 |
发表于 2017-4-11 16:22:18
|
显示全部楼层
本帖最后由 棒棒糖 于 2017-4-11 17:26 编辑
这个数据是通过创建视图查出来的,
create or replace view v_prj_task_list as
select fprjyear as fid,fprjyear as fname,'' as fparentid,0 as flevel,'' as fNodeKind,'/'||'year' as fPath,''as fprjname from CBMP_TaskInfo group by fprjyear
union
select t.fprjyear || '-' || t.fprojectid as fid,t.fprjname as fname,t.fprjyear as fparentid,1 as flevel, '' as fNodeKind,'/'||'year'|| '/' || fprjyear as fPath,fprjname as fprjname from CBMP_TaskInfo t group by t.fprojectid,t.fprjname,t.fprjyear
union
select t.fid as fid,t.ftaskname as fname,t.fprjyear || '-' || t.fprojectid as fparentid,2 as flevel,'nkLeaf' as fNodeKind,'/'||'year'|| '/' || fprjyear || '/' || fprojectid as fPath,t.fprjname as fprjname from CBMP_TaskInfo t group by fid,ftaskname,fprjyear,fprojectid,fprjname;
|
|