binxie
2024-01-20 2ff0f0a7ab276c3466d9e06e14222db802194efc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?xml version="1.0" encoding="UTF-8"?>
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
    <alerts>
        <fullName>Inspection_report_approved</fullName>
        <description>点检报告书批准通知</description>
        <protected>false</protected>
        <recipients>
            <field>Reporter__c</field>
            <type>userLookup</type>
        </recipients>
        <senderType>CurrentUser</senderType>
        <template>Inspection/Inspection_report_approved</template>
    </alerts>
    <alerts>
        <fullName>Inspection_report_decline</fullName>
        <description>点检申请书驳回通知</description>
        <protected>false</protected>
        <recipients>
            <field>Reporter__c</field>
            <type>userLookup</type>
        </recipients>
        <senderType>CurrentUser</senderType>
        <template>Inspection/Inspection_report_decline</template>
    </alerts>
    <fieldUpdates>
        <fullName>Change_to_complete_filed</fullName>
        <field>Status__c</field>
        <literalValue>填写完毕</literalValue>
        <name>状态修改到填写完毕</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Input_submit_date</fullName>
        <field>Submit_date__c</field>
        <formula>today()</formula>
        <name>更新:申请日</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Set_draft</fullName>
        <field>Status__c</field>
        <literalValue>草案中</literalValue>
        <name>状态修改到草案中</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Status_change_submit</fullName>
        <field>Status__c</field>
        <literalValue>申请中</literalValue>
        <name>状态:申请中</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Update_approved_date</fullName>
        <field>Approved_date__c</field>
        <formula>today()</formula>
        <name>更新:批准日</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>change_approved</fullName>
        <field>Status__c</field>
        <literalValue>批准</literalValue>
        <name>设定:改到批准</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>request_day_blank</fullName>
        <field>Submit_date__c</field>
        <name>申请日:空</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Null</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>set_InspectionName</fullName>
        <field>Name</field>
        <formula>IF(Name = &apos;*&apos;,&quot;OCSM-&quot; &amp; MID(Text(Today()), 3, 2) &amp; &quot;-&quot; &amp; RIGHT(Name_AutoNumber__c, 5),Name)</formula>
        <name>自动编码=&gt;Name</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>set_InspectionNameUnique</fullName>
        <field>Name_Unique__c</field>
        <formula>IF(Name = &apos;*&apos;,&quot;OCSM-&quot; &amp; MID(Text(Today()), 3, 2) &amp; &quot;-&quot; &amp; RIGHT(Name_AutoNumber__c, 5),Name)</formula>
        <name>自动编码=&gt;Name_Unique</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>set_InspectionNameUnique2</fullName>
        <field>Name_Unique__c</field>
        <formula>Name</formula>
        <name>Name=&gt;Name_Unique</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <rules>
        <fullName>手动-点检报告书单号</fullName>
        <actions>
            <name>set_InspectionNameUnique2</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>Name_Manual__c &amp;&amp; ISCHANGED(Name)</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>状态修改到填写完毕</fullName>
        <actions>
            <name>Change_to_complete_filed</name>
            <type>FieldUpdate</type>
        </actions>
        <active>false</active>
        <criteriaItems>
            <field>Inspection_Report__c.Responsible_Person__c</field>
            <operation>notEqual</operation>
        </criteriaItems>
        <criteriaItems>
            <field>Inspection_Report__c.Manual_Department__c</field>
            <operation>notEqual</operation>
        </criteriaItems>
        <criteriaItems>
            <field>Inspection_Report__c.phone__c</field>
            <operation>notEqual</operation>
        </criteriaItems>
        <criteriaItems>
            <field>Inspection_Report__c.Inspection_Date__c</field>
            <operation>notEqual</operation>
        </criteriaItems>
        <criteriaItems>
            <field>Inspection_Report__c.Status__c</field>
            <operation>equals</operation>
            <value>草案中</value>
        </criteriaItems>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>自动编码-点检报告书单号</fullName>
        <actions>
            <name>set_InspectionName</name>
            <type>FieldUpdate</type>
        </actions>
        <actions>
            <name>set_InspectionNameUnique</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>True</formula>
        <triggerType>onCreateOnly</triggerType>
    </rules>
</Workflow>