Quintiq file version 2.0
|
#parent: #root
|
StaticMethod Synchronize (
|
InterfaceDataset owner,
|
String executor
|
)
|
{
|
TextBody:
|
[*
|
//// 甄兰鸽 Jul-17-2024 (created)
|
date := Date::ActualDate() - Duration::Days( 1 );
|
loginfo := owner.InterfaceLoginfo( relnew, ExecuteUser := executor
|
, Name := Translations::InterfaceDataset_MachineStockData_Name()
|
, InterfaceDateTime := DateTime::ActualTime()
|
, Message := '库存数据(机加库存)'
|
, RequestBody := MachineStockData::GetRequestBody( date.Date() ) );
|
|
data := InterfaceLoginfo::CallInterface( owner, loginfo );
|
if( not isnull( data ) ){
|
|
cnv2 := StringToDate::StandardConverter();
|
cnv2.SetCustomConversion();
|
cnv2.CustomFormatString( 'yyyy-MM-dd' );
|
|
// sadatalist := construct( ShippingActualDatas );
|
for( seq := 0;seq < data.Size();seq++){
|
item := data.Get(seq);
|
inventory :=MachineStockData::GenerateData( loginfo, cnv2, item );
|
inventoryname := inventory.Lgort();
|
if( inventory.Fac() = 'DL' and inventory.Lgort() = 'All' ){
|
inventoryname := inventory.LineType();
|
}
|
options := DatasetFindOptions::Construct( 'MacroPlan' ).IncludeOffline( true ); //to load we must search offline datasets.
|
mdskey := DatasetController::FindUnique( options );
|
|
MDSMacroPlan::Root( mdskey ) -> InventoryInterfaceData::Generate( owner, inventory.DDay(), inventory.MaterialNo(), inventoryname, inventory.Fac(), [Number]inventory.Total() );
|
// sadatalist.Add( sadata );
|
}
|
}
|
*]
|
}
|