From 0fc2b1ded886d7eac96f6263c053372665e6ad00 Mon Sep 17 00:00:00 2001
From: 张宇恒 <bxyun0@163.com>
Date: 星期三, 13 四月 2022 18:01:04 +0800
Subject: [PATCH] 612和603更改
---
force-app/main/default/classes/NFM603ControllerTest.cls | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
force-app/main/default/classes/NFMUtil.cls | 1 +
2 files changed, 48 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/classes/NFM603ControllerTest.cls b/force-app/main/default/classes/NFM603ControllerTest.cls
index 92d2cab..33515b5 100644
--- a/force-app/main/default/classes/NFM603ControllerTest.cls
+++ b/force-app/main/default/classes/NFM603ControllerTest.cls
@@ -74,7 +74,11 @@
ast = [select Id, Name, Product_Serial_No__c, AccountId, Department_Class__c, Department_Class__r.Management_Code_Auto__c, Hospital__c, Product2Id, Product2.ProductCode, Product2.Repair_Product_Code__c, SerialNumber
from Asset
where Id = :ast.Id];
-
+ RepairSubOrder__c subOrder = new RepairSubOrder__c();
+ subOrder.AttachmentDownload__c = true;
+ subOrder.AttachmentLink__c = 'https://albsylfw.s3.cn-northwest-1.amazonaws.com.cn/20211220/14/11/30/lessthan12/5e8cb69e-f935-48f5-825e-b8344d60f6d4.zip';
+ subOrder.AttachmentName__c = '娴嬭瘯闄勪欢涓嬭浇';
+ insert subOrder;
Repair__c rpr = new Repair__c();
rpr.PAE_Determine__c = 'PAE' ; //--
rpr.ifDeadHurt__c = '鏈�'; //-- R1
@@ -83,12 +87,14 @@
rpr.Account__c = depart.Id;
rpr.Department_Class__c = section.Id;
rpr.Hospital__c = company.Id;
+ rpr.RepairSubOrder__c = subOrder.Id;
rpr.Delivered_Product__c = ast.Id;
rpr.Status__c = '1.鍙楃悊瀹屾瘯';
rpr.Incharge_Staff__c = Userinfo.getUserId();
rpr.Repair_Detail__c = 'test';
rpr.GeneratedPDFField__c = null;
rpr.AsyncData__c = true;
+ rpr.AwaitToSendAWS__c = false;
rpr.Complaint_Number__c = null;
rpr.ReportAdverseEvents__c = '鏈�';
rpr.ProblemOccurred__c = '鍒拌揣楠屾敹';
@@ -99,6 +105,7 @@
rpr.Failure_Occurrence_Date__c = Date.today();
rpr.Repair_Ordered_Date__c = Date.today();
rpr.Repair_Shipped_Date__c = Date.today();
+ rpr.Repair_Ordered_DateTime__c = Datetime.newInstance(2022,04,13,18,18,18);
rpr.ReturnType__c = 'A20';
rpr.AwaitToSendAWS__c = true;
//rpr.Returns_Product_waySAP__c = '杩旈�佸尰闄�';
@@ -231,6 +238,45 @@
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];
+ 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.OTSRepairOrder__c = '123123123';
+ idList.add(repair.Id);
+ }
+ upsert repairList;
+ 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 testcallout2(){
// List<Repair__c> repairList = [select id from Repair__c];
diff --git a/force-app/main/default/classes/NFMUtil.cls b/force-app/main/default/classes/NFMUtil.cls
index 91cf2fc..d671e2a 100644
--- a/force-app/main/default/classes/NFMUtil.cls
+++ b/force-app/main/default/classes/NFMUtil.cls
@@ -130,6 +130,7 @@
AWS_DOMAIN = 'https://olympus.bqbot.com';
// 鏂版湇鍔$郴缁� 鏈湴鐜锛堜复鏃讹級
// AWS_DOMAIN = 'http://114.249.236.98:29990';
+ // AWS_DOMAIN = 'http://114.249.231.75:29995';
// AWS_DOMAIN = 'http://jzbase.bqbot.com:29990';
// AWS_DOMAIN = 'http://114.249.238.243:29990';
--
Gitblit v1.9.1