From 1fe923bcb5983e2156e13dbf1316c6dabfbf026d Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期五, 06 九月 2024 18:18:08 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
---
_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl | 27 ++++-----------------------
1 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
index 2139612..54ab522 100644
--- a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
@@ -2,7 +2,6 @@
#parent: #root
StaticMethod GenerateData (
const MacroPlan macroplan,
- const Archive archive,
InterfaceDataset interfaceDataset,
String executor,
Boolean versionflag
@@ -32,28 +31,10 @@
, ReturnMsg := 'Success'
, Success := true
);
- traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
- 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() );
- CustomerDemandIDS::ReadStructure( binaryValue, interfaceDataset );
- productcolumn := select( interfaceDataset, CustomerDemandIDS.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() );
- cd :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product := product.Value()
- , DemandDate := period
+ 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
--
Gitblit v1.9.3