Quintiq file version 2.0
|
#parent: #root
|
Method GenerateColumn (
|
MacroPlan owner,
|
String timeunit,
|
Date startdate,
|
Date enddate
|
)
|
{
|
TextBody:
|
[*
|
// 甄兰鸽 Jun-25-2024 (created)
|
//查询日期返回需要在计划日期之内
|
weekstart := owner.StartOfPlanning().Date();
|
traverse( owner, Period_MP, period, not period.IsHistorical() and period.TimeUnit() = Translations::MP_GlobalParameters_Day() ){
|
if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Day() ){
|
periodtime := period.StartDate();
|
periodname := periodtime.Format( "M2/D2/Y" );
|
|
this.Column( relnew, Name := periodname, Period := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() );
|
}
|
|
if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){
|
if( period.StartDate() = weekstart ){
|
weekperiodname := weekstart.Format( "M2/D2/Y" );
|
this.Column( relnew, Name := weekperiodname, Period := weekstart, TimeUnit := Translations::MP_GlobalParameters_Week() );
|
weekstart := ( weekstart + Duration::Days( 7 ) ).Date();
|
}
|
}
|
}
|
*]
|
}
|