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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
| @isTest
| private class SBG203RestTest {
| public static Account acc0;
| public static Account acc1;
| public static Account acc2;
| public static Account acc3;
| public static Account acc4;
|
| public static Contact core;
| public static Dealer_Discount__c dealerDiscount;
| public static Dealer_Discount__c dealerDiscount1;
| public static Dealer_Discount__c dealerDiscount2;
| public static Dealer_Discount__c dealerDiscount3;
| @testSetup
| static void inittransfersData() {
| NFMUtil.EscapeSBG001TriggerHandler = true;
| List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Dealer'];
| Account acc0 = new Account(
| name = '*',
| RecordTypeId = rectIE[0].Id,
| OwnerId = UserInfo.getUserId(),
| DivisionName__c = 'Customer IE',
| FacilityName__c = 'abc',
| DivisionName_D__c = 'Customer IE',
| FacilityNameD__c = 'abc',
| PostCode__c = '123456',
| NationalEnterpriseUser__c = true
| );
| insert acc0;
| Account acc1 = new Account(
| name = '*',
| RecordTypeId = rectIE[0].Id,
| OwnerId = UserInfo.getUserId(),
| DivisionName__c = 'Customer IE',
| FacilityName__c = 'abc',
| DivisionName_D__c = 'Customer IE',
| FacilityNameD__c = 'abc',
| PostCode__c = '123456',
| ManagementCode_Ext__c = '30022',
| ParentId = acc0.Id,
| NationalEnterpriseUser__c = true
| );
| Account acc2 = new Account(
| name = '*',
| RecordTypeId = rectIE[0].Id,
| OwnerId = UserInfo.getUserId(),
| DivisionName__c = 'Customer IE',
| FacilityName__c = 'abc',
| DivisionName_D__c = 'Customer IE',
| FacilityNameD__c = 'abc',
| PostCode__c = '123456',
| ManagementCode_Ext__c = '30122',
| NationalEnterpriseUser__c = true
| );
| Account acc5 = new Account(
| name = '*',
| RecordTypeId = rectIE[0].Id,
| OwnerId = UserInfo.getUserId(),
| DivisionName__c = 'Customer IE',
| FacilityName__c = 'abc',
| DivisionName_D__c = 'Customer IE',
| FacilityNameD__c = 'abc',
| PostCode__c = '123456',
| ManagementCode_Ext__c = '30121',
| NationalEnterpriseUser__c = true
| );
| Account acc3 = new Account(
| name = '*',
| RecordTypeId = rectIE[0].Id,
| OwnerId = UserInfo.getUserId(),
| DivisionName__c = 'Customer IE',
| FacilityName__c = 'abc',
| DivisionName_D__c = 'Customer IE',
| FacilityNameD__c = 'abc',
| CancelReason__c = 'test',
| PostCode__c = '123456',
| ManagementCode_Ext__c = '30222',
| NationalEnterpriseUser__c = true
| );
|
| Account acc4 = new Account(
| name = '*',
| RecordTypeId = rectIE[0].Id,
| OwnerId = UserInfo.getUserId(),
| DivisionName__c = 'Customer IE',
| FacilityName__c = 'abc',
| DivisionName_D__c = 'Customer IE',
| FacilityNameD__c = 'abc',
| PostCode__c = '123456',
| ManagementCode_Ext__c = '300220',
| ParentId = acc0.Id,
| NationalEnterpriseUser__c = true
| );
|
| insert new List<Account> {acc1, acc2, acc3,acc4,acc5};
|
|
| List<BatchIF_Transfer__c> transfers = new List<BatchIF_Transfer__c>();
| BatchIF_Transfer__c transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'Account';
| transfer.Column__c = 'Dealer_Type__c';
| transfer.External_Value__c = '22';
| transfer.Internal_Value__c = 'Authorize dealer';
| transfers.add(transfer);
|
| transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'License_Information__c';
| transfer.Column__c = 'LicenseType__c';
| transfer.External_Value__c = '01';
| transfer.Internal_Value__c = '营业执照';
| transfers.add(transfer);
|
| transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'License_Information__c';
| transfer.Column__c = 'LicenseType__c';
| transfer.External_Value__c = '04';
| transfer.Internal_Value__c = '第二类医疗器械经营备案凭证';
| transfers.add(transfer);
|
| transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'License_Information__c';
| transfer.Column__c = 'LicenseType__c';
| transfer.External_Value__c = '08';
| transfer.Internal_Value__c = '辐射安全许可证';
| transfers.add(transfer);
|
| transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'Account';
| transfer.Column__c = 'KeyAccount__c';
| transfer.External_Value__c = '全球客户';
| transfer.Internal_Value__c = 'Global Account';
| transfers.add(transfer);
|
| transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'Account';
| transfer.Column__c = 'Use__c';
| transfer.External_Value__c = 'BS11';
| transfer.Internal_Value__c = 'Cell Biology - Cancer Research';
| transfers.add(transfer);
|
| transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'Account';
| transfer.Column__c = 'MarketVerticals__c';
| transfer.External_Value__c = '临床';
| transfer.Internal_Value__c = 'Clinical';
| transfers.add(transfer);
|
| transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'Account';
| transfer.Column__c = 'IndustryC__c';
| transfer.External_Value__c = '生物工艺';
| transfer.Internal_Value__c = 'Biotech';
| transfers.add(transfer);
|
| transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'CertificationDetails__c';
| transfer.Column__c = 'ProductModel__c';
| transfer.External_Value__c = 'D';
| transfer.Internal_Value__c = 'Delta';
| transfers.add(transfer);
|
| transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'CertificationDetails__c';
| transfer.Column__c = 'ProductModel__c';
| transfer.External_Value__c = 'V';
| transfer.Internal_Value__c = 'Venta';
| transfers.add(transfer);
|
| transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'CertificationDetails__c';
| transfer.Column__c = 'ProductModel__c';
| transfer.External_Value__c = 'DV';
| transfer.Internal_Value__c = 'Delta+Venta';
| transfers.add(transfer);
|
| transfer = new BatchIF_Transfer__c();
| transfer.Table__c = 'CertificationDetails__c';
| transfer.Column__c = 'ProductModel__c';
| transfer.External_Value__c = 'F';
| transfer.Internal_Value__c = 'FOX-IQ';
| transfers.add(transfer);
| insert transfers;
|
| core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=acc1.id,ManagementCode_Ext__c = 'C100300X');
| insert core;
|
| dealerDiscount = new Dealer_Discount__c();
| dealerDiscount.DimensionValue1__c = '30022';
| dealerDiscount.DimensionValue2__c = '山西';
| dealerDiscount.DealerDiscountAccount__c = acc3.Id;
| dealerDiscount.DimensionField1__c = 'Dealer_Code__c';
| dealerDiscount.DimensionField2__c = 'Province__c';
| dealerDiscount.Dealer_Rank__c = 49;
| dealerDiscount.Valid_Date_From__c = Date.today().addDays(2);
| dealerDiscount.Valid_Date_To__c = Date.today().addDays(22);
| //dealerDiscount.Valid_Date_From2__c = Date.today().addDays(23);
| //dealerDiscount.Valid_Date_To2__c = Date.today().addDays(33);
| insert dealerDiscount;
|
| dealerDiscount1 = new Dealer_Discount__c();
| dealerDiscount1.DimensionValue1__c = '30022';
| dealerDiscount1.DimensionValue2__c = '山东';
| dealerDiscount1.DealerDiscountAccount__c = acc3.Id;
| dealerDiscount1.DimensionField1__c = 'Dealer_Code__c';
| dealerDiscount1.DimensionField2__c = 'Province__c';
| dealerDiscount1.Dealer_Rank__c = 49;
| dealerDiscount1.Valid_Date_From__c = Date.today().addDays(-22);
| dealerDiscount1.Valid_Date_To__c = Date.today().addDays(22);
| dealerDiscount.Valid_Date_From2__c = Date.today().addDays(23);
| dealerDiscount.Valid_Date_To2__c = Date.today().addDays(33);
|
| insert dealerDiscount1;
|
| dealerDiscount2 = new Dealer_Discount__c();
| dealerDiscount2.DimensionValue1__c = '300220';
| dealerDiscount2.DimensionValue2__c = '山西';
| dealerDiscount2.DealerDiscountAccount__c = acc4.Id;
| dealerDiscount2.DimensionField1__c = 'Dealer_Code__c';
| dealerDiscount2.DimensionField2__c = 'Province__c';
| dealerDiscount2.Dealer_Rank__c = 49;
| dealerDiscount2.Valid_Date_From__c = Date.today().addDays(-22);
| dealerDiscount2.Valid_Date_To__c = Date.today().addDays(22);
| dealerDiscount2.Valid_Date_From2__c = Date.today().addDays(23);
| dealerDiscount2.Valid_Date_To2__c = Date.today().addDays(33);
|
| insert dealerDiscount2;
|
| dealerDiscount3 = new Dealer_Discount__c();
| dealerDiscount3.DimensionValue1__c = '300220';
| dealerDiscount3.DimensionValue2__c = '山东';
| dealerDiscount3.DealerDiscountAccount__c = acc4.Id;
| dealerDiscount3.DimensionField1__c = 'Dealer_Code__c';
| dealerDiscount3.DimensionField2__c = 'Province__c';
| dealerDiscount3.Dealer_Rank__c = 49;
| dealerDiscount3.Valid_Date_From__c = Date.today().addDays(2);
| dealerDiscount3.Valid_Date_To__c = Date.today().addDays(22);
| dealerDiscount3.Valid_Date_From2__c = Date.today().addDays(23);
| dealerDiscount3.Valid_Date_To2__c = Date.today().addDays(33);
|
| insert dealerDiscount3;
| }
|
| //客户必填字段验证
| static testMethod void fieldcheck00() {
| // 24 -直销
| RestRequest req = new RestRequest();
| RestResponse res = new RestResponse();
| String JsonMsg = '{"Monitoring":{"Tag":"MSGH","Sender":"1330","Receiver":"1592","MessageType":"SBG203","MessageGroupNumber":"20200000334093","NumberOfRecord":"1","TransmissionDateTime":"202010160915"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","Use":"","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"914401067299207256","SubUseEnterprise":"","STR_SUPPL1":"广州市天河区天河北路689号光大银行大厦24层E2","ServiceType":"","Remark":"广州元升是IE的签约代理商,并且8月25日参加了FY2021 SSBG 经销商合规培训","RegisterAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2","RegionName":"","Region":"广东","QualityAgrNoVT":"","QualityAgrNoVF":"","ProductSegment":"","Postal":"","Phone":"020-38730350","other3":null,"other2":null,"other1":null,"OperationProject":null,"Mobilephone":"","MarketVerticals":"","License_Info":[{"WarehouseAddress":"","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"01","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":null,"BusLicenseNo":"914401067299207256","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"}],"KeyAccount":"","KATR2":"2A","Invoice_phone":"020-38730350","Industry":"","Incorporator":"刘智锋","Fax":"","ExportRegulatedCustomer":"","DealerTradeType":"","CustomerService":null,"Contract_Info":[{"TermContractNo":null,"SubUse":"Civil Aviation","SelableProduct":null,"SalesState":null,"SalesShopClass":null,"SalesSection":null,"DealerRate":"70","DealerRank":null,"DealerdiscountZF":null,"DealerdiscountURO":null,"DealerdiscountSP":null,"DealerdiscountOTH":null,"DealerdiscountGYN":null,"DealerdiscountGS":null,"DealerdiscountGI":null,"DealerdiscountET":null,"DealerdiscountENG":null,"DealerdiscountENF":null,"DealerdiscountBF":null,"DealerdiscountAH":null,"ContractStartDate":"20220522","ContractRegion":null,"ContractOwner":null,"ContractEndDate":null,"ContractDepartmentClass":null,"ContractDecideStartDate":null,"ContractDecideEndDate":null,"BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":null,"AgencyApplicationNo":null,"AgencyApplicationDay":null}],"Consignee_Info":[{"PostalCode":"","ContactPhone":"020-38730350","ContactName":"洪波","ContactMobilePhone":"","ContactId":"135281","ContactEnglishName":null,"ContactAddress":"广州市天河区天河北路689号光大银行大厦24层E2","CITY1":"广州市"}],"CompanyName":"广州元升科技有限公司","CompanyEnglishName":null,"CompanyCode":"5112","Comment":"同意","CNTag":"","City":"广州市","BPType":"24","BPCodeforeign":"3000002109","BPCode":"","BankName":"中国工商银行广州科技园支行","BankCode":"3602062719200061533","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":null,"Approver":"Zhou Fang (方舟) (OCSM)","ApproveDate":"20200910","ApplyType":"3","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"","AgentValidFrom":"","AgentType":"23","VTWEG":"42","AccountSource":"","UserType":"","COMPOSubuse":"","TargetCustomer":null,"IsCOMPO":null}]}';
|
| req.requestURI = 'services/apexrest/SBG203/execute';
| req.httpMethod = 'POST';
| req.requestBody = Blob.valueof(JsonMsg);
| RestContext.request = req;
| RestContext.response= res;
| SBG203Rest.execute();
| // 24 - 分销
| RestRequest req01 = new RestRequest();
| RestResponse res01 = new RestResponse();
| String JsonMsg01 = '{"Monitoring":{"Tag":"MSGH","Sender":"1330","Receiver":"1592","MessageType":"SBG203","MessageGroupNumber":"20200000334093","NumberOfRecord":"1","TransmissionDateTime":"202010160915"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","Use":"","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"914401067299207256","SubUseEnterprise":"","STR_SUPPL1":"广州市天河区天河北路689号光大银行大厦24层E2","ServiceType":"","Remark":"广州元升是IE的签约代理商,并且8月25日参加了FY2021 SSBG 经销商合规培训","RegisterAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2","RegionName":"","Region":"广东","QualityAgrNoVT":"","QualityAgrNoVF":"","ProductSegment":"","Postal":"","Phone":"020-38730350","other3":null,"other2":null,"other1":null,"OperationProject":null,"Mobilephone":"","MarketVerticals":"","License_Info":[{"WarehouseAddress":"","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"01","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":null,"BusLicenseNo":"914401067299207256","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"}],"KeyAccount":"","KATR2":"2A","Invoice_phone":"020-38730350","Industry":"","Incorporator":"刘智锋","Fax":"","ExportRegulatedCustomer":"","DealerTradeType":"","CustomerService":null,"Contract_Info":[{"TermContractNo":null,"SubUse":"Civil Aviation","SelableProduct":null,"SalesState":null,"SalesShopClass":null,"SalesSection":null,"DealerRate":"70","DealerRank":null,"DealerdiscountZF":null,"DealerdiscountURO":null,"DealerdiscountSP":null,"DealerdiscountOTH":null,"DealerdiscountGYN":null,"DealerdiscountGS":null,"DealerdiscountGI":null,"DealerdiscountET":null,"DealerdiscountENG":null,"DealerdiscountENF":null,"DealerdiscountBF":null,"DealerdiscountAH":null,"ContractStartDate":"20220522","ContractRegion":null,"ContractOwner":null,"ContractEndDate":null,"ContractDepartmentClass":null,"ContractDecideStartDate":null,"ContractDecideEndDate":null,"BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":null,"AgencyApplicationNo":null,"AgencyApplicationDay":null}],"Consignee_Info":[{"PostalCode":"","ContactPhone":"020-38730350","ContactName":"洪波","ContactMobilePhone":"","ContactId":"135281","ContactEnglishName":null,"ContactAddress":"广州市天河区天河北路689号光大银行大厦24层E2","CITY1":"广州市"}],"CompanyName":"广州元升科技有限公司","CompanyEnglishName":null,"CompanyCode":"5112","Comment":"同意","CNTag":"","City":"广州市","BPType":"24","BPCodeforeign":"3000002109","BPCode":"","BankName":"中国工商银行广州科技园支行","BankCode":"3602062719200061533","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":null,"Approver":"Zhou Fang (方舟) (OCSM)","ApproveDate":"20200910","ApplyType":"3","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"","AgentValidFrom":"","AgentType":"23","VTWEG":"41","AccountSource":"","UserType":"","COMPOSubuse":"","TargetCustomer":null,"IsCOMPO":null}]}';
|
| req01.requestURI = 'services/apexrest/SBG203/execute';
| req01.httpMethod = 'POST';
| req01.requestBody = Blob.valueof(JsonMsg01);
| RestContext.request = req01;
| RestContext.response= res01;
| SBG203Rest.execute();
|
| // 23 - 分销
| RestRequest req00 = new RestRequest();
| RestResponse res00 = new RestResponse();
| String JsonMsg00 = '{"Monitoring":{"Tag":"MSGH","Sender":"1330","Receiver":"1592","MessageType":"SBG203","MessageGroupNumber":"20200000334093","NumberOfRecord":"1","TransmissionDateTime":"202010160915"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","Use":"","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"914401067299207256","SubUseEnterprise":"","STR_SUPPL1":"广州市天河区天河北路689号光大银行大厦24层E2","ServiceType":"","Remark":"广州元升是IE的签约代理商,并且8月25日参加了FY2021 SSBG 经销商合规培训","RegisterAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2","RegionName":"","Region":"广东","QualityAgrNoVT":"","QualityAgrNoVF":"","ProductSegment":"LS","Postal":"","Phone":"020-38730350","other3":null,"other2":null,"other1":null,"OperationProject":null,"Mobilephone":"","MarketVerticals":"","License_Info":[{"WarehouseAddress":"","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"01","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":null,"BusLicenseNo":"914401067299207256","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"}],"KeyAccount":"","KATR2":"2A","Invoice_phone":"020-38730350","Industry":"","Incorporator":"刘智锋","Fax":"","ExportRegulatedCustomer":"","DealerTradeType":"","CustomerService":null,"Contract_Info":[{"TermContractNo":null,"SubUse":"Civil Aviation","SelableProduct":null,"SalesState":null,"SalesShopClass":null,"SalesSection":null,"DealerRate":"70","DealerRank":null,"DealerdiscountZF":null,"DealerdiscountURO":null,"DealerdiscountSP":null,"DealerdiscountOTH":null,"DealerdiscountGYN":null,"DealerdiscountGS":null,"DealerdiscountGI":null,"DealerdiscountET":null,"DealerdiscountENG":null,"DealerdiscountENF":null,"DealerdiscountBF":null,"DealerdiscountAH":null,"ContractStartDate":"20220522","ContractRegion":null,"ContractOwner":null,"ContractEndDate":null,"ContractDepartmentClass":null,"ContractDecideStartDate":null,"ContractDecideEndDate":null,"BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":null,"AgencyApplicationNo":null,"AgencyApplicationDay":null}],"Consignee_Info":[{"PostalCode":"","ContactPhone":"020-38730350","ContactName":"洪波","ContactMobilePhone":"","ContactId":"135281","ContactEnglishName":null,"ContactAddress":"广州市天河区天河北路689号光大银行大厦24层E2","CITY1":"广州市"}],"CompanyName":"广州元升科技有限公司","CompanyEnglishName":null,"CompanyCode":"5112","Comment":"同意","CNTag":"","City":"广州市","BPType":"23","BPCodeforeign":"3000002107","BPCode":"","BankName":"中国工商银行广州科技园支行","BankCode":"3602062719200061533","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":null,"Approver":"Zhou Fang (方舟) (OCSM)","ApproveDate":"20200910","ApplyType":"3","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"","AgentValidFrom":"","AgentType":"","VTWEG":"41","AccountSource":"","UserType":"","COMPOSubuse":"","TargetCustomer":null,"IsCOMPO":null}]}';
| req00.requestURI = 'services/apexrest/SBG203/execute';
| req00.httpMethod = 'POST';
| req00.requestBody = Blob.valueof(JsonMsg00);
| RestContext.request = req00;
| RestContext.response= res00;
| SBG203Rest.execute();
| }
|
|
| static testMethod void insertOrUpdate_BS_Account() {
|
| RestRequest req = new RestRequest();
| RestResponse res = new RestResponse();
| String JsonMsg = '{"Monitoring":{"Tag":"MSGH","Sender":"1330","Receiver":"1592","MessageType":"SBG203","MessageGroupNumber":"20200000334093","NumberOfRecord":"1","TransmissionDateTime":"202010160915"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","Use":"","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"914401067299207256","SubUseEnterprise":"","STR_SUPPL1":"广州市天河区天河北路689号光大银行大厦24层E2","ServiceType":"","Remark":"广州元升是IE的签约代理商,并且8月25日参加了FY2021 SSBG 经销商合规培训","RegisterAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2","RegionName":"","Region":"广东","QualityAgrNoVT":"","QualityAgrNoVF":"","ProductSegment":"LS","Postal":"","Phone":"020-38730350","other3":null,"other2":null,"other1":null,"OperationProject":null,"Mobilephone":"","MarketVerticals":"","License_Info":[{"WarehouseAddress":"测试;","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"01","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":null,"BusLicenseNo":"914401067299207256","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"}],"KeyAccount":"","KATR2":"2A","Invoice_phone":"020-38730350","Industry":"","Incorporator":"刘智锋","Fax":"","ExportRegulatedCustomer":"","DealerTradeType":"","CustomerService":null,"Contract_Info":[{"TermContractNo":null,"SubUse":"Civil Aviation","SelableProduct":null,"SalesState":null,"SalesShopClass":null,"SalesSection":null,"DealerRate":"70","DealerRank":null,"DealerdiscountZF":null,"DealerdiscountURO":null,"DealerdiscountSP":null,"DealerdiscountOTH":null,"DealerdiscountGYN":null,"DealerdiscountGS":null,"DealerdiscountGI":null,"DealerdiscountET":null,"DealerdiscountENG":null,"DealerdiscountENF":null,"DealerdiscountBF":null,"DealerdiscountAH":null,"ContractStartDate":"20220522","ContractRegion":"山西","ContractOwner":null,"ContractEndDate":null,"ContractDepartmentClass":null,"ContractDecideStartDate":null,"ContractDecideEndDate":null,"BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":null,"AgencyApplicationNo":null,"AgencyApplicationDay":null}],"Consignee_Info":[{"PostalCode":"","ContactPhone":"020-38730350","ContactName":"洪波","ContactMobilePhone":"","ContactId":"135281","ContactEnglishName":null,"ContactAddress":"广州市天河区天河北路689号光大银行大厦24层E2","CITY1":"广州市"}],"CompanyName":"广州元升科技有限公司","CompanyEnglishName":null,"CompanyCode":"5112","Comment":"同意","CNTag":"","City":"广州市","BPType":"23","BPCodeforeign":"3000002106","BPCode":"3000002105","BankName":"中国工商银行广州科技园支行","BankCode":"3602062719200061533","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":null,"Approver":"Zhou Fang (方舟) (OCSM)","ApproveDate":"20200910","ApplyType":"3","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"","AgentValidFrom":"","AgentType":"23"}]}';
| req.requestURI = 'services/apexrest/SBG203/execute';
| req.httpMethod = 'POST';
| req.requestBody = Blob.valueof(JsonMsg);
| RestContext.request = req;
| RestContext.response= res;
| SBG203Rest.execute();
|
|
| }
|
| static testMethod void insertOrUpdate_BS_Account00() {
|
|
| RestRequest req00 = new RestRequest();
| RestResponse res00 = new RestResponse();
| String JsonMsg00 = '{"Monitoring":{"Tag":"MSGH","Sender":"1330","Receiver":"1592","MessageType":"SBG203","MessageGroupNumber":"20200000334093","NumberOfRecord":"1","TransmissionDateTime":"202010160915"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","Use":"","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"914401067299207256","SubUseEnterprise":"","STR_SUPPL1":"广州市天河区天河北路689号光大银行大厦24层E2","ServiceType":"","Remark":"广州元升是IE的签约代理商,并且8月25日参加了FY2021 SSBG 经销商合规培训","RegisterAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2","RegionName":"","Region":"广东","QualityAgrNoVT":"","QualityAgrNoVF":"","ProductSegment":"LS","Postal":"","Phone":"020-38730350","other3":null,"other2":null,"other1":null,"OperationProject":null,"Mobilephone":"","MarketVerticals":"","License_Info":[{"WarehouseAddress":"测试","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"01","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":null,"BusLicenseNo":"914401067299207256","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"}],"KeyAccount":"","KATR2":"2A","Invoice_phone":"020-38730350","Industry":"","Incorporator":"刘智锋","Fax":"","ExportRegulatedCustomer":"","DealerTradeType":"","CustomerService":null,"Contract_Info":[{"TermContractNo":null,"SubUse":"Civil Aviation","SelableProduct":null,"SalesState":null,"SalesShopClass":null,"SalesSection":null,"DealerRate":"70","DealerRank":null,"DealerdiscountZF":null,"DealerdiscountURO":null,"DealerdiscountSP":null,"DealerdiscountOTH":null,"DealerdiscountGYN":null,"DealerdiscountGS":null,"DealerdiscountGI":null,"DealerdiscountET":null,"DealerdiscountENG":null,"DealerdiscountENF":null,"DealerdiscountBF":null,"DealerdiscountAH":null,"ContractStartDate":"20220522","ContractRegion":"山西;山东","ContractOwner":null,"ContractEndDate":null,"ContractDepartmentClass":null,"ContractDecideStartDate":null,"ContractDecideEndDate":null,"BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":null,"AgencyApplicationNo":null,"AgencyApplicationDay":null}],"Consignee_Info":[{"PostalCode":"","ContactPhone":"020-38730350","ContactName":"洪波","ContactMobilePhone":"","ContactId":"135281","ContactEnglishName":null,"ContactAddress":"广州市天河区天河北路689号光大银行大厦24层E2","CITY1":"广州市"}],"CompanyName":"广州元升科技有限公司","CompanyEnglishName":null,"CompanyCode":"5112","Comment":"同意","CNTag":"","City":"广州市","BPType":"23","BPCodeforeign":"30022","BPCode":"30022","BankName":"中国工商银行广州科技园支行","BankCode":"3602062719200061533","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":null,"Approver":"Zhou Fang (方舟) (OCSM)","ApproveDate":"20200910","ApplyType":"1","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"","AgentValidFrom":"","AgentType":"23"}]}';
| req00.requestURI = 'services/apexrest/SBG203/execute';
| req00.httpMethod = 'POST';
| req00.requestBody = Blob.valueof(JsonMsg00);
| RestContext.request = req00;
| RestContext.response= res00;
| SBG203Rest.execute();
|
| }
|
| static testMethod void insertOrUpdate_BS_Account01() {
|
|
| RestRequest req00 = new RestRequest();
| RestResponse res00 = new RestResponse();
| String JsonMsg00 = '{"Monitoring":{"Tag":"MSGH","Sender":"1330","Receiver":"1592","MessageType":"SBG203","MessageGroupNumber":"20200000334093","NumberOfRecord":"1","TransmissionDateTime":"202010160915"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","Use":"","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"914401067299207256","SubUseEnterprise":"","STR_SUPPL1":"广州市天河区天河北路689号光大银行大厦24层E2","ServiceType":"","Remark":"广州元升是IE的签约代理商,并且8月25日参加了FY2021 SSBG 经销商合规培训","RegisterAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2","RegionName":"","Region":"广东","QualityAgrNoVT":"","QualityAgrNoVF":"","ProductSegment":"LS","Postal":"","Phone":"020-38730350","other3":null,"other2":null,"other1":null,"OperationProject":null,"Mobilephone":"","MarketVerticals":"","License_Info":[{"WarehouseAddress":"测试","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"01","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":null,"BusLicenseNo":"914401067299207256","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"}],"KeyAccount":"","KATR2":"2A","Invoice_phone":"020-38730350","Industry":"","Incorporator":"刘智锋","Fax":"","ExportRegulatedCustomer":"","DealerTradeType":"","CustomerService":null,"Contract_Info":[{"TermContractNo":null,"SubUse":"Civil Aviation","SelableProduct":null,"SalesState":null,"SalesShopClass":null,"SalesSection":null,"DealerRate":"70","DealerRank":null,"DealerdiscountZF":null,"DealerdiscountURO":null,"DealerdiscountSP":null,"DealerdiscountOTH":null,"DealerdiscountGYN":null,"DealerdiscountGS":null,"DealerdiscountGI":null,"DealerdiscountET":null,"DealerdiscountENG":null,"DealerdiscountENF":null,"DealerdiscountBF":null,"DealerdiscountAH":null,"ContractStartDate":"20220522","ContractRegion":"山西;山东","ContractOwner":null,"ContractEndDate":null,"ContractDepartmentClass":null,"ContractDecideStartDate":null,"ContractDecideEndDate":null,"BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":null,"AgencyApplicationNo":null,"AgencyApplicationDay":null}],"Consignee_Info":[{"PostalCode":"","ContactPhone":"020-38730350","ContactName":"洪波","ContactMobilePhone":"","ContactId":"135281","ContactEnglishName":null,"ContactAddress":"广州市天河区天河北路689号光大银行大厦24层E2","CITY1":"广州市"}],"CompanyName":"广州元升科技有限公司","CompanyEnglishName":null,"CompanyCode":"5112","Comment":"同意","CNTag":"","City":"广州市","BPType":"23","BPCodeforeign":"30022","BPCode":"30022","BankName":"中国工商银行广州科技园支行","BankCode":"3602062719200061533","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":null,"Approver":"Zhou Fang (方舟) (OCSM)","ApproveDate":"20200910","ApplyType":"2","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"","AgentValidFrom":"","AgentType":"23"}]}';
| req00.requestURI = 'services/apexrest/SBG203/execute';
| req00.httpMethod = 'POST';
| req00.requestBody = Blob.valueof(JsonMsg00);
| RestContext.request = req00;
| RestContext.response= res00;
| SBG203Rest.execute();
|
| }
|
| //变更(协议变更(经销商折扣)、证照变更、收货人变更(联系人))(尚未开发)
| static testMethod void insertOrUpdate_RVI_Account() {
| // BPType=24 RVI
| RestRequest req = new RestRequest();
| RestResponse res = new RestResponse();
| String JsonMsg = '{"Monitoring":{"Tag":"MSGH","Sender":"1330","Receiver":"1592","MessageType":"SBG203","MessageGroupNumber":"20200000334093","NumberOfRecord":"1","TransmissionDateTime":"202010160915"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","Use":"BS11","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"914401067299207256","SubUseEnterprise":"","STR_SUPPL1":"广州市天河区天河北路689号光大银行大厦24层E2","ServiceType":"","Remark":"广州元升是IE的签约代理商,并且8月25日参加了FY2021 SSBG 经销商合规培训","RegisterAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2","RegionName":"","Region":"广东","QualityAgrNoVT":"","QualityAgrNoVF":"","ProductSegment":"RVI","Postal":"100010","Phone":"020-38730350","other3":null,"other2":null,"other1":null,"OperationProject":null,"Mobilephone":"","MarketVerticals":"其他","License_Info":[{"WarehouseAddress":"测试;","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"01","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":null,"BusLicenseNo":"914401067299207256","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"}],"KeyAccount":"大客户","KATR2":"2A","Invoice_phone":"020-38730350","Industry":"教育","Incorporator":"刘智锋","Fax":"","ExportRegulatedCustomer":"0","DealerTradeType":"","CustomerService":null,"Contract_Info":[{"TermContractNo":null,"SubUse":"Civil Aviation;其他","SelableProduct":null,"SalesState":null,"SalesShopClass":null,"SalesSection":null,"DealerRate":"70","DealerRank":null,"DealerdiscountZF":null,"DealerdiscountURO":null,"DealerdiscountSP":null,"DealerdiscountOTH":null,"DealerdiscountGYN":null,"DealerdiscountGS":null,"DealerdiscountGI":null,"DealerdiscountET":null,"DealerdiscountENG":null,"DealerdiscountENF":null,"DealerdiscountBF":null,"DealerdiscountAH":null,"ContractStartDate":"20220522","ContractRegion":null,"ContractOwner":null,"ContractEndDate":null,"ContractDepartmentClass":null,"ContractDecideStartDate":null,"ContractDecideEndDate":null,"BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":null,"AgencyApplicationNo":null,"AgencyApplicationDay":null}],"Consignee_Info":[{"PostalCode":"","ContactPhone":"020-38730350","ContactName":"洪波","ContactMobilePhone":"","ContactId":"135281","ContactEnglishName":null,"ContactAddress":"广州市天河区天河北路689号光大银行大厦24层E2","CITY1":"广州市"}],"CompanyName":"广州元升科技有限公司","CompanyEnglishName":null,"CompanyCode":"5112","Comment":"同意","CNTag":"","City":"广州市","BPType":"24","BPCodeforeign":"3000002108","BPCode":"3000002108","BankName":"中国工商银行广州科技园支行","BankCode":"3602062719200061533","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":null,"Approver":"Zhou Fang (方舟) (OCSM)","ApproveDate":"20200910","ApplyType":"3","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"","AgentValidFrom":"","AgentType":"23","AccountSource":"直销","TargetCustomer":true,"IsCOMPO":true,"UserType":"研究所","COMPOSubuse":"I073","VTWEG":"41"}]}';
| req.requestURI = 'services/apexrest/SBG203/execute';
| req.httpMethod = 'POST';
| req.requestBody = Blob.valueof(JsonMsg);
| RestContext.request = req;
| RestContext.response= res;
| SBG203Rest.execute();
|
|
| }
| //变更(协议变更(经销商折扣)、证照变更、收货人变更(联系人))(尚未开发)
| static testMethod void insertOrUpdate_RVI_Account01() {
| // BPType=24 RVI
| RestRequest req = new RestRequest();
| RestResponse res = new RestResponse();
| String JsonMsg = '{"Monitoring":{"Tag":"MSGH","Sender":"1330","Receiver":"1592","MessageType":"SBG203","MessageGroupNumber":"20200000334093","NumberOfRecord":"1","TransmissionDateTime":"202010160915"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","Use":"BS11","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"914401067299207256","SubUseEnterprise":"","STR_SUPPL1":"广州市天河区天河北路689号光大银行大厦24层E2","ServiceType":"","Remark":"广州元升是IE的签约代理商,并且8月25日参加了FY2021 SSBG 经销商合规培训","RegisterAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2","RegionName":"","Region":"广东","QualityAgrNoVT":"","QualityAgrNoVF":"","ProductSegment":"RVI","Postal":"100010","Phone":"020-38730350","other3":null,"other2":null,"other1":null,"OperationProject":null,"Mobilephone":"","MarketVerticals":"其他","License_Info":[{"WarehouseAddress":"测试;","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"01","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":null,"BusLicenseNo":"914401067299207256","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"}],"KeyAccount":"大客户","KATR2":"2A","Invoice_phone":"020-38730350","Industry":"教育","Incorporator":"刘智锋","Fax":"","ExportRegulatedCustomer":"0","DealerTradeType":"","CustomerService":null,"Contract_Info":[{"TermContractNo":null,"SubUse":"Civil Aviation;其他","SelableProduct":null,"SalesState":null,"SalesShopClass":null,"SalesSection":null,"DealerRate":"70","DealerRank":null,"DealerdiscountZF":null,"DealerdiscountURO":null,"DealerdiscountSP":null,"DealerdiscountOTH":null,"DealerdiscountGYN":null,"DealerdiscountGS":null,"DealerdiscountGI":null,"DealerdiscountET":null,"DealerdiscountENG":null,"DealerdiscountENF":null,"DealerdiscountBF":null,"DealerdiscountAH":null,"ContractStartDate":"20220522","ContractRegion":null,"ContractOwner":null,"ContractEndDate":null,"ContractDepartmentClass":null,"ContractDecideStartDate":null,"ContractDecideEndDate":null,"BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":null,"AgencyApplicationNo":null,"AgencyApplicationDay":null}],"Consignee_Info":[{"PostalCode":"","ContactPhone":"020-38730350","ContactName":"洪波","ContactMobilePhone":"","ContactId":"135281","ContactEnglishName":null,"ContactAddress":"广州市天河区天河北路689号光大银行大厦24层E2","CITY1":"广州市"}],"CompanyName":"广州元升科技有限公司","CompanyEnglishName":null,"CompanyCode":"5112","Comment":"同意","CNTag":"","City":"广州市","BPType":"24","BPCodeforeign":"3000002108","BPCode":"3000002108","BankName":"中国工商银行广州科技园支行","BankCode":"3602062719200061533","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":null,"Approver":"Zhou Fang (方舟) (OCSM)","ApproveDate":"20200910","ApplyType":"3","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"","AgentValidFrom":"","AgentType":"23","AccountSource":"分销","TargetCustomer":true,"IsCOMPO":true,"UserType":"研究所","COMPOSubuse":"I073","VTWEG":"42"}]}';
| req.requestURI = 'services/apexrest/SBG203/execute';
| req.httpMethod = 'POST';
| req.requestBody = Blob.valueof(JsonMsg);
| RestContext.request = req;
| RestContext.response= res;
| SBG203Rest.execute();
|
|
| }
|
| static testMethod void insertOrUpdate_RVI_Account00() {
|
|
| // BPType=23 RVI
| RestRequest req00 = new RestRequest();
| RestResponse res00 = new RestResponse();
| String JsonMsg00 = '{"Monitoring":{"Tag":"MSGH","Sender":"1330","Receiver":"1592","MessageType":"SBG203","MessageGroupNumber":"20200000334093","NumberOfRecord":"1","TransmissionDateTime":"202010160915"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","Use":"BS11","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"914401067299207256","SubUseEnterprise":"","STR_SUPPL1":"广州市天河区天河北路689号光大银行大厦24层E2","ServiceType":"","Remark":"广州元升是IE的签约代理商,并且8月25日参加了FY2021 SSBG 经销商合规培训","RegisterAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2","RegionName":"","Region":"广东","QualityAgrNoVT":"","QualityAgrNoVF":"","ProductSegment":"RVI","Postal":"","Phone":"020-38730350","other3":null,"other2":null,"other1":null,"OperationProject":null,"Mobilephone":"","MarketVerticals":"其他","License_Info":[{"WarehouseAddress":"测试;","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"01","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":null,"BusLicenseNo":"914401067299207256","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"},{"WarehouseAddress":"","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"04","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":null,"BusLicenseNo":"914401067299207257","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"},{"WarehouseAddress":"","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"08","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":[{"ProSerial":"Delta和Vanta","Quantity":"22","ProName":"DE2000/DPO2000","Category":"销售"}],"BusLicenseNo":"914401067299207258","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"}],"KeyAccount":"大客户","KATR2":"2A","Invoice_phone":"020-38730350","Industry":"教育","Incorporator":"刘智锋","Fax":"","ExportRegulatedCustomer":"0","DealerTradeType":"","CustomerService":null,"Contract_Info":[{"TermContractNo":null,"SubUse":"Civil Aviation;其他","SelableProduct":null,"SalesState":null,"SalesShopClass":null,"SalesSection":null,"DealerRate":"70","DealerRank":null,"DealerdiscountZF":null,"DealerdiscountURO":null,"DealerdiscountSP":null,"DealerdiscountOTH":null,"DealerdiscountGYN":null,"DealerdiscountGS":null,"DealerdiscountGI":null,"DealerdiscountET":null,"DealerdiscountENG":null,"DealerdiscountENF":null,"DealerdiscountBF":null,"DealerdiscountAH":null,"ContractStartDate":"20220522","ContractRegion":null,"ContractOwner":null,"ContractEndDate":null,"ContractDepartmentClass":null,"ContractDecideStartDate":null,"ContractDecideEndDate":null,"BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":null,"AgencyApplicationNo":null,"AgencyApplicationDay":null}],"Consignee_Info":[{"PostalCode":"","ContactPhone":"020-38730350","ContactName":"洪波","ContactMobilePhone":"","ContactId":"135281","ContactEnglishName":null,"ContactAddress":"广州市天河区天河北路689号光大银行大厦24层E2","CITY1":"广州市"}],"CompanyName":"广州元升科技有限公司","CompanyEnglishName":null,"CompanyCode":"5112","Comment":"同意","CNTag":"","City":"广州市","BPType":"23","BPCodeforeign":"30121","BPCode":"30122","BankName":"中国工商银行广州科技园支行","BankCode":"3602062719200061533","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":null,"Approver":"Zhou Fang (方舟) (OCSM)","ApproveDate":"20200910","ApplyType":"3","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"","AgentValidFrom":"","AgentType":"23"}]}';
| req00.requestURI = 'services/apexrest/SBG203/execute';
| req00.httpMethod = 'POST';
| req00.requestBody = Blob.valueof(JsonMsg00);
| RestContext.request = req00;
| RestContext.response= res00;
| SBG203Rest.execute();
|
| }
| // ANI
| static testMethod void insertOrUpdate_ANI_Account() {
| RestRequest req = new RestRequest();
| RestResponse res = new RestResponse();
| String JsonMsg = '{"Monitoring":{"Tag":"MSGH","Sender":"1330","Receiver":"1592","MessageType":"SBG203","MessageGroupNumber":"20200000334093","NumberOfRecord":"1","TransmissionDateTime":"202010160915"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","Use":"","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"914401067299207256","SubUseEnterprise":"","STR_SUPPL1":"广州市天河区天河北路689号光大银行大厦24层E2","ServiceType":"","Remark":"广州元升是IE的签约代理商,并且8月25日参加了FY2021 SSBG 经销商合规培训","RegisterAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2","RegionName":"","Region":"广东","QualityAgrNoVT":"","QualityAgrNoVF":"","ProductSegment":"ANI","Postal":"","Phone":"020-38730350","other3":null,"other2":null,"other1":null,"OperationProject":null,"Mobilephone":"","MarketVerticals":"","License_Info":[{"WarehouseAddress":"","ValidTo":"99991231","ValidFrom":"20151211","Principal":"刘智锋","other6":"","other5":"","other4":"","LicenseType":"01","ISSUEDATE1":"20151211","IssueAuthority":"","IfQuantityCtrl":false,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"Detail_Info":null,"BusLicenseNo":"914401067299207256","BusinessType":"研究和试验发展(具体经营项目请登录广州市商事主体信息公示平台查询。依法须经批准的项目,经相关部门批准后方可开展经营活动。)","BusinessScope1":"","BusinessScope":null,"BusinessAddress":"广东广州市天河区天河北路689号光大银行大厦24层E2"}],"KeyAccount":"","KATR2":"2A","Invoice_phone":"020-38730350","Industry":"","Incorporator":"刘智锋","Fax":"","ExportRegulatedCustomer":"","DealerTradeType":"","CustomerService":null,"Contract_Info":[{"TermContractNo":null,"SubUse":"Civil Aviation","SelableProduct":null,"SalesState":null,"SalesShopClass":null,"SalesSection":null,"DealerRate":"70","DealerRank":null,"DealerdiscountZF":null,"DealerdiscountURO":null,"DealerdiscountSP":null,"DealerdiscountOTH":null,"DealerdiscountGYN":null,"DealerdiscountGS":null,"DealerdiscountGI":null,"DealerdiscountET":null,"DealerdiscountENG":null,"DealerdiscountENF":null,"DealerdiscountBF":null,"DealerdiscountAH":null,"ContractStartDate":"20220522","ContractRegion":null,"ContractOwner":null,"ContractEndDate":null,"ContractDepartmentClass":null,"ContractDecideStartDate":null,"ContractDecideEndDate":null,"BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":null,"AgencyApplicationNo":null,"AgencyApplicationDay":null}],"Consignee_Info":[{"PostalCode":"","ContactPhone":"020-38730350","ContactName":"洪波","ContactMobilePhone":"","ContactId":"135281","ContactEnglishName":null,"ContactAddress":"广州市天河区天河北路689号光大银行大厦24层E2","CITY1":"广州市"}],"CompanyName":"广州元升科技有限公司","CompanyEnglishName":null,"CompanyCode":"5112","Comment":"同意","CNTag":"","City":"广州市","BPType":"23","BPCodeforeign":"30222","BPCode":"30222","BankName":"中国工商银行广州科技园支行","BankCode":"3602062719200061533","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":null,"Approver":"Zhou Fang (方舟) (OCSM)","ApproveDate":"20200910","ApplyType":"3","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"","AgentValidFrom":"","AgentType":"23"}]}';
| req.requestURI = 'services/apexrest/SBG203/execute';
| req.httpMethod = 'POST';
| req.requestBody = Blob.valueof(JsonMsg);
| RestContext.request = req;
| RestContext.response= res;
| SBG203Rest.execute();
| }
|
| }
|
|