xiaoding721
2024-09-03 2216fba3cc0585064f370ae8348bf6b90ef99e5a
修复一些bug
已修改13个文件
已添加2个文件
151 ■■■■ 文件已修改
_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_Compared.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_FillRows.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_ImportOutput.qbl 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Test/StaticMethod_Test.qbl 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupDebug_ButtonTest_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelSelection.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionCurve.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionIDS.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPPA.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPR.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_Compared.qbl
@@ -32,12 +32,14 @@
        
        //生成行数据
        rowKeys := construct( Strings );
        rowKeyIndexTree := NamedValueTree::Create();
        baseVersionRowTree := NamedValueTree::Create();
        baseVersionRows := construct( GeneralExcelImportAndExportDataRows ,constcontent);
        compareVersionRowTree := NamedValueTree::Create();
        compareVersionRows := construct( GeneralExcelImportAndExportDataRows ,constcontent);
        LocalCell_DemandComparison::FillRows( baseVersionTable,rowKeys,baseVersionRowTree,baseVersionRows );
        LocalCell_DemandComparison::FillRows( compareVersionTable,rowKeys,compareVersionRowTree,compareVersionRows );
        LocalCell_DemandComparison::FillRows( baseVersionTable,rowKeys,rowKeyIndexTree,baseVersionRowTree,baseVersionRows );
        LocalCell_DemandComparison::FillRows( compareVersionTable,rowKeys,rowKeyIndexTree,compareVersionRowTree,compareVersionRows );
        
        // ç”Ÿæˆåˆ—数据
        columnTree := NamedValueTree::Create();
_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_FillRows.qbl
@@ -3,6 +3,7 @@
StaticMethod FillRows (
  const GeneralExcelImportAndExportDataTable general,
  Strings rowKeys,
  NamedValueTree rowKeyIndexTree,
  NamedValueTree rowTree,
  constcontent GeneralExcelImportAndExportDataRows rows
)
@@ -30,7 +31,14 @@
      tempHandle := rowTree.GetHandle( rowKey );
      rowTree.Root().AddChild( tempHandle ,i);
      rows.Add( tempRowKeyCell1.GeneralExcelImportAndExportDataRow());
      rowKeys.Add( rowKey );
      rowKeyHanlde := rowKeyIndexTree.GetHandle( rowKey );
      rowKeyIndex := guard( rowKeyIndexTree.Root().Child( rowKeyHanlde ),null( NamedValue ));
      if( isnull( rowKeyIndex )){
        rowKeys.Add( rowKey );
        rowKeyIndexTree.Root().AddChild( rowKeyHanlde,rowKeys.Size() - 1 );
      }
    }
  *]
}
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl
@@ -42,6 +42,15 @@
    localCells := construct( LocalCell_ScheduleSummarys );
    localCellIndexTree := NamedValueTree::Create();
    
    units := selectset( owner,Unit,unit,unit.HasCapacityTypeTime() and not unit.HasChild());
    unitIndexTree := NamedValueTree::Create();
    for( i := 0 ; i< units.Size() ; i++ ){
      unit := units.Element( i );
      unitHandle := unitIndexTree.GetHandle( unit.ID() );
      unitIndexTree.Root().AddChild( unitHandle,i );
    }
    //shiftPatternCount := NamedValueTree::Create();
    traverse( tables,Elements.MP_Row,row ){
       rowMacroPlan := row.MP_Table().MacroPlan();
@@ -63,14 +72,27 @@
                              cell.MP_Column().CustomDate() >= localColumn.CustomDate() and 
                              cell.MP_Column().CustomDate() < localColumn.CustomDate().StartOfNextMonth() );
          
          output := 0.0;
          isFuture := owner.StartOfPlanning().Date() >= localColumn.CustomDate();
          
          scheduleSummaryOutputDataKey := row.Name() + localColumn.CustomDate().AsQUILL();
          scheduleSummaryOutputDataHandle := scheduleSummaryOutputDataIndexTree.GetHandle( scheduleSummaryOutputDataKey );
          scheduleSummaryOutputDataIndex := guard( scheduleSummaryOutputDataIndexTree.Root().Child( scheduleSummaryOutputDataHandle ),null( NamedValue ));
          if( not isnull( scheduleSummaryOutputDataIndex )){
            scheduleSummaryOutputData := scheduleSummaryOutputDatas.Element( scheduleSummaryOutputDataIndex.GetValueAsNumber() );
            output := scheduleSummaryOutputData.Output();
          output := 0.0;
          if( isFuture ){
            unitHandle := unitIndexTree.GetHandle( row.Name() );
            unitIndex := guard( unitIndexTree.Root().Child( unitHandle ),null( NamedValue ));
            if( not isnull( unitIndex )){
              unit := units.Element( unitIndex.GetValueAsNumber() );
              output := sum( unit,UnitPeriod.PeriodTask_MP.NewSupply,np,
                             np.PeriodTask_MP().UnitPeriod().StartDate() >= localColumn.CustomDate() and
                             np.PeriodTask_MP().UnitPeriod().StartDate() < localColumn.CustomDate(),
                             np.Quantity() );
            }
          }else{
            scheduleSummaryOutputDataKey := row.Name() + localColumn.CustomDate().AsQUILL();
            scheduleSummaryOutputDataHandle := scheduleSummaryOutputDataIndexTree.GetHandle( scheduleSummaryOutputDataKey );
            scheduleSummaryOutputDataIndex := guard( scheduleSummaryOutputDataIndexTree.Root().Child( scheduleSummaryOutputDataHandle ),null( NamedValue ));
            if( not isnull( scheduleSummaryOutputDataIndex )){
              scheduleSummaryOutputData := scheduleSummaryOutputDatas.Element( scheduleSummaryOutputDataIndex.GetValueAsNumber() );
              output := scheduleSummaryOutputData.Output();
            }
          }
          
          maxShiftPattern := "";
@@ -115,7 +137,9 @@
            }
          }
          
          localCell.ShiftPattern( maxShiftPattern );
          if( not maxShiftPattern = "" ){
            localCell.ShiftPattern( maxShiftPattern );
          }
          localCell.WorkingDay( localCell.WorkingDay() + workingDay );
          localCell.Capacity( localCell.Capacity() + capacity );
          localCell.Output( localCell.Output() + output );
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_ImportOutput.qbl
@@ -13,6 +13,9 @@
    if( isnull( outputTable )){
      error( "导入的文件不正确" ); 
    }
    archive.ScheduleSummaryOutputLine( relflush );
    lines := construct( ScheduleSummaryOutputLines );
    lineIndexTree := NamedValueTree::Create();
    
_Main/BL/Type_Test/StaticMethod_Test.qbl
@@ -4,7 +4,8 @@
  ScenarioManager scenarioManager,
  MacroPlan macroPlan,
  Archive archive,
  RecycleBin recycleBin
  RecycleBin recycleBin,
  ArchiveExecutionStatus archiveExecutionStatus
)
{
  TextBody:
@@ -20,9 +21,18 @@
    //  } 
    //}
    
    table := select( macroPlan,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
    if( not isnull( table )){
      table.Delete();
    }
    //table := select( macroPlan,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
    //if( not isnull( table )){
    //  table.Delete();
    //}
    archiveExecutionStatus.RequirementImportExecutionStatus( relnew,
                                                             ExecutionCode        := 500,
                                                             ExecutionIsSuccess   := false,
                                                             ExecutionRespMessage := "11111",
                                                             ExecutionStatus      := "Complete",
                                                             ExecutionUserName    := "vwedadmin" );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupDebug_ButtonTest_OnClick.def
@@ -9,7 +9,7 @@
  {
    Body:
    [*
      Test::Test( ScenarioManager,MacroPlan,Archive,RecycleBin );
      Test::Test( ScenarioManager,MacroPlan,Archive,RecycleBin,ArchiveExecutionStatus );
      
      WebMessageBox::Success( "Success");
    *]
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelSelection.def
@@ -12,6 +12,16 @@
    #child: pSelectionCurve
    #child: pSelectionPP
    #child: PanelSelectionChecks
    Component dhDateUnit
    {
      #keys: '[414996.1.58048570]'
      BaseType: 'WebDataHolder'
      Databinding: 'String*'
      Properties:
      [
        Taborder: 7
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def
@@ -29,6 +29,7 @@
      [
        DisplayField: 'Name'
        Label: '基准需求版本:'
        NumberOfColumns: 50
        Taborder: 0
      ]
    }
@@ -56,8 +57,8 @@
          Properties:
          [
            DataType: 'Archive'
            FilterArguments: 'baseSelection:QMacroPlanner::FormDemandComparison.dhBaseVersionBudget'
            FixedFilter: 'object <> baseSelection'
            FilterArguments: 'baseSelection:QMacroPlanner::FormDemandComparison.dhBaseVersionBudget;dateUnit:QMacroPlanner::FormDemandComparison.dhDateUnit'
            FixedFilter: 'object <> baseSelection and object.Name().LikeUserLocale( dateUnit )'
            Source: 'Archive'
            Taborder: 0
            Transformation: 'ArchiveBudget'
@@ -68,6 +69,7 @@
      [
        DisplayField: 'Name'
        Label: '对比需求版本:'
        NumberOfColumns: 50
        Taborder: 2
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionCurve.def
@@ -29,6 +29,7 @@
      [
        DisplayField: 'Name'
        Label: '基准需求版本:'
        NumberOfColumns: 50
        Taborder: 0
      ]
    }
@@ -68,6 +69,7 @@
      [
        DisplayField: 'Name'
        Label: '对比需求版本:'
        NumberOfColumns: 50
        Taborder: 2
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionIDS.def
@@ -29,6 +29,7 @@
      [
        DisplayField: 'Name'
        Label: '基准需求版本:'
        NumberOfColumns: 50
        Taborder: 0
      ]
    }
@@ -68,6 +69,7 @@
      [
        DisplayField: 'Name'
        Label: '对比需求版本:'
        NumberOfColumns: 50
        Taborder: 2
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def
@@ -29,6 +29,7 @@
      [
        DisplayField: 'Name'
        Label: '基准需求版本:'
        NumberOfColumns: 50
        Taborder: 0
      ]
    }
@@ -56,8 +57,8 @@
          Properties:
          [
            DataType: 'Archive'
            FilterArguments: 'baseSelection:QMacroPlanner::FormDemandComparison.dhBaseVersionPP'
            FixedFilter: 'object <> baseSelection'
            FilterArguments: 'baseSelection:QMacroPlanner::FormDemandComparison.dhBaseVersionPP;dateUnit:QMacroPlanner::FormDemandComparison.dhDateUnit'
            FixedFilter: 'object <> baseSelection and object.Name().LikeUserLocale( dateUnit )'
            Source: 'Archive'
            Taborder: 0
            Transformation: 'ArchivePP'
@@ -68,6 +69,7 @@
      [
        DisplayField: 'Name'
        Label: '对比需求版本:'
        NumberOfColumns: 50
        Taborder: 2
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPPA.def
@@ -29,6 +29,7 @@
      [
        DisplayField: 'Name'
        Label: '基准需求版本:'
        NumberOfColumns: 50
        Taborder: 0
      ]
    }
@@ -68,6 +69,7 @@
      [
        DisplayField: 'Name'
        Label: '对比需求版本:'
        NumberOfColumns: 50
        Taborder: 2
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPR.def
@@ -29,6 +29,7 @@
      [
        DisplayField: 'Name'
        Label: '基准需求版本:'
        NumberOfColumns: 50
        Taborder: 0
      ]
    }
@@ -68,6 +69,7 @@
      [
        DisplayField: 'Name'
        Label: '对比需求版本:'
        NumberOfColumns: 50
        Taborder: 2
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: pSelectionBudget/dhBaseVersionBudget
Response OnDataChanged () id:Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged
{
  #keys: '[414996.1.58018748]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      if( this.Name().LikeUserLocale( "M" )){
        dhDateUnit.Data( "M" );
      }else{
        dhDateUnit.Data( "W" );
      }
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: pSelectionPP/dhBaseVersionPP
Response OnDataChanged () id:Response_pSelectionPP_dhBaseVersionPP_OnDataChanged
{
  #keys: '[414996.1.55350834]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      if( this.Name().LikeUserLocale( "M" )){
        dhDateUnit.Data( "M" );
      }else{
        dhDateUnit.Data( "W" );
      }
    *]
  }
}