From bbc05c39743320fd2aa804c4522e58a90a460c57 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期五, 06 九月 2024 17:45:11 +0800
Subject: [PATCH] 客户需求报表页面
---
_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl | 46 ++++++++++------------------------------------
1 files changed, 10 insertions(+), 36 deletions(-)
diff --git a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
index 1ccd93d..54ab522 100644
--- a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
@@ -2,8 +2,6 @@
#parent: #root
StaticMethod GenerateData (
const MacroPlan macroplan,
- RecycleBin recycle,
- const Archive archive,
InterfaceDataset interfaceDataset,
String executor,
Boolean versionflag
@@ -33,42 +31,18 @@
, ReturnMsg := 'Success'
, Success := true
);
- traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
- info( forecast.ProductID() );
- cd :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product := forecast.ProductID()
- , DemandDate := forecast.StartDate()
- , DemandQty := [Number]forecast.Quantity()
- , VersionName := macroplan.ScenarioName()
- , InterfaceTime := nowdate
- , VersionFlag := versionflag
- );
- loginfo.CustomerDemandPPAIDS( relinsert, cd );
- }
- binaryValue := TemplateManager::GetIDSFullTable( archive, Date::ActualDate().Year() );
- source := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
- source.ReadStructure();
- Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
- cnv2 := StringToDate::StandardConverter();
- cnv2.SetCustomConversion();
- cnv2.CustomFormatString( "dd/MM/yyyy" );
- traverse( recycle, GeneralExcelImportAndExportDataSource.GeneralExcelImportAndExportDataTable, table ){
- traverse( table, GeneralExcelImportAndExportDataRow, row ){
- product := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
- traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){
- info( cell.GeneralExcelImportAndExportDataColumn().ColumnIndex(), cell.Value(), product.Value() );
- period := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() );
- cd :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product := product.Value()
- , DemandDate := period
- , DemandQty := [Number]cell.Value()
- , VersionName := macroplan.ScenarioName()
- , InterfaceTime := nowdate
- , VersionFlag := versionflag
- );
- loginfo.CustomerDemandPPAIDS( relinsert, cd );
- }
+ traverse( macroplan, CustomerDemandIDS.Row, row ){
+ traverse( row, Cell, cell ){
+ cd :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product := row.Name()
+ , DemandDate := cell.Column().StartDate()
+ , DemandQty := [Number]cell.Value()
+ , VersionName := macroplan.ScenarioName()
+ , InterfaceTime := nowdate
+ , VersionFlag := versionflag
+ );
+ loginfo.CustomerDemandPPAIDS( relinsert, cd );
}
}
- source.Delete();
loginfo.TotalRow( loginfo.CustomerDemandPPAIDS( relsize ) );
*]
}
--
Gitblit v1.9.3