Oracle脚本

pull/186/MERGE^2
dxfeng 3 years ago
parent 1f9a5501d7
commit 16a27d6735

@ -51,7 +51,7 @@ declare
begin
select min(id) into orgid from hrmresource;
cubeuuid1:=newid();
cubeuuid1:=RAWTOHEX(sys_guid());
modename :='聚才林人事模块';
select count(*) into cnt from modetreefield where treeFieldName=modename;
@ -66,7 +66,7 @@ else
select id into appid1 from modetreefield where cubeuuid=cubeuuid1;
end if;
uuid :=lower(replace(newid(),'-',''));
uuid :=lower(replace(RAWTOHEX(sys_guid()),'-',''));
insert into mode_customtree(treename,creater, createdate, createtime, rootname, defaultaddress,
showtype, isselsub, isonlyleaf, appid, treecode, isRefreshTree, isshowsearchtab,
searchbrowserid, isQuickSearch, treeremark, combintree, combintreeway, defaulthideleft,
@ -77,7 +77,7 @@ insert into mode_customtreedetail(mainid, nodename, nodedesc, sourcefrom, source
hreftype, hrefid, hreftarget, hrefrelatefield, nodeicon, supnode, supnodefield, nodefield, showorder,
iconField, dataorder, datacondition, hrefField, rootids, isshowrootnode, isContainsSub)
values(treeid,'职等职级','',2,0,'v_jcl_zdzj','fid','fparentid','fname',2,0,'#','','',0,'','',1,'','fno','','','',1,0);
uuid :=lower(replace(newid(),'-',''));
uuid :=lower(replace(RAWTOHEX(sys_guid()),'-',''));
insert into mode_customtree(treename,creater, createdate, createtime, rootname, defaultaddress,
showtype, isselsub, isonlyleaf, appid, treecode, isRefreshTree, isshowsearchtab,
searchbrowserid, isQuickSearch, treeremark, combintree, combintreeway, defaulthideleft,

@ -312,7 +312,7 @@ insert into jcl_org_map
(id,ftype,fobjid,fecid,uuid,fclass,fclassname,fnumber,fname,fleader,fleaderimg,
fleadername,fleaderjobid,fleaderjob,fleaderlv,fleaderst,fparentid,fobjparentid,
fplan,fonjob,fisvitual,fdatebegin,fdateend)
select 0,0,0,1,uuid,0,'行政维度','00',companyname,0,'','',0,'','','',-1,0,0,0,0,to_date(sysdate),to_date('2099-12-31','yyyy-mm-dd') from HrmCompany;
select 0,0,0,1,uuid,0,'行政维度','00',companyname,0,'','',0,'','','',-1,0,0,0,0,to_date(sysdate),to_date('2099-12-31','yyyy-mm-dd') from HrmCompany
/
insert into jcl_org_map
@ -334,7 +334,7 @@ from
left join (select subcompanyid1,count(1) fcnt from hrmresource where status<=3 group by subcompanyid1) f
on f.subcompanyid1=b.id
left join cus_fielddata g on c.id=g.id and g.scope='HrmCustomFieldByInfoType' and g.scopeid=3
where nvl(a.delete_type,0) <>1 and nvl(a.forbidden_tag,0) <>1;
where nvl(a.delete_type,0) <>1 and nvl(a.forbidden_tag,0) <>1
/
insert into jcl_org_map
@ -357,7 +357,7 @@ from
group by dept_id) e on a.id=e.dept_id
left join (select departmentid,count(1) fcnt from hrmresource where status<=3 group by departmentid) f on f.departmentid=b.id
left join cus_fielddata g on c.id=g.id and g.scope='HrmCustomFieldByInfoType' and g.scopeid=3
where nvl(a.delete_type,0) <>1 and nvl(a.forbidden_tag,0) <>1;
where nvl(a.delete_type,0) <>1 and nvl(a.forbidden_tag,0) <>1
/
insert into jcl_org_map
@ -380,10 +380,10 @@ from JCL_ORG_job a
inner join jcl_org_dept d on a.uuid=b.uuid
group by d.id,b.jobtitlename) f
on f.id=a.parent_dept and a.job_name=f.jobtitlename
where nvl(a.delete_type,0) <>1 and nvl(a.forbidden_tag,0) <>1;
where nvl(a.delete_type,0) <>1 and nvl(a.forbidden_tag,0) <>1
/
delete from cus_fielddata where scopeid=-1;
delete from cus_fielddata where scopeid=-1
/
insert into cus_fielddata(scope, scopeid, id, field100002)
select 'HrmCustomFieldByInfoType',-1,a.id,'199_'||to_char(e.id)
@ -391,7 +391,7 @@ from hrmresource a
left join HrmJobTitles b on a.jobtitle=b.id
left join hrmdepartment c on a.departmentid=c.id
left join JCL_ORG_DEPT d on c.uuid=d.uuid
left join jcl_org_job e on d.id=e.parent_dept and e.job_name=b.jobtitlename;
left join jcl_org_job e on d.id=e.parent_dept and e.job_name=b.jobtitlename
/
insert into jcl_org_map
@ -406,5 +406,5 @@ select a.id+300000000,4,a.id,a.id,a.uuid,0,'行政维度',a.workcode,a.lastname,
from hrmresource a
left join hrmjobtitles b on a.jobtitle=b.id
left join cus_fielddata c on a.id=c.id and c.scope='HrmCustomFieldByInfoType' and c.scopeid=-1
where a.status<4;
where a.status<4
/
Loading…
Cancel
Save