|
|
@ -18,13 +18,8 @@ inner join JCL_ORG_COMP as t3 on t2.parentuuid=t3.uuid
|
|
|
|
go
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
insert into JCL_ORG_DEPT(dept_no, dept_name, dept_name_short,parent_comp,
|
|
|
|
insert into JCL_ORG_DEPT(dept_no, dept_name, dept_name_short,parent_comp,show_order,forbidden_tag,creator,delete_type,create_time,uuid)
|
|
|
|
dept_principal,show_order,forbidden_tag,creator,delete_type,create_time,uuid)
|
|
|
|
select a.departmentcode,a.departmentname,a.departmentmark,a.subcompanyid1,a.showorder,isnull(a.canceled,0),1,0,getdate(),uuid
|
|
|
|
select a.departmentcode,a.departmentname,a.departmentmark,a.subcompanyid1,
|
|
|
|
|
|
|
|
cast(case charindex(',',b.bmfzr)
|
|
|
|
|
|
|
|
when 0 then cast(b.bmfzr as varchar(2000))
|
|
|
|
|
|
|
|
else left(cast(b.bmfzr as varchar(2000)),charindex(',',b.bmfzr)-1)
|
|
|
|
|
|
|
|
end as int) ,a.showorder,isnull(a.canceled,0),1,0,getdate(),uuid
|
|
|
|
|
|
|
|
from HrmDepartment as a
|
|
|
|
from HrmDepartment as a
|
|
|
|
left join HrmDepartmentDefined as b on a.id=b.deptid
|
|
|
|
left join HrmDepartmentDefined as b on a.id=b.deptid
|
|
|
|
go
|
|
|
|
go
|
|
|
|