From 4419b51e5cfed824ca592ae5cba7654994ee005d Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期二, 29 十月 2024 17:30:24 +0800
Subject: [PATCH] 下线计划存档前端

---
 _Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl |   43 +++++++++++++++++++++++--------------------
 1 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl b/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
index a22c383..9b9f152 100644
--- a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
+++ b/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
@@ -7,30 +7,33 @@
 {
   TextBody:
   [*
-    //鏍规嵁褰撳墠鐗堟湰鐨勮閰嶄笂绾胯鍒�
-    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() );
-    table                  := selectobject( interface, AssemblyOnlinePlanVersion, version, not version.IsShow() );
+    //鏍规嵁褰撳墠鐗堟湰鐨勪笅绾胯鍒�
+    allunit                := OfflinePlanArchiveVersion::GetDefaultAllUnit();
+    name                   := OfflinePlanArchiveVersion::GetDefaultName();
+    search                 := interface.OfflinePlanArchiveSearch( relnew, Product := allunit, ProductionLine := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );
+    table                  := selectobject( interface, OfflinePlanArchiveVersion, version, not version.IsShow() );
     if( isnull( table ) ){
-      table                := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name );
+      table                := interface.OfflinePlanArchiveVersion( relnew, ID := name, Name := name );
     }
-    showtable              := selectobject( interface, AssemblyOnlinePlanVersion, version, version.IsShow() );
+    showtable              := selectobject( interface, OfflinePlanArchiveVersion, version, version.IsShow() );
     if( isnull( table ) ){
-      showtable               := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name, IsShow := true );
+      showtable               := interface.OfflinePlanArchiveVersion( relnew, ID := name, Name := name, IsShow := true );
     }
-    aopcolumns             := selectuniquevalues(  macroPlan, AssemblyOnlinePlanColumn, aopcolumn, not exists( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = aopcolumn.ColumnDate() ), aopcolumn.ColumnDate() );
-    table.GenerateColumn( aopcolumns, search.TimeUnit(), search.StartDate(), search.EndDate() );
-    traverse( macroPlan, AssemblyOnlinePlanRow, aoprow ){
-      row                  := table.GetRow( aoprow );
-      traverse( aoprow, AssemblyOnlinePlanCell, aopcell ){
-        column             := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = aopcell.AssemblyOnlinePlanColumn().ColumnDate() );
-        cell               := selectobject( row, Cell, cell, cell.Column() = column );
-        cell.InventoryWeight( aopcell.InventoryWeight() );
-        cell.ProductionSerialNumber( aopcell.ProductionSerialNumber() );
-        cell.Quantity( aopcell.Quantity() );
-        cell.Shift( aopcell.Shift() );
-        cell.Value( aopcell.Value() );
+    nopcolumns             := selectuniquevalues(  macroPlan, NewOfflinePlanTable.NewOfflinePlanColumn, nopcolumn, not exists( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcolumn.StartDate() ), nopcolumn.StartDate() );
+    table.GenerateColumn( nopcolumns, search.TimeUnit(), search.StartDate(), search.EndDate() );
+    traverse( macroPlan, NewOfflinePlanTable, noptable ){
+      
+      traverse( noptable, NewOfflinePlanRow, noprow ){
+        row                  := table.GetRow( noprow );
+        traverse( noprow, NewOfflinePlanCell, nopcell ){
+          column             := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() );
+          cell               := selectobject( row, Cell, cell, cell.Column() = column );
+          cell.InventoryWeight( nopcell.InventoryWeight() );
+    //      cell.ProductionSerialNumber( nopcell.ProductionSerialNumber() );
+          cell.Quantity( nopcell.Quantity() );
+    //      cell.Shift( nopcell.Shift() );
+    //      cell.Value( nopcell.Value() );
+        }
       }
     }
     //showtable.Generate( search, products );

--
Gitblit v1.9.3