From b98c031f4bb9ccef46005694a0c4837b1b4d853b Mon Sep 17 00:00:00 2001
From: 张宇恒 <bxyun0@163.com>
Date: 星期四, 28 四月 2022 09:32:24 +0800
Subject: [PATCH] 修理触发条件、调用方法修改

---
 force-app/main/default/classes/NFM603ControllerTest.cls |   36 +++++++++++-------------------------
 1 files changed, 11 insertions(+), 25 deletions(-)

diff --git a/force-app/main/default/classes/NFM603ControllerTest.cls b/force-app/main/default/classes/NFM603ControllerTest.cls
index 33515b5..1688f92 100644
--- a/force-app/main/default/classes/NFM603ControllerTest.cls
+++ b/force-app/main/default/classes/NFM603ControllerTest.cls
@@ -87,9 +87,11 @@
         rpr.Account__c             = depart.Id;
         rpr.Department_Class__c    = section.Id;
         rpr.Hospital__c            = company.Id;
+        rpr.DeliveryLogisticsMode__c = '鍏朵粬';
         rpr.RepairSubOrder__c = subOrder.Id;
         rpr.Delivered_Product__c   = ast.Id;
         rpr.Status__c              = '1.鍙楃悊瀹屾瘯';
+        rpr.SAP_Transfer_time__c = null;
         rpr.Incharge_Staff__c = Userinfo.getUserId();
         rpr.Repair_Detail__c = 'test';
         rpr.GeneratedPDFField__c = null;
@@ -237,32 +239,16 @@
 
         Test.stopTest();
     }
-
-    @isTest
-    static void testCallOut1_1(){
-      List<Repair__c> repairList = [select id,Repair_Ordered_DateTime__c from Repair__c];
-      Test.startTest();
-        List<Id> idList = new List<Id>();
-        for(Repair__c repair : repairList){
-          idList.add(repair.Id);
-        }
-        BatchIF_Log__c iflog = new BatchIF_Log__c();
-        iflog.Log__c = 'test start \n';
-        insert iflog;
-
-        NFM603Controller.callout(iflog.Id,idList);
-
-        Test.stopTest();
-    }
     @isTest
     static void testCallOut1_2(){
-      List<Repair__c> repairList = [select id,Repair_Ordered_DateTime__c,OTSRepairOrder__c from Repair__c];
+      List<Repair__c> repairList = [select id,Repair_Ordered_DateTime__c,OTSRepairOrder__c,SAP_Transfer_time__c,Status__c from Repair__c];
       Test.startTest();
         List<Id> idList = new List<Id>();
         for(Repair__c repair : repairList){
             repair.Repair_Ordered_DateTime__c = Datetime.newInstance(2022,04,13,05,18,18);
+        repair.SAP_Transfer_time__c = Datetime.newInstance(2022,04,13,18,18,18);
             repair.OTSRepairOrder__c = '123123123';
-          idList.add(repair.Id);
+          // idList.add(repair.Id);
         }
         upsert repairList;
         for(Repair__c repair : repairList){
@@ -272,7 +258,7 @@
         iflog.Log__c = 'test start \n';
         insert iflog;
 
-        NFM603Controller.callout(iflog.Id,idList);
+        NFM603Controller.executefuture(iflog,idList);
 
         Test.stopTest();
     }
@@ -292,11 +278,11 @@
     //     Test.stopTest();
     // }
 
-    @isTest
-    static void testcallout3(){
-      BatchIF_Log__c iflog = [select id from BatchIF_Log__c where Type__c = '603test'];
-        NFM603Controller.ManualExecute(iflog.Id);
-    }
+    // @isTest
+    // static void testcallout3(){
+    //   BatchIF_Log__c iflog = [select id from BatchIF_Log__c where Type__c = '603test' limit 1];
+    //     NFM603Controller.ManualExecute(iflog.Id);
+    // }
 
     @isTest
     static void NFM603BatchTest01(){

--
Gitblit v1.9.1