From 9ee4859010d71856ff97a3fb87f2aae1b6ae48f1 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期三, 04 九月 2024 16:15:56 +0800
Subject: [PATCH] 修复需求对比的一些bug

---
 _Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl                                                               |    8 --
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def             |   10 ++-
 _Main/BL/Type_ArchivePP/Method_Filter.qbl                                                                                              |   13 ++++
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarPageReport_dhDateUnitPP_OnCreated.def     |   16 +++++
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def                     |   12 ++-
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def                                                  |    4 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarPageReport_dhDateUnitBudget_OnCreated.def |   16 +++++
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_DropDownListBaseVersionPP_OnSelectionChanged.def      |    2 
 _Main/BL/Type_Test/StaticMethod_Test.qbl                                                                                               |   36 ++++-------
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def                                              |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelSelection.def                                                |   10 ---
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPageReport.def                                        |   20 ++++++
 _Main/BL/Type_ArchiveBudget/Method_Filter.qbl                                                                                          |   13 ++++
 13 files changed, 110 insertions(+), 54 deletions(-)

diff --git a/_Main/BL/Type_ArchiveBudget/Method_Filter.qbl b/_Main/BL/Type_ArchiveBudget/Method_Filter.qbl
new file mode 100644
index 0000000..f82533d
--- /dev/null
+++ b/_Main/BL/Type_ArchiveBudget/Method_Filter.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Method Filter (
+  const ArchiveBudget baseVersion,
+  String dateUnit
+) const declarative remote as Boolean
+{
+  TextBody:
+  [*
+    // Akari Sep-4-2024 (created)
+    return this <> baseVersion and this.Name().LikeUserLocale( dateUnit );
+  *]
+}
diff --git a/_Main/BL/Type_ArchivePP/Method_Filter.qbl b/_Main/BL/Type_ArchivePP/Method_Filter.qbl
new file mode 100644
index 0000000..f1f9552
--- /dev/null
+++ b/_Main/BL/Type_ArchivePP/Method_Filter.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Method Filter (
+  const ArchivePP baseVersion,
+  String dateUnit
+) const declarative remote as Boolean
+{
+  TextBody:
+  [*
+    // Akari Sep-4-2024 (created)
+    return this <> baseVersion and this.Name().LikeUserLocale( dateUnit );
+  *]
+}
diff --git a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl
index 6f998db..188515f 100644
--- a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl
+++ b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl
@@ -105,14 +105,6 @@
              workingDay := workingDay + cell.WorkingDay();
              capacity := capacity + cell.Capacity();
              
-    //         shiftPatternHanlde := shiftPatternCount.GetHandle( cell.ShiftPattern() );
-    //         shiftPatternCountValue := guard( shiftPatternCount.Root().Child( shiftPatternHanlde ),null( NamedValue ));
-    //         if( isnull( shiftPatternCountValue )){
-    //           shiftPatternCount.Root().AddChild( shiftPatternHanlde,1 );
-    //         }else{
-    //           shiftPatternCountValue.SetValue( shiftPatternCountValue.GetValueAsNumber() + 1 );
-    //         }
-             
              if( maxShiftPattern <> cell.ShiftPattern() ){
                if( maxShiftPatternCount = 0 ){
                   maxShiftPattern := cell.ShiftPattern();
diff --git a/_Main/BL/Type_Test/StaticMethod_Test.qbl b/_Main/BL/Type_Test/StaticMethod_Test.qbl
index 3b45a67..a1d7e18 100644
--- a/_Main/BL/Type_Test/StaticMethod_Test.qbl
+++ b/_Main/BL/Type_Test/StaticMethod_Test.qbl
@@ -10,29 +10,21 @@
 {
   TextBody:
   [*
-    //name := "2020/04/01";
-    //names := name.Tokenize( "/" );
-    //  info( guard( Date::Construct( [Number]names.Element( 0 ),[Number]names.Element( 1 ),[Number]names.Element( 2 )),Date::MinDate() ));
+    archive.ArchivePP( relflush );
+    archive.ArchiveBudget( relflush );
     
-    //traverse( archive,ScheduleSummaryOutputLine,line ){
-    //  info( line.LineName() );
-    //  traverse( line,ScheduleSummaryOutputData,data ){
-    //    info( data.Date().Format( "Y-M2-D2 ") + " ->" + [String]data.Output() );
-    //  } 
-    //}
+    archive.ArchivePP( relnew,Name := "2025 M" )
+    archive.ArchivePP( relnew,Name := "2025 W" )
+    archive.ArchivePP( relnew,Name := "2026 M" )
+    archive.ArchivePP( relnew,Name := "2026 W" )
+    archive.ArchivePP( relnew,Name := "2027 M" )
+    archive.ArchivePP( relnew,Name := "2027 W" )
     
-    //table := select( macroPlan,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
-    //if( not isnull( table )){
-    //  table.Delete(); 
-    //}
-    
-    
-    
-    archiveExecutionStatus.RequirementImportExecutionStatus( relnew, 
-                                                             ExecutionCode        := 500,
-                                                             ExecutionIsSuccess   := false,
-                                                             ExecutionRespMessage := "11111",
-                                                             ExecutionStatus      := "Complete",
-                                                             ExecutionUserName    := "vwedadmin" );
+    archive.ArchiveBudget( relnew,Name := "2025 M" )
+    archive.ArchiveBudget( relnew,Name := "2025 W" )
+    archive.ArchiveBudget( relnew,Name := "2026 M" )
+    archive.ArchiveBudget( relnew,Name := "2026 W" )
+    archive.ArchiveBudget( relnew,Name := "2027 M" )
+    archive.ArchiveBudget( relnew,Name := "2027 W" )
   *]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPageReport.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPageReport.def
index 747c7e2..a9e718b 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPageReport.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPageReport.def
@@ -6,6 +6,26 @@
   Children:
   [
     #child: ActionBarGroupReport
+    Component dhDateUnitPP
+    {
+      #keys: '[414996.1.62800785]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'String*'
+      Properties:
+      [
+        Taborder: 1
+      ]
+    }
+    Component dhDateUnitBudget
+    {
+      #keys: '[414996.1.63951151]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'String*'
+      Properties:
+      [
+        Taborder: 2
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarPageReport_dhDateUnitBudget_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarPageReport_dhDateUnitBudget_OnCreated.def
new file mode 100644
index 0000000..72a696b
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarPageReport_dhDateUnitBudget_OnCreated.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ActionBarPageReport/dhDateUnitBudget
+Response OnCreated () id:Response_MacroPlanner_ActionBarPageReport_dhDateUnitBudget_OnCreated
+{
+  #keys: '[414996.1.63951149]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      this.Data( "M" );
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarPageReport_dhDateUnitPP_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarPageReport_dhDateUnitPP_OnCreated.def
new file mode 100644
index 0000000..19235fe
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarPageReport_dhDateUnitPP_OnCreated.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ActionBarPageReport/dhDateUnitPP
+Response OnCreated () id:Response_MacroPlanner_ActionBarPageReport_dhDateUnitPP_OnCreated
+{
+  #keys: '[414996.1.64299345]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      this.Data( "M" );
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelSelection.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelSelection.def
index 6e39dc5..51b4cfe 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelSelection.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelSelection.def
@@ -12,16 +12,6 @@
     #child: pSelectionCurve
     #child: pSelectionPP
     #child: PanelSelectionChecks
-    Component dhDateUnit
-    {
-      #keys: '[414996.1.58048570]'
-      BaseType: 'WebDataHolder'
-      Databinding: 'String*'
-      Properties:
-      [
-        Taborder: 7
-      ]
-    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def
index 0c2a781..7823f63 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def
@@ -57,8 +57,8 @@
           Properties:
           [
             DataType: 'Archive'
-            FilterArguments: 'baseSelection:QMacroPlanner::FormDemandComparison.dhBaseVersionBudget;dateUnit:QMacroPlanner::FormDemandComparison.dhDateUnit'
-            FixedFilter: 'object <> baseSelection and object.Name().LikeUserLocale( dateUnit )'
+            FilterArguments: 'baseSelection:QMacroPlanner::FormDemandComparison.dhBaseVersionBudget;dateUnit:QLibMacroPlannerWebUI::ApplicationMacroPlanner.ActionBarMacroPlanner.dhDateUnitBudget'
+            FixedFilter: 'object.Filter( baseSelection,dateUnit )'
             Source: 'Archive'
             Taborder: 0
             Transformation: 'ArchiveBudget'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def
index e2a2f25..5fcce35 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def
@@ -57,8 +57,8 @@
           Properties:
           [
             DataType: 'Archive'
-            FilterArguments: 'baseSelection:QMacroPlanner::FormDemandComparison.dhBaseVersionPP;dateUnit:QMacroPlanner::FormDemandComparison.dhDateUnit'
-            FixedFilter: 'object <> baseSelection and object.Name().LikeUserLocale( dateUnit )'
+            FilterArguments: 'baseSelection:QMacroPlanner::FormDemandComparison.dhBaseVersionPP;dateUnit:QLibMacroPlannerWebUI::ApplicationMacroPlanner.ActionBarMacroPlanner.dhDateUnitPP'
+            FixedFilter: 'object.Filter( baseSelection,dateUnit )'
             Source: 'Archive'
             Taborder: 0
             Transformation: 'ArchivePP'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def
index 7efaf4f..e3c760f 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def
@@ -10,10 +10,12 @@
   {
     Body:
     [*
-      if( this.Name().LikeUserLocale( "M" )){
-        dhDateUnit.Data( "M" );
-      }else{
-        dhDateUnit.Data( "W" );
+      if( not isnull( this.Data())){
+        if( this.Data().Name().LikeUserLocale( "M" )){
+          dhDateUnitBudget.Data( "M" ); 
+        }else{
+          dhDateUnitBudget.Data( "W" );
+        }
       }
     *]
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_DropDownListBaseVersionPP_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_DropDownListBaseVersionPP_OnSelectionChanged.def
index f49972f..adeff4f 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_DropDownListBaseVersionPP_OnSelectionChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_DropDownListBaseVersionPP_OnSelectionChanged.def
@@ -4,7 +4,7 @@
   ArchivePP selection
 ) id:Response_pSelectionPP_DropDownListBaseVersionPP_OnSelectionChanged
 {
-  #keys: '[412672.0.1109211873]'
+  #keys: '[414996.1.62811858]'
   CanBindMultiple: false
   DefinitionID: 'Responsedef_WebDropDownList_OnSelectionChanged'
   GroupServerCalls: true
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def
index 6033e79..9a1bc55 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def
@@ -5,16 +5,18 @@
   #keys: '[414996.1.55350834]'
   CanBindMultiple: false
   DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
-  GroupServerCalls: true
   QuillAction
   {
     Body:
     [*
-      if( this.Name().LikeUserLocale( "M" )){
-        dhDateUnit.Data( "M" );
-      }else{
-        dhDateUnit.Data( "W" );
+      if( not isnull( this.Data())){
+        if( this.Data().Name().LikeUserLocale( "M" )){
+          dhDateUnitPP.Data( "M" ); 
+        }else{
+          dhDateUnitPP.Data( "W" );
+        }
       }
     *]
+    GroupServerCalls: false
   }
 }

--
Gitblit v1.9.3