| | |
| | | if (Trigger.isUpdate) { |
| | | old = Trigger.oldMap.get(local.Id); |
| | | } |
| | | |
| | | //20230303 lt DB202302421915 start |
| | | if(Trigger.isBefore && Trigger.isUpdate && local.Pregnant_Rest__c != old.Pregnant_Rest__c){ |
| | | if(old.Pregnant_Rest__c == FALSE && local.Pregnant_Rest__c == TRUE){ |
| | | local.Maternity_leave_StartDate__c = Date.today(); |
| | | } |
| | | if(old.Pregnant_Rest__c == TRUE && local.Pregnant_Rest__c == FALSE){ |
| | | local.Maternity_leave_EndDate__c = Date.today(); |
| | | } |
| | | } |
| | | //20230303 lt DB202302421915 end |
| | | |
| | | if (String.isNotBlank(local.Employee_No__c) |
| | | && ( Trigger.isInsert |
| | | || old.Test_staff__c != local.Test_staff__c |
| | |
| | | } |
| | | |
| | | } |
| | | // system.debug('UserToContact'+old.HR_Post__c+'==='+local.HR_Post__c); |
| | | if (String.isNotBlank(local.Employee_No__c) && (Trigger.isInsert |
| | | || old.Mobile_Phone__c != local.Mobile_Phone__c //手机号码2 MobilePhone |
| | | || old.Work_Location__c != local.Work_Location__c //工作地 Work_Location_manual__c |
| | | //用户的工作地(人事)改变更新到联系人上 thh 2022-02-16 start |
| | | || old.Work_Location_HR__c != local.Work_Location_HR__c |
| | | //用户的工作地(人事)改变更新到联系人上 thh 2022-02-16 end |
| | | || old.Post__c != local.Post__c //职位 Post_picklist__c |
| | | //|| old.Post__c != local.Post__c //职位 Post_picklist__c |
| | | || old.HR_Post__c != local.HR_Post__c//HR通用职级 //20220425 LLIU-CCY9TA you |
| | | || old.PositionSubsequence__c != local.PositionSubsequence__c//20220428 LLIU-CDW5ZW you 岗位子序列 |
| | | || old.Rank__c != local.Rank__c//20220512 you LLIU-CDW5ZW start 职级 |
| | | || old.Gender__c != local.Gender__c //性别 Gender_text__c |
| | | || old.Pregnant_Rest__c != local.Pregnant_Rest__c // 是否产假 Pregnant_Rest__c |
| | | || old.Dept__c != local.Dept__c //本部 dept__c |
| | |
| | | || oldu.Hire_Date__c != newu.Hire_Date__c//入职日期 |
| | | || oldu.Email != newu.Email//电子邮件 |
| | | || oldu.Mobile_Phone__c != newu.Mobile_Phone__c//手机号码 |
| | | || oldu.Post__c != newu.Post__c//职位 |
| | | //|| oldu.Post__c != newu.Post__c//职位 |
| | | || oldu.HR_Post__c != newu.HR_Post__c//HR通用职级 //20220425 LLIU-CCY9TA you |
| | | || oldu.PositionSubsequence__c != newu.PositionSubsequence__c//20220428 LLIU-CDW5ZW you 岗位子序列 |
| | | || oldu.Rank__c != newu.Rank__c//20220512 you LLIU-CDW5ZW start 职级 |
| | | || oldu.Job_Category__c != newu.Job_Category__c//职种 |
| | | //用户的工作地(人事)改变,更新HR信息上的用户字段 thh 2022-02-17 start |
| | | || oldu.Work_Location_HR__c != newu.Work_Location_HR__c |