陈清红
2025-04-14 880f3c0257eeb8c37761d484258fdd102a369a19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Quintiq file version 2.0
#parent: #root
StaticMethod AddPISPIPFromFirstToLast (
  output ProductInStockingPointInPeriodPlanningLeafs candidates_o,
  ProductInStockingPoint_MP pisp,
  ProductInStockingPointInPeriodPlanningLeaf firstpispip,
  DateTime last,
  Boolean includefirst,
  Boolean includelast
) as ProductInStockingPointInPeriodPlanningLeaf
{
  TextBody:
  [*
    pispip := pisp.FirstPISPIPRectangleMeta();
    lastadded := null(  ProductInStockingPointInPeriodPlanningLeaf ); 
    if ( not includefirst and not isnull( pispip ) ) 
    {
      pispip := pispip.NextPlanningPISPIP().astype( ProductInStockingPointInPeriodPlanningLeaf ); 
    } 
    last := last - ifexpr(  includelast, Duration::Zero(), Duration::Minutes( 1 ) ); 
    while(  not isnull( pispip )
                        and pispip.Start() <= last ) 
    {
      candidates_o.Add( pispip ); 
      lastadded := pispip; 
      pispip := pispip.NextPlanningPISPIP().astype( ProductInStockingPointInPeriodPlanningLeaf ); 
    }
    return lastadded;
  *]
  InterfaceProperties { Accessibility: 'Module' }
}