From 8650429161595bff3833254d400709b3fcadc197 Mon Sep 17 00:00:00 2001
From: lihongji <3117313295@qq.com>
Date: 星期四, 23 五月 2024 10:54:47 +0800
Subject: [PATCH] 接口优化

---
 _Main/BL/Type_Archive/StaticMethod_HandleBudget.qbl        |   30 +++++++++++++++
 _Main/BL/Type_Archive/StaticMethod_HandlePR.qbl            |    2 +
 _Main/BL/Type_Archive/StaticMethod_HandlePP.qbl            |   30 +++++++++++++++
 _Main/BL/Type_Archive/StaticMethod_HandlePPA_Curve_IDS.qbl |   35 +++++++++++++++++
 4 files changed, 97 insertions(+), 0 deletions(-)

diff --git a/_Main/BL/Type_Archive/StaticMethod_HandleBudget.qbl b/_Main/BL/Type_Archive/StaticMethod_HandleBudget.qbl
index b587370..37fff73 100644
--- a/_Main/BL/Type_Archive/StaticMethod_HandleBudget.qbl
+++ b/_Main/BL/Type_Archive/StaticMethod_HandleBudget.qbl
@@ -10,4 +10,34 @@
   String filePath
 )
 {
+  TextBody:
+  [*
+    // 璇锋眰鍙傛暟
+    pathBudget := filePath + budgetFileName;
+    isArchive  := ifexpr( isBudgetArchive, "true", "false" );
+    minorKey   := [String]macroPlan.MDSID().MinorKey();
+    json       := JSON::Object()
+                  .Add( "path", pathBudget )
+                  .Add( "isArchive", isArchive )
+                  .Add( "minorKey", minorKey ).Build().AsString();
+    
+    // 鍐欏叆涓存椂鏂囦欢
+    Archive::WriteTempFile( pathBudget, budgetBinaryValue );
+    
+    info( json );
+    
+    // 璋冪敤鎺ュ彛
+    //url := "/PR/Import";
+    //i := HTTPInterface::Create( archive.JavaInterfaceAddress(), archive.JavaInterfacePort() );
+    //i.URL( url );
+    //i.PostMethod( true );
+    //
+    //try {
+    //  i.Call( json );
+    //  
+    //  htmlresult := i.Result();
+    //} onerror {
+    //
+    //}
+  *]
 }
diff --git a/_Main/BL/Type_Archive/StaticMethod_HandlePP.qbl b/_Main/BL/Type_Archive/StaticMethod_HandlePP.qbl
index db8e0f8..445a11d 100644
--- a/_Main/BL/Type_Archive/StaticMethod_HandlePP.qbl
+++ b/_Main/BL/Type_Archive/StaticMethod_HandlePP.qbl
@@ -10,4 +10,34 @@
   String filePath
 )
 {
+  TextBody:
+  [*
+    // 璇锋眰鍙傛暟
+    pathPP    := filePath + ppFileName;
+    isArchive := ifexpr( isPPArchive, "true", "false" );
+    minorKey  := [String]macroPlan.MDSID().MinorKey();
+    json      := JSON::Object()
+                 .Add( "path", pathPP )
+                 .Add( "isArchive", isArchive )
+                 .Add( "minorKey", minorKey ).Build().AsString();
+    
+    // 鍐欏叆涓存椂鏂囦欢
+    Archive::WriteTempFile( pathPP, ppBinaryValue );
+    
+    info( json );
+    
+    // 璋冪敤鎺ュ彛
+    //url := "/PR/Import";
+    //i := HTTPInterface::Create( archive.JavaInterfaceAddress(), archive.JavaInterfacePort() );
+    //i.URL( url );
+    //i.PostMethod( true );
+    //
+    //try {
+    //  i.Call( json );
+    //  
+    //  htmlresult := i.Result();
+    //} onerror {
+    //
+    //}
+  *]
 }
diff --git a/_Main/BL/Type_Archive/StaticMethod_HandlePPA_Curve_IDS.qbl b/_Main/BL/Type_Archive/StaticMethod_HandlePPA_Curve_IDS.qbl
index bc89d4a..9291f91 100644
--- a/_Main/BL/Type_Archive/StaticMethod_HandlePPA_Curve_IDS.qbl
+++ b/_Main/BL/Type_Archive/StaticMethod_HandlePPA_Curve_IDS.qbl
@@ -14,4 +14,39 @@
   String filePath
 )
 {
+  TextBody:
+  [*
+    // 璇锋眰鍙傛暟
+    pathPPA   := filePath + ppaFileName;
+    pathCurve := filePath + curveFileName;
+    pathIDS   := filePath + idsFileName;
+    //isArchive := ifexpr( isPRArchive, "true", "false" );
+    minorKey  := [String]macroPlan.MDSID().MinorKey();
+    json      := JSON::Object()
+                 .Add( "pathPPA", pathPPA )
+                 .Add( "pathCurve", pathCurve )
+                 .Add( "pathIDS", pathIDS )
+                 .Add( "minorKey", minorKey ).Build().AsString();
+    
+    // 鍐欏叆涓存椂鏂囦欢
+    Archive::WriteTempFile( pathPPA, ppaBinaryValue );
+    Archive::WriteTempFile( pathCurve, curveBinaryValue );
+    Archive::WriteTempFile( pathIDS, idsBinaryValue );
+    
+    info( json );
+    
+    // 璋冪敤鎺ュ彛
+    //url := "/PR/Import";
+    //i := HTTPInterface::Create( archive.JavaInterfaceAddress(), archive.JavaInterfacePort() );
+    //i.URL( url );
+    //i.PostMethod( true );
+    //
+    //try {
+    //  i.Call( json );
+    //  
+    //  htmlresult := i.Result();
+    //} onerror {
+    //
+    //}
+  *]
 }
diff --git a/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl b/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl
index 77f512d..d157263 100644
--- a/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl
+++ b/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl
@@ -24,6 +24,8 @@
     // 鍐欏叆涓存椂鏂囦欢
     Archive::WriteTempFile( pathPR, prBinaryValue );
     
+    info( json );
+    
     // 璋冪敤鎺ュ彛
     //url := "/PR/Import";
     //i := HTTPInterface::Create( archive.JavaInterfaceAddress(), archive.JavaInterfacePort() );

--
Gitblit v1.9.3