From 138b9789e8680c9cd9670d7cae1ddaadf86a2e70 Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期四, 07 十一月 2024 13:35:26 +0800
Subject: [PATCH] 计划库存接口优化

---
 _Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter_PlanInventory.qbl |   37 +++++++++++++++++--------------------
 _Main/BL/Type_InterfaceDataset/StaticMethod_PushPlanInventoryData.qbl                    |    3 +--
 2 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/_Main/BL/Type_InterfaceDataset/StaticMethod_PushPlanInventoryData.qbl b/_Main/BL/Type_InterfaceDataset/StaticMethod_PushPlanInventoryData.qbl
index 1b91d1c..e2d4376 100644
--- a/_Main/BL/Type_InterfaceDataset/StaticMethod_PushPlanInventoryData.qbl
+++ b/_Main/BL/Type_InterfaceDataset/StaticMethod_PushPlanInventoryData.qbl
@@ -38,12 +38,11 @@
     
     loginfo := interfaceDataset.InterfaceLoginfo( relnew, 
                                                   ExecuteUser       := executor, 
-                                                  Name              := Translations::InterfaceDataset_CustomerDemandPPAIDS_Name(), 
+                                                  Name              := "Plan inventory data", 
                                                   InterfaceDateTime := DateTime::ActualTime(), 
                                                   Message           := "璁″垝搴撳瓨鏁版嵁", 
                                                   RequestBody       := requestbody );
     
     InterfaceLoginfo::CallInterfaceForDataCenter_PlanInventory( interfaceDataset, loginfo );
-    //info( '----------------', data.AsString() );
   *]
 }
diff --git a/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter_PlanInventory.qbl b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter_PlanInventory.qbl
index d7fc50a..47b93de 100644
--- a/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter_PlanInventory.qbl
+++ b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter_PlanInventory.qbl
@@ -3,49 +3,46 @@
 StaticMethod CallInterfaceForDataCenter_PlanInventory (
   InterfaceDataset owner,
   InterfaceLoginfo loginfo
-) as owning JSON
+)
 {
   Description: '璋冪敤鏁版嵁涓彴鎺ュ彛銆愯鍒掑簱瀛樸��'
   TextBody:
   [*
-    // 鐢勫叞楦� Jul-22-2024 (created)
     address       := Translations::InterfaceDataset_DataCenter_Address(); 
-    httpinterface := HTTPInterface::Create( address,80);
+    
+    httpinterface := HTTPInterface::Create( address,80 );
+    
     httpinterface.PostMethod( true ); 
+    httpinterface.URL( "/api/plan-stock/saveList" );
     httpinterface.MediaType( Translations::InterfaceDataset_ContentType() );
     httpinterface.AddHeader( "clientId", Translations::InterfaceDataset_DataCenter_ClientId() );
     httpinterface.AddHeader( "clientSecret", Translations::InterfaceDataset_DataCenter_ClientSecret() );
-    try{
-      if( loginfo.Name() = Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() ){//瀹㈡埛闇�姹�
-        httpinterface.URL( Translations::InterfaceDataset_CustomerDemandPPAIDS_URL() );
-      } 
+    
+    try {
       httpinterface.Call( loginfo.RequestBody() );
+      
       result := httpinterface.Result();
+      
       loginfo.Response( result );
       loginfo.Success( true );
-    }onerror{
+    } onerror { 
       loginfo.ReturnMsg( e.GeneralInformation() );
     }
     
-    //鍚庣画鍏叡澶勭悊
+    // 鍚庣画鍏叡澶勭悊
     loginfo.FinishTime( DateTime::ActualTime() );
-    data             := JSON::Null().Build();
     
-    if( loginfo.Success() ){
-      resultJson     := JSON::Parse( loginfo.Response() );
-      code           := resultJson.Get( "code" ).GetNumber();
-      msg            := resultJson.Get( "message" ).GetString();
-      data           := resultJson.Get( "data" );
+    if ( loginfo.Success() ) {
+      resultJson := JSON::Parse( loginfo.Response() );
+      code       := resultJson.Get( "code" ).GetNumber();
+      msg        := resultJson.Get( "message" ).GetString();
       
       loginfo.ReturnMsg( msg );
-      if( code = 200 ){
-    //    total        := resultJson.Get( "dataSize" ).GetNumber();
+      
+      if ( code = 200 ) {
         loginfo.ReturnSuccess( true );
-    //    loginfo.TotalRow( total );
         loginfo.UpdateLast();
       }
     }
-    
-    return &data;
   *]
 }

--
Gitblit v1.9.3