From cd76160e1dcefe21c06b610bd4ef17928cbfba51 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期三, 04 九月 2024 18:37:48 +0800
Subject: [PATCH] 通过共用类解析binary
---
_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
index 2139612..a9645b0 100644
--- a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
@@ -2,6 +2,7 @@
#parent: #root
StaticMethod GenerateData (
const MacroPlan macroplan,
+ RecycleBin recycle,
const Archive archive,
InterfaceDataset interfaceDataset,
String executor,
@@ -43,15 +44,16 @@
loginfo.CustomerDemandPPAIDS( relinsert, cd );
}
binaryValue := TemplateManager::GetIDSFullTable( archive, Date::ActualDate().Year() );
- CustomerDemandIDS::ReadStructure( binaryValue, interfaceDataset );
- productcolumn := select( interfaceDataset, CustomerDemandIDS.Column, column, column.Index() = 1 );
+ source := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
+ source.ReadStructure();
+ //productcolumn := select( recycle, ge.Column, column, column.Index() = 1 );
cnv2 := StringToDate::StandardConverter();
cnv2.SetCustomConversion();
cnv2.CustomFormatString( "dd/MM/yyyy" );
- traverse( interfaceDataset, CustomerDemandIDS.Row, row ){
- product := selectobject( row, Cell, cell, cell.Column() = productcolumn );
- traverse( row, Cell, cell, cell.Column().Index() > 3 ){
- period := cnv2.Convert( cell.Column().Name() );
+ traverse( recycle, GeneralExcelImportAndExportDataSource.GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataRow, row ){
+ product := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 1 );
+ traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 3 ){
+ period := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() );
cd :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product := product.Value()
, DemandDate := period
, DemandQty := [Number]cell.Value()
@@ -62,6 +64,7 @@
loginfo.CustomerDemandPPAIDS( relinsert, cd );
}
}
+ source.Delete();
loginfo.TotalRow( loginfo.CustomerDemandPPAIDS( relsize ) );
*]
}
--
Gitblit v1.9.3