Quintiq file version 2.0
|
#parent: #root
|
StaticMethod InterfaceArchive (
|
MacroPlan macroPlan,
|
InterfaceDataset interfaceDataset
|
)
|
{
|
TextBody:
|
[*
|
nopt := maxselect( macroPlan, NewOfflinePlanTable, tempNOPT, true, tempNOPT.SaveDateTime() );
|
|
// 选择指定版本下线计划接口数据
|
inopv := select( interfaceDataset, InterfaceNewOfflinePlanVersion, tempINOPV, tempINOPV.ScenarioName() = macroPlan.ScenarioName() );
|
if ( isnull( inopv ) ) {
|
inopv := interfaceDataset.InterfaceNewOfflinePlanVersion( relnew, ScenarioName := macroPlan.ScenarioName() );
|
} else {
|
inopv.Delete();
|
inopv := interfaceDataset.InterfaceNewOfflinePlanVersion( relnew, ScenarioName := macroPlan.ScenarioName() );
|
}
|
|
// 创建下线计划接口数据
|
traverse ( nopt, NewOfflinePlanRow.NewOfflinePlanCell, nopcell, nopcell.NewOfflinePlanRow().Type() = "1" ) {
|
inopv.InterfaceNewOfflinePlanDetailData( relnew,
|
Order := nopcell.Order(),
|
OrderNr := nopcell.OrderNr(),
|
ProductID := nopcell.NewOfflinePlanRow().ProductID(),
|
ProductionLine := nopcell.NewOfflinePlanRow().ProductionLine(),
|
Quantity := nopcell.Quantity(),
|
ShiftPatternEnd := nopcell.ShiftPatternEnd(),
|
ShiftPatternName := nopcell.ShiftPatternName(),
|
ShiftPatternStart := nopcell.ShiftPatternStart(),
|
StartDate := nopcell.StartDate()
|
);
|
}
|
*]
|
}
|