Quintiq file version 2.0
|
#parent: #root
|
StaticMethod GenerateData (
|
const MacroPlan macroplan,
|
InterfaceDataset interfaceDataset,
|
String executor,
|
Boolean versionflag
|
)
|
{
|
Description: '生成可以下发的客户需求(PPA+IDS)数据'
|
TextBody:
|
[*
|
// 甄兰鸽 Aug-20-2024 (created)
|
cdlast := maxobject( interfaceDataset, CustomerDemandPPAIDS, cd, cd.InterfaceTime(), cd.DemandDate(), cd.Product() );
|
if( not isnull( cdlast ) ){
|
loginfo := cdlast.InterfaceLoginfo();
|
if( not loginfo.IsShow() ){
|
loginfo.Delete();
|
}else{
|
loginfo.Last( false );
|
}
|
interfaceDataset.CustomerDemandPPAIDS( relflush );
|
}
|
nowdate := DateTime::ActualTime();
|
loginfo := interfaceDataset.InterfaceLoginfo( relnew, ExecuteUser := executor
|
, Name := Translations::InterfaceDataset_CustomerDemandPPAIDS_Name()
|
, InterfaceDateTime := nowdate
|
, Message := '客户需求(PPA+IDS)数据推送'
|
, Last := true
|
, IsShow := false
|
, ReturnSuccess := true
|
, ReturnMsg := 'Success'
|
, Success := true
|
);
|
traverse( macroplan, SalesDemand.astype( Forecast ), forecast ){
|
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 );
|
}
|
loginfo.TotalRow( loginfo.CustomerDemandPPAIDS( relsize ) );
|
*]
|
}
|