From 152aea9a4acebeab080e795ff8c7e7e74c7bbde5 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期一, 17 六月 2024 09:55:18 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg

---
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlActions.def                               |   40 +++
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_pnlContent.def                              |   25 ++
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_ListUphillRouting_943_MenuCreate_OnClick.def |   19 +
 _Main/BL/Type_LocalTool/_ROOT_Type_LocalTool.qbl                                                                           |    9 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Create#680.def                                  |   18 +
 _Main/BL/Type_UphillRouting/_ROOT_Type_UphillRouting.qbl                                                                   |    9 
 _Main/BL/Type_UphillRouting/Attribute_StartDate.qbl                                                                        |    7 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_listContextMenuUphillRouting#1.def          |   24 ++
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Edit.def                                        |   14 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_listActionBarPageUphillRouting#1.def        |   10 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/_ROOT_Component_DialogCreateEditUphillRouting.def      |   42 +++
 _Main/BL/Type_LocalTool/StaticMethod_IsOverlap.qbl                                                                         |   15 +
 _Main/BL/Type_UphillRouting/StaticMethod_Create.qbl                                                                        |   21 +
 _Main/BL/Type_UphillRouting/StaticMethod_Create#793.qbl                                                                    |   15 +
 _Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuSetUphillRouting_OnClick.def     |   21 +
 _Main/BL/Type_ProductionLineBatchData/Method_verifyEnable.qbl                                                              |    2 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnOk_OnClick.def                  |   20 +
 _Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuSetUnitUphillRouting_OnClick.def |   19 +
 _Main/BL/Type_Routing/Method_Copy.qbl                                                                                      |   39 +++
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Create.def                                      |   12 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/_ROOT_Component_DialogCreateEditUphillRoutings.def    |   20 +
 _Main/BL/Relations/Relation_UphillRouting_CopyRouting_Routing_CopyUphillRouting.qbl                                        |   23 +
 _Main/BL/Type_UphillRouting/Attribute_Percentage.qbl                                                                       |    7 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Method_CreateEditUphillRoutings.def                   |   14 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_ListUphillRouting#943.def                   |   59 ++++
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_OnOK.def                                        |   18 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnCancel_OnClick.def              |   15 +
 _Main/BL/Type_UphillRouting/Attribute_EndDate.qbl                                                                          |    7 
 _Main/BL/Relations/Relation_UphillRouting_Routing_Routing_UphillRouting.qbl                                                |   23 +
 _Main/BL/Type_UphillRouting/StaticMethod_Create#90.qbl                                                                     |   34 ++
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlContent.def                               |   76 ++++++
 _Main/UI/MacroPlannerWebApp/Component_FormRoutings/Component_listContextMenuRoutings.def                                   |   24 +
 32 files changed, 699 insertions(+), 2 deletions(-)

diff --git a/_Main/BL/Relations/Relation_UphillRouting_CopyRouting_Routing_CopyUphillRouting.qbl b/_Main/BL/Relations/Relation_UphillRouting_CopyRouting_Routing_CopyUphillRouting.qbl
new file mode 100644
index 0000000..a6ad716
--- /dev/null
+++ b/_Main/BL/Relations/Relation_UphillRouting_CopyRouting_Routing_CopyUphillRouting.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation UphillRouting_CopyRouting_Routing_CopyUphillRouting
+{
+  #keys: '1[412672.0.1042903929]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide CopyRouting
+  {
+    #keys: '3[412672.0.1042903931][412672.0.1042903930][412672.0.1042903932]'
+    Cardinality: '1toN'
+    ObjectDefinition: UphillRouting
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide CopyUphillRouting
+  {
+    #keys: '3[412672.0.1042903934][412672.0.1042903933][412672.0.1042903935]'
+    Cardinality: '0to1'
+    ObjectDefinition: Routing
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_UphillRouting_Routing_Routing_UphillRouting.qbl b/_Main/BL/Relations/Relation_UphillRouting_Routing_Routing_UphillRouting.qbl
new file mode 100644
index 0000000..1f66f35
--- /dev/null
+++ b/_Main/BL/Relations/Relation_UphillRouting_Routing_Routing_UphillRouting.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation UphillRouting_Routing_Routing_UphillRouting
+{
+  #keys: '1[412672.0.1042903717]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Routing
+  {
+    #keys: '3[412672.0.1042903719][412672.0.1042903718][412672.0.1042903720]'
+    Cardinality: '0to1'
+    ObjectDefinition: UphillRouting
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide UphillRouting
+  {
+    #keys: '3[412672.0.1042903722][412672.0.1042903721][412672.0.1042903723]'
+    Cardinality: '1toN'
+    ObjectDefinition: Routing
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Type_LocalTool/StaticMethod_IsOverlap.qbl b/_Main/BL/Type_LocalTool/StaticMethod_IsOverlap.qbl
new file mode 100644
index 0000000..e4d6bb3
--- /dev/null
+++ b/_Main/BL/Type_LocalTool/StaticMethod_IsOverlap.qbl
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod IsOverlap (
+  Date start1,
+  Date end1,
+  Date start2,
+  Date end2
+) const declarative as Boolean
+{
+  TextBody:
+  [*
+    // rislai Jun-14-2024 (created)
+    return start1 < end2 and start2 < end1 ;
+  *]
+}
diff --git a/_Main/BL/Type_LocalTool/_ROOT_Type_LocalTool.qbl b/_Main/BL/Type_LocalTool/_ROOT_Type_LocalTool.qbl
new file mode 100644
index 0000000..b840ecf
--- /dev/null
+++ b/_Main/BL/Type_LocalTool/_ROOT_Type_LocalTool.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type LocalTool
+{
+  #keys: '5[412672.0.1042354674][412672.0.1042354672][0.0.0][412672.0.1042354673][412672.0.1042354675]'
+  BaseType: Object
+  StructuredName: 'LocalTools'
+}
diff --git a/_Main/BL/Type_ProductionLineBatchData/Method_verifyEnable.qbl b/_Main/BL/Type_ProductionLineBatchData/Method_verifyEnable.qbl
index 0226cbe..bf02abd 100644
--- a/_Main/BL/Type_ProductionLineBatchData/Method_verifyEnable.qbl
+++ b/_Main/BL/Type_ProductionLineBatchData/Method_verifyEnable.qbl
@@ -12,7 +12,7 @@
     //锛�3锛�  鍚屼竴鏃堕棿锛屼竴鏉′骇绾夸笉鍙互鍜屽鏉′骇绾胯疆鎹㈢敓浜э紝濡傛灉浜х嚎1ZKG鍜屼骇绾�2ZK鐨勮疆鎹㈢彮娆″凡缁忓湪4/29/2024鐢熸晥锛岄偅涔堜骇绾�1ZKG鍜屽叾浠栦骇绾跨殑杞崲鐝鏃犳硶鍦ㄥ悓涓�鏃堕棿鐢熸晥锛屾鏃躲�怑nable銆戞寜閽鐢�
     verifyData := select( owner,ProductionLineBatchData,plbd, plbd <> this and plbd.IsEnable() and 
                           ( plbd.Unit1() = this.Unit1() or plbd.Unit2() = this.Unit2() or plbd.Unit1() = this.Unit2() or plbd.Unit2() = this.Unit1()) and
-                          ( plbd.StartDate() <= this.EndDate() or plbd.EndDate() >= this.StartDate() ));
+                          LocalTool::IsOverlap( plbd.StartDate(),plbd.EndDate(),this.StartDate(),this.EndDate()));
     
     if( not isnull( verifyData )){
       feeback := "銆�" + verifyData.Unit1().Name() + "銆戙��" + verifyData.Unit2().Name() + "銆戝凡浜�" + verifyData.StartDate().Format( "Y-M2-D2" ) +"鐢熸晥銆�";
diff --git a/_Main/BL/Type_Routing/Method_Copy.qbl b/_Main/BL/Type_Routing/Method_Copy.qbl
new file mode 100644
index 0000000..b1c6498
--- /dev/null
+++ b/_Main/BL/Type_Routing/Method_Copy.qbl
@@ -0,0 +1,39 @@
+Quintiq file version 2.0
+#parent: #root
+Method Copy (
+  String suffix
+) as Routing
+{
+  TextBody:
+  [*
+    // rislai Jun-14-2024 (created)
+    
+    routingname := this.MacroPlan().GetUniqueRoutingName( this.Name() + suffix );
+    
+    newrouting := Routing::Create( this.MacroPlan(),
+                                   routingname,
+                                   routingname,
+                                   this.Start(),
+                                   this.End(),
+                                   this.AllowWIPInventory(),
+                                   false 
+                                   );
+    
+    // Copy rouitng step with operations
+    traverse( this, RoutingStep, rs )
+    {
+      rs.Copy( newrouting );
+    }
+    
+    // Propagated all Operation-Step-Routing relation before copy operation link
+    Transaction::Transaction().Propagate();
+    
+    traverse( this, RoutingStep.Operation.SourceOperationLink, ol )
+    {
+      ol.Copy( newrouting );
+    }
+    
+    
+    return newrouting;
+  *]
+}
diff --git a/_Main/BL/Type_UphillRouting/Attribute_EndDate.qbl b/_Main/BL/Type_UphillRouting/Attribute_EndDate.qbl
new file mode 100644
index 0000000..2eb2902
--- /dev/null
+++ b/_Main/BL/Type_UphillRouting/Attribute_EndDate.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute EndDate
+{
+  #keys: '3[412672.0.1042903765][412672.0.1042903764][412672.0.1042903766]'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_UphillRouting/Attribute_Percentage.qbl b/_Main/BL/Type_UphillRouting/Attribute_Percentage.qbl
new file mode 100644
index 0000000..24b7a34
--- /dev/null
+++ b/_Main/BL/Type_UphillRouting/Attribute_Percentage.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Percentage
+{
+  #keys: '3[412672.0.1042903775][412672.0.1042903774][412672.0.1042903776]'
+  ValueType: Real
+}
diff --git a/_Main/BL/Type_UphillRouting/Attribute_StartDate.qbl b/_Main/BL/Type_UphillRouting/Attribute_StartDate.qbl
new file mode 100644
index 0000000..f751b43
--- /dev/null
+++ b/_Main/BL/Type_UphillRouting/Attribute_StartDate.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute StartDate
+{
+  #keys: '3[412672.0.1042903755][412672.0.1042903754][412672.0.1042903756]'
+  ValueType: Date
+}
diff --git "a/_Main/BL/Type_UphillRouting/StaticMethod_Create\043793.qbl" "b/_Main/BL/Type_UphillRouting/StaticMethod_Create\043793.qbl"
new file mode 100644
index 0000000..33715d1
--- /dev/null
+++ "b/_Main/BL/Type_UphillRouting/StaticMethod_Create\043793.qbl"
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Create (
+  Routing owner,
+  Date startDate,
+  Date endDate,
+  Real percentage
+)
+{
+  TextBody:
+  [*
+    // rislai Jun-14-2024 (created)
+    UphillRouting::Create( owner,startDate,endDate,percentage,"_浜у搧鐖潯_");
+  *]
+}
diff --git "a/_Main/BL/Type_UphillRouting/StaticMethod_Create\04390.qbl" "b/_Main/BL/Type_UphillRouting/StaticMethod_Create\04390.qbl"
new file mode 100644
index 0000000..fce68c7
--- /dev/null
+++ "b/_Main/BL/Type_UphillRouting/StaticMethod_Create\04390.qbl"
@@ -0,0 +1,34 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Create (
+  Routing owner,
+  Date startDate,
+  Date endDate,
+  Real percentage,
+  String suffix
+)
+{
+  TextBody:
+  [*
+    // rislai Jun-14-2024 (created)
+    
+    verifyData := select( owner,UphillRouting,ur,LocalTool::IsOverlap( ur.StartDate(),ur.EndDate(),startDate,endDate ));
+    if( not isnull( verifyData )){
+      error( "璁剧疆鐨凷tart鍜孍nd涓嶅彲涓庡凡鏈夋暟鎹殑鏃堕棿鍖洪棿閲嶅彔銆�" ); 
+    }
+    
+    data := owner.UphillRouting( relnew,StartDate := startDate, EndDate := endDate,Percentage := percentage );
+    
+    copy_routing := owner.Copy( suffix + startDate.Format( "Y-M2-D2") );
+    
+    copy_routing.Start( startDate );
+    
+    copy_routing.End( endDate );
+    
+    traverse( copy_routing,OperationForPlanningMatrix,op){
+      op.Throughput( op.Throughput() * ( percentage / 100) );
+    }
+    
+    copy_routing.CopyUphillRouting( relset, data );
+  *]
+}
diff --git a/_Main/BL/Type_UphillRouting/StaticMethod_Create.qbl b/_Main/BL/Type_UphillRouting/StaticMethod_Create.qbl
new file mode 100644
index 0000000..671450e
--- /dev/null
+++ b/_Main/BL/Type_UphillRouting/StaticMethod_Create.qbl
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Create (
+  Unit unit,
+  Date startDate,
+  Date endDate,
+  Real percentage
+)
+{
+  TextBody:
+  [*
+    // rislai Jun-14-2024 (created)
+    traverse( unit,Operation.RoutingForPlanningMatrix,routing , routing.IsEnabled() and LocalTool::IsOverlap( startDate,endDate,routing.Start(),routing.End())){
+      UphillRouting::Create( routing,startDate,endDate,percentage,"_浜х嚎鐖潯_" );
+    }
+    
+    
+    
+    // owner.UphillRouting( relnew,Unit := unit,StartDate := startDate, EndDate := endDate,Percentage := percentage );
+  *]
+}
diff --git a/_Main/BL/Type_UphillRouting/_ROOT_Type_UphillRouting.qbl b/_Main/BL/Type_UphillRouting/_ROOT_Type_UphillRouting.qbl
new file mode 100644
index 0000000..5688008
--- /dev/null
+++ b/_Main/BL/Type_UphillRouting/_ROOT_Type_UphillRouting.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type UphillRouting
+{
+  #keys: '5[412672.0.1042903701][412672.0.1042903699][0.0.0][412672.0.1042903700][412672.0.1042903702]'
+  BaseType: Object
+  StructuredName: 'UphillRoutings'
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlActions.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlActions.def
new file mode 100644
index 0000000..63e070b
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlActions.def
@@ -0,0 +1,40 @@
+Quintiq file version 2.0
+Component pnlActions
+{
+  #keys: '[412672.0.1042452873]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component btnOk
+    {
+      #keys: '[412672.0.1042452877]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'OK'
+        Taborder: 0
+      ]
+    }
+    Component btnCancel
+    {
+      #keys: '[412672.0.1042452879]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'Cancel'
+        Taborder: 1
+      ]
+    }
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    Border: true
+    ExcludeFromActiveComponent: true
+    FixedSize: true
+    Orientation: 'horizontal'
+    Padding: 'true'
+    Style: 'footer'
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlContent.def
new file mode 100644
index 0000000..b421616
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlContent.def
@@ -0,0 +1,76 @@
+Quintiq file version 2.0
+Component pnlContent
+{
+  #keys: '[412672.0.1042452871]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ddlUnit
+    {
+      #keys: '[412672.0.1040101442]'
+      BaseType: 'WebDropDownList'
+      Databinding: 'Unit'
+      Children:
+      [
+        Component deContent
+        {
+          #keys: '[412672.0.1040101444]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'structured[Unit]'
+            Source: 'ApplicationMacroPlanner.DataHolderUnit'
+            Taborder: 0
+            Transformation: 'Elements.astype(Unit)'
+          ]
+        }
+      ]
+      Properties:
+      [
+        DisplayField: 'Name'
+        Label: '浜х嚎'
+        Taborder: 0
+      ]
+    }
+    Component dsStartDate
+    {
+      #keys: '[412672.0.1040102174]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        DataBinding: 'dhDialogData.Data.StartDate'
+        Label: '寮�濮嬫椂闂�'
+        Taborder: 1
+      ]
+    }
+    Component dsEndDate
+    {
+      #keys: '[412672.0.1040102187]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        DataBinding: 'dhDialogData.Data.EndDate'
+        Label: '缁撴潫鏃堕棿'
+        Taborder: 2
+      ]
+    }
+    Component npPercentage
+    {
+      #keys: '[412672.0.1040102201]'
+      BaseType: 'WebNumberPicker'
+      Properties:
+      [
+        DataBinding: 'dhDialogData.Data.Percentage'
+        Label: 'Percentage'
+        Max: '100'
+        Min: '0'
+        Taborder: 3
+      ]
+    }
+  ]
+  Properties:
+  [
+    Padding: 'true'
+    Taborder: 0
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Create\043680.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Create\043680.def"
new file mode 100644
index 0000000..9bbedc8
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Create\043680.def"
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: #root
+Method Create (
+  Routing routing
+) id:Method_DialogCreateEditUphillRouting_Create_680
+{
+  #keys: '[412672.0.1040101362]'
+  Body:
+  [*
+    ddlUnit.Visible( false );
+    
+    ddlUnit.Enabled( false,"" );
+    
+    dhRouting.Data( routing );
+    
+    ApplicationMacroPlanner.ShowFormModal( this );
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Create.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Create.def
new file mode 100644
index 0000000..2407a27
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Create.def
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: #root
+Method Create () id:Method_DialogCreateEditUphillRouting_Create
+{
+  #keys: '[412672.0.1040101310]'
+  Body:
+  [*
+    this.Title( ddlUnit.Label() + this.Title().SubString( 2,6) );
+    
+    ApplicationMacroPlanner.ShowFormModal( this );
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Edit.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Edit.def
new file mode 100644
index 0000000..470aca2
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_Edit.def
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+#parent: #root
+Method Edit (
+  UphillRouting uphillRouting
+) id:Method_DialogCreateEditUphillRouting_Edit
+{
+  #keys: '[412672.0.1040130863]'
+  Body:
+  [*
+    dhDialogData.Data( uphillRouting );
+    
+    ApplicationMacroPlanner.ShowFormModal( this );
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_OnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_OnOK.def
new file mode 100644
index 0000000..c276ae9
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_OnOK.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: #root
+Method OnOK () id:Method_DialogCreateEditUphillRouting_OnOK
+{
+  #keys: '[412672.0.1040102043]'
+  Body:
+  [*
+    if( isnull( dhDialogData.Data( ) )){
+      if( ddlUnit.Visible() ){
+        UphillRouting::Create( ddlUnit.Data(), dsStartDate.Date(),dsEndDate.Date(),npPercentage.Number() );
+      }else{
+        UphillRouting::Create( dhRouting.Data(), dsStartDate.Date(),dsEndDate.Date(),npPercentage.Number());
+      } 
+    }else{
+      
+    }
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnCancel_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnCancel_OnClick.def
new file mode 100644
index 0000000..dceb8b3
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnCancel_OnClick.def
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: pnlActions/btnCancel
+Response OnClick () id:Response_pnlActions_btnCancel_OnClick
+{
+  #keys: '[412672.0.1042452883]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      Form.Close();
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnOk_OnClick.def
new file mode 100644
index 0000000..2efb364
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnOk_OnClick.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: pnlActions/btnOk
+Response OnClick () id:Response_pnlActions_btnOk_OnClick
+{
+  #keys: '[412672.0.1042452882]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  Precondition:
+  [*
+    return dsStartDate.Date() < dsEndDate.Date();
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      Form.OnOK();
+      Form.Close();
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/_ROOT_Component_DialogCreateEditUphillRouting.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/_ROOT_Component_DialogCreateEditUphillRouting.def
new file mode 100644
index 0000000..5069a6d
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/_ROOT_Component_DialogCreateEditUphillRouting.def
@@ -0,0 +1,42 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent DialogCreateEditUphillRouting
+{
+  #keys: '[412672.0.1042452869]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: pnlContent
+    #child: pnlActions
+    Component dhDialogData
+    {
+      #keys: '[412672.0.1040101484]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'UphillRouting'
+      Properties:
+      [
+        Taborder: 2
+      ]
+    }
+    Component dhRouting
+    {
+      #keys: '[412672.0.1040101841]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'Routing'
+      Properties:
+      [
+        Taborder: 3
+      ]
+    }
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    EnterButton: 'btnOk'
+    EscapeButton: 'btnCancel'
+    ExcludeFromActiveComponent: true
+    Padding: 'false'
+    Title: '浜у搧鐖潯宸ヨ壓璺嚎'
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_ListUphillRouting\043943.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_ListUphillRouting\043943.def"
new file mode 100644
index 0000000..950f73b
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_ListUphillRouting\043943.def"
@@ -0,0 +1,59 @@
+Quintiq file version 2.0
+Component ListUphillRouting id:ListUphillRouting_943
+{
+  #keys: '[412672.0.1040121798]'
+  BaseType: 'WebList'
+  Children:
+  [
+    Component DataExtractorUphillRouting
+    {
+      #keys: '[412672.0.1040121799]'
+      BaseType: 'WebDataExtractor'
+      Properties:
+      [
+        DataType: 'Routing'
+        Source: 'dhRouting'
+        Taborder: 0
+        Transformation: 'UphillRouting'
+      ]
+    }
+    #child: listActionBarPageUphillRouting_1
+    Component DataSetLevelUphillRouting
+    {
+      #keys: '[412672.0.1040121801]'
+      BaseType: 'WebDataSetLevel'
+      Children:
+      [
+        #child: listContextMenuUphillRouting_1
+      ]
+      Properties:
+      [
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Percentage","title":"Percentage","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Percentage"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}}]'
+        ContextMenu: 'listContextMenuUphillRouting'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 0
+  ]
+  ResponseDefinitions:
+  [
+    DelegatedResponseDefinition OnClick id:Responsedef_ListUphillRouting_943_WebMenu_OnClick
+    {
+      #keys: '[412672.0.1042455296]'
+      Initiator: 'WebMenu'
+      IsInherited: false
+      ResponseType: 'OnClick'
+      Arguments:
+      [
+        ResponseDefinitionArgument selection
+        {
+          #keys: '[2003.0.34277352]'
+          Binding: 'this.Selection()'
+        }
+      ]
+    }
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_listActionBarPageUphillRouting\0431.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_listActionBarPageUphillRouting\0431.def"
new file mode 100644
index 0000000..414c506
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_listActionBarPageUphillRouting\0431.def"
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component listActionBarPageUphillRouting id:listActionBarPageUphillRouting_1
+{
+  #keys: '[412672.0.1040121800]'
+  BaseType: 'listActionBarPage'
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_listContextMenuUphillRouting\0431.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_listContextMenuUphillRouting\0431.def"
new file mode 100644
index 0000000..6a185d5
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_listContextMenuUphillRouting\0431.def"
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+Component listContextMenuUphillRouting id:listContextMenuUphillRouting_1
+{
+  #keys: '[412672.0.1040121802]'
+  BaseType: 'listContextMenu'
+  Children:
+  [
+    Component MenuCreate
+    {
+      #keys: '[412672.0.1043375746]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'ADD2'
+        Taborder: 3
+        Title: 'Create...'
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_pnlContent.def
new file mode 100644
index 0000000..d1a86d4
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_pnlContent.def
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+Component pnlContent
+{
+  #keys: '[412672.0.1043138046]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    #child: ListUphillRouting_943
+    Component dhRouting
+    {
+      #keys: '[412672.0.1040132827]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'Routing'
+      Properties:
+      [
+        Taborder: 1
+      ]
+    }
+  ]
+  Properties:
+  [
+    Padding: 'true'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Method_CreateEditUphillRoutings.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Method_CreateEditUphillRoutings.def
new file mode 100644
index 0000000..3e45751
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Method_CreateEditUphillRoutings.def
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+#parent: #root
+Method CreateEditUphillRoutings (
+  Routing owner
+) id:Method_DialogCreateEditUphillRoutings_CreateEditUphillRoutings
+{
+  #keys: '[412672.0.1040132851]'
+  Body:
+  [*
+    dhRouting.Data( owner );
+    
+    ApplicationMacroPlanner.ShowFormModal( this );
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_ListUphillRouting_943_MenuCreate_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_ListUphillRouting_943_MenuCreate_OnClick.def
new file mode 100644
index 0000000..d4902bf
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_ListUphillRouting_943_MenuCreate_OnClick.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: ListUphillRouting_943
+Response OnClick () id:Response_ListUphillRouting_943_MenuCreate_OnClick
+{
+  #keys: '[412672.0.1040123392]'
+  CanBindMultiple: false
+  DefinitionID => /ListUphillRouting_943/Responsedef_ListUphillRouting_943_WebMenu_OnClick
+  GroupServerCalls: true
+  Initiator: 'MenuCreate'
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogCreateEditUphillRouting );
+      
+      dlg.Create( dhRouting.Data( ));
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/_ROOT_Component_DialogCreateEditUphillRoutings.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/_ROOT_Component_DialogCreateEditUphillRoutings.def
new file mode 100644
index 0000000..1e0fcc7
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/_ROOT_Component_DialogCreateEditUphillRoutings.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent DialogCreateEditUphillRoutings
+{
+  #keys: '[412672.0.1043138044]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: pnlContent
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    ExcludeFromActiveComponent: true
+    Image: 'ESCALATOR_UP'
+    Padding: 'false'
+    Title: '浜у搧鐖潯宸ヨ壓璺嚎'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Component_listContextMenuRoutings.def b/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Component_listContextMenuRoutings.def
index b39925b..6cd59a5 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Component_listContextMenuRoutings.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Component_listContextMenuRoutings.def
@@ -24,13 +24,35 @@
         Title: 'Thermal trial ratio'
       ]
     }
+    Component MenuSetUnitUphillRouting
+    {
+      #keys: '[412672.0.1040121042]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'ESCALATOR_UP'
+        Taborder: 13
+        Title: '璁剧疆浜х嚎鐖潯宸ヨ壓璺嚎'
+      ]
+    }
+    Component MenuSetUphillRouting
+    {
+      #keys: '[412672.0.1040131623]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'ESCALATOR_UP'
+        Taborder: 13
+        Title: '璁剧疆浜у搧鐖潯宸ヨ壓璺嚎'
+      ]
+    }
     Component MenuTest
     {
       #keys: '[415136.0.789811702]'
       BaseType: 'WebMenu'
       Properties:
       [
-        Taborder: 13
+        Taborder: 14
         Title: 'Test'
       ]
     }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuSetUnitUphillRouting_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuSetUnitUphillRouting_OnClick.def
new file mode 100644
index 0000000..ecf02cc
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuSetUnitUphillRouting_OnClick.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: ListRoutings
+Response OnClick () id:Response_ListRoutings_MenuSetUnitUphillRouting_OnClick
+{
+  #keys: '[412672.0.1040131205]'
+  CanBindMultiple: false
+  DefinitionID => /ListRoutings/Responsedef_ListRoutings_WebMenu_OnClick
+  GroupServerCalls: true
+  Initiator: 'MenuSetUnitUphillRouting'
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogCreateEditUphillRouting );
+      
+      dlg.Create( );
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuSetUphillRouting_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuSetUphillRouting_OnClick.def
new file mode 100644
index 0000000..83f6154
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuSetUphillRouting_OnClick.def
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: ListRoutings
+Response OnClick (
+  Routing selection
+) id:Response_ListRoutings_MenuSetUphillRouting_OnClick
+{
+  #keys: '[412672.0.1040131705]'
+  CanBindMultiple: false
+  DefinitionID => /ListRoutings/Responsedef_ListRoutings_WebMenu_OnClick
+  GroupServerCalls: true
+  Initiator: 'MenuSetUphillRouting'
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogCreateEditUphillRoutings );
+      
+      dlg.CreateEditUphillRoutings( selection );
+    *]
+  }
+}

--
Gitblit v1.9.3