From 0382a81753b0b1ee1dfbc9cab7f529703fa643cf Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期四, 31 十月 2024 12:00:42 +0800
Subject: [PATCH] SAP装配上线计划接口处理

---
 _Main/BL/Type_InterfaceDataset/Method_GenerateArchiveData.qbl                                                                    |   45 +++
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_LogMessageNo.qbl                                                             |    7 
 _Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_Publish.qbl                                                                      |   20 
 _Main/BL/Type_EnginePipelineReport/Method_Generate0.qbl                                                                          |  153 ++++++++++
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Number.qbl                                                                   |    7 
 _Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_ActualProductionQty.qbl                                                    |    8 
 _Main/BL/InfoMessages.qbl                                                                                                        |   12 
 _Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForSAPGet.qbl                                                           |   56 ++++
 _Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_ListInterfaceSapResponseLoginfo.def              |   42 +++
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_ID.qbl                                                                       |    7 
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v2.qbl                                                                   |    7 
 _Main/UI/MacroPlannerWebApp/Component_DialogReportArchiveConfirm/Method_OnOK.def                                                 |    8 
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg.qbl                                                                      |    7 
 _Main/BL/Type_AOnlineAndMOfflinePlanMS64/Attribute_ZPPPSCode.qbl                                                                 |    7 
 _Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl                                                             |   39 ++
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v3.qbl                                                                   |    7 
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Type.qbl                                                                     |    8 
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlLeft#88.def                                                  |   24 -
 _Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_listActionBarPageInterfaceSapResponseLoginfo.def |   10 
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Function_CalcIsSuccess.qbl                                                             |   18 +
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_LogNo.qbl                                                                    |    7 
 _Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/_ROOT_Component_FormInterfaceSapResponseLoginfo.def        |   17 +
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v4.qbl                                                                   |    7 
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Response_pnlLeft_ddslFactory_OnCreated.def                                 |   18 +
 _Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GetWerk.qbl                                                                 |   18 +
 _Main/BL/Type_AOnlineAndMOfflinePlanMS64/StaticMethod_GenerateData.qbl                                                           |    3 
 _Main/BL/Relations/Relation_InterfaceSAPResponseLoginfo_InterfaceLoginfo_InterfaceLoginfo_SAPRe.qbl                              |   23 +
 _Main/BL/Type_AOnlineAndMOfflinePlanMS64/DefaultValue_ZPPPSCode.qbl                                                              |    6 
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v1.qbl                                                                   |    7 
 _Main/BL/Type_InterfaceSAPResponseLoginfo/StaticMethod_GenerateData.qbl                                                          |   35 ++
 _Main/BL/Type_InterfaceSAPResponseLoginfo/_ROOT_Type_InterfaceSAPResponseLoginfo.qbl                                             |   10 
 _Main/UI/MacroPlannerWebApp/Views/Interface_loginfo_view.vw                                                                      |   87 ++++++
 _Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter.qbl                                                       |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_listContextMenuInterfaceSapResponseLoginfo.def   |   10 
 _Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_IsSuccess.qbl                                                                |    7 
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlLeft.def                                                      |   21 -
 _Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl                                                            |    6 
 37 files changed, 720 insertions(+), 64 deletions(-)

diff --git a/_Main/BL/InfoMessages.qbl b/_Main/BL/InfoMessages.qbl
index 0a6056a..e157030 100644
--- a/_Main/BL/InfoMessages.qbl
+++ b/_Main/BL/InfoMessages.qbl
@@ -90,9 +90,17 @@
   {
     DefaultText: 'Assembly online plan + Machine offline plan - MS64'
   }
+  InfoMessage InterfaceDataset_AOnlineAndMOfflinePlanMS64_URL
+  {
+    DefaultText: '/sap/bc/zedppps/zed_pps_ms64'
+  }
   InfoMessage InterfaceDataset_AOnlineAndMOfflinePlanPIR_Name
   {
     DefaultText: 'Assembly online plan + Machine offline plan - PIR'
+  }
+  InfoMessage InterfaceDataset_AOnlineAndMOfflinePlanPIR_URL
+  {
+    DefaultText: '/sap/bc/zedppps/zed_pps_pir'
   }
   InfoMessage InterfaceDataset_ActualDailyProductionData_Name
   {
@@ -170,6 +178,10 @@
   {
     DefaultText: '/data-service/api/service/post-data/V1.101/2f6c42fe895c45bdb2e8e1ca8489b5a2'
   }
+  InfoMessage InterfaceDataset_SAP_Address
+  {
+    DefaultText: '10.120.76.86'
+  }
   InfoMessage InterfaceDataset_ShippingActualData_Name
   {
     DefaultText: 'Shipping actual data'
diff --git a/_Main/BL/Relations/Relation_InterfaceSAPResponseLoginfo_InterfaceLoginfo_InterfaceLoginfo_SAPRe.qbl b/_Main/BL/Relations/Relation_InterfaceSAPResponseLoginfo_InterfaceLoginfo_InterfaceLoginfo_SAPRe.qbl
new file mode 100644
index 0000000..082a1f1
--- /dev/null
+++ b/_Main/BL/Relations/Relation_InterfaceSAPResponseLoginfo_InterfaceLoginfo_InterfaceLoginfo_SAPRe.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation InterfaceSAPResponseLoginfo_InterfaceLoginfo_InterfaceLoginfo_SAPResponseLoginfo
+{
+  #keys: '1[415136.0.1262040147]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide InterfaceLoginfo
+  {
+    #keys: '3[415136.0.1262040149][415136.0.1262040148][415136.0.1262040150]'
+    Cardinality: '0to1'
+    ObjectDefinition: InterfaceSAPResponseLoginfo
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide SAPResponseLoginfo
+  {
+    #keys: '3[415136.0.1262040152][415136.0.1262040151][415136.0.1262040153]'
+    Cardinality: '1toN'
+    ObjectDefinition: InterfaceLoginfo
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Type_AOnlineAndMOfflinePlanMS64/Attribute_ZPPPSCode.qbl b/_Main/BL/Type_AOnlineAndMOfflinePlanMS64/Attribute_ZPPPSCode.qbl
new file mode 100644
index 0000000..fb00779
--- /dev/null
+++ b/_Main/BL/Type_AOnlineAndMOfflinePlanMS64/Attribute_ZPPPSCode.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ZPPPSCode
+{
+  #keys: '3[415136.0.1256454719][415136.0.1256454718][415136.0.1256454720]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_AOnlineAndMOfflinePlanMS64/DefaultValue_ZPPPSCode.qbl b/_Main/BL/Type_AOnlineAndMOfflinePlanMS64/DefaultValue_ZPPPSCode.qbl
new file mode 100644
index 0000000..1452533
--- /dev/null
+++ b/_Main/BL/Type_AOnlineAndMOfflinePlanMS64/DefaultValue_ZPPPSCode.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: ZPPPSCode
+}
diff --git a/_Main/BL/Type_AOnlineAndMOfflinePlanMS64/StaticMethod_GenerateData.qbl b/_Main/BL/Type_AOnlineAndMOfflinePlanMS64/StaticMethod_GenerateData.qbl
index 4246842..28f43a3 100644
--- a/_Main/BL/Type_AOnlineAndMOfflinePlanMS64/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_AOnlineAndMOfflinePlanMS64/StaticMethod_GenerateData.qbl
@@ -35,7 +35,7 @@
                                                       , ReturnMsg := 'Success'
                                                       , Success := true
                                                       );
-    ms64                   := owner.AOnlineAndMOfflinePlanMS64( relnew, Werk := werk, StartDate := startdate, EndDate := enddate
+    ms64                   := owner.AOnlineAndMOfflinePlanMS64( relnew, ZPPPSCode := OS::GenerateGUIDAsString(), Werk := AOnlineAndMOfflinePlanPIR::GetWerk( werk ), StartDate := startdate, EndDate := enddate
                                                                 , VersionFrom := versionfrom
                                                                 , VersionTo := versionto, IsActive := versionflag );
     loginfo.AOnlineAndMOfflinePlanMS64( relinsert, ms64 );
@@ -43,5 +43,6 @@
       ms64.MS64Data( relnew, Product := product.ID() );
     }
     loginfo.TotalRow( ms64.MS64Data( relsize ) );
+    InterfaceLoginfo::CallInterfaceForSAPGet( owner, loginfo );
   *]
 }
diff --git a/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
index ab4f0b9..de8c96f 100644
--- a/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
@@ -19,8 +19,9 @@
       }else{
         loginfo.Last( false );
       }
-      owner.AOnlineAndMOfflinePlanPIR( relflush );
+    //  owner.AOnlineAndMOfflinePlanPIR( relflush );
     }
+    owner.AOnlineAndMOfflinePlanPIR( relflush );
     nowdate                := DateTime::ActualTime();
     productids             := construct( Strings );
     loginfo                := owner.InterfaceLoginfo( relnew, ExecuteUser := executor
@@ -33,7 +34,7 @@
                                                       , ReturnMsg := 'Success'
                                                       , Success := true
                                                       );
-    pir                    := owner.AOnlineAndMOfflinePlanPIR( relnew, ZPPPSCode := OS::GenerateGUIDAsString(), Werk := werk, Version := version, StartDate := startdate, EndDate := enddate );
+    pir                    := owner.AOnlineAndMOfflinePlanPIR( relnew, ZPPPSCode := OS::GenerateGUIDAsString(), Werk := AOnlineAndMOfflinePlanPIR::GetWerk( werk ), Version := version, StartDate := startdate, EndDate := enddate );
     loginfo.AOnlineAndMOfflinePlanPIR( relinsert, pir );
     traverse( owner, AssemblyOnlinePlanVersion, verison, not verison.IsShow() ){
       traverse( verison, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() >= startdate and column.StartDate() <= enddate ){
@@ -80,5 +81,6 @@
       }
     }
     loginfo.TotalRow( pir.PIRData( relsize ) );
+    InterfaceLoginfo::CallInterfaceForSAPGet( owner, loginfo );
   *]
 }
diff --git a/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GetWerk.qbl b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GetWerk.qbl
new file mode 100644
index 0000000..340b845
--- /dev/null
+++ b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GetWerk.qbl
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetWerk (
+  String werk
+) as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-30-2024 (created)
+    value      := '8201;8200';
+    if( werk = FinancialProductionReport::GetDefaultCCUnit() ){
+      value    := '8200';
+    }else if( werk = FinancialProductionReport::GetDefaultDLUnit() ){
+      value    := '8201';
+    }
+    return value;
+  *]
+}
diff --git a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_Publish.qbl b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_Publish.qbl
index b222ad0..244c723 100644
--- a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_Publish.qbl
+++ b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_Publish.qbl
@@ -8,22 +8,20 @@
   TextBody:
   [*
     //// 鐢勫叞楦� Jul-17-2024 (created)
-    requestbody :='[
-        {
-            "product": "DZ948293",
-            "demandDate": "2024-10-01",
-            "demandQty": 800,
-            "versionName": "V2410204",
-            "interfaceTime": "2024-10-01 12:00:00"
-        }
-    ]';
+    jsonarray := JSON::Array().Add( JSON::Object().Add( "product", "DZ948293" )
+                                    .Add( "demandDate", "2024-10-01" )
+                                    .Add( "demandQty", 800 )
+                                    .Add( "versionName", "V2410204" )
+                                    .Add( "interfaceTime", "2024-10-01 12:00:00" ).Build() ).Build();
+    requestbody := jsonarray.AsString();
     loginfo := owner.InterfaceLoginfo( relnew, ExecuteUser := executor
                                        , Name := Translations::InterfaceDataset_CustomerDemandPPAIDS_Name()
                                        , InterfaceDateTime := DateTime::ActualTime()
                                        , Message := '瀹㈡埛闇�姹傦紙PPA+IDS锛�'
                                        , RequestBody := requestbody);
-    
-    InterfaceLoginfo::CallInterface( owner, loginfo );
+    //error( '--------------------', requestbody );
+    data     := InterfaceLoginfo::CallInterfaceForDataCenter( owner, loginfo );
+    info( '----------------', data.AsString() );
     //if( not isnull( data ) ){
     //  
     //  cnv2 := StringToDate::StandardConverter();
diff --git a/_Main/BL/Type_EnginePipelineReport/Method_Generate0.qbl b/_Main/BL/Type_EnginePipelineReport/Method_Generate0.qbl
new file mode 100644
index 0000000..733701c
--- /dev/null
+++ b/_Main/BL/Type_EnginePipelineReport/Method_Generate0.qbl
@@ -0,0 +1,153 @@
+Quintiq file version 2.0
+#parent: #root
+Method Generate0 (
+  EnginePipelineSearch search,
+  Product_MPs products
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    table                   := selectobject( this, Source.Report, report, not report.IsShow() );
+    //娓呯┖涔嬪墠瀛樺偍鐨勬樉绀烘暟鎹�
+    this.Clear( search.TimeUnit(), search.StartDate(), search.EndDate() );
+    Transaction::Transaction().Propagate( attribute( EnginePipelineColumn, Index ) );
+    Transaction::Transaction().Propagate( attribute( EnginePipelineCell, ProductionQuantity ) );
+    Transaction::Transaction().Propagate( attribute( EnginePipelineCell, DemandQuantity ) );
+    //杩囨护鍚庣殑浜у搧id
+    productids              := selectuniquevalues( products, Elements, product, true, product.ID() );
+    rows                    := selectsortedset( table, Row, row, row.RowNr() );
+    models                  := selectuniquevalues( table, Column.Cell.Demand, demand, demand.Model() );
+    cellnr                  := 5 + models.Size();
+    //鍚堣琛�
+    sumname                 := 'SUM';
+    sumstr                  := sumname.Format( 'S(Len(10))' );
+    sumrowproduction        := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( '鎬讳骇閲�' ), sumname, '', rows.Size() * cellnr );
+    sumrowdlproduction      := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( '澶ц繛浜ч噺' ), sumname, '', sumrowproduction.RowNr() + 1 );
+    sumrowccproduction      := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( '闀挎槬浜ч噺' ), sumname, '', sumrowdlproduction.RowNr() + 1  );
+    sumrowdemand            := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( '鎬婚渶姹�' ), sumname, '', sumrowccproduction.RowNr() + 1 );
+    sumdemandrows           := construct( EnginePipelineRows );
+    rowno                   := sumrowdemand.RowNr() + 1;
+    traverse( models, Elements, model ){
+      sumdemandrows.Add( EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( model.Concat( '闇�姹�' ) ), sumname, model, rowno ) ); 
+      rowno                 := rowno + 1;
+    }
+    sumrowinventory         := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( '搴撳瓨' ), sumname, '', rowno );
+    
+    //琛岃鏁�
+    rownr                   := 0;
+    traverse( rows, Elements, row, productids.Find( row.Name() ) >= 0 ){
+      rowname               := row.Name().Format( 'S(Len(10))' );
+      showrowproduction     := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '鎬讳骇閲�' ), row.Name(), '', rownr );
+      showrowdlproduction   := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '澶ц繛浜ч噺' ), row.Name(), '', showrowproduction.RowNr() + 1 );
+      showrowccproduction   := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '闀挎槬浜ч噺' ), row.Name(), '', showrowdlproduction.RowNr() + 1 );
+      showrowdemand         := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '鎬婚渶姹�' ), row.Name(), '', showrowccproduction.RowNr() + 1 );
+      rownr                 := showrowdemand.RowNr() + 1;
+      modelsnr              := showrowdemand.RowNr() + 3;
+      uniquemodels          := selectuniquevalues( row, Cell.Demand, demand, true, demand.Model() );
+      demandrows            := construct( EnginePipelineRows );
+      traverse( uniquemodels, Elements, e ){
+    
+        if( rownr < modelsnr ){
+          demandrows.Add( EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( e.Concat( '闇�姹�' ) ), row.Name(), e, rownr ) ); 
+          rownr             := rownr + 1;
+        }
+      }
+    
+      for( rownr := rownr; rownr < modelsnr; rownr ++ ){
+    
+        demandrows.Add( EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '' ), row.Name(), '', rownr ) ); 
+      }
+      showrowinventory      :=  EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '搴撳瓨' ), row.Name(), '', rownr );
+    
+      traverse( this, Column, column ){
+        daycells            := selectset( row, Cell, cell, cell.Column().TimeUnit() = Translations::MP_GlobalParameters_Day() and
+                                            cell.Column().StartDate() >= column.StartDate() and 
+                                            cell.Column().StartDate() <= column.EndDate() );
+        
+        //鐢熶骇
+        productionqty       := sum( daycells, Elements, cell, cell.ProductionQuantity() );
+        production          := column.CellValue( relnew, Value := [String]productionqty );
+        showrowproduction.CellValue( relinsert, production );
+        sumproduction       := selectobject( column, CellValue, c, c.Row() = sumrowproduction );
+        if( isnull( sumproduction ) ){
+          sumproduction     := column.CellValue( relnew, Value := [String]0 );
+          sumrowproduction.CellValue( relinsert, sumproduction );
+        }
+        sumproduction.Value( [String]( [Real]sumproduction.Value() + productionqty ) );
+        //澶ц繛浜ч噺
+        dlproductionqty     := sum( daycells, Elements, cell, cell.Production().DLProduction() );
+        dlproduction        := column.CellValue( relnew, Value := [String]dlproductionqty );
+        showrowdlproduction.CellValue( relinsert, dlproduction );
+        sumdlproduction     := selectobject( column, CellValue, c, c.Row() = sumrowdlproduction );
+        if( isnull( sumdlproduction ) ){
+          sumdlproduction   := column.CellValue( relnew, Value := [String]0 );
+          sumrowdlproduction.CellValue( relinsert, sumdlproduction );
+        }
+        sumdlproduction.Value( [String]( [Real]sumdlproduction.Value() + dlproductionqty ) );
+        //闀挎槬浜ч噺
+        ccproductionqty     := sum( daycells, Elements, cell, cell.Production().CCProduction() );
+        ccproduction        := column.CellValue( relnew, Value := [String]ccproductionqty );
+        showrowccproduction.CellValue( relinsert, ccproduction );
+        sumccproduction     := selectobject( column, CellValue, c, c.Row() = sumrowccproduction );
+        if( isnull( sumccproduction ) ){
+          sumccproduction   := column.CellValue( relnew, Value := [String]0 );
+          sumrowccproduction.CellValue( relinsert, sumccproduction );
+        }
+        sumccproduction.Value( [String]( [Real]sumccproduction.Value() + ccproductionqty ) );
+        //闇�姹�
+        totaldemandqty      := sum( daycells, Elements, cell, cell.DemandQuantity() );
+        totaldemand         := column.CellValue( relnew, Value := [String]totaldemandqty );
+        showrowdemand.CellValue( relinsert, totaldemand );
+        sumdemand           := selectobject( column, CellValue, c, c.Row() = sumrowdemand );
+        if( isnull( sumdemand ) ){
+          sumdemand         := column.CellValue( relnew, Value := [String]0 );
+          sumrowdemand.CellValue( relinsert, sumdemand );
+        }
+        sumdemand.Value( [String]( [Real]sumdemand.Value() + totaldemandqty ) );
+        //鍏蜂綋闇�姹�
+        traverse( demandrows, Elements, demandrow ){
+          demandqty         :=  sum( daycells, Elements.Demand, celldemand, celldemand.Model() = demandrow.Demand(), celldemand.Quantity() );
+          demandcell        := column.CellValue( relnew, Value := [String]demandqty );
+          demandrow.CellValue( relinsert, demandcell );
+          sumdemandrow      := selectobject( sumdemandrows, Elements, r, r.Demand() = demandrow.Demand() );
+          if( not isnull( sumdemandrow ) ){
+            sumdemandcell   := selectobject( column, CellValue, c, c.Row() = sumdemandrow );
+            if( isnull( sumdemandcell ) ){
+              sumdemandcell := column.CellValue( relnew, Value := [String]0 );
+              sumdemandrow.CellValue( relinsert, sumdemandcell );
+            }
+            sumdemandcell.Value( [String]( [Real]sumdemandcell.Value() + demandqty ) );
+          }
+        }
+        //搴撳瓨
+        inventroyqty             := maxobject( daycells, Elements, e, e.Column().StartDate() ).InventoryQuantity();
+        inventory                := column.CellValue( relnew, Value := [String]inventroyqty );
+        showrowinventory.CellValue( relinsert, inventory );
+        suminventory             := selectobject( column, CellValue, c, c.Row() = sumrowinventory );
+        if( isnull( suminventory ) ){
+          suminventory           := column.CellValue( relnew, Value := [String]0 );
+          sumrowinventory.CellValue( relinsert, suminventory );
+        }
+        suminventory.Value( [String]( [Real]suminventory.Value() + inventroyqty ) );
+      }
+    }
+    traverse( this, Column, column ){
+      for( demandr := sumrowdemand.RowNr() + 1; demandr < sumrowinventory.RowNr(); demandr := demandr + 1 ){
+        demandrow              := selectobject( this, Row, r, r.RowNr() = demandr and r.Name() = sumname );
+    //    info( '------------------14----------------' );
+        if( not isnull( demandrow ) and not exists( demandrow, CellValue, cv, cv.Column() = column ) ){
+          demandcell           := column.CellValue( relnew, Value := '' );
+          demandrow.CellValue( relinsert, demandcell );
+        }
+      }
+    }
+    
+    rows := selectsortedset( this, Row, row, row.Name(), row.RowNr() );
+    i    := 0;
+    traverse( rows, Elements, e ){
+      e.RowNr( i );
+      i := i + 1;
+    }
+  *]
+}
diff --git a/_Main/BL/Type_InterfaceDataset/Method_GenerateArchiveData.qbl b/_Main/BL/Type_InterfaceDataset/Method_GenerateArchiveData.qbl
new file mode 100644
index 0000000..12d072c
--- /dev/null
+++ b/_Main/BL/Type_InterfaceDataset/Method_GenerateArchiveData.qbl
@@ -0,0 +1,45 @@
+Quintiq file version 2.0
+#parent: #root
+Method GenerateArchiveData (
+  const MacroPlan macroplan,
+  RecycleBin recyclebin,
+  Archive archive,
+  Boolean iscustomdemand,
+  Boolean isofflineplan,
+  Boolean isshiftplan,
+  Boolean isassembleonlineplan,
+  Boolean isinventoryplan,
+  Boolean istrcdemand,
+  Boolean istransferplan,
+  Boolean ispackageplan
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-30-2024 (created)
+    if( iscustomdemand ){//鍏ㄥ勾鏃ュ害闇�姹�/瀹㈡埛闇�姹�
+      CustomerDemandIDS::GenerateData( this, recyclebin, archive );
+    }
+    if( isofflineplan ){//鍚勪骇绾夸笅绾胯鍒�
+      OfflinePlanArchiveVersion::RefreshData( this, macroplan, archive );
+    }
+    if( isshiftplan ){//鐝璁″垝
+    //  CustomerDemandIDS::GenerateData( this, recyclebin, archive );
+    }
+    if( isassembleonlineplan ){//瑁呴厤涓婄嚎璁″垝
+      AssemblyOnlinePlanVersion::RefreshData( this, macroplan );
+    }
+    if( isinventoryplan ){//搴撳瓨璁″垝
+    //  CustomerDemandIDS::GenerateData( this, recyclebin, archive );
+    }
+    if( istrcdemand ){//TRC闇�姹�
+    //  CustomerDemandIDS::GenerateData( this, recyclebin, archive );
+    }
+    if( istransferplan ){//璋冩嫧璁″垝
+    //  CustomerDemandIDS::GenerateData( this, recyclebin, archive );
+    }
+    if( ispackageplan ){//鍖呰璁″垝
+    //  CustomerDemandIDS::GenerateData( this, recyclebin, archive );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter.qbl b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter.qbl
index 7660e64..5bd309f 100644
--- a/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter.qbl
+++ b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter.qbl
@@ -12,7 +12,7 @@
     address       := Translations::InterfaceDataset_DataCenter_Address(); 
     httpinterface := HTTPInterface::Create( address,80);
     httpinterface.PostMethod( true ); 
-    httpinterface.MediaType( Translations::InterfaceDataset_DataCenter_ContentType() );
+    httpinterface.MediaType( Translations::InterfaceDataset_ContentType() );
     httpinterface.AddHeader( "clientId", Translations::InterfaceDataset_DataCenter_ClientId() );
     httpinterface.AddHeader( "clientSecret", Translations::InterfaceDataset_DataCenter_ClientSecret() );
     try{
@@ -33,15 +33,15 @@
     
     if( loginfo.Success() ){
       resultJson     := JSON::Parse( loginfo.Response() );
-      code           := resultJson.Get( "code" ).GetString();
+      code           := resultJson.Get( "code" ).GetNumber();
       msg            := resultJson.Get( "message" ).GetString();
       data           := resultJson.Get( "data" );
       
       loginfo.ReturnMsg( msg );
-      if( code = "200" ){
-        total        := resultJson.Get( "dataSize" ).GetNumber();
+      if( code = 200 ){
+    //    total        := resultJson.Get( "dataSize" ).GetNumber();
         loginfo.ReturnSuccess( true );
-        loginfo.TotalRow( total );
+    //    loginfo.TotalRow( total );
         loginfo.UpdateLast();
       }
     }
diff --git a/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForSAPGet.qbl b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForSAPGet.qbl
new file mode 100644
index 0000000..8a5e8c8
--- /dev/null
+++ b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForSAPGet.qbl
@@ -0,0 +1,56 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CallInterfaceForSAPGet (
+  InterfaceDataset owner,
+  InterfaceLoginfo loginfo
+) as owning InterfaceSAPResponseLoginfos
+{
+  Description: '璋冪敤鏁版嵁涓彴鎺ュ彛'
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jul-22-2024 (created)
+    address           := Translations::InterfaceDataset_SAP_Address(); 
+    httpinterface     := HTTPInterface::Create( address,80);
+    httpinterface.PostMethod( false ); 
+    httpinterface.MediaType( Translations::InterfaceDataset_ContentType() );
+    try{
+      if( loginfo.Name() = Translations::InterfaceDataset_AOnlineAndMOfflinePlanPIR_Name() ){//瑁呴厤涓婄嚎璁″垝PIR
+        httpinterface.URL( Translations::InterfaceDataset_AOnlineAndMOfflinePlanPIR_URL() );
+      } 
+      if( loginfo.Name() = Translations::InterfaceDataset_AOnlineAndMOfflinePlanMS64_Name() ){//瑁呴厤涓婄嚎璁″垝MS64
+        httpinterface.URL( Translations::InterfaceDataset_AOnlineAndMOfflinePlanMS64_URL() );
+      } 
+      httpinterface.Call();
+      result         := httpinterface.Result();
+      loginfo.Response( result );
+      loginfo.Success( true );
+    }onerror{
+      loginfo.ReturnMsg( e.GeneralInformation() );
+    }
+    
+    //鍚庣画鍏叡澶勭悊
+    loginfo.FinishTime( DateTime::ActualTime() );
+    data             := JSON::Null().Build();
+    saploginfos      := construct( InterfaceSAPResponseLoginfos );
+    if( loginfo.Success() ){
+      resultJson     := JSON::Parse( loginfo.Response() );
+      code           := resultJson.Get( "code" ).GetNumber();
+      msg            := resultJson.Get( "message" ).GetString();
+      data           := resultJson.Get( "data" );
+      
+      loginfo.ReturnMsg( msg );
+      if( code = 200 ){
+    //    total        := resultJson.Get( "dataSize" ).GetNumber();
+        loginfo.ReturnSuccess( true );
+    //    loginfo.TotalRow( total );
+        loginfo.UpdateLast();
+      }
+      for( i := 0; i < data.Size(); i++ ){
+        item := data.Get( i );
+        saploginfos.Add( InterfaceSAPResponseLoginfo::GenerateData( loginfo, item ) );
+      }
+    }
+    
+    return &saploginfos;
+  *]
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_ID.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_ID.qbl
new file mode 100644
index 0000000..ab16d3b
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_ID.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ID
+{
+  #keys: '3[415136.0.1262040083][415136.0.1262040082][415136.0.1262040084]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_IsSuccess.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_IsSuccess.qbl
new file mode 100644
index 0000000..1a4a657
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_IsSuccess.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsSuccess
+{
+  #keys: '3[415136.0.1262040069][415136.0.1262040068][415136.0.1262040070]'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_LogMessageNo.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_LogMessageNo.qbl
new file mode 100644
index 0000000..98bdec5
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_LogMessageNo.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute LogMessageNo
+{
+  #keys: '3[415136.0.1262040113][415136.0.1262040112][415136.0.1262040114]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_LogNo.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_LogNo.qbl
new file mode 100644
index 0000000..6a8184a
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_LogNo.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute LogNo
+{
+  #keys: '3[415136.0.1262040103][415136.0.1262040102][415136.0.1262040104]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg.qbl
new file mode 100644
index 0000000..79cdd12
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Msg
+{
+  #keys: '3[415136.0.1261990019][415136.0.1261990018][415136.0.1261990020]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v1.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v1.qbl
new file mode 100644
index 0000000..48cd092
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v1.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Msg_v1
+{
+  #keys: '3[415136.0.1261990029][415136.0.1261990028][415136.0.1261990030]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v2.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v2.qbl
new file mode 100644
index 0000000..cc31743
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v2.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Msg_v2
+{
+  #keys: '3[415136.0.1262040123][415136.0.1262040122][415136.0.1262040124]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v3.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v3.qbl
new file mode 100644
index 0000000..916f567
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v3.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Msg_v3
+{
+  #keys: '3[415136.0.1262040133][415136.0.1262040132][415136.0.1262040134]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v4.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v4.qbl
new file mode 100644
index 0000000..9ead1f9
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Msg_v4.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Msg_v4
+{
+  #keys: '3[415136.0.1261990039][415136.0.1261990038][415136.0.1261990040]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Number.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Number.qbl
new file mode 100644
index 0000000..6a20c5c
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Number.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Number
+{
+  #keys: '3[415136.0.1262040093][415136.0.1262040092][415136.0.1262040094]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Type.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Type.qbl
new file mode 100644
index 0000000..9f14f07
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Attribute_Type.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Type
+{
+  #keys: '3[415136.0.1262040059][415136.0.1262040058][415136.0.1262040060]'
+  Description: 'S/E'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/Function_CalcIsSuccess.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Function_CalcIsSuccess.qbl
new file mode 100644
index 0000000..3bcb4fd
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/Function_CalcIsSuccess.qbl
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcIsSuccess
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-31-2024 (created)
+    
+    value := false;
+    
+    if( this.Type() = 'S' ){
+      
+      value := true;
+    }
+    
+    this.IsSuccess( value );
+  *]
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/StaticMethod_GenerateData.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/StaticMethod_GenerateData.qbl
new file mode 100644
index 0000000..8f707a2
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/StaticMethod_GenerateData.qbl
@@ -0,0 +1,35 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GenerateData (
+  InterfaceLoginfo owner,
+  JSON item
+) as InterfaceSAPResponseLoginfo
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jul-17-2024 (created)
+    type                       := guard( item.Get( "type").GetString(),"");
+    id                         := guard( item.Get( "id").GetString(),"");
+    number                     := guard( item.Get( "number").GetString(),"");
+    logNo                      := guard( item.Get( "logNo").GetString(),"");
+    logMessageNo               := guard( item.Get( "logMessageNo").GetString(),"");
+    msg                        := guard( item.Get( "msg").GetString(),"");
+    msg_v1                     := guard( item.Get( "msg_v1").GetString(),"");
+    msg_v2                     := guard( item.Get( "msg_v2").GetString(),"");
+    msg_v3                     := guard( item.Get( "msg_v3").GetString(),"");
+    msg_v4                     := guard( item.Get( "msg_v4").GetString(),"");
+    
+    saploginfo                 := owner.SAPResponseLoginfo( relnew, Type            := type
+                                                            , ID                    := id
+                                                            , Number                := number
+                                                            , LogNo                 := logNo
+                                                            , LogMessageNo          := logMessageNo
+                                                            , Msg                   := msg
+                                                            , Msg_v1                := msg_v1
+                                                            , Msg_v2                := msg_v2
+                                                            , Msg_v3                := msg_v3
+                                                            , Msg_v4                := msg_v4 );
+    
+    return saploginfo;
+  *]
+}
diff --git a/_Main/BL/Type_InterfaceSAPResponseLoginfo/_ROOT_Type_InterfaceSAPResponseLoginfo.qbl b/_Main/BL/Type_InterfaceSAPResponseLoginfo/_ROOT_Type_InterfaceSAPResponseLoginfo.qbl
new file mode 100644
index 0000000..472f759
--- /dev/null
+++ b/_Main/BL/Type_InterfaceSAPResponseLoginfo/_ROOT_Type_InterfaceSAPResponseLoginfo.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type InterfaceSAPResponseLoginfo
+{
+  #keys: '5[415136.0.1262040055][415136.0.1262040053][0.0.0][415136.0.1262040054][415136.0.1262040056]'
+  BaseType: Object
+  Description: 'sap鎺ュ彛杩斿洖淇℃伅'
+  StructuredName: 'InterfaceSAPResponseLoginfos'
+}
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl b/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
index 9b9f152..63b0a65 100644
--- a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
+++ b/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
@@ -2,7 +2,8 @@
 #parent: #root
 StaticMethod RefreshData (
   InterfaceDataset interface,
-  const MacroPlan macroPlan
+  const MacroPlan macroPlan,
+  const Archive archive
 )
 {
   TextBody:
@@ -21,19 +22,35 @@
     }
     nopcolumns             := selectuniquevalues(  macroPlan, NewOfflinePlanTable.NewOfflinePlanColumn, nopcolumn, not exists( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcolumn.StartDate() ), nopcolumn.StartDate() );
     table.GenerateColumn( nopcolumns, search.TimeUnit(), search.StartDate(), search.EndDate() );
-    traverse( macroPlan, NewOfflinePlanTable, noptable ){
-      
-      traverse( noptable, NewOfflinePlanRow, noprow ){
-        row                  := table.GetRow( noprow );
-        traverse( noprow, NewOfflinePlanCell, nopcell ){
-          column             := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() );
-          cell               := selectobject( row, Cell, cell, cell.Column() = column );
-          cell.InventoryWeight( nopcell.InventoryWeight() );
+    noptable               := maxobject( macroPlan, NewOfflinePlanTable, noptable, noptable.SaveDateTime() );
+    actproductiondatas     := selectset( archive,ActualDailyProductionData,data,true );
+    actproductiontree      := NamedValueTree::Create();
+    for( i := 0; i< actproductiondatas.Size(); i++ ){
+      actproduction        := actproductiondatas.Element( i );
+      actproductionKey     := actproduction.ProductNo() + actproduction.ProductionDate().AsQUILL();
+      actproductionhandle  := actproductiontree.GetHandle( actproductionKey );
+      actproductiontree.Root().AddChild( actproductionhandle,i ); 
+    }
+    traverse( noptable, NewOfflinePlanRow, noprow ){
+      row                  := table.GetRow( noprow );
+      traverse( noprow, NewOfflinePlanCell, nopcell ){
+        column             := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() );
+        cell               := selectobject( row, Cell, cell, cell.Column() = column );
+        actproductionKey   := noprow.ProductID() + column.StartDate().AsQUILL();
+        actproductionhandle:= actproductiontree.GetHandle( actproductionKey );
+        actproductionindex := guard( actproductiontree.Root().Child( actproductionhandle ),null( NamedValue ));
+        
+        actproductionqty       := 0.0;
+        if( not isnull( actproductionindex )){
+          actproduction        := actproductiondatas.Element( actproductionindex.GetValueAsNumber() );
+          actproductionqty     := actproduction.ActualOut();
+        }
+        cell.ActualProductionQty( actproductionqty );
+        cell.InventoryWeight( nopcell.InventoryWeight() );
     //      cell.ProductionSerialNumber( nopcell.ProductionSerialNumber() );
-          cell.Quantity( nopcell.Quantity() );
+        cell.Quantity( nopcell.Quantity() );
     //      cell.Shift( nopcell.Shift() );
     //      cell.Value( nopcell.Value() );
-        }
       }
     }
     //showtable.Generate( search, products );
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_ActualProductionQty.qbl b/_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_ActualProductionQty.qbl
new file mode 100644
index 0000000..00c8b1a
--- /dev/null
+++ b/_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_ActualProductionQty.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ActualProductionQty
+{
+  #keys: '3[415136.0.1256481350][415136.0.1256481349][415136.0.1256481351]'
+  Description: '瀹為檯浜ч噺'
+  ValueType: Real
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogReportArchiveConfirm/Method_OnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogReportArchiveConfirm/Method_OnOK.def
index 46f7baf..7cc69fd 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogReportArchiveConfirm/Method_OnOK.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogReportArchiveConfirm/Method_OnOK.def
@@ -45,6 +45,14 @@
       showlabel := showlabel.Concat( plannames.Concatenate( "銆�" ) ).Concat( '锛�' );
     //  info( '*****************************' );
       if( WebMessageBox::Question( this, showlabel, 'OK|Cancel' ) = 0 ){
+        InterfaceDataset.GenerateArchiveData( MacroPlan, RecycleBin, Archive, cbCustomDemand.Checked()
+                                              , cbOfflinePlan.Checked()
+                                              , cbShiftPlan.Checked()
+                                              , cbAssembleOnlinePlan.Checked()
+                                              , cbInventoryPlan.Checked()
+                                              , cbTRCDemand.Checked()
+                                              , cbTransferPlan.Checked()
+                                              , cbPackagePlan.Checked() );
       }
     //}else{
     //  info( '************###########*****************' );
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlLeft\04388.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlLeft\04388.def"
index 1567971..7effb1a 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlLeft\04388.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlLeft\04388.def"
@@ -5,17 +5,6 @@
   BaseType: 'WebPanel'
   Children:
   [
-    Component efFactory
-    {
-      #keys: '[415136.0.1044211287]'
-      BaseType: 'WebEditField'
-      Properties:
-      [
-        Label: '宸ュ巶浠g爜'
-        Taborder: 0
-        Visible: false
-      ]
-    }
     Component dsStartDate
     {
       #keys: '[415136.0.1044211288]'
@@ -23,7 +12,7 @@
       Properties:
       [
         Label: '寮�濮嬫棩鏈�'
-        Taborder: 2
+        Taborder: 1
       ]
     }
     Component dsEndDate
@@ -33,7 +22,7 @@
       Properties:
       [
         Label: '缁撴潫鏃ユ湡'
-        Taborder: 3
+        Taborder: 2
       ]
     }
     Component cbActiveVersion
@@ -44,7 +33,7 @@
       [
         Checked: true
         Label: '鏄惁婵�娲荤増鏈�'
-        Taborder: 6
+        Taborder: 5
       ]
     }
     Component efVersionFrom
@@ -54,7 +43,7 @@
       Properties:
       [
         Label: '浠庣増鏈�'
-        Taborder: 4
+        Taborder: 3
       ]
     }
     Component efVersionTo
@@ -64,7 +53,7 @@
       Properties:
       [
         Label: '鍒扮増鏈�'
-        Taborder: 5
+        Taborder: 4
       ]
     }
     Component ddslFactory
@@ -73,10 +62,9 @@
       BaseType: 'WebDropDownStringList'
       Properties:
       [
-        InitialValue: 'all;8200;8201'
         Label: '宸ュ巶浠g爜'
         Strings: 'All;DL;CC'
-        Taborder: 1
+        Taborder: 0
       ]
     }
   ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlLeft.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlLeft.def
index 9065511..68c7490 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlLeft.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlLeft.def
@@ -5,17 +5,6 @@
   BaseType: 'WebPanel'
   Children:
   [
-    Component efFactory id:efFactory_672
-    {
-      #keys: '[415136.0.1043000546]'
-      BaseType: 'WebEditField'
-      Properties:
-      [
-        Label: '宸ュ巶浠g爜'
-        Taborder: 0
-        Visible: false
-      ]
-    }
     Component dsStartDate id:dsStartDate_60
     {
       #keys: '[415136.0.1043000586]'
@@ -23,7 +12,7 @@
       Properties:
       [
         Label: '璁″垝寮�濮嬫椂闂�'
-        Taborder: 3
+        Taborder: 2
       ]
     }
     Component dsEndDate id:dsEndDate_236
@@ -33,7 +22,7 @@
       Properties:
       [
         Label: '璁″垝缁撴潫鏃堕棿'
-        Taborder: 4
+        Taborder: 3
       ]
     }
     Component ddslFactory id:ddslFactory_424
@@ -42,10 +31,10 @@
       BaseType: 'WebDropDownStringList'
       Properties:
       [
-        InitialValue: 'all;8200;8201'
+        InitialValue: 'All'
         Label: '宸ュ巶浠g爜'
         Strings: 'All;DL;CC'
-        Taborder: 1
+        Taborder: 0
       ]
     }
     Component efVersion
@@ -55,7 +44,7 @@
       Properties:
       [
         Label: '鐗堟湰'
-        Taborder: 2
+        Taborder: 1
       ]
     }
   ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Response_pnlLeft_ddslFactory_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Response_pnlLeft_ddslFactory_OnCreated.def
new file mode 100644
index 0000000..13fe02b
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Response_pnlLeft_ddslFactory_OnCreated.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: pnlLeft/ddslFactory_424
+Response OnCreated () id:Response_pnlLeft_ddslFactory_OnCreated
+{
+  #keys: '[415136.0.1257761350]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      valueString := "All";
+      
+      this.Strings( valueString.Concat( ";" ).Concat( FinancialProductionReport::GetDefaultCCUnit().Concat( ";" ) ).Concat( FinancialProductionReport::GetDefaultDLUnit() ) );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_ListInterfaceSapResponseLoginfo.def b/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_ListInterfaceSapResponseLoginfo.def
new file mode 100644
index 0000000..3b6e35d
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_ListInterfaceSapResponseLoginfo.def
@@ -0,0 +1,42 @@
+Quintiq file version 2.0
+Component ListInterfaceSapResponseLoginfo
+{
+  #keys: '[415136.0.1260821889]'
+  BaseType: 'WebList'
+  Children:
+  [
+    Component DataExtractorInterfaceSapResponseLoginfo
+    {
+      #keys: '[415136.0.1260821890]'
+      BaseType: 'WebDataExtractor'
+      Properties:
+      [
+        DataType: 'InterfaceLoginfo'
+        ExtractionMode: 'Selected'
+        Source: 'FormInterfaceLoginfo.ListInterfaceLoginfo'
+        Taborder: 0
+        Transformation: 'SAPResponseLoginfo'
+      ]
+    }
+    #child: listActionBarPageInterfaceSapResponseLoginfo
+    Component DataSetLevelInterfaceSapResponseLoginfo
+    {
+      #keys: '[415136.0.1260821895]'
+      BaseType: 'WebDataSetLevel'
+      Children:
+      [
+        #child: listContextMenuInterfaceSapResponseLoginfo
+      ]
+      Properties:
+      [
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsSuccess","title":"IsSuccess","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsSuccess"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LogMessageNo","title":"LogMessageNo","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"LogMessageNo"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LogNo","title":"LogNo","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"LogNo"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Msg","title":"Msg","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Msg"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Msg_v1","title":"Msg_v1","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Msg_v1"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Msg_v2","title":"Msg_v2","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Msg_v2"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Msg_v3","title":"Msg_v3","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Msg_v3"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Msg_v4","title":"Msg_v4","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Msg_v4"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Number","title":"Number","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"Number"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Type","title":"Type","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Type"}}]'
+        ContextMenu: 'listContextMenuInterfaceSapResponseLoginfo'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_listActionBarPageInterfaceSapResponseLoginfo.def b/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_listActionBarPageInterfaceSapResponseLoginfo.def
new file mode 100644
index 0000000..cab0281
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_listActionBarPageInterfaceSapResponseLoginfo.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component listActionBarPageInterfaceSapResponseLoginfo
+{
+  #keys: '[415136.0.1260821892]'
+  BaseType: 'listActionBarPage'
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_listContextMenuInterfaceSapResponseLoginfo.def b/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_listContextMenuInterfaceSapResponseLoginfo.def
new file mode 100644
index 0000000..40535a4
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/Component_listContextMenuInterfaceSapResponseLoginfo.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component listContextMenuInterfaceSapResponseLoginfo
+{
+  #keys: '[415136.0.1260821897]'
+  BaseType: 'listContextMenu'
+  Properties:
+  [
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/_ROOT_Component_FormInterfaceSapResponseLoginfo.def b/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/_ROOT_Component_FormInterfaceSapResponseLoginfo.def
new file mode 100644
index 0000000..340d79d
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceSapResponseLoginfo/_ROOT_Component_FormInterfaceSapResponseLoginfo.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent FormInterfaceSapResponseLoginfo
+{
+  #keys: '[415136.0.1260821836]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: ListInterfaceSapResponseLoginfo
+  ]
+  Properties:
+  [
+    Image: 'DATA_SCROLL'
+    Title: 'SAP response loginfo'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Views/Interface_loginfo_view.vw b/_Main/UI/MacroPlannerWebApp/Views/Interface_loginfo_view.vw
index cc85355..b0468a9 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/Interface_loginfo_view.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/Interface_loginfo_view.vw
@@ -128,6 +128,93 @@
           }
         }
       }
+      form_FormInterfaceSapResponseLoginfo
+      {
+        title: 'QMacroPlanner::FormInterfaceSapResponseLoginfo'
+        shown: true
+        componentID: 'QMacroPlanner::FormInterfaceSapResponseLoginfo'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 17
+          rowSpan: 12
+          columnPosition: 1
+          columnSpan: 12
+        }
+        components
+        {
+          FormInterfaceSapResponseLoginfo_ListInterfaceSapResponseLoginfo
+          {
+          }
+          FormInterfaceSapResponseLoginfo_DataSetLevelInterfaceSapResponseLoginfo
+          {
+            groupDepth: -1
+            column_IsSuccess
+            {
+              columnId: 'IsSuccess'
+              dataPath: 'IsSuccess'
+              dataType: 'boolean'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_Msg
+            {
+              columnId: 'Msg'
+              dataPath: 'Msg'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 150
+            }
+            column_Msg_v1
+            {
+              columnId: 'Msg_v1'
+              dataPath: 'Msg_v1'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 150
+            }
+            column_Msg_v2
+            {
+              columnId: 'Msg_v2'
+              dataPath: 'Msg_v2'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 150
+            }
+            column_Msg_v3
+            {
+              columnId: 'Msg_v3'
+              dataPath: 'Msg_v3'
+              dataType: 'string'
+              index: 4
+              subtotals: ''
+              width: 150
+            }
+            column_Msg_v4
+            {
+              columnId: 'Msg_v4'
+              dataPath: 'Msg_v4'
+              dataType: 'string'
+              index: 5
+              subtotals: ''
+              width: 150
+            }
+            column_Type
+            {
+              columnId: 'Type'
+              dataPath: 'Type'
+              dataType: 'string'
+              index: 6
+              subtotals: ''
+              width: 150
+            }
+          }
+        }
+      }
     }
     userconfigurableinformation
     {

--
Gitblit v1.9.3