1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod Create ( 
 |    Routing owner, 
 |    Date startDate, 
 |    Date endDate, 
 |    Real percentage, 
 |    String suffix 
 |  ) as UphillRouting 
 |  { 
 |    TextBody: 
 |    [* 
 |      // rislai Jun-14-2024 (created) 
 |       
 |      verifyData := select( owner,UphillRouting,ur,ur.Suffix() = suffix and LocalTool::IsOverlap( ur.StartDate(),ur.EndDate(),startDate,endDate )); 
 |      if( not isnull( verifyData )){ 
 |        error( "设置的Start和End不可与已有数据的时间区间重叠。" );  
 |      } 
 |       
 |      data := owner.UphillRouting( relnew,StartDate := startDate, EndDate := endDate,Percentage := percentage,Suffix := suffix ); 
 |       
 |      return data; 
 |    *] 
 |  } 
 |  
  |