|
楼主 |
发表于 2015-8-11 18:02:27
|
显示全部楼层
--插入机构
Insert [192.168.10.6].[BeX5].[dbo].sa_oporg (sID,sName,sCode,sParent,sOrgKindID,sValidState,version,sFID)
Select 'BM9999','湖北祥云集团','BM9999','','ogn',1,0,''
go
--插入机构下部门
Insert [192.168.10.6].[BeX5].[dbo].sa_oporg (sID,sName,sCode,sParent,sOrgKindID,sValidState,version,sFID)
select DEPT_NO,c_desc,dept_no,head_dept,'dpt',1,0,'' from apedept where dept_no<>'BM9999' and stoped=0
--插入人员
Insert [192.168.10.6].[BeX5].[dbo].[SA_OPOrg] (sID,sName,sCode,sPersonID,sParent,sOrgKindID,sValidState,version,sFID,
sNodeKind)
select pers_no+'@'+dept_no,lastname,pers_no,pers_no,dept_no,'psm',1,0,'','nkLeaf' from apepersdocu where dook=1 and ygtypeno like '0%'
Insert [192.168.10.6].[BeX5].[dbo].sa_opperson (sID,sName,sCode,sMainOrgID,sPassword,sValidState,version,sNumb)
select pers_no,lastname,pers_no,dept_no,'E10ADC3949BA59ABBE56E057F20F883E',1,0,0 from apepersdocu where dook=1 and ygtypeno like '0%'
go
|
|