binxie
2024-01-18 22bd41f13147fce1df6ff35b592720c9cb387de9
force-app/main/default/workflows/Maintenance_Contract__c.workflow-meta.xml
@@ -16,7 +16,7 @@
            <field>Service_Contract_Staff__c</field>
            <type>userLookup</type>
        </recipients>
        <senderAddress>18523460502@163.com</senderAddress>
        <senderAddress>ocm_te2ampj@olympus.com.cn</senderAddress>
        <senderType>OrgWideEmailAddress</senderType>
        <template>Olympus_OCM/Before_30_Days_Contract_End</template>
    </alerts>
@@ -37,7 +37,7 @@
            <field>Service_Contract_Staff__c</field>
            <type>userLookup</type>
        </recipients>
        <senderAddress>18523460502@163.com</senderAddress>
        <senderAddress>ocm_te2ampj@olympus.com.cn</senderAddress>
        <senderType>OrgWideEmailAddress</senderType>
        <template>Olympus_OCM/Before_7_Days_Contract_End</template>
    </alerts>
@@ -57,7 +57,7 @@
            <field>Service_Contract_Staff__c</field>
            <type>userLookup</type>
        </recipients>
        <senderAddress>18523460502@163.com</senderAddress>
        <senderAddress>ocm_te2ampj@olympus.com.cn</senderAddress>
        <senderType>OrgWideEmailAddress</senderType>
        <template>Olympus_OCM/Before_90_Days_Contract_End</template>
    </alerts>
@@ -97,7 +97,7 @@
            <field>Service_Contract_Staff__c</field>
            <type>userLookup</type>
        </recipients>
        <senderAddress>18523460502@163.com</senderAddress>
        <senderAddress>ocm_te2ampj@olympus.com.cn</senderAddress>
        <senderType>OrgWideEmailAddress</senderType>
        <template>Contract_Folder/ConsumptionRateIntervalRemind</template>
    </alerts>
@@ -241,7 +241,7 @@
    </alerts>
    <alerts>
        <fullName>FifteenDaysBeforePayDay_Prepay</fullName>
        <ccEmails>SFDC_LiJin@olympus.com.cn.invalid</ccEmails>
        <ccEmails>SFDC_LiJin@olympus.com.cn</ccEmails>
        <description>15日前提醒-1(先款)</description>
        <protected>false</protected>
        <recipients>
@@ -272,7 +272,7 @@
    </alerts>
    <alerts>
        <fullName>FifteenDaysBeforePayDay_Prepay_2</fullName>
        <ccEmails>SFDC_LiJin@olympus.com.cn.invalid</ccEmails>
        <ccEmails>SFDC_LiJin@olympus.com.cn</ccEmails>
        <description>15日前提醒-2(先款)</description>
        <protected>false</protected>
        <recipients>
@@ -304,7 +304,7 @@
    </alerts>
    <alerts>
        <fullName>FifteenDaysBeforePayDay_Prepay_3</fullName>
        <ccEmails>SFDC_LiJin@olympus.com.cn.invalid</ccEmails>
        <ccEmails>SFDC_LiJin@olympus.com.cn</ccEmails>
        <description>15日前提醒-3(先款)</description>
        <protected>false</protected>
        <recipients>
@@ -332,7 +332,7 @@
    </alerts>
    <alerts>
        <fullName>FifteenDaysBeforePayDay_Prepay_4</fullName>
        <ccEmails>SFDC_LiJin@olympus.com.cn.invalid</ccEmails>
        <ccEmails>SFDC_LiJin@olympus.com.cn</ccEmails>
        <description>15日前提醒-4(先款)</description>
        <protected>false</protected>
        <recipients>
@@ -364,7 +364,7 @@
    </alerts>
    <alerts>
        <fullName>FifteenDaysBeforePayDay_Prepay_5</fullName>
        <ccEmails>SFDC_LiJin@olympus.com.cn.invalid</ccEmails>
        <ccEmails>SFDC_LiJin@olympus.com.cn</ccEmails>
        <description>15日前提醒-5(先款)</description>
        <protected>false</protected>
        <recipients>
@@ -396,7 +396,7 @@
    </alerts>
    <alerts>
        <fullName>FifteenDaysBeforePayDay_Prepay_6</fullName>
        <ccEmails>SFDC_LiJin@olympus.com.cn.invalid</ccEmails>
        <ccEmails>SFDC_LiJin@olympus.com.cn</ccEmails>
        <description>15日前提醒-6(先款)</description>
        <protected>false</protected>
        <recipients>
@@ -876,6 +876,10 @@
            <type>user</type>
        </recipients>
        <recipients>
            <recipient>daisuke_goto@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
        <recipients>
            <recipient>haijuan_wang@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
@@ -889,6 +893,10 @@
        </recipients>
        <recipients>
            <recipient>jue_xu@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
        <recipients>
            <recipient>kazuyuki_tada@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
        <recipients>
@@ -1359,7 +1367,7 @@
        <criteriaItems>
            <field>Maintenance_Contract__c.Approval1__c</field>
            <operation>equals</operation>
            <value>True</value>
            <value>真</value>
        </criteriaItems>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
    </rules>
@@ -1389,7 +1397,7 @@
        <criteriaItems>
            <field>Maintenance_Contract__c.old_Is_RecognitionModel__c</field>
            <operation>equals</operation>
            <value>True</value>
            <value>真</value>
        </criteriaItems>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
    </rules>
@@ -1471,7 +1479,7 @@
        <criteriaItems>
            <field>Maintenance_Contract__c.Contract_End_Date__c</field>
            <operation>greaterThan</operation>
            <value>TODAY</value>
            <value>今天</value>
        </criteriaItems>
        <criteriaItems>
            <field>Maintenance_Contract__c.RecordTypeId</field>
@@ -1521,7 +1529,7 @@
        <criteriaItems>
            <field>Maintenance_Contract__c.DevApply__c</field>
            <operation>equals</operation>
            <value>True</value>
            <value>真</value>
        </criteriaItems>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
    </rules>
@@ -1867,7 +1875,9 @@
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>Isblank(Text(SalesOfficeCode_selection__c))  &amp;&amp; Case(Service_Contract_Staff__r.Province__c,&apos;浙江省&apos;,     IF(NOT(OR(Hospital__r.City_Master__r.Name == &apos;舟山市&apos;,Hospital__r.City_Master__r.Name == &apos;绍兴市&apos;,Hospital__r.City_Master__r.Name == &apos;宁波市&apos;)),1,0), 0) == 1</formula>
        <formula>Isblank(Text(SalesOfficeCode_selection__c))
&amp;&amp; Case(Service_Contract_Staff__r.Province__c,&apos;浙江省&apos;,
   IF(NOT(OR(Hospital__r.City_Master__r.Name == &apos;舟山市&apos;,Hospital__r.City_Master__r.Name == &apos;绍兴市&apos;,Hospital__r.City_Master__r.Name == &apos;宁波市&apos;)),1,0), 0) == 1</formula>
        <triggerType>onCreateOnly</triggerType>
    </rules>
    <rules>
@@ -1877,7 +1887,9 @@
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>Isblank(Text(SalesOfficeCode_selection__c)) &amp;&amp; Case(Service_Contract_Staff__r.Province__c, &apos;上海市&apos;, 1, &apos;福建省&apos;, 1, &apos;江苏省&apos;, 1, &apos;江西省&apos;, 1, &apos;安徽省&apos;, 1   ,&apos;浙江省&apos;, if(OR(Hospital__r.City_Master__r.Name == &apos;舟山市&apos;,Hospital__r.City_Master__r.Name == &apos;绍兴市&apos;,Hospital__r.City_Master__r.Name == &apos;宁波市&apos;),1,0)    , 0 ) == 1</formula>
        <formula>Isblank(Text(SalesOfficeCode_selection__c)) &amp;&amp; Case(Service_Contract_Staff__r.Province__c, &apos;上海市&apos;, 1, &apos;福建省&apos;, 1, &apos;江苏省&apos;, 1, &apos;江西省&apos;, 1, &apos;安徽省&apos;, 1
  ,&apos;浙江省&apos;, if(OR(Hospital__r.City_Master__r.Name == &apos;舟山市&apos;,Hospital__r.City_Master__r.Name == &apos;绍兴市&apos;,Hospital__r.City_Master__r.Name == &apos;宁波市&apos;),1,0)
  , 0 ) == 1</formula>
        <triggerType>onCreateOnly</triggerType>
    </rules>
    <rules>
@@ -1911,7 +1923,7 @@
        <criteriaItems>
            <field>Maintenance_Contract__c.Switch_TimeBase_WF__c</field>
            <operation>equals</operation>
            <value>True</value>
            <value>真</value>
        </criteriaItems>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
        <workflowTimeTriggers>
@@ -1935,7 +1947,7 @@
        <criteriaItems>
            <field>Maintenance_Contract__c.Switch_TimeBase_WF__c</field>
            <operation>equals</operation>
            <value>True</value>
            <value>真</value>
        </criteriaItems>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
        <workflowTimeTriggers>
@@ -1959,7 +1971,7 @@
        <criteriaItems>
            <field>Maintenance_Contract__c.Switch_TimeBase_WF__c</field>
            <operation>equals</operation>
            <value>True</value>
            <value>真</value>
        </criteriaItems>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
        <workflowTimeTriggers>
@@ -1993,12 +2005,12 @@
        <criteriaItems>
            <field>Maintenance_Contract__c.Switch_TimeBase_WF__c</field>
            <operation>equals</operation>
            <value>True</value>
            <value>真</value>
        </criteriaItems>
        <criteriaItems>
            <field>Maintenance_Contract__c.Contract_End_Date__c</field>
            <operation>greaterOrEqual</operation>
            <value>TODAY</value>
            <value>今天</value>
        </criteriaItems>
        <description>未来时间的工作流</description>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
@@ -2027,12 +2039,12 @@
        <criteriaItems>
            <field>Maintenance_Contract__c.Switch_TimeBase_WF__c</field>
            <operation>equals</operation>
            <value>True</value>
            <value>真</value>
        </criteriaItems>
        <criteriaItems>
            <field>Maintenance_Contract__c.Contract_End_Date__c</field>
            <operation>lessThan</operation>
            <value>TODAY</value>
            <value>今天</value>
        </criteriaItems>
        <description>契約終了日を過去日に更新した時</description>
        <triggerType>onAllChanges</triggerType>
@@ -2089,7 +2101,20 @@
        </actions>
        <active>false</active>
        <description>当更新过询价跟进信息中任意一个信息,则给变更日期赋值=最后更新日期</description>
        <formula>OR(ISCHANGED(Opportunity_Stage__c), ISCHANGED(Sales_Method__c), ISCHANGED(Sales_Method_Other__c), ISCHANGED(Next_Action__c), ISCHANGED(Negotiation_Start_Date__c), ISCHANGED(Quotation_Submission_Date__c), ISCHANGED(Quotation_Decision_Date__c), ISCHANGED(Last_Update_Date__c), ISCHANGED(Expected_Check_Back_Date__c), ISCHANGED(Cumulative_Followup__c), ISCHANGED(Renewal_Status__c), ISCHANGED(No_Renewal_Reason__c) ) = true &amp;&amp; ($User.ProfileId !=&apos;00e10000000Y3o5&apos; &amp;&amp;  $User.Batch_User__c  != true) &amp;&amp;  !ISNEW()</formula>
        <formula>OR(ISCHANGED(Opportunity_Stage__c),
ISCHANGED(Sales_Method__c),
ISCHANGED(Sales_Method_Other__c),
ISCHANGED(Next_Action__c),
ISCHANGED(Negotiation_Start_Date__c),
ISCHANGED(Quotation_Submission_Date__c),
ISCHANGED(Quotation_Decision_Date__c),
ISCHANGED(Last_Update_Date__c),
ISCHANGED(Expected_Check_Back_Date__c),
ISCHANGED(Cumulative_Followup__c),
ISCHANGED(Renewal_Status__c),
ISCHANGED(No_Renewal_Reason__c)
) = true
&amp;&amp; ($User.ProfileId !=&apos;00e10000000Y3o5&apos; &amp;&amp;  $User.Batch_User__c  != true) &amp;&amp;  !ISNEW()</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
@@ -2098,7 +2123,7 @@
        <criteriaItems>
            <field>Maintenance_Contract__c.duplicate_deleate_request__c</field>
            <operation>equals</operation>
            <value>True</value>
            <value>真</value>
        </criteriaItems>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
    </rules>