From 654fce62637fc073b97efde22c2b4adf5d6ed792 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期三, 24 七月 2024 16:42:33 +0800
Subject: [PATCH] 库存数据(机加库存)接口

---
 _Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl
index 56b7dcb..c5083ec 100644
--- a/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl
+++ b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl
@@ -10,23 +10,33 @@
     // 鐢勫叞楦� Jul-22-2024 (created)
     address       := Translations::InterfaceDataset_Address(); 
     httpinterface := HTTPInterface::Create( address,80);
-    
-    if( loginfo.Name() = Translations::InterfaceDataset_ShippingActualData_Name() ){//鍙戣繍瀹為檯鏁版嵁
-      
-      httpinterface.URL( Translations::InterfaceDataset_ShippingActualData_URL() );
-      httpinterface.MediaType( Translations::InterfaceDataset_ContentType() );
-      httpinterface.PostMethod( true ); 
-      try{
-        httpinterface.AddHeader("Authorization",InterfaceLoginfo::CallToken())
+    try{
+      if( loginfo.Name() = Translations::InterfaceDataset_ShippingActualData_Name() ){//鍙戣繍瀹為檯鏁版嵁
+        
+        httpinterface.URL( Translations::InterfaceDataset_ShippingActualData_URL() );
+        httpinterface.MediaType( Translations::InterfaceDataset_ContentType() );
+        httpinterface.PostMethod( true ); 
+        httpinterface.AddHeader("Authorization",InterfaceLoginfo::CallToken( Translations::InterfaceDataset_ShippingActualData_Secret() ))
         
         httpinterface.Call( loginfo.RequestBody() );
         
         result := httpinterface.Result();
         loginfo.Response( result );
         loginfo.Success( true );
-      }onerror{
-        loginfo.ReturnMsg( e.GeneralInformation() );
+      } else if ( loginfo.Name() = Translations::InterfaceDataset_MachineStockData_Name() ){//搴撳瓨鏁版嵁锛堟満鍔犲簱瀛橈級
+        httpinterface.URL( Translations::InterfaceDataset_MachineStockData_URL() );
+        httpinterface.MediaType( Translations::InterfaceDataset_ContentType() );
+        httpinterface.PostMethod( true ); 
+        httpinterface.AddHeader("Authorization",InterfaceLoginfo::CallToken( Translations::InterfaceDataset_MachineStockData_Secret() ))
+        
+        httpinterface.Call( loginfo.RequestBody() );
+        
+        result := httpinterface.Result();
+        loginfo.Response( result );
+        loginfo.Success( true );
       }
+    }onerror{
+      loginfo.ReturnMsg( e.GeneralInformation() );
     }
     //鍚庣画鍏叡澶勭悊
     loginfo.FinishTime( DateTime::ActualTime() );

--
Gitblit v1.9.3