根据员工变动记录更新档案历史期间的组织和职位

栏目:s-hr cloud知识作者:金蝶来源:金蝶云社区发布:2024-09-22浏览:1

根据员工变动记录更新档案历史期间的组织和职位

[适用版本]

8.2sp2

[解决方案]

问题:根据员工变动记录更新档案历史期间的组织和职位

处理方案:

--备份数据

select * into attendancefilehis0612 from t_hr_ats_attendancefilehis

--修复数据

update t_hr_ats_attendancefilehis a set FADMINORGUNITID=( select FADMINORGID from t_hr_emporgrelation

where fassigntype=1 and fisinner=1 and fpersonid=a.fproposerid and a.feffdt>=feffdt and a.fleffdt<=fleffdt

)

where fid in(select a.fid

from t_hr_ats_attendancefilehis a

inner join t_hr_emporgrelation b on a.fproposerid=b.fpersonid and a.feffdt>=b.feffdt and a.fleffdt<=b.fleffdt and b.fassigntype=1 and fisinner=1

where a.FADMINORGUNITID <>b.FADMINORGID or a.FPOSITIONID <>b.FPOSITIONID

)


update t_hr_ats_attendancefilehis a set Fpositionid=( select Fpositionid from t_hr_emporgrelation

where fassigntype=1 and fisinner=1 and fpersonid=a.fproposerid and a.feffdt>=feffdt and a.fleffdt<=fleffdt

)

where fid in(select a.fid

from t_hr_ats_attendancefilehis a

根据员工变动记录更新档案历史期间的组织和职位

[适用版本]8.2sp2[解决方案]问题:根据员工变动记录更新档案历史期间的组织和职位处理方案:--备份数据select * into attendancefilehis06...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息