xiaoding721
2024-08-20 9a26b08165a48bec8014d22abec587cb2c7d8c28
修复了一些bug
已修改5个文件
已添加2个文件
93 ■■■■ 文件已修改
_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_Compared.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_AnnualPlanReport/_ROOT_Type_MP_Cell_AnnualPlanReport.qbl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Table/StaticMethod_GetMP_Tables_AnnualPlanReport.qbl 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Table/StaticMethod_GetMP_Tables_ScheduleSummary.qbl 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_Compared.qbl
@@ -88,8 +88,8 @@
              if( columnName = "发动机零件号" ){
                row.ProductID( ifexpr( isnull( baseVersionCell ), ifexpr( isnull( compareVersionCell ),"空",compareVersionCell.Value()), baseVersionCell.Value()) );
              }
              if( columnName = "产地" ){
                row.CustomName( row.ProductID() + " > " + ifexpr( isnull( baseVersionCell ), ifexpr( isnull( compareVersionCell ),"空",compareVersionCell.Value()), baseVersionCell.Value()) );
              if( columnName = "车型" ){
                row.CustomName( " > " + ifexpr( isnull( baseVersionCell ), ifexpr( isnull( compareVersionCell ),"空",compareVersionCell.Value()), baseVersionCell.Value()) );
              }
            }else{
              row.LocalCell( relnew,LocalCell_DemandComparison,LocalColumn := column,
@@ -97,6 +97,7 @@
                             CompareVersion := ifexpr( isnull( compareVersionCell ), 0 ,[Real]compareVersionCell.Value() ));
            }
          }
          row.CustomName( row.ProductID() + row.CustomName() );
        }
      }
      // åŽç»­åˆ é™¤
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
@@ -26,7 +26,7 @@
      columnIndexTree.Root().AddChild( columnHandle,columns.Size() - 1 );
    }
    
    traverse( owner,Unit,unit,unit.HasCapacityTypeTime()){
    traverse( owner,Unit,unit,unit.HasCapacityTypeTime() and not unit.HasChild()){
      // unit.AsEntity().DisplayNameForSelection()
      row := table.MP_Row( relnew,CustomName := unit.ID(),Index := table.GetRowIndexCache() ); 
      throughput := sum( unit,Operation,operation,operation.Throughput() ) / unit.Operation( relsize );
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl
@@ -3,20 +3,14 @@
StaticMethod CreateFullTable (
  const MacroPlans owners,
  RecycleBin recycleBin,
  const Archive archive
  const Archive archive,
  const MacroPlan owner
) as LocalTable
{
  TextBody:
  [*
    // rislai Aug-7-2024 (created)
    tables := construct( MP_Tables );
    traverse( owners,Elements,owner ){
      table := select( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
      if( isnull( table )){
        table :=  MP_Cell_ScheduleSummary::Create( owner );
      }
      tables.Add( table );
    }
    tables := MP_Table::GetMP_Tables_ScheduleSummary( owners );
    
    scheduleSummaryOutputDataIndexTree := NamedValueTree::Create();
    scheduleSummaryOutputDatas := selectset( archive,ScheduleSummaryOutputLine.ScheduleSummaryOutputData,data,
@@ -88,6 +82,18 @@
       }
    }
    
    //startDate := owner.StartOfPlanning().Date() + 7;
    //endDate := maxselect( owner,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.EndDate(),period.TimeUnit() = "Month" ).EndDate();
    //columns := construct( MP_Columns );
    //columnIndexTree := NamedValueTree::Create();
    //for( i := startDate;i < endDate; i := i + 1){
    //  column := table.MP_Column( relnew,CustomDate := i );
    //  columnHandle := columnIndexTree.GetHandle( i.AsQUILL() );
    //  columns.Add( column );
    //  columnIndexTree.Root().AddChild( columnHandle,columns.Size() - 1 );
    //}
    return localTable;
  *]
}
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl
@@ -8,14 +8,7 @@
  TextBody:
  [*
    // rislai Aug-7-2024 (created)
    tables := construct( MP_Tables );
    traverse( owners,Elements,owner ){
      table := select( owner,MP_Table,table,table.Name() = MP_Cell_AnnualPlanReport::GetTableName() );
      if( isnull( table )){
        table :=  MP_Cell_AnnualPlanReport::Create( owner );
      }
      tables.Add( table );
    }
    tables := MP_Table::GetMP_Tables_AnnualPlanReport( owners );
    
    localTable := recycleBin.LocalTable( relnew,Name := MP_Cell_AnnualPlanReport::GetTableName() );
    startDate := minselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate();
_Main/BL/Type_MP_Cell_AnnualPlanReport/_ROOT_Type_MP_Cell_AnnualPlanReport.qbl
@@ -4,6 +4,7 @@
TypeSpecialization MP_Cell_AnnualPlanReport
{
  #keys: '2[412672.1.107700065][412672.1.107700060]'
  Description: '全年计划报表'
  Parent: MP_Cell
  StructuredName: 'MP_Cell_AnnualPlanReports'
}
_Main/BL/Type_MP_Table/StaticMethod_GetMP_Tables_AnnualPlanReport.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetMP_Tables_AnnualPlanReport (
  const MacroPlans owners
) as owning MP_Tables
{
  TextBody:
  [*
    // Akari Aug-19-2024 (created)
    tables := construct( MP_Tables );
    traverse( owners,Elements,owner ){
      table := select( owner,MP_Table,table,table.Name() = MP_Cell_AnnualPlanReport::GetTableName() );
      if( isnull( table )){
        table :=  MP_Cell_AnnualPlanReport::Create( owner );
      }else{
        startDate := minselect( table,MP_Column,column,column.CustomDate() ).CustomDate();
        planStartDate := owner.StartOfPlanning().Date();
        if( startDate <> planStartDate ){
          table :=  MP_Cell_AnnualPlanReport::Create( owner );
        }
      }
      tables.Add( table );
    }
    return &tables;
  *]
}
_Main/BL/Type_MP_Table/StaticMethod_GetMP_Tables_ScheduleSummary.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetMP_Tables_ScheduleSummary (
  const MacroPlans owners
) as owning MP_Tables
{
  TextBody:
  [*
    // Akari Aug-19-2024 (created)
    tables := construct( MP_Tables );
    traverse( owners,Elements,owner ){
      table := select( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
      if( isnull( table )){
        table :=  MP_Cell_ScheduleSummary::Create( owner );
      }else{
        startDate := minselect( table,MP_Column,column,column.CustomDate() ).CustomDate();
        planStartDate := owner.StartOfPlanning().Date();
        if( startDate <> planStartDate ){
          table :=  MP_Cell_ScheduleSummary::Create( owner );
        }
      }
      tables.Add( table );
    }
    return &tables;
  *]
}