From 20bac026b51b5d6572a6107ef09397288bbc6dd8 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期三, 06 十一月 2024 15:38:32 +0800
Subject: [PATCH] 发送报表数据

---
 _Main/UI/MacroPlannerWebApp/Component_DialogPublishPlan/Method_OnOK.def          |    8 +++++++-
 _Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl                  |   33 +++++++++++++++++++++++++++++++++
 _Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl                 |    5 ++---
 _Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def |    4 ++--
 4 files changed, 44 insertions(+), 6 deletions(-)

diff --git a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
index c6b465d..8876fdd 100644
--- a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
@@ -3,8 +3,7 @@
 StaticMethod GenerateData (
   InterfaceDataset interfaceDataset,
   const MacroPlan macroplan,
-  String executor,
-  Boolean versionflag
+  String executor
 )
 {
   Description: '鐢熸垚鍙互涓嬪彂鐨勫鎴烽渶姹傦紙PPA+IDS锛夋暟鎹�'
@@ -38,7 +37,7 @@
                                                                      , DemandQty               := [Number]cell.Value()
                                                                      , VersionName             := macroplan.ScenarioName()
                                                                      , InterfaceTime           := nowdate
-                                                                     , VersionFlag             := versionflag
+    //                                                                 , VersionFlag             := versionflag
                                                                      );
         loginfo.CustomerDemandPPAIDS( relinsert, cd );
       }
diff --git a/_Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl b/_Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl
new file mode 100644
index 0000000..68a5c84
--- /dev/null
+++ b/_Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl
@@ -0,0 +1,33 @@
+Quintiq file version 2.0
+#parent: #root
+Method PublishPlanReportData (
+  const MacroPlan macroplan,
+  Boolean iscustomdemand,
+  Boolean isofflineplan,
+  Boolean isshiftplan,
+  Boolean isassembleonlineplan,
+  Boolean isinventoryplan,
+  String executor
+)
+{
+  Description: '涓嬪彂璁″垝鏁版嵁'
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-30-2024 (created)
+    if( iscustomdemand ){//鍏ㄥ勾鏃ュ害闇�姹�/瀹㈡埛闇�姹� 
+      CustomerDemandPPAIDS::GenerateData( this, macroplan, executor );
+    }
+    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 );
+    }
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def
index 5d1b854..0840c40 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def
@@ -5,13 +5,13 @@
   #keys: '[415136.0.1022502154]'
   Body:
   [*
-    // On ok
+    // On ok 
     Form.ApplyChanges();
     
     currentuser  := QuintiqUser::CurrentUser().DisplayName();
     isactive     := ifexpr( rbgVersionFlag.BoundValue() = "true", true, false );
     if( efInterfacename.Text() = Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() ){//瀹㈡埛闇�姹�
-      CustomerDemandPPAIDS::GenerateData( InterfaceDataset, MacroPlan, currentuser, isactive );
+      CustomerDemandPPAIDS::GenerateData( InterfaceDataset, MacroPlan, currentuser );
     }
     if( efInterfacename.Text() = Translations::InterfaceDataset_AssemblyOnlinePlanPPPSPush_Name()){//瑁呴厤涓婄嚎
       AssemblyOnlinePlanPPPSPush::GenerateData( MacroPlan, InterfaceDataset, currentuser, isactive );
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogPublishPlan/Method_OnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogPublishPlan/Method_OnOK.def
index f3ed1c0..e0d5650 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogPublishPlan/Method_OnOK.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogPublishPlan/Method_OnOK.def
@@ -26,8 +26,14 @@
       }
     
       showlabel := showlabel.Concat( plannames.Concatenate( "銆�" ) ).Concat( '锛�' );
-    
+    currentuser  := QuintiqUser::CurrentUser().DisplayName();
       if( WebMessageBox::Question( this, showlabel, 'OK|Cancel' ) = 0 ){
+        InterfaceDataset.PublishPlanReportData( MacroPlan, cbCustomDemand.Checked()
+                                              , cbOfflinePlan.Checked()
+                                              , cbShiftPlan.Checked()
+                                              , cbAssembleOnlinePlan.Checked()
+                                              , cbInventoryPlan.Checked()
+                                                , currentuser );
       }
     
     this.Close();

--
Gitblit v1.9.3