假期档案所属行政组织与主要任职不匹配
解决方案:
【适用版本】8.5& 8.5 sp1
【操作步骤】
行政组织是组织人事职业信息表中的字段,有时当员工发生调动后面撤销调动的时候,就会造成假期档案行政组织和主职不一致的情况。可以使用下列的sql脚本批量更新处理:
----修复假期档案的行政组织字段为职业信息表的组织字段update t_hr_ats_atsholidayfile set FADMINORGUNITID =(select FPERSONDEP from t_hr_personposition where fpersonid=fproposerid) where
FATTENDFILESTATE = 1
and fproposerid in
(select fid from T_BD_Person where FEMPLOYEETYPEID not in ('00000000-0000-0000-0000-000000000008A29E85B3','00000000-0000-0000-0000-000000000014A29E85B3',
'FTCmJT3SSRi1twufIaRb56KehbM=','00000000-0000-0000-0000-000000000006A29E85B3','vRcAAAAADL2inoWz','vRcAAAAADLminoWz'))
--修复假期档案历史的行政组织字段为职业信息表的组织字段
update t_hr_ats_atsholidayfilehis set FADMINORGUNITID =(select FPERSONDEP from t_hr_personposition where fpersonid=fproposerid) where
FATTENDFILESTATE = 1
and fproposerid in
(select fid from T_BD_Person where FEMPLOYEETYPEID not in ('00000000-0000-0000-0000-000000000008A29E85B3','00000000-0000-0000-0000-000000000014A29E85B3',
'FTCmJT3SSRi1twufIaRb56KehbM=','00000000-0000-0000-0000-000000000006A29E85B3','vRcAAAAADL2inoWz','vRcAAAAADLminoWz'))
--修复假期档案的职位字段为职业信息表的职位字段
update t_hr_ats_atsholidayfile set FPOSITIONID =(select fprimarypositionid from t_hr_personposition where fpersonid=fproposerid) where
FATTENDFILESTATE = 1
and fproposerid in
(select fid from T_BD_Person where FEMPLOYEETYPEID not in ('00000000-0000-0000-0000-000000000008A29E85B3','00000000-0000-0000-0000-000000000014A29E85B3',
'FTCmJT3SSRi1twufIaRb56KehbM=','00000000-0000-0000-0000-000000000006A29E85B3','vRcAAAAADL2inoWz','vRcAAAAADLminoWz'))
--修复假期档案历史的职位字段为职业信息表的职位字段
update t_hr_ats_atsholidayfilehis set FPOSITIONID =(select fprimarypositionid from t_hr_personposition where fpersonid=fproposerid) where
FATTENDFILESTATE = 1
and fproposerid in
(select fid from T_BD_Person where FEMPLOYEETYPEID not in ('00000000-0000-0000-0000-000000000008A29E85B3','00000000-0000-0000-0000-000000000014A29E85B3',
'FTCmJT3SSRi1twufIaRb56KehbM=','00000000-0000-0000-0000-000000000006A29E85B3','vRcAAAAADL2inoWz','vRcAAAAADLminoWz'))
假期档案所属行政组织与主要任职不匹配
本文2024-09-22 21:41:44发表“s-hr cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-shr-121726.html