Extend_Gurantee_DateTo__c if( New_logic_data__c, /* 新数据逻辑 */ IF(IS_Extend_Gurantee_Txt__c|| Text(warrantyType__c) = '市场多年保修' , if(IS_Extend_Gurantee_Txt__c, /* 服务多年保修 多年保修期至 = 保修期限 */ Guarantee_period_formula__c, /* 市场多年保修 多年保修期至 使用固定3年 */ IF( AND( Not(ISBLANK(EntryDate__c)) ,EntryDate__c <= Posting_Date__c +100) , ADDMONTHS( InstallDate , 3 * 12 ) , ADDMONTHS( Posting_Date__c , 3 * 12 ) + 7)) , null) , /* 老数据原有逻辑保留 */ IF(IS_Extend_Gurantee_Txt__c==true ,DATE(IF(ISBLANK(InstallDate) ,YEAR(Posting_Date__c) ,YEAR(InstallDate) ) + CASE(Product2.Entend_gurantee_period__c ,'两年',2 ,'三年',3 ,'四年',4 ,'五年',5 ,0 ) , MONTH(Guarantee_period_for_products__c) , DAY(Guarantee_period_for_products__c) ) ,null ) ) false if( New_logic_data__c, /* 新数据逻辑 */ IF(IS_Extend_Gurantee_Txt__c|| Text(warrantyType__c) = '市场多年保修' , if(IS_Extend_Gurantee_Txt__c, /* 服务多年保修 多年保修期至 = 保修期限 */ Guarantee_period_formula__c, /* 市场多年保修 多年保修期至 使用固定3年 */ ADDMONTHS( InstallDate__c , ProvistonPeriod__c * 12 )) , null) , /* 老数据原有逻辑保留 */ IF(IS_Extend_Gurantee_Txt__c==true ,DATE(IF(ISBLANK(InstallDate) ,YEAR(Posting_Date__c) ,YEAR(InstallDate) ) + CASE(Product2.Entend_gurantee_period__c ,'两年',2 ,'三年',3 ,'四年',4 ,'五年',5 ,0 ) , MONTH(Guarantee_period_for_products__c) , DAY(Guarantee_period_for_products__c) ) ,null ) ) false false Date