From 6e4766bc135c30fa9e02a2b527dcdf8fd5eeec8d Mon Sep 17 00:00:00 2001 From: binxie <137736985@qq.com> Date: 星期一, 26 六月 2023 16:54:22 +0800 Subject: [PATCH] mergecode0626 --- force-app/main/default/triggers/UserToContact.trigger | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/triggers/UserToContact.trigger b/force-app/main/default/triggers/UserToContact.trigger index c182efc..5dea882 100644 --- a/force-app/main/default/triggers/UserToContact.trigger +++ b/force-app/main/default/triggers/UserToContact.trigger @@ -12,6 +12,18 @@ 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 @@ -56,13 +68,17 @@ } } + // 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 @@ -111,7 +127,10 @@ || 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 -- Gitblit v1.9.1