From 0bb0bff90498bdec6f3d954dfc0bef2dec3b28c1 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期二, 03 九月 2024 18:04:23 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
---
_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
index c09496a..2139612 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,
+ const Archive archive,
InterfaceDataset interfaceDataset,
String executor,
Boolean versionflag
@@ -31,7 +32,7 @@
, ReturnMsg := 'Success'
, Success := true
);
- traverse( macroplan, SalesDemand.astype( Forecast ), forecast ){
+ traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
cd :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product := forecast.ProductID()
, DemandDate := forecast.StartDate()
, DemandQty := [Number]forecast.Quantity()
@@ -41,6 +42,26 @@
);
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
+ , DemandQty := [Number]cell.Value()
+ , VersionName := macroplan.ScenarioName()
+ , InterfaceTime := nowdate
+ , VersionFlag := versionflag
+ );
+ loginfo.CustomerDemandPPAIDS( relinsert, cd );
+ }
+ }
loginfo.TotalRow( loginfo.CustomerDemandPPAIDS( relsize ) );
*]
}
--
Gitblit v1.9.3