From 78dd2e41b79a74e267c48fb92603c2d170ce3779 Mon Sep 17 00:00:00 2001 From: lazhen <17772815105@139.com> Date: 星期五, 22 十一月 2024 18:08:00 +0800 Subject: [PATCH] 客户需求ids数据 --- _Main/BL/Type_CustomerDemandArchive/StaticMethod_GenerateData.qbl | 58 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 29 insertions(+), 29 deletions(-) diff --git a/_Main/BL/Type_CustomerDemandArchive/StaticMethod_GenerateData.qbl b/_Main/BL/Type_CustomerDemandArchive/StaticMethod_GenerateData.qbl index 2812c04..7bafbd1 100644 --- a/_Main/BL/Type_CustomerDemandArchive/StaticMethod_GenerateData.qbl +++ b/_Main/BL/Type_CustomerDemandArchive/StaticMethod_GenerateData.qbl @@ -12,34 +12,34 @@ [* // 鐢勫叞楦� Nov-22-2024 (created) info( '-------------------------Start---------------------'); - 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( "yyyy/MM/dd" ); - - traverse( recycle, GeneralExcelImportAndExportDataSource.GeneralExcelImportAndExportDataTable, table ){ - traverse( table, GeneralExcelImportAndExportDataRow, row ){ - productcell := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 ); - factorycell := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 ); - unitname := ifexpr( factorycell.Value().StartsWith( '闀挎槬' ), FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() ); - // idsrow := idstable.GetRowByUnit( productcell.Value(), unitname ); - traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){ - period := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() ); - archivedata := selectobject( interface, CustomerDemandArchive, archivedata, archivedata.Factory() = factorycell.Value() - and archivedata.Product() = productcell.Value() - and archivedata.StartDate() = period - and archivedata.Origin() = 'IDS' ); - if( isnull( archivedata ) ){ - archivedata := interface.CustomerDemandArchive( relnew, Factory := factorycell.Value(), Product := productcell.Value(), StartDate := period, Origin := 'IDS', FactoryName := unitname ); - } - archivedata.Quantity( [Real]cell.Value() ); - } - } - } - traverse ( macroplan, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.Product_MP() ) and forecast.Origin() = 'PPA' ){ + //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( "yyyy/MM/dd" ); + // + //traverse( recycle, GeneralExcelImportAndExportDataSource.GeneralExcelImportAndExportDataTable, table ){ + // traverse( table, GeneralExcelImportAndExportDataRow, row ){ + // productcell := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 ); + // factorycell := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 ); + // unitname := ifexpr( factorycell.Value().StartsWith( '闀挎槬' ), FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() ); + //// idsrow := idstable.GetRowByUnit( productcell.Value(), unitname ); + // traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){ + // period := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() ); + // archivedata := selectobject( interface, CustomerDemandArchive, archivedata, archivedata.Factory() = factorycell.Value() + // and archivedata.Product() = productcell.Value() + // and archivedata.StartDate() = period + // and archivedata.Origin() = 'IDS' ); + // if( isnull( archivedata ) ){ + // archivedata := interface.CustomerDemandArchive( relnew, Factory := factorycell.Value(), Product := productcell.Value(), StartDate := period, Origin := 'IDS', FactoryName := unitname ); + // } + // archivedata.Quantity( [Real]cell.Value() ); + // } + // } + //} + traverse ( macroplan, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.Product_MP() ) and ( forecast.Origin() = 'PPA' or forecast.Origin() = 'IDS' ) ){ unitname := ifexpr( forecast.StockingPointID().StartsWith( '闀挎槬' ) , FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() );/*ifexpr( forecast.SalesSegment_MP().Name().StartsWith( 'Changchun' ) or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Changchun' ) ) @@ -63,7 +63,7 @@ } } - source.Delete(); + //source.Delete(); info( '-------------------------End---------------------'); *] } -- Gitblit v1.9.3