lazhen
2024-07-12 e7d178297c6065691f5a8ad20fb5e1c54c55031a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Quintiq file version 2.0
#parent: #root
Method GenerateColumn (
  MacroPlan owner,
  String timeunit,
  Date startdate,
  Date enddate
)
{
  TextBody:
  [*
    // 甄兰鸽 Jun-25-2024 (created)
    //查询日期返回需要在计划日期之内
    traverse( owner, Period_MP, period, not period.IsHistorical() and period.StartDate() >= startdate and period.EndDate() <= enddate
              and ( ( timeunit = 'All' and ( period.TimeUnit() = Translations::MP_GlobalParameters_Day() or period.TimeUnit() = Translations::MP_GlobalParameters_Week() ) ) 
                    or period.TimeUnit() = timeunit ) ){
      periodtime := period.StartDate();
      periodname := periodtime.Format( "M2/D2/Y" );
      
      this.Column( relnew, Name := periodname, Period := periodtime, TimeUnit := period.TimeUnit() );
    }
  *]
}