From 131236be1e80fea9aa9ff158bd270646059cfdfc Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期二, 27 八月 2024 18:49:59 +0800
Subject: [PATCH] 接口优化

---
 _Main/BL/Type_InterfacePlanInventoryDataPush/StaticMethod_GenerateData.qbl |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/_Main/BL/Type_InterfacePlanInventoryDataPush/StaticMethod_GenerateData.qbl b/_Main/BL/Type_InterfacePlanInventoryDataPush/StaticMethod_GenerateData.qbl
index a1631c3..8572e8b 100644
--- a/_Main/BL/Type_InterfacePlanInventoryDataPush/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_InterfacePlanInventoryDataPush/StaticMethod_GenerateData.qbl
@@ -2,12 +2,16 @@
 #parent: #root
 StaticMethod GenerateData (
   MacroPlan macroPlan,
-  InterfaceDataset interfaceDataset
+  InterfaceDataset interfaceDataset,
+  Number versionFlag
 )
 {
   TextBody:
   [*
-    interfaceDataset.InterfacePlanInventoryDataPush( relflush );
+    ipidps := selectset( interfaceDataset, InterfacePlanInventoryDataPush, tempIPIDP, tempIPIDP.VersionFlag() = versionFlag );
+    MacroPlan::DeleteObjects( ipidps );
+    
+    actualDateTime := DateTime::ActualTime();
     
     traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pispmp, not pispmp.IsSystem() and pispmp.IsLeaf() ) {
       traverse ( pispmp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispippl, not pispippl.IsPeriodFrozen() ) {
@@ -17,7 +21,9 @@
                                                          PlanningInventory := [Number]pispippl.InventoryLevelEnd(),
                                                          VersionName       := macroPlan.ScenarioName(),
                                                          FactoryName       := ifexpr( pispmp.StockingPointID().Regex( "澶ц繛" ) or pispmp.StockingPointID().Regex( "DL" ), "澶ц繛宸ュ巶", "闀挎槬宸ュ巶" ),
-                                                         Fac               := ifexpr( pispmp.StockingPointID().Regex( "澶ц繛" ) or pispmp.StockingPointID().Regex( "DL" ), "DL", "CC" )
+                                                         Fac               := ifexpr( pispmp.StockingPointID().Regex( "澶ц繛" ) or pispmp.StockingPointID().Regex( "DL" ), "DL", "CC" ),
+                                                         InterfaceTime     := actualDateTime,
+                                                         VersionFlag       := versionFlag
                                                         );
       } 
     }

--
Gitblit v1.9.3