From a48ed9f335db52a433a2b343ff9636a28ee8a97f Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期四, 10 三月 2022 18:53:59 +0800
Subject: [PATCH] New xml file for PIPL20220310
---
force-app/main/default/classes/NFM203RestTest.cls | 35 +++++++++++++++++++++++++++--------
1 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/force-app/main/default/classes/NFM203RestTest.cls b/force-app/main/default/classes/NFM203RestTest.cls
index 3fdcbe9..88800b6 100644
--- a/force-app/main/default/classes/NFM203RestTest.cls
+++ b/force-app/main/default/classes/NFM203RestTest.cls
@@ -69,7 +69,6 @@
@isTest
static void test_method_one() {
inittransfersData();
-
NFM203Rest.GeDatas GeDatas = new NFM203Rest.GeDatas();
NFM203Rest.GeData GeData = new NFM203Rest.GeData();
NFM203Rest.License_Info License_Info = new NFM203Rest.License_Info();
@@ -198,10 +197,20 @@
Contract_Info.AimDivision = '閲戦' ;
Contract_Info.AgencyApplicationNo = 'MSHTYXQHD201812005' ;
Contract_Info.AgencyApplicationDay = '20181207' ;
+
System.Test.startTest();
NFMUtil.Monitoring Monitoring = GeDatas.Monitoring;
BatchIF_Log__c rowData = NFMUtil.saveRowData(Monitoring, 'NFM203', GeDatas.Partners);
+ Oly_TriggerHandler.bypass('NFM702ControllerHandler');
+ Oly_TriggerHandler.bypass('ContactTriggerHandler');
+ StaticParameter.EscapeContactToUser = true;
+ ControllerUtil.EscapeNFM001Trigger = true;
+ ControllerUtil.EscapeMaintenanceContractAfterUpdateTrigger = true;
+ StaticParameter.EscapeNFM001Trigger = true;
+ StaticParameter.EscapeNFM001AgencyContractTrigger = true;
+ StaticParameter.EscapeNFM001AgencyContractTrigger2 = true;
+ StaticParameter.EscapeMaintenanceContractAfterUpdateTrigger = true;
NFM203Rest.main(rowData.Id);
GeData.BPType = '03';
rowData = NFMUtil.saveRowData(Monitoring, 'NFM203', GeDatas.Partners);
@@ -527,15 +536,14 @@
License_Info.LicenseType = '';
rowData = NFMUtil.saveRowData(Monitoring, 'NFM203', GeDatas.Partners);
NFM203Rest.main(rowData.Id);
- //GeData.ApplyType = '5';
- //rowData = NFMUtil.saveRowData(Monitoring, 'NFM203', GeDatas.Partners);
- //NFM203Rest.main(rowData.Id);
- //System.Test.stopTest();
-
-
+ GeData.ApplyType = '5';
+ rowData = NFMUtil.saveRowData(Monitoring, 'NFM203', GeDatas.Partners);
+ NFM203Rest.main(rowData.Id);
+ System.Test.stopTest();
}
@isTest
static void test_method_Three() {
+
ControllerUtil.EscapeNFM001Trigger = true;
inittransfersData();
NFM203Rest.GeDatas GeDatas = new NFM203Rest.GeDatas();
@@ -647,10 +655,19 @@
Contract_Info.AimDivision = '閲戦' ;
Contract_Info.AgencyApplicationNo = 'MSHTYXQHD201812005' ;
Contract_Info.AgencyApplicationDay = '20181207' ;
-
+
System.Test.startTest();
NFMUtil.Monitoring Monitoring = GeDatas.Monitoring;
BatchIF_Log__c rowData = NFMUtil.saveRowData(Monitoring, 'NFM203', GeDatas.Partners);
+ Oly_TriggerHandler.bypass('NFM702ControllerHandler');
+ Oly_TriggerHandler.bypass('ContactTriggerHandler');
+ StaticParameter.EscapeContactToUser = true;
+ ControllerUtil.EscapeNFM001Trigger = true;
+ ControllerUtil.EscapeMaintenanceContractAfterUpdateTrigger = true;
+ StaticParameter.EscapeNFM001Trigger = true;
+ StaticParameter.EscapeNFM001AgencyContractTrigger = true;
+ StaticParameter.EscapeNFM001AgencyContractTrigger2 = true;
+ StaticParameter.EscapeMaintenanceContractAfterUpdateTrigger = true;
NFM203Rest.main(rowData.Id);
//Contract_Info.DealerdiscountET = null ;
//Contract_Info.DealerdiscountENG = 10.0 ;
@@ -881,6 +898,8 @@
RestResponse res = new RestResponse();
String JsonMsg = '{"Monitoring":{"TransmissionDateTime":"201812201320","Text":"","Tag":"MSGH","Sender":"SFDC","Receiver":"SPO","NumberOfRecord":"1","MessageType":"NFM203","MessageGroupNumber":"20180001722190"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"12345678909855","ServiceType":null,"Remark":"","RegisterAddress":"1鍙�","RegionName":"鍖椾含甯�","Region":"10","QualityAgrNoVT":null,"QualityAgrNoVF":null,"Postal":"111100","Phone":"15611778799","other3":null,"other2":null,"other1":null,"OperationProject":null,"License_Info":[{"WarehouseAddress":null,"ValidTo":"20210731","ValidFrom":"20210601","Principal":"寮犱笁","other6":null,"other5":null,"other4":null,"LicenseType":"01","IssueAuthority":null,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"BusLicenseNo":"code123456","BusinessType":null,"BusinessScope1":"鍖荤枟鍣ㄦ","BusinessScope":null,"BusinessAddress":"鍖椾含甯傛槍骞冲尯1鍙�"},{"WarehouseAddress":"","ValidTo":"20210701","ValidFrom":"20210531","Principal":"寮犱笁","other6":null,"other5":null,"other4":null,"LicenseType":"09","IssueAuthority":"娴嬭瘯","Exclusive1":"","Exclusive":"","DiagnosisScope":"","BusLicenseNo":"code123456","BusinessType":"涓嶅甫鏈夊瓨鍌ㄨ鏂界殑缁忚惀","BusinessScope1":"","BusinessScope":"杩囦箼閰竅鍚噺鈮�16%锛屽惈姘粹墺39%锛屽惈涔欓吀鈮�15%锛屽惈杩囨哀鍖栨阿鈮�24%锛屽惈绋冲畾鍓俔","BusinessAddress":"鍖椾含甯傛槍骞冲尯1鍙�"}],"Incorporator":"寮犱笁","Fax":"","CustomerService":null,"Contract_Info":[{"TermContractNo":"154P-HD062","SelableProduct":"闃胯タ璧涘","SalesState":"涓婃捣甯�","SalesShopClass":"浜у搧","SalesSection":"缁熸嫭鏈儴","SalesCity":"涓婃捣甯�","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":"20210401","ContractOwner":"comlan_ctec_zhangbo","ContractEndDate":"20220331","ContractDepartmentClass":null,"ContractDecideStartDate":"20210401","ContractDecideEndDate":"20220331","BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":"閲戦","AgencyApplicationNo":"MSHTYXGHD202106005","AgencyApplicationDay":"20210616"}],"Consignee_Info":[{"PostalCode":"111101","ContactPhone":"15611778700","ContactName":"鐮佸浘娴嬭瘯鏀惰揣浜轰俊鎭彉鏇�","ContactCity":"鍖椾含","ContactAddress":"鍖椾含甯傛湞闃冲尯浜┈妗�"}],"CompanyName":"闃胯タ璧涘澶嶆祴0616","CompanyCode":"5112","Comment":"鍚屾剰","CNTag":"","City":"鏄屽钩鍖�","BPType":"02","BPCode":"31416","BillingType":"2B","BillingTelephone":"15611778796","BillingAddress":"鍖椾含甯傛槍骞冲尯2鍙�","BankName":"宸ュ晢閾惰","BankCode":"12345678909876","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":[],"Approver":"鏉庡渤娲�","ApproveDate":"20210616","ApplyType":"1","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"20210701","AgentValidFrom":"20210601","AgentType":"02"}]}';
+ //String JsonMsg = '{"Monitoring":{"TransmissionDateTime":"201812201320","Text":"","Tag":"MSGH","Sender":"SFDC","Receiver":"SPO","NumberOfRecord":"1","MessageType":"NFM203","MessageGroupNumber":"20180001722190"},"Partners":[{"Z3PLTransAgrNo":"","Z3PLQualityAgrNo":"","Z3PLAuthorizedNo":"","TransAgrVT":null,"TransAgrVF":null,"TaxNo":"12345678909855","ServiceType":null,"Remark":"","RegisterAddress":"1鍙�","RegionName":"鍖椾含甯�","Region":"10","QualityAgrNoVT":null,"QualityAgrNoVF":null,"Postal":"111100","Phone":"15611778799","other3":null,"other2":null,"other1":null,"OperationProject":null,"License_Info":[{"WarehouseAddress":null,"ValidTo":"20210731","ValidFrom":"20210601","Principal":"寮犱笁","other6":null,"other5":null,"other4":null,"LicenseType":"01","IssueAuthority":null,"Exclusive1":null,"Exclusive":null,"DiagnosisScope":null,"BusLicenseNo":"code123456","BusinessType":null,"BusinessScope1":"鍖荤枟鍣ㄦ","BusinessScope":null,"BusinessAddress":"鍖椾含甯傛槍骞冲尯1鍙�"},{"WarehouseAddress":"","ValidTo":"20210701","ValidFrom":"20210531","Principal":"寮犱笁","other6":null,"other5":null,"other4":null,"LicenseType":"09","IssueAuthority":"娴嬭瘯","Exclusive1":"","Exclusive":"","DiagnosisScope":"","BusLicenseNo":"code123456","BusinessType":"涓嶅甫鏈夊瓨鍌ㄨ鏂界殑缁忚惀","BusinessScope1":"","BusinessScope":"杩囦箼閰竅鍚噺鈮�16%锛屽惈姘粹墺39%锛屽惈涔欓吀鈮�15%锛屽惈杩囨哀鍖栨阿鈮�24%锛屽惈绋冲畾鍓俔","BusinessAddress":"鍖椾含甯傛槍骞冲尯1鍙�"}],"Incorporator":"寮犱笁","Fax":"","CustomerService":null,"Contract_Info":[{"TermContractNo":"154P-HD062","SelableProduct":"闃胯タ璧涘","SalesState":"涓婃捣甯�","SalesShopClass":"浜у搧","SalesSection":"缁熸嫭鏈儴","SalesCity":"涓婃捣甯�","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":"20210401","ContractOwner":"comlan_ctec_zhangbo","ContractEndDate":"20220331","ContractDepartmentClass":null,"ContractDecideStartDate":"20210401","ContractDecideEndDate":"20220331","BusinessAssistant":null,"AimPriceSP":null,"AimPriceGIR":null,"AimPriceAreaSP":null,"AimPriceAreaET":null,"AimPriceAreaENG":null,"AimPriceAH":null,"AimPrice":null,"AimDivision":"閲戦","AgencyApplicationNo":"MSHTYXGHD202106005","AgencyApplicationDay":"20210616"}],"CompanyName":"闃胯タ璧涘澶嶆祴0616","CompanyCode":"5112","Comment":"鍚屾剰","CNTag":"","City":"鏄屽钩鍖�","BPType":"02","BPCode":"31416","BillingType":"2B","BillingTelephone":"15611778796","BillingAddress":"鍖椾含甯傛槍骞冲尯2鍙�","BankName":"宸ュ晢閾惰","BankCode":"12345678909876","AuthorizedVT":null,"AuthorizedVF":null,"AuthorizedScope":"","Authorized_Info":[],"Approver":"鏉庡渤娲�","ApproveDate":"20210616","ApplyType":"1","Agreement4":null,"Agreement3":null,"Agreement2":null,"Agreement1":null,"AgentValidTo":"20210701","AgentValidFrom":"20210601","AgentType":"02"}]}';
+
req.requestURI = 'services/apexrest/NFM203/execute';
req.httpMethod = 'POST';
req.requestBody = Blob.valueof(JsonMsg);
--
Gitblit v1.9.1