From b624f1264276a00a1c6407fdd80ef27118615d8b Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期四, 21 十一月 2024 18:22:57 +0800
Subject: [PATCH] 添加班次计划存档

---
 _Main/UI/MacroPlannerWebApp/Views/ActualDailyProduction.vw                                                                         |  226 +++++++++++++++++++++++++
 _Main/BL/Type_InterfaceDataset/Method_GenerateArchiveData.qbl                                                                      |    3 
 _Main/BL/Relations/Relation_ArchiveShiftPlanCell_ArchiveShiftPlanRow_ArchiveShiftPlanRow_Archiv.qbl                                |   23 ++
 _Main/BL/Relations/Relation_ArchiveShiftPlanColumn_Archive_Archive_ArchiveShiftPlanColumn.qbl                                      |   23 ++
 _Main/BL/Type_ArchiveShiftPlanColumn/Attribute_StartDate.qbl                                                                       |    7 
 _Main/BL/Type_ArchiveShiftPlanCell/Attribute_Outcome.qbl                                                                           |    7 
 _Main/BL/Type_ArchiveShiftPlanColumn/_ROOT_Type_ArchiveShiftPlanColumn.qbl                                                         |    9 +
 _Main/BL/Relations/Relation_ArchiveShiftPlanRow_Archive_Archive_ArchiveShiftPlanRow.qbl                                            |   23 ++
 _Main/BL/Type_ArchiveShiftPlanRow/Attribute_UnitID.qbl                                                                             |    7 
 _Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_PanelDispatchShiftSchedulingInformation.def |    1 
 _Main/BL/Relations/Relation_ArchiveShiftPlanCell_ArchiveShiftPlanColumn_ArchiveShiftPlanColumn_.qbl                                |   23 ++
 _Main/BL/Type_ArchiveShiftPlanCell/_ROOT_Type_ArchiveShiftPlanCell.qbl                                                             |    9 +
 _Main/BL/Type_ArchiveShiftPlanCell/Attribute_Remark.qbl                                                                            |    7 
 _Main/BL/Type_TransferPlanCell0/StaticMethod_Archive.qbl                                                                           |    2 
 _Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_Outcome.qbl                                                                        |    6 
 _Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_EventType.qbl                                                                      |    6 
 _Main/BL/Type_ArchiveShiftPlanCell/Attribute_EventType.qbl                                                                         |    7 
 _Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_Remark.qbl                                                                         |    6 
 _Main/BL/Type_ArchiveShiftPlanCell/StaticMethod_Archive.qbl                                                                        |   90 ++++++++++
 _Main/BL/Type_ArchiveShiftPlanRow/_ROOT_Type_ArchiveShiftPlanRow.qbl                                                               |    9 +
 _Main/BL/Type_ArchiveShiftPlanCell/Attribute_IsHoliday.qbl                                                                         |    7 
 _Main/BL/Type_ArchivePackagingPlanCell/StaticMethod_Archive.qbl                                                                    |   17 -
 22 files changed, 501 insertions(+), 17 deletions(-)

diff --git a/_Main/BL/Relations/Relation_ArchiveShiftPlanCell_ArchiveShiftPlanColumn_ArchiveShiftPlanColumn_.qbl b/_Main/BL/Relations/Relation_ArchiveShiftPlanCell_ArchiveShiftPlanColumn_ArchiveShiftPlanColumn_.qbl
new file mode 100644
index 0000000..716bc34
--- /dev/null
+++ b/_Main/BL/Relations/Relation_ArchiveShiftPlanCell_ArchiveShiftPlanColumn_ArchiveShiftPlanColumn_.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation ArchiveShiftPlanCell_ArchiveShiftPlanColumn_ArchiveShiftPlanColumn_ArchiveShiftPlanCell
+{
+  #keys: '1[414996.1.241024779]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide ArchiveShiftPlanColumn
+  {
+    #keys: '3[414996.1.241024781][414996.1.241024780][414996.1.241024782]'
+    Cardinality: '0to1'
+    ObjectDefinition: ArchiveShiftPlanCell
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide ArchiveShiftPlanCell
+  {
+    #keys: '3[414996.1.241024784][414996.1.241024783][414996.1.241024785]'
+    Cardinality: '1toN'
+    ObjectDefinition: ArchiveShiftPlanColumn
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_ArchiveShiftPlanCell_ArchiveShiftPlanRow_ArchiveShiftPlanRow_Archiv.qbl b/_Main/BL/Relations/Relation_ArchiveShiftPlanCell_ArchiveShiftPlanRow_ArchiveShiftPlanRow_Archiv.qbl
new file mode 100644
index 0000000..53a46eb
--- /dev/null
+++ b/_Main/BL/Relations/Relation_ArchiveShiftPlanCell_ArchiveShiftPlanRow_ArchiveShiftPlanRow_Archiv.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation ArchiveShiftPlanCell_ArchiveShiftPlanRow_ArchiveShiftPlanRow_ArchiveShiftPlanCell
+{
+  #keys: '1[414996.1.241024792]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide ArchiveShiftPlanRow
+  {
+    #keys: '3[414996.1.241024794][414996.1.241024793][414996.1.241024795]'
+    Cardinality: '0to1'
+    ObjectDefinition: ArchiveShiftPlanCell
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide ArchiveShiftPlanCell
+  {
+    #keys: '3[414996.1.241024797][414996.1.241024796][414996.1.241024798]'
+    Cardinality: '1toN'
+    ObjectDefinition: ArchiveShiftPlanRow
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_ArchiveShiftPlanColumn_Archive_Archive_ArchiveShiftPlanColumn.qbl b/_Main/BL/Relations/Relation_ArchiveShiftPlanColumn_Archive_Archive_ArchiveShiftPlanColumn.qbl
new file mode 100644
index 0000000..e975786
--- /dev/null
+++ b/_Main/BL/Relations/Relation_ArchiveShiftPlanColumn_Archive_Archive_ArchiveShiftPlanColumn.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation ArchiveShiftPlanColumn_Archive_Archive_ArchiveShiftPlanColumn
+{
+  #keys: '1[414996.1.241024814]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Archive
+  {
+    #keys: '3[414996.1.241024816][414996.1.241024815][414996.1.241024817]'
+    Cardinality: '0to1'
+    ObjectDefinition: ArchiveShiftPlanColumn
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide ArchiveShiftPlanColumn
+  {
+    #keys: '3[414996.1.241024819][414996.1.241024818][414996.1.241024820]'
+    Cardinality: '1toN'
+    ObjectDefinition: Archive
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_ArchiveShiftPlanRow_Archive_Archive_ArchiveShiftPlanRow.qbl b/_Main/BL/Relations/Relation_ArchiveShiftPlanRow_Archive_Archive_ArchiveShiftPlanRow.qbl
new file mode 100644
index 0000000..c6d6061
--- /dev/null
+++ b/_Main/BL/Relations/Relation_ArchiveShiftPlanRow_Archive_Archive_ArchiveShiftPlanRow.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation ArchiveShiftPlanRow_Archive_Archive_ArchiveShiftPlanRow
+{
+  #keys: '1[414996.1.241024827]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Archive
+  {
+    #keys: '3[414996.1.241024829][414996.1.241024828][414996.1.241024830]'
+    Cardinality: '0to1'
+    ObjectDefinition: ArchiveShiftPlanRow
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide ArchiveShiftPlanRow
+  {
+    #keys: '3[414996.1.241024832][414996.1.241024831][414996.1.241024833]'
+    Cardinality: '1toN'
+    ObjectDefinition: Archive
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Type_ArchivePackagingPlanCell/StaticMethod_Archive.qbl b/_Main/BL/Type_ArchivePackagingPlanCell/StaticMethod_Archive.qbl
index 995a324..f58ef62 100644
--- a/_Main/BL/Type_ArchivePackagingPlanCell/StaticMethod_Archive.qbl
+++ b/_Main/BL/Type_ArchivePackagingPlanCell/StaticMethod_Archive.qbl
@@ -8,21 +8,6 @@
   TextBody:
   [*
     // Akari Oct-23-2024 (created)
-    //packagingPlanCells := selectset( macroPlan,PackagingPlanRow.PackagingPlanCell,cell,true );
-    //packagingPlanCellIndexTree := NamedValueTree::Create();
-    //for( i := 0; i < packagingPlanCells.Size(); i++ ){
-    //  packagingPlanCell := packagingPlanCells.Element( i );
-    //  packagingPlanRow := packagingPlanCell.PackagingPlanRow();
-    //  packagingPlanColumn := packagingPlanCell.PackagingPlanColumn();
-    //  
-    //  packagingPlanRowKey := packagingPlanRow.Category() + packagingPlanRow.Factory() + packagingPlanRow.ProductID() + packagingPlanRow.StockingPointID();
-    //  packagingPlanColumnKey := packagingPlanColumn.StartDate().AsQUILL();
-    //  packagingPlanCellKey := packagingPlanRowKey + packagingPlanColumnKey;
-    //  packagingPlanCellHandle := packagingPlanCellIndexTree.GetHandle( packagingPlanCellKey );
-    //  
-    //  packagingPlanCellIndexTree.Root().AddChild( packagingPlanCellHandle,i );
-    //}
-    
     archivePackagingPlanCells := selectset( archive,ArchivePackagingPlanRow.ArchivePackagingPlanCell,cell,true );
     archivePackagingPlanCellIndexTree := NamedValueTree::Create();
     for( i := 0; i < archivePackagingPlanCells.Size(); i++ ){
@@ -56,7 +41,7 @@
       archivePackagingPlanColumnIndexTree.Root().AddChild( archivePackagingPlanColumnHandle,i );
     }
     
-    traverse( macroPlan,PackagingPlanRow.PackagingPlanCell,packagingPlanCell ){
+    traverse( macroPlan,PackagingPlanRow.PackagingPlanCell,packagingPlanCell,packagingPlanCell.PackagingPlanColumn().StartDate() >= macroPlan.StartOfPlanning().Date() ){
       packagingPlanRow := packagingPlanCell.PackagingPlanRow();
       packagingPlanColumn := packagingPlanCell.PackagingPlanColumn();
       packagingPlanRowKey := packagingPlanRow.Category() + packagingPlanRow.Factory() + packagingPlanRow.ProductID() + packagingPlanRow.StockingPointID();
diff --git a/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_EventType.qbl b/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_EventType.qbl
new file mode 100644
index 0000000..75d0998
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_EventType.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute EventType
+{
+  #keys: '3[414996.1.241024753][414996.1.241024752][414996.1.241024754]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_IsHoliday.qbl b/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_IsHoliday.qbl
new file mode 100644
index 0000000..02e4da7
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_IsHoliday.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsHoliday
+{
+  #keys: '3[414996.1.241024747][414996.1.241024746][414996.1.241024748]'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_Outcome.qbl b/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_Outcome.qbl
new file mode 100644
index 0000000..bd95fdf
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_Outcome.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Outcome
+{
+  #keys: '3[414996.1.241024759][414996.1.241024758][414996.1.241024760]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_Remark.qbl b/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_Remark.qbl
new file mode 100644
index 0000000..219e3a6
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanCell/Attribute_Remark.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Remark
+{
+  #keys: '3[414996.1.241024756][414996.1.241024755][414996.1.241024757]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_EventType.qbl b/_Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_EventType.qbl
new file mode 100644
index 0000000..2f4dc09
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_EventType.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: EventType
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_Outcome.qbl b/_Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_Outcome.qbl
new file mode 100644
index 0000000..b26067a
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_Outcome.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Outcome
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_Remark.qbl b/_Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_Remark.qbl
new file mode 100644
index 0000000..b7df04c
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanCell/DefaultValue_Remark.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Remark
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanCell/StaticMethod_Archive.qbl b/_Main/BL/Type_ArchiveShiftPlanCell/StaticMethod_Archive.qbl
new file mode 100644
index 0000000..c40fdbc
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanCell/StaticMethod_Archive.qbl
@@ -0,0 +1,90 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Archive (
+  const MacroPlan macroPlan,
+  Archive archive
+)
+{
+  TextBody:
+  [*
+    // Akari Oct-23-2024 (created)
+    archiveShiftPlanCells := selectset( archive,ArchiveShiftPlanRow.ArchiveShiftPlanCell,cell,true );
+    archiveShiftPlanCellIndexTree := NamedValueTree::Create();
+    for( i := 0; i < archiveShiftPlanCells.Size(); i++ ){
+      archiveShiftPlanCell := archiveShiftPlanCells.Element( i );
+      archiveShiftPlanRow := archiveShiftPlanCell.ArchiveShiftPlanRow();
+      archiveShiftPlanColumn := archiveShiftPlanCell.ArchiveShiftPlanColumn();
+      
+      archiveShiftPlanRowKey := archiveShiftPlanRow.UnitID();
+      archiveShiftPlanColumnKey := archiveShiftPlanColumn.StartDate().AsQUILL();
+      archiveShiftPlanCellKey := archiveShiftPlanRowKey + archiveShiftPlanColumnKey;
+      archiveShiftPlanCellHandle := archiveShiftPlanCellIndexTree.GetHandle( archiveShiftPlanCellKey );
+      
+      archiveShiftPlanCellIndexTree.Root().AddChild( archiveShiftPlanCellHandle,i );
+    }
+    
+    archiveShiftPlanRows := selectset( archive,ArchiveShiftPlanRow,row,true );
+    archiveShiftPlanRowIndexTree := NamedValueTree::Create();
+    for( i := 0; i < archiveShiftPlanRows.Size(); i++ ){
+      archiveShiftPlanRow := archiveShiftPlanRows.Element( i );
+      archiveShiftPlanRowKey := archiveShiftPlanRow.UnitID();
+      archiveShiftPlanRowHandle := archiveShiftPlanRowIndexTree.GetHandle( archiveShiftPlanRowKey );
+      archiveShiftPlanRowIndexTree.Root().AddChild( archiveShiftPlanRowHandle,i );
+    }
+    
+    archiveShiftPlanColumns := selectset( archive,ArchiveShiftPlanColumn,row,true );
+    archiveShiftPlanColumnIndexTree := NamedValueTree::Create();
+    for( i := 0; i < archiveShiftPlanColumns.Size(); i++ ){
+      archiveShiftPlanColumn := archiveShiftPlanColumns.Element( i );
+      archiveShiftPlanColumnKey := archiveShiftPlanColumn.StartDate().AsQUILL();
+      archiveShiftPlanColumnHandle := archiveShiftPlanColumnIndexTree.GetHandle( archiveShiftPlanColumnKey );
+      archiveShiftPlanColumnIndexTree.Root().AddChild( archiveShiftPlanColumnHandle,i );
+    }
+    
+    traverse( macroPlan,Unit.UnitPeriod.astype( UnitPeriodTime ).ShiftPlan,shiftPlanCell,shiftPlanCell.UnitPeriodTime().Period_MP().StartDate() >= macroPlan.StartOfPlanning().Date() ){
+      shiftPlanRow := shiftPlanCell.UnitPeriodTime().Unit();
+      shiftPlanColumn := shiftPlanCell.UnitPeriodTime().Period_MP();
+      shiftPlanRowKey := shiftPlanRow.ID();
+      shiftPlanColumnKey := shiftPlanColumn.StartDate().AsQUILL();
+      shiftPlanCellKey := shiftPlanRowKey + shiftPlanColumnKey;
+      
+      archiveShiftPlanCell := null( ArchiveShiftPlanCell );
+      archiveShiftPlanCellHandle := archiveShiftPlanCellIndexTree.GetHandle( shiftPlanCellKey );
+      archiveShiftPlanCellIndex := guard( archiveShiftPlanCellIndexTree.Root().Child( archiveShiftPlanCellHandle ),null( NamedValue ) );
+      if( isnull( archiveShiftPlanCellIndex )){
+        archiveShiftPlanRow := null( ArchiveShiftPlanRow );
+        archiveShiftPlanRowHandle := archiveShiftPlanRowIndexTree.GetHandle( shiftPlanRowKey );
+        archiveShiftPlanRowIndex := guard( archiveShiftPlanRowIndexTree.Root().Child( archiveShiftPlanRowHandle ),null( NamedValue ));
+        if( isnull( archiveShiftPlanRowIndex )){
+          archiveShiftPlanRow := archive.ArchiveShiftPlanRow( relnew,UnitID := shiftPlanRow.ID() );
+          archiveShiftPlanRows.Add( archiveShiftPlanRow );
+          archiveShiftPlanRowIndexTree.Root().AddChild( archiveShiftPlanRowHandle,archiveShiftPlanRows.Size() - 1 );
+        }else{
+          archiveShiftPlanRow := archiveShiftPlanRows.Element( archiveShiftPlanRowIndex.GetValueAsNumber() ); 
+        }
+        
+        archiveShiftPlanColumn := null( ArchiveShiftPlanColumn );
+        archiveShiftPlanColumnHandle := archiveShiftPlanColumnIndexTree.GetHandle( shiftPlanColumnKey );
+        archiveShiftPlanColumnIndex := guard( archiveShiftPlanColumnIndexTree.Root().Child( archiveShiftPlanColumnHandle ),null( NamedValue ));
+        if( isnull( archiveShiftPlanColumnIndex )){
+          archiveShiftPlanColumn := archive.ArchiveShiftPlanColumn( relnew,StartDate := shiftPlanColumn.StartDate() );
+          archiveShiftPlanColumns.Add( archiveShiftPlanColumn );
+          archiveShiftPlanColumnIndexTree.Root().AddChild( archiveShiftPlanColumnHandle,archiveShiftPlanColumns.Size() - 1 );
+        }else{
+          archiveShiftPlanColumn := archiveShiftPlanColumns.Element( archiveShiftPlanColumnIndex.GetValueAsNumber() ); 
+        }
+        
+        archiveShiftPlanCell := archiveShiftPlanRow.ArchiveShiftPlanCell( relnew,ArchiveShiftPlanColumn := archiveShiftPlanColumn );
+        archiveShiftPlanCells.Add( archiveShiftPlanCell );
+        archiveShiftPlanCellIndexTree.Root().AddChild( archiveShiftPlanCellHandle,archiveShiftPlanCells.Size() - 1 );
+      }else{
+        archiveShiftPlanCell := archiveShiftPlanCells.Element( archiveShiftPlanCellIndex.GetValueAsNumber());
+      }
+      
+      archiveShiftPlanCell.EventType( shiftPlanCell.EventType());
+      archiveShiftPlanCell.IsHoliday( shiftPlanCell.IsHoliday() );
+      archiveShiftPlanCell.Outcome( shiftPlanCell.Outcome() );
+      archiveShiftPlanCell.Remark( shiftPlanCell.Remark() );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanCell/_ROOT_Type_ArchiveShiftPlanCell.qbl b/_Main/BL/Type_ArchiveShiftPlanCell/_ROOT_Type_ArchiveShiftPlanCell.qbl
new file mode 100644
index 0000000..4eac1a5
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanCell/_ROOT_Type_ArchiveShiftPlanCell.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type ArchiveShiftPlanCell
+{
+  #keys: '5[414996.1.241024730][414996.1.241024728][0.0.0][414996.1.241024729][414996.1.241024731]'
+  BaseType: Object
+  StructuredName: 'ArchiveShiftPlanCells'
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanColumn/Attribute_StartDate.qbl b/_Main/BL/Type_ArchiveShiftPlanColumn/Attribute_StartDate.qbl
new file mode 100644
index 0000000..ec059fa
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanColumn/Attribute_StartDate.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute StartDate
+{
+  #keys: '3[414996.1.241024850][414996.1.241024849][414996.1.241024851]'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanColumn/_ROOT_Type_ArchiveShiftPlanColumn.qbl b/_Main/BL/Type_ArchiveShiftPlanColumn/_ROOT_Type_ArchiveShiftPlanColumn.qbl
new file mode 100644
index 0000000..15ad217
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanColumn/_ROOT_Type_ArchiveShiftPlanColumn.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type ArchiveShiftPlanColumn
+{
+  #keys: '5[414996.1.241024735][414996.1.241024733][0.0.0][414996.1.241024734][414996.1.241024736]'
+  BaseType: Object
+  StructuredName: 'ArchiveShiftPlanColumns'
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanRow/Attribute_UnitID.qbl b/_Main/BL/Type_ArchiveShiftPlanRow/Attribute_UnitID.qbl
new file mode 100644
index 0000000..56301a1
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanRow/Attribute_UnitID.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute UnitID
+{
+  #keys: '3[414996.1.240980054][414996.1.240980053][414996.1.240980055]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_ArchiveShiftPlanRow/_ROOT_Type_ArchiveShiftPlanRow.qbl b/_Main/BL/Type_ArchiveShiftPlanRow/_ROOT_Type_ArchiveShiftPlanRow.qbl
new file mode 100644
index 0000000..f1cae4d
--- /dev/null
+++ b/_Main/BL/Type_ArchiveShiftPlanRow/_ROOT_Type_ArchiveShiftPlanRow.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type ArchiveShiftPlanRow
+{
+  #keys: '5[414996.1.241024740][414996.1.241024738][0.0.0][414996.1.241024739][414996.1.241024741]'
+  BaseType: Object
+  StructuredName: 'ArchiveShiftPlanRows'
+}
diff --git a/_Main/BL/Type_InterfaceDataset/Method_GenerateArchiveData.qbl b/_Main/BL/Type_InterfaceDataset/Method_GenerateArchiveData.qbl
index 9f326d0..c3724e2 100644
--- a/_Main/BL/Type_InterfaceDataset/Method_GenerateArchiveData.qbl
+++ b/_Main/BL/Type_InterfaceDataset/Method_GenerateArchiveData.qbl
@@ -24,6 +24,7 @@
       OfflinePlanArchiveVersion::RefreshData( this, macroplan, archive );
     }
     if( isshiftplan ){//鐝璁″垝
+      ArchiveShiftPlanCell::Archive( macroplan,archive );
     //  CustomerDemandIDS::GenerateData( this, recyclebin, archive );
     }
     if( isassembleonlineplan ){//瑁呴厤涓婄嚎璁″垝
@@ -36,9 +37,11 @@
     //  CustomerDemandIDS::GenerateData( this, recyclebin, archive );
     }
     if( istransferplan ){//璋冩嫧璁″垝
+      ArchiveTransferPlanCell::Archive( macroplan,archive );
     //  CustomerDemandIDS::GenerateData( this, recyclebin, archive );
     }
     if( ispackageplan ){//鍖呰璁″垝
+      ArchivePackagingPlanCell::Archive( macroplan,archive );
     //  CustomerDemandIDS::GenerateData( this, recyclebin, archive );
     }
   *]
diff --git a/_Main/BL/Type_TransferPlanCell0/StaticMethod_Archive.qbl b/_Main/BL/Type_TransferPlanCell0/StaticMethod_Archive.qbl
index ccf81c1..4707be8 100644
--- a/_Main/BL/Type_TransferPlanCell0/StaticMethod_Archive.qbl
+++ b/_Main/BL/Type_TransferPlanCell0/StaticMethod_Archive.qbl
@@ -41,7 +41,7 @@
       archiveTransferPlanColumnIndexTree.Root().AddChild( archiveTransferPlanColumnHandle,i );
     }
     
-    traverse( macroPlan,TransferPlanRow.TransferPlanCell,transferPlanCell ){
+    traverse( macroPlan,TransferPlanRow.TransferPlanCell,transferPlanCell,transferPlanCell.TransferPlanColumn().ColumnDate() >= macroPlan.StartOfPlanning().Date() ){
       transferPlanRow := transferPlanCell.TransferPlanRow();
       transferPlanColumn := transferPlanCell.TransferPlanColumn();
       transferPlanRowKey := transferPlanRow.Category() + transferPlanRow.ProductID() + transferPlanRow.SourceStockpoingPointID() + transferPlanRow.TargetStockpoingPointID();
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_PanelDispatchShiftSchedulingInformation.def b/_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_PanelDispatchShiftSchedulingInformation.def
index 6ec5006..08039c7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_PanelDispatchShiftSchedulingInformation.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_PanelDispatchShiftSchedulingInformation.def
@@ -31,6 +31,7 @@
       BaseType: 'WebDateSelector'
       Properties:
       [
+        Date: 9999-12-31
         Label: 'EndDate'
         Taborder: 1
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Views/ActualDailyProduction.vw b/_Main/UI/MacroPlannerWebApp/Views/ActualDailyProduction.vw
new file mode 100644
index 0000000..e840a14
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Views/ActualDailyProduction.vw
@@ -0,0 +1,226 @@
+Quintiq file version 2.0
+{
+  viewcontents
+  {
+    forms
+    {
+      form_FormActualDailyProduction
+      {
+        title: 'QMacroPlanner::FormActualDailyProduction'
+        shown: true
+        componentID: 'QMacroPlanner::FormActualDailyProduction'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 1
+          rowSpan: 25
+          columnPosition: 1
+          columnSpan: 10
+        }
+        components
+        {
+          FormActualDailyProduction_PanelActualDailyProduction
+          {
+            sizeRatio: 1
+          }
+          FormActualDailyProduction_PanelActualDailyProduction912
+          {
+            sizeRatio: 1
+          }
+          FormActualDailyProduction_ListActualDailyProduction
+          {
+          }
+          FormActualDailyProduction_DataSetLevelActualDailyProduction
+          {
+            groupDepth: -1
+            column_ActualOut
+            {
+              columnId: 'ActualOut'
+              dataPath: 'ActualOut'
+              dataType: 'real'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_Fac
+            {
+              columnId: 'Fac'
+              dataPath: 'Fac'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 150
+            }
+            column_LineName
+            {
+              columnId: 'LineName'
+              dataPath: 'LineName'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 150
+            }
+            column_ProductionDate
+            {
+              columnId: 'ProductionDate'
+              dataPath: 'ProductionDate'
+              dataType: 'date'
+              index: 3
+              subtotals: ''
+              width: 150
+            }
+            column_ProductNo
+            {
+              columnId: 'ProductNo'
+              dataPath: 'ProductNo'
+              dataType: 'string'
+              index: 4
+              subtotals: ''
+              width: 150
+            }
+            column_ShiftCode
+            {
+              columnId: 'ShiftCode'
+              dataPath: 'ShiftCode'
+              dataType: 'string'
+              index: 5
+              subtotals: ''
+              width: 150
+            }
+            column_ShiftName
+            {
+              columnId: 'ShiftName'
+              dataPath: 'ShiftName'
+              dataType: 'string'
+              index: 6
+              subtotals: ''
+              width: 150
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 0
+        }
+        components
+        {
+          FormOptimizerPuzzles_ListOptimizerPuzzles
+          {
+          }
+          FormOptimizerPuzzles_DataSetLevelOptimizerPuzzles
+          {
+            groupDepth: -1
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              title: 'All constraints'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              title: 'Name'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: 'Description'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI
+      {
+        title: 'KPI Dashboard'
+        shown: true
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 1
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPISelection'
+          }
+          FormKPI_PanelKPIDashboard
+          {
+            sizeRatio: 1
+          }
+          FormKPI_PanelKPISelection
+          {
+            sizeRatio: 1
+          }
+          FormKPI_ListKPISelection
+          {
+            QuillViewData
+            {
+              Food_KPISetting: 'Cost of sales;Fulfillment;Fulfillment target;Inventory holding cost;Labor cost;Margin;Safety stock;Sales;Sourcing cost;Total CO2 emission;Transportation cost;Volume'
+            }
+          }
+          FormKPI_DataSetLevelKPISelection
+          {
+            groupDepth: -1
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              title: 'All constraints'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              title: 'Name'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+    }
+    userconfigurableinformation
+    {
+    }
+    image: 'RSS'
+    page: ''
+    group: ''
+    index: 0
+    description: ''
+  }
+  formatversion: 2
+  id: 'ActualDailyProduction'
+  name: 'ActualDailyProduction'
+  isglobal: false
+  isroot: true
+}

--
Gitblit v1.9.3