From 7da84821eb07cfa1370adfe4144e41416cf1cefa Mon Sep 17 00:00:00 2001
From: lihongji <3117313295@qq.com>
Date: 星期四, 07 十一月 2024 11:46:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 _Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl
index 82afd96..9d13f21 100644
--- a/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl
@@ -2,7 +2,7 @@
 #parent: #root
 StaticMethod RefreshData (
   InterfaceDataset interface,
-  const MacroPlan macroPlan
+  MacroPlan macroPlan
 )
 {
   TextBody:
@@ -11,30 +11,26 @@
     interface.AssemblyOnlinePlanVersion( relflush );
     allunit                := AssemblyOnlinePlanVersion::GetDefaultAllUnit();
     name                   := AssemblyOnlinePlanVersion::GetDefaultName();//search                 := 
-    interface.AssemblyOnlinePlanVersionSearch( relnew, Product := allunit, ProductionLine := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );
+    search                 := interface.AssemblyOnlinePlanVersionSearch( relnew, Product := allunit, ProductionLine := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );
     table                  := selectobject( interface, AssemblyOnlinePlanVersion, version, not version.IsShow() );
     if( isnull( table ) ){
       table                := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name );
     }
-    //showtable              := selectobject( interface, AssemblyOnlinePlanVersion, version, version.IsShow() );
-    //if( isnull( table ) ){
-    //  showtable               := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name, IsShow := true );
-    //}
+    showtable              := selectobject( interface, AssemblyOnlinePlanVersion, version, version.IsShow() );
+    if( isnull( table ) ){
+      showtable               := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name, IsShow := true );
+    }
     aopcolumns             := selectuniquevalues(  macroPlan, NewAssemblyOnlinePlanColumn, aopcolumn, not exists( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = aopcolumn.StartDate() ), aopcolumn.StartDate() );
-    table.GenerateColumn( aopcolumns );
+    table.GenerateColumn( aopcolumns, false );
     traverse( macroPlan, NewAssemblyOnlinePlanRow, aoprow, aoprow.Type() = '1' ){
       row                  := table.GetRow( aoprow );
-      info( '------------------------', row.Type() );
       traverse( aoprow, NewAssemblyOnlinePlanCell, aopcell ){
         column             := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = aopcell.NewAssemblyOnlinePlanColumn().StartDate() );
         cell               := selectobject( row, Cell, cell, cell.Column() = column );
-        cell.InventoryWeight( aopcell.InventoryWeight() );
-    //    cell.ProductionSerialNumber( aopcell.ProductionSerialNumber() );  
+    //    cell.InventoryWeight( aopcell.InventoryWeight() );
         cell.Quantity( aopcell.Quantity() );
-    //    cell.Shift( aopcell.Shift() );
-    //    cell.Value( aopcell.Value() );
       }
     }
-    //showtable.Generate( search, products );
+    showtable.Generate( search );
   *]
 }

--
Gitblit v1.9.3