admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
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
Quintiq file version 2.0
#parent: #root
Method GetRow (
  NewOfflinePlanRow noprow
) as OfflinePlanArchiveRow
{
  TextBody:
  [*
    // 甄兰鸽 Oct-11-2024 (created)
    row       := selectobject( this, Row, row, row.Name() = noprow.ProductID() and row.ProductionLine() = noprow.ProductionLine() and row.Type() = noprow.Type() and row.StockingPointID() = noprow.StockingPointID() );
    
    if( isnull( row ) ){
      product := selectobject( noprow.NewOfflinePlanTable().MacroPlan(), Product_MP, product, product.ID() = noprow.ProductID() );
      if( not isnull( product ) ){
        unit    := ifexpr( noprow.ProductionLine().FindString( "CC", 0 ) > -1, FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() );
        row     := this.Row( relnew, Name := noprow.ProductID(), ProductionLine := noprow.ProductionLine(), Type := noprow.Type(), Unit := unit,StockingPointID := noprow.StockingPointID()
                             , ProductID := ifexpr( exists( product.GetAllParent(), Elements, e, e.ID() = EnginePipelineReport::GetDefaultProductParent() ), product.Notes(), product.ID() ) );
        //初始化单元格
        row.InitializeCell();
      }
    }
    
    return row;
  *]
}