From 1d6137b0386b062dffee16c2edb8087c71cbebc3 Mon Sep 17 00:00:00 2001
From: 彭锟 <pengkun@prec-tech.com>
Date: 星期四, 31 三月 2022 21:55:18 +0800
Subject: [PATCH] 624Test修改

---
 force-app/main/default/classes/NFM624RestTest.cls |   71 +++++++++++++++++++++++++++--------
 1 files changed, 55 insertions(+), 16 deletions(-)

diff --git a/force-app/main/default/classes/NFM624RestTest.cls b/force-app/main/default/classes/NFM624RestTest.cls
index 9341dfe..45b8135 100644
--- a/force-app/main/default/classes/NFM624RestTest.cls
+++ b/force-app/main/default/classes/NFM624RestTest.cls
@@ -9,7 +9,7 @@
         testLog.ErrorLog__c = '';
         testLog.MessageGroupNumber__c = '20211207';
         testLog.RowDataFlg__c = true;
-        testLog.Log__c = '[{"Type":"鍖荤敓","State":"鍖椾含甯�","ServiceUserId":"","RelatedHospital":"354044","RelatedDepartment":"760129","RegSource":"2","PersonManagementCode":"C000132345","Name":"鍒樼拹","Mobile":"13683268803","HospitalManagementCode2":"415","ForbiddenStatus":true,"DepartmentName":"鍖椾含澶у绗笁鍖婚櫌 鍛煎惛绉� 鍛煎惛绉�","DepartmentManagementCode2":"416","DepartmentClass":"鍛煎惛绉�","ContactId":"2552","ContactAddress":"","City":"娴锋穩鍖�","ApproverID":"","AgentFlag":false,"AccountName":"鍖椾含澶у绗笁鍖婚櫌"}]';
+        testLog.Log__c = '[{"TypeEncrypted":"53173e61ac22874aab5b8d1f802515db","Type":"*****","State":"鍖椾含甯�","ServiceUserId":"958717798199066624","RelatedHospital":"8020739","RelatedDepartment":"","RegSource":"1","PersonManagementCode":"","NameEncrypted":"d5cd51938e71eebbc0641f4e976146e7","Name":"***","MobileEncrypted":"c34725fe79b3965ea9abfd7c1435cf9a","Mobile":"***********","HospitalManagementCode2":"1377","ForbiddenStatus":false,"DepartmentName":"鏅绉�","DepartmentManagementCode2":"1378","DepartmentClass":"鏅绉�","DataId":"958717797737693184","ContactId":"958717798199066624","ContactAddressEncrypted":"","ContactAddress":"","City":"鏄屽钩鍖�","ApproverID":"om003669","AgentFlag":false,"AccountName":"鍖椾含浜兘鍎跨鍖婚櫌"}]';
         //[Select Id, Name, Log__c, ErrorLog__c, Log2__c, Log3__c, Log4__c, Log5__c, Log6__c, Log7__c, Log8__c, Log9__c, Log10__c, Log11__c, Log12__c, MessageGroupNumber__c, retry_cnt__c,NFM624_Secondary_processing__c  from BatchIF_Log__c where RowDataFlg__c = true and Id =: rowData_Id]
         insert testLog;
         NFM624Rest.main(testLog.Id);
@@ -156,15 +156,16 @@
         Account hp = new Account(RecordTypeId = '01210000000QemG', Name = '鍖椾含寰疯儨闂ㄤ腑鍖婚櫌', OwnerId = hpOwner.Id);
         hp.FSE_GI_Main_Leader__c = hpOwner.Id;
         hp.Advance_Payment_Identification_Approval__c = Date.today().addyears(-1);
-        hp.AgentCode_Ext__c = '1375';
-        hp.PlatformCode__c = '112358';
+        hp.AgentCode_Ext__c = '112358';
+        hp.PlatformCode__c = '1375';
         hp.Is_Active__c = '鏈夊姽';
         insert hp;
-      
+        
 
-        Account hptemp = [select Id,PlatformCode__c,AgentCode_Ext__c from Account where Id = :hp.Id];
+        Account hptemp = [select Id,PlatformCode__c,AgentCode_Ext__c,Is_Active_Formula__c from Account where Id = :hp.Id];
+        
         //鎴樼暐绉戝
-        Account dc = [select Id, Name, RecordType_DeveloperName__c, Account2__c from Account where ParentId = :hp.Id and RecordType_DeveloperName__c = 'Department_Class_BF'];
+        Account dc = [select Id, Name,Parent_PlatformCode__c,Parent_Management_Code__c, RecordType_DeveloperName__c, Account2__c from Account where ParentId = :hp.Id and RecordType_DeveloperName__c = 'Department_Class_BF'];
         
         NFM624Rest.GeData GeData1 = new NFM624Rest.GeData();
         NFM624Rest.GeDatas GaDatas = new  NFM624Rest.GeDatas();
@@ -173,7 +174,7 @@
         String nowStr = nowDT.format('yyyyMMddHHmm');
         GaDatas.Monitoring = new NFMUtil.Monitoring();
         GaDatas.Monitoring.MessageGroupNumber = nowStr + '01';
-
+        //鏈夊尰闄㈡病鏈夌瀹ゆ病鏈変汉鍛樼鐞嗙紪鐮佲�斺��>鏂板缓绉戝+鏂板缓鑱旂郴浜�
         GaDatas.GeData = new NFM624Rest.Gedata[] { GeData1 };
         GeData1.ContactId = '958432058911227904';
         GeData1.ServiceUserId = '958432058911227904';
@@ -200,13 +201,18 @@
         GeData1.AgentFlag = false;
         GeData1.ApproverID = hpowner.Id;
         GeData1.DataId = '958432058273693696';
+       
+        BatchIF_Log__c rowData = NFMUtil.saveRowData(GaDatas.Monitoring, 'NFM624', GaDatas.GeData);
+        if (String.isBlank(rowData.Log__c) == false)
+            NFM624Rest.executefuture(rowData.Id);
+        
 
         NFM624Rest.GeData GeData2 = new NFM624Rest.GeData();
         GaDatas.GeData = new NFM624Rest.Gedata[] { GeData2 };
         GeData2.ContactId = '';
         GeData2.ServiceUserId = '';
         GeData2.PersonManagementCode = '';
-        GeData2.HospitalManagementCode2 = hptemp.AgentCode_Ext__c;
+        GeData2.HospitalManagementCode2 = '';
         GeData2.DepartmentManagementCode2 = '';
         GeData2.Name = '';
         GeData2.NameEncrypted = '';
@@ -215,7 +221,7 @@
         GeData2.State = '';
         GeData2.City = '';
         GeData2.AccountName = '';
-        GeData2.RelatedHospital = hptemp.PlatformCode__c;
+        GeData2.RelatedHospital = '';
         GeData2.DepartmentClass = '';
         GeData2.DepartmentName = '';
         GeData2.RelatedDepartment = '';
@@ -226,14 +232,47 @@
         GeData2.ForbiddenStatus = false;
         GeData2.RegSource = '';
         GeData2.AgentFlag = false;
-        GeData2.ApproverID = hpowner.Id;
+        GeData2.ApproverID = '';
         GeData2.DataId = '';
 
-        System.Test.startTest();
-        BatchIF_Log__c rowData = NFMUtil.saveRowData(GaDatas.Monitoring, 'NFM624', GaDatas.GeData);
-        if (String.isBlank(rowData.Log__c) == false)
-            NFM624Rest.executefuture(rowData.Id);
-        //NFM110WebService.NFM110(ProductsDelivery);
-        System.Test.stopTest();
+        
+        BatchIF_Log__c rowData2 = NFMUtil.saveRowData(GaDatas.Monitoring, 'NFM624', GaDatas.GeData);
+        if (String.isBlank(rowData2.Log__c) == false){
+            NFM624Rest.executefuture(rowData2.Id);
+        }
+
+        //鏈夊尰闄㈡湁鏈夌瀹ゆ病鏈変汉鍛樼鐞嗙紪鐮佲�斺��>鏇存柊鑱旂郴浜�
+        NFM624Rest.GeData GeData3 = new NFM624Rest.GeData();
+        GaDatas.GeData = new NFM624Rest.Gedata[] { GeData3 };
+        GeData3.ContactId = '958432058911227904';
+        GeData3.ServiceUserId = '958432058911227904';
+        GeData3.PersonManagementCode = '';
+        GeData3.HospitalManagementCode2 = '1375';
+        GeData3.DepartmentManagementCode2 = '1376';
+        GeData3.Name = '***';
+        GeData3.NameEncrypted = '24616254c7c7b65d985567f475b667d7';
+        GeData3.Mobile = '***********';
+        GeData3.MobileEncrypted = 'c34725fe79b3965ea9abfd7c1435cf9a';
+        GeData3.State = '鍖椾含甯�';
+        GeData3.City = '瑗垮煄鍖�';
+        GeData3.AccountName = '鍖椾含寰疯儨闂ㄤ腑鍖婚櫌';
+        GeData3.RelatedHospital = '112358';
+        GeData3.DepartmentClass = '娑堝寲绉�';
+        GeData3.DepartmentName = '鍖椾含寰疯儨闂ㄤ腑鍖婚櫌 娑堝寲绉� 鑳冮暅瀹�';
+        GeData3.RelatedDepartment = '5311053';
+        GeData3.Type = '*****';
+        GeData3.TypeEncrypted = '53173e61ac22874aab5b8d1f802515db';
+        GeData3.ContactAddress = '**********';
+        GeData3.ContactAddressEncrypted = '121a09fd9e0e9b090c4aa9c95da52810';
+        GeData3.ForbiddenStatus = false;
+        GeData3.RegSource = '1';
+        GeData3.AgentFlag = false;
+        GeData3.ApproverID = hpowner.Id;
+        GeData3.DataId = '958432058273693696';
+        
+        BatchIF_Log__c rowData3 = NFMUtil.saveRowData(GaDatas.Monitoring, 'NFM624', GaDatas.GeData);
+        if (String.isBlank(rowData3.Log__c) == false){
+            NFM624Rest.executefuture(rowData3.Id);
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1