From 331f46d96ef1e2140042d3c2f7938fe0d9635c27 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期一, 11 十一月 2024 23:26:08 +0800
Subject: [PATCH] 修复一些bug,调整页面布局

---
 _Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl                                                                         |    5 
 _Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl                                                                |    4 +
 _Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhScheduleSummaryTable_OnCreated.def         |   12 +++
 _Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_870_bExport_OnClick.def                                    |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pExport_bExport_OnClick#832.def                               |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonUp_88_bCreateBaseData_OnClick#88.def                   |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pAnnualPlanReport#439.def                                         |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_MatrixEditor510.def                                          |    6 
 _Main/BL/Type_MP_Table/Attribute_CreateTime.qbl                                                                                        |    7 +
 _Main/BL/Type_LocalTable/Attribute_CreateTime.qbl                                                                                      |    7 +
 _Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl                                                               |    8 +
 _Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonDown_478_dhAsyncFlag_OnDataChanged.def                 |   12 +++
 _Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl                                                                        |    3 
 _Main/BL/Type_LocalTable/_ROOT_Type_LocalTable.qbl                                                                                     |    1 
 _Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonDown_478_bImportOutput_OnClick.def                     |    2 
 _Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_AsyncCreateTables.qbl                                                             |   15 +++
 _Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_pScheduleSummary.def                                         |   18 ++++
 _Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonUp_88_bCreateFullTable_OnClick#71.def                  |    7 -
 _Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhScheduleSummaryTable_OnDataChanged#906.def |    4 
 /dev/null                                                                                                                              |   12 ---
 _Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_MatrixEditor.def                                                  |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pAnnualPlanReport_439_dhAnnualPlanTable_OnDataChanged.def          |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_pRibbonDown#478.def                                          |   37 +++++++++
 _Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_AsyncCreateFullTable.qbl                                                          |   23 +++++
 _Main/BL/Type_MP_Table/_ROOT_Type_MP_Table.qbl                                                                                         |    1 
 25 files changed, 166 insertions(+), 44 deletions(-)

diff --git a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_AsyncCreateFullTable.qbl b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_AsyncCreateFullTable.qbl
new file mode 100644
index 0000000..0d45916
--- /dev/null
+++ b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_AsyncCreateFullTable.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod AsyncCreateFullTable (
+  const Keys macroPlanMDSIDs,
+  RecycleBin recycleBin,
+  const Archive archive,
+  const MacroPlan owner
+)
+{
+  TextBody:
+  [*
+    // Akari Nov-11-2024 (created)
+    AsyncFlag::Running( recycleBin,MP_Cell_ScheduleSummary::GetTableName() );
+    
+    macroPlans := stream[MacroPlan]::Success();
+    traverse( macroPlanMDSIDs,Elements,mdsid ){
+      streamMacroPlan := LocalTool::LoadMacroPlan( mdsid );
+      macroPlans.Merge( streamMacroPlan );
+    }
+    
+    macroPlans -> GroupAll() -> MP_Cell_ScheduleSummary::CreateFullTable( recycleBin,archive,owner );
+  *]
+}
diff --git a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_AsyncCreateTables.qbl b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_AsyncCreateTables.qbl
new file mode 100644
index 0000000..e3e2a83
--- /dev/null
+++ b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_AsyncCreateTables.qbl
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod AsyncCreateTables (
+  const Keys macroPlanMDSIDs
+)
+{
+  TextBody:
+  [*
+    // Akari Nov-11-2024 (created)
+    traverse( macroPlanMDSIDs,Elements,mdsid ){
+      streamMacroPlan := LocalTool::LoadMacroPlan( mdsid );
+      streamMacroPlan -> MP_Cell_ScheduleSummary::Create( );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
index 53b1182..3655001 100644
--- a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
+++ b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
@@ -7,8 +7,7 @@
   TextBody:
   [*
       // rislai Aug-6-2024 (created)
-    table := select( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
-    if( not isnull( table )){
+    traverse( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() ){
       table.Delete(); 
     }
     
diff --git a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl
index d6344e0..d8b6913 100644
--- a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl
+++ b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl
@@ -10,7 +10,7 @@
   TextBody:
   [*
     // rislai Aug-7-2024 (created)
-    tables := MP_Table::GetMP_Tables_ScheduleSummary( owners );
+    tables := selectset( owners,Elements.MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
     
     scheduleSummaryOutputDataIndexTree := NamedValueTree::Create();
     scheduleSummaryOutputDatas := selectset( archive,ScheduleSummaryOutputLine.ScheduleSummaryOutputData,data,
@@ -23,7 +23,11 @@
       scheduleSummaryOutputDataIndexTree.Root().AddChild( scheduleSummaryOutputDataHandle,i );
     }
     
+    traverse( recycleBin,LocalTable,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() ){
+      table.Delete();
+    }
     localTable := recycleBin.LocalTable( relnew,Name := MP_Cell_ScheduleSummary::GetTableName() );
+    
     startDate := minselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate();
     endDate := maxselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate();
     
@@ -146,7 +150,7 @@
     //  columnIndexTree.Root().AddChild( columnHandle,columns.Size() - 1 );
     //}
     
-    
+    AsyncFlag::Success( recycleBin,MP_Cell_ScheduleSummary::GetTableName() );
     return localTable;
   *]
 }
diff --git a/_Main/BL/Type_LocalTable/Attribute_CreateTime.qbl b/_Main/BL/Type_LocalTable/Attribute_CreateTime.qbl
new file mode 100644
index 0000000..081271c
--- /dev/null
+++ b/_Main/BL/Type_LocalTable/Attribute_CreateTime.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute CreateTime
+{
+  #keys: '3[414996.1.213514774][414996.1.213514773][414996.1.213514775]'
+  ValueType: DateTime
+}
diff --git a/_Main/BL/Type_LocalTable/_ROOT_Type_LocalTable.qbl b/_Main/BL/Type_LocalTable/_ROOT_Type_LocalTable.qbl
index 67d59e9..02da58c 100644
--- a/_Main/BL/Type_LocalTable/_ROOT_Type_LocalTable.qbl
+++ b/_Main/BL/Type_LocalTable/_ROOT_Type_LocalTable.qbl
@@ -5,5 +5,6 @@
 {
   #keys: '5[412672.0.1084249615][412672.0.1084249613][0.0.0][412672.0.1084249614][412672.0.1084249616]'
   BaseType: Object
+  OnCreate: 'this.CreateTime( DateTime::Now() );'
   StructuredName: 'LocalTables'
 }
diff --git a/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl b/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl
index 009056c..09e1363 100644
--- a/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl
+++ b/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl
@@ -7,9 +7,8 @@
   TextBody:
   [*
     // rislai Aug-6-2024 (created)
-    table := select( owner,MP_Table,table,table.Name() = MP_Cell_AnnualPlanReport::GetTableName() );
-    if( not isnull( table )){
-      table.Delete(); 
+    traverse( owner,MP_Table,table,table.Name() = MP_Cell_AnnualPlanReport::GetTableName() ){
+      table.Delete();
     }
     
     table := owner.MP_Table( relnew,Name := MP_Cell_AnnualPlanReport::GetTableName());
diff --git a/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl b/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl
index 6618723..b81f496 100644
--- a/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl
+++ b/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl
@@ -11,7 +11,11 @@
     // rislai Aug-7-2024 (created)
     tables := selectset( owners,Elements.MP_Table,table,table.Name() = MP_Cell_AnnualPlanReport::GetTableName());
     
+    traverse( recycleBin,LocalTable,table,table.Name() = MP_Cell_AnnualPlanReport::GetTableName() ){
+      table.Delete();
+    }
     localTable := recycleBin.LocalTable( relnew,Name := MP_Cell_AnnualPlanReport::GetTableName() );
+    
     startDate := minselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate();
     endDate := maxselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate();
     
diff --git a/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateTables.qbl b/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateTables.qbl
deleted file mode 100644
index 952c6a2..0000000
--- a/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateTables.qbl
+++ /dev/null
@@ -1,18 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod CreateTables (
-  MacroPlans owners
-)
-{
-  TextBody:
-  [*
-    // Akari Nov-11-2024 (created)
-    traverse( owners,Elements,owner ){
-      table := select( owner,MP_Table,table,table.Name() = MP_Cell_AnnualPlanReport::GetTableName() );
-      if( not isnull( table )){
-        table.Delete();
-      }
-      MP_Cell_AnnualPlanReport::Create( owner );
-    }
-  *]
-}
diff --git a/_Main/BL/Type_MP_Table/Attribute_CreateTime.qbl b/_Main/BL/Type_MP_Table/Attribute_CreateTime.qbl
new file mode 100644
index 0000000..28ea804
--- /dev/null
+++ b/_Main/BL/Type_MP_Table/Attribute_CreateTime.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute CreateTime
+{
+  #keys: '3[414996.1.213444720][414996.1.213444719][414996.1.213444721]'
+  ValueType: DateTime
+}
diff --git a/_Main/BL/Type_MP_Table/StaticMethod_CreateMP_Tables_ScheduleSummary.qbl b/_Main/BL/Type_MP_Table/StaticMethod_CreateMP_Tables_ScheduleSummary.qbl
deleted file mode 100644
index 3b6b88a..0000000
--- a/_Main/BL/Type_MP_Table/StaticMethod_CreateMP_Tables_ScheduleSummary.qbl
+++ /dev/null
@@ -1,21 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod CreateMP_Tables_ScheduleSummary (
-  const MacroPlans owners
-) as owning MP_Tables
-{
-  TextBody:
-  [*
-    // Akari Aug-19-2024 (created)
-    tables := construct( MP_Tables );
-    traverse( owners,Elements,owner ,owner.MDSMacroPlan().Description().LikeUserLocale( "璁″垝姹囨��" )){
-      table := select( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
-      if( not isnull( table )){
-        table.Delete();
-      }
-      table :=  MP_Cell_ScheduleSummary::Create( owner );
-      tables.Add( table );
-    }
-    return &tables;
-  *]
-}
diff --git a/_Main/BL/Type_MP_Table/StaticMethod_GetMP_Tables_ScheduleSummary.qbl b/_Main/BL/Type_MP_Table/StaticMethod_GetMP_Tables_ScheduleSummary.qbl
deleted file mode 100644
index d43f49f..0000000
--- a/_Main/BL/Type_MP_Table/StaticMethod_GetMP_Tables_ScheduleSummary.qbl
+++ /dev/null
@@ -1,26 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod GetMP_Tables_ScheduleSummary (
-  const MacroPlans owners
-) as owning MP_Tables
-{
-  TextBody:
-  [*
-    // Akari Aug-19-2024 (created)
-    tables := construct( MP_Tables );
-    traverse( owners,Elements,owner ,owner.MDSMacroPlan().Description().LikeUserLocale( "璁″垝姹囨��" )){
-      table := select( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
-      if( isnull( table )){
-        table :=  MP_Cell_ScheduleSummary::Create( owner );
-      }else{
-        startDate := minselect( table,MP_Column,column,column.CustomDate() ).CustomDate();
-        planStartDate := owner.StartOfPlanning().Date();
-        if( startDate <> planStartDate ){
-          table :=  MP_Cell_ScheduleSummary::Create( owner );
-        }
-      }
-      tables.Add( table );
-    }
-    return &tables;
-  *]
-}
diff --git a/_Main/BL/Type_MP_Table/_ROOT_Type_MP_Table.qbl b/_Main/BL/Type_MP_Table/_ROOT_Type_MP_Table.qbl
index 620aaac..f363aef 100644
--- a/_Main/BL/Type_MP_Table/_ROOT_Type_MP_Table.qbl
+++ b/_Main/BL/Type_MP_Table/_ROOT_Type_MP_Table.qbl
@@ -5,5 +5,6 @@
 {
   #keys: '5[412672.1.95254778][412672.1.95254776][0.0.0][412672.1.95254777][412672.1.95254779]'
   BaseType: Object
+  OnCreate: 'this.CreateTime( DateTime::Now() );'
   StructuredName: 'MP_Tables'
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_MatrixEditor.def b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_MatrixEditor.def
index bca6f9c..4ef6c00 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_MatrixEditor.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_MatrixEditor.def
@@ -18,7 +18,7 @@
           Properties:
           [
             DataType: 'LocalTable'
-            Source: 'dhComparisonData'
+            Source: 'dhAnnualPlanTable'
             Taborder: 0
             Transformation: 'LocalRow.LocalCell.astype(LocalCell_Default)'
           ]
@@ -47,7 +47,7 @@
             DataType: 'LocalTable'
             FilterArguments: 'checkedProducts:QMacroPlanner::FormAnnualPlanReport.dhFinelProducts;checkedEntitys:QMacroPlanner::FormAnnualPlanReport.dhFinelEntitys'
             FixedFilter: 'exists( checkedProducts,Elements,entity,entity.ID() = object.ProductID()) and exists( checkedEntitys,Elements,entity,entity.DisplayName() = object.ProductionLine())'
-            Source: 'dhComparisonData'
+            Source: 'dhAnnualPlanTable'
             Taborder: 0
             Transformation: 'LocalRow'
           ]
@@ -75,7 +75,7 @@
             DataType: 'LocalTable'
             FilterArguments: 'startDate:QMacroPlanner::FormAnnualPlanReport.dhStartDate;endDate:QMacroPlanner::FormAnnualPlanReport.dhEndDate;timeUnit:QMacroPlanner::FormAnnualPlanReport.dhTimeUnit'
             FixedFilter: 'not object.IsAttrbuteColumn() and startDate <= object.Date() and endDate > object.Date() and object.TimeUnit() = timeUnit'
-            Source: 'dhComparisonData'
+            Source: 'dhAnnualPlanTable'
             Taborder: 0
             Transformation: 'LocalColumn'
           ]
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pAnnualPlanReport\043439.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pAnnualPlanReport\043439.def"
index e4da3cd..f7ce590 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pAnnualPlanReport\043439.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pAnnualPlanReport\043439.def"
@@ -40,14 +40,14 @@
         Taborder: 2
       ]
     }
-    Component dhComparisonData
+    Component dhAnnualPlanTable
     {
       #keys: '[414996.1.209190961]'
       BaseType: 'WebDataHolder'
       Databinding: 'LocalTable'
       Children:
       [
-        Component deComparisonData
+        Component deAnnualPlanTable
         {
           #keys: '[414996.1.209190962]'
           BaseType: 'WebDataExtractor'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pAnnualPlanReport_439_dhComparisonData_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pAnnualPlanReport_439_dhAnnualPlanTable_OnDataChanged.def
similarity index 65%
rename from _Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pAnnualPlanReport_439_dhComparisonData_OnDataChanged.def
rename to _Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pAnnualPlanReport_439_dhAnnualPlanTable_OnDataChanged.def
index e4c4d51..78f081f 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pAnnualPlanReport_439_dhComparisonData_OnDataChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pAnnualPlanReport_439_dhAnnualPlanTable_OnDataChanged.def
@@ -1,6 +1,6 @@
 Quintiq file version 2.0
-#parent: pAnnualPlanReport_439/dhComparisonData
-Response OnDataChanged () id:Response_pAnnualPlanReport_439_dhComparisonData_OnDataChanged
+#parent: pAnnualPlanReport_439/dhAnnualPlanTable
+Response OnDataChanged () id:Response_pAnnualPlanReport_439_dhAnnualPlanTable_OnDataChanged
 {
   #keys: '[414996.1.209190954]'
   CanBindMultiple: false
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_870_bExport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_870_bExport_OnClick.def
index 702601f..a04ce7f 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_870_bExport_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_870_bExport_OnClick.def
@@ -9,8 +9,8 @@
   {
     Body:
     [*
-      rows := selectset( dhComparisonData.Data(),LocalRow,row,exists( dhFinelProducts.Data(),Elements,entity,entity.ID() = row.ProductID()) and exists( dhFinelEntitys.Data(),Elements,entity,entity.DisplayName() = row.ProductionLine())); 
-      columns := selectset( dhComparisonData.Data(),LocalColumn,column,dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() and column.TimeUnit() = dhTimeUnit.Data());
+      rows := selectset( dhAnnualPlanTable.Data(),LocalRow,row,exists( dhFinelProducts.Data(),Elements,entity,entity.ID() = row.ProductID()) and exists( dhFinelEntitys.Data(),Elements,entity,entity.DisplayName() = row.ProductionLine())); 
+      columns := selectset( dhAnnualPlanTable.Data(),LocalColumn,column,dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() and column.TimeUnit() = dhTimeUnit.Data());
       LocalCell_Default::AsyncExport( RecycleBin,rows,columns );
       //Application.Download( "浜у嚭瀵煎叆妯℃澘.xlsx",data.AsBinaryData() );
     *]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_MatrixEditor510.def b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_MatrixEditor510.def
index 13fc229..b6ad37c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_MatrixEditor510.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_MatrixEditor510.def
@@ -18,7 +18,7 @@
           Properties:
           [
             DataType: 'LocalTable'
-            Source: 'dhTable'
+            Source: 'dhScheduleSummaryTable'
             Taborder: 0
             Transformation: 'LocalRow.LocalCell.astype(LocalCell_ScheduleSummary)'
           ]
@@ -47,7 +47,7 @@
             DataType: 'LocalTable'
             FilterArguments: 'checkedEntitys:QMacroPlanner::FormScheduleSummaryReport.dhFinelEntitys'
             FixedFilter: 'exists( checkedEntitys,Elements,entity,entity.DisplayName() = object.Name() )'
-            Source: 'dhTable'
+            Source: 'dhScheduleSummaryTable'
             Taborder: 0
             Transformation: 'LocalRow'
           ]
@@ -75,7 +75,7 @@
             DataType: 'LocalTable'
             FilterArguments: 'startDate:QMacroPlanner::FormScheduleSummaryReport.dhStartDate;endDate:QMacroPlanner::FormScheduleSummaryReport.dhEndDate'
             FixedFilter: 'not object.IsAttrbuteColumn() and startDate <= object.Date() and endDate > object.Date() '
-            Source: 'dhTable'
+            Source: 'dhScheduleSummaryTable'
             Taborder: 0
             Transformation: 'LocalColumn'
           ]
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_pRibbonDown\043478.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_pRibbonDown\043478.def"
index 7566ac1..533b51a 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_pRibbonDown\043478.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_pRibbonDown\043478.def"
@@ -27,6 +27,43 @@
         Taborder: 1
       ]
     }
+    Component dhAsyncFlag
+    {
+      #keys: '[414996.1.214519511]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'AsyncFlag'
+      Children:
+      [
+        Component deAsyncFlag
+        {
+          #keys: '[414996.1.214519512]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'RecycleBin'
+            FixedFilter: 'object.Name() = MP_Cell_ScheduleSummary::GetTableName()'
+            Source: 'RecycleBin'
+            Taborder: 0
+            Transformation: 'AsyncFlag'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Taborder: 3
+      ]
+    }
+    Component lAsyncFlag id:lAsyncFlag_19
+    {
+      #keys: '[414996.1.214519535]'
+      BaseType: 'WebLabel'
+      Properties:
+      [
+        DataBinding: 'dhAsyncFlag.Data.State'
+        Label: '杩愯鐘舵��:'
+        Taborder: 2
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_pScheduleSummary.def b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_pScheduleSummary.def
index 82b2714..72b12d7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_pScheduleSummary.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_pScheduleSummary.def
@@ -41,11 +41,27 @@
       ]
     }
     #child: MatrixEditor
-    Component dhTable
+    Component dhScheduleSummaryTable
     {
       #keys: '[412672.1.96380914]'
       BaseType: 'WebDataHolder'
       Databinding: 'LocalTable'
+      Children:
+      [
+        Component deScheduleSummaryTable
+        {
+          #keys: '[414996.1.214519458]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'RecycleBin'
+            FixedFilter: 'object.Name() = MP_Cell_ScheduleSummary::GetTableName()'
+            Source: 'RecycleBin'
+            Taborder: 0
+            Transformation: 'LocalTable'
+          ]
+        }
+      ]
       Properties:
       [
         Taborder: 1
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pExport_bExport_OnClick\043832.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pExport_bExport_OnClick\043832.def"
index a45884a..cd96743 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pExport_bExport_OnClick\043832.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pExport_bExport_OnClick\043832.def"
@@ -9,8 +9,8 @@
   {
     Body:
     [*
-      rows := selectset( dhTable.Data(),LocalRow,row,exists( dhFinelEntitys.Data(),Elements,entity,entity.DisplayName() = row.Name() ));
-      columns := selectset( dhTable.Data(),LocalColumn,column,dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() );
+      rows := selectset( dhScheduleSummaryTable.Data(),LocalRow,row,exists( dhFinelEntitys.Data(),Elements,entity,entity.DisplayName() = row.Name() ));
+      columns := selectset( dhScheduleSummaryTable.Data(),LocalColumn,column,dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() );
       attrbutes := construct( Strings );
       if( cbShiftPlan.Checked() ){
         attrbutes.Add( "ShiftPattern" ); 
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonDown_478_bImportOutput_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonDown_478_bImportOutput_OnClick.def
index a1b7d39..6aa27cf 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonDown_478_bImportOutput_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonDown_478_bImportOutput_OnClick.def
@@ -41,7 +41,7 @@
       macroPlans := ApplicationMacroPlanner.GetLoadedMacroPlans();
       table := MP_Cell_ScheduleSummary::CreateFullTable( macroPlans,RecycleBin ,Archive, MacroPlan );
       
-      dhTable.Data( table );
+      dhScheduleSummaryTable.Data( table );
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonDown_478_dhAsyncFlag_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonDown_478_dhAsyncFlag_OnDataChanged.def
new file mode 100644
index 0000000..019eb35
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonDown_478_dhAsyncFlag_OnDataChanged.def
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: pRibbonDown_478/dhAsyncFlag
+Response OnDataChanged () id:Response_pRibbonDown_dhAsyncFlag_OnDataChanged
+{
+  #keys: '[414996.1.214519509]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
+  GroupServerCalls: true
+  QuillAction
+  {
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonUp_88_bCreateBaseData_OnClick\04388.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonUp_88_bCreateBaseData_OnClick\04388.def"
index 945c6fc..a2d95f6 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonUp_88_bCreateBaseData_OnClick\04388.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonUp_88_bCreateBaseData_OnClick\04388.def"
@@ -9,8 +9,8 @@
   {
     Body:
     [*
-      MP_Table::CreateMP_Tables_ScheduleSummary( ApplicationMacroPlanner.GetLoadedMacroPlans() );
-      WebMessageBox::Success( "Success" );
+      macroPlanMDSIDs := ApplicationMacroPlanner.GetMacroPlanMDSIDsByName( "璁″垝姹囨��" );
+      MP_Cell_ScheduleSummary::AsyncCreateTables( macroPlanMDSIDs );
     *]
     GroupServerCalls: false
   }
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonUp_88_bCreateFullTable_OnClick\04371.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonUp_88_bCreateFullTable_OnClick\04371.def"
index 9518a21..a7ef49f 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonUp_88_bCreateFullTable_OnClick\04371.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pRibbonUp_88_bCreateFullTable_OnClick\04371.def"
@@ -9,12 +9,9 @@
   {
     Body:
     [*
-      macroPlans := ApplicationMacroPlanner.GetLoadedMacroPlans();
-      table := MP_Cell_ScheduleSummary::CreateFullTable( macroPlans,RecycleBin ,Archive, MacroPlan );
+      macroPlanMDSIDs := ApplicationMacroPlanner.GetMacroPlanMDSIDsByName( "璁″垝姹囨��" );
       
-      dhTable.Data( table );
-      
-      WebMessageBox::Success( "Success" );
+      MP_Cell_ScheduleSummary::AsyncCreateFullTable( macroPlanMDSIDs,RecycleBin,Archive, MacroPlan );
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhScheduleSummaryTable_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhScheduleSummaryTable_OnCreated.def
new file mode 100644
index 0000000..b725c83
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhScheduleSummaryTable_OnCreated.def
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: pScheduleSummary/dhScheduleSummaryTable
+Response OnCreated () id:Response_pScheduleSummary_dhScheduleSummaryTable_OnCreated
+{
+  #keys: '[412672.1.96380911]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  GroupServerCalls: true
+  QuillAction
+  {
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhTable_OnDataChanged\043906.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhScheduleSummaryTable_OnDataChanged\043906.def"
similarity index 64%
rename from "_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhTable_OnDataChanged\043906.def"
rename to "_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhScheduleSummaryTable_OnDataChanged\043906.def"
index 38218f2..de3925a 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhTable_OnDataChanged\043906.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhScheduleSummaryTable_OnDataChanged\043906.def"
@@ -1,6 +1,6 @@
 Quintiq file version 2.0
-#parent: pScheduleSummary/dhTable
-Response OnDataChanged () id:Response_pScheduleSummary_dhTable_OnDataChanged_906
+#parent: pScheduleSummary/dhScheduleSummaryTable
+Response OnDataChanged () id:Response_pScheduleSummary_dhScheduleSummaryTable_OnDataChanged_906
 {
   #keys: '[412672.1.99700929]'
   CanBindMultiple: false
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhTable_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhTable_OnCreated.def
deleted file mode 100644
index 820aa1c..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_pScheduleSummary_dhTable_OnCreated.def
+++ /dev/null
@@ -1,12 +0,0 @@
-Quintiq file version 2.0
-#parent: pScheduleSummary/dhTable
-Response OnCreated () id:Response_pScheduleSummary_dhTable_OnCreated
-{
-  #keys: '[412672.1.96380911]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebComponent_OnCreated'
-  GroupServerCalls: true
-  QuillAction
-  {
-  }
-}

--
Gitblit v1.9.3