lazhen
2024-07-12 4ea4b773425d7e7a9034c52269e6fb9d30be5904
Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
已添加20个文件
已修改6个文件
已删除1个文件
776 ■■■■■ 文件已修改
_Main/BL/Type_EmployeeCost/StaticMethod_GetSalary.qbl 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/Method_SetBreakDayOverTimeDurction.qbl 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/Method_SetOvertimeDurction.qbl 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport#1.qbl 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/StaticMethod_GetCell.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/StaticMethod_NewStaticMethod.qbl 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalTool/StaticMethod_IsAnyDurationContained.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalTool/StaticMethod_IsOverlap.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/DefaultValue_StandardWorkingDay.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ShiftPlan/Attribute_IsHoliday.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ShiftPlan/Function_CalcIsHoliday.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_ButtonComprehensiveStandardHoursR.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_MatrixEditor859.def 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_Panel743.def 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_matrixEditorActionBarPage681.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_matrixeditorContextMenu445.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_pMain.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_pOperaction#633.def 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_bCalculating_OnClick.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_cbComprehensiveHours_OnUserChanged.def 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_cbStandardHours_OnUserChanged.def 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/_ROOT_Component_FormComprehensiveStandardHoursReport.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/ComprehensiveStandardHoursReport.vw 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/Labor_Costs.vw 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/ShiftPlan.vw 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_EmployeeCost/StaticMethod_GetSalary.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetSalary (
  const Unit owner,
  const OvertimeMultiplier overtimeMutiplier,
  Real overtime
) const as Real
{
  TextBody:
  [*
    // rislai Jul-10-2024 (created)
    value := 0.0;
    salaryByEmployeeTypeTree := NamedValueTree::Create();
    traverse( owner,EmployeeCost,cost ){
      salaryByEmployeeTypeHandle := salaryByEmployeeTypeTree.GetHandle( cost.EmployeeType().Name() );
      salary := guard( salaryByEmployeeTypeTree.Root().Child( salaryByEmployeeTypeHandle ),null( NamedValue ));
      // äº§çº¿äººå‘˜ç±»åˆ«1*人数*基本工资1/21.75/8*工作日加班时长*倍率1
      temp_salary := cost.EmployeeNumber() * cost.BaseSalary() / owner.MacroPlan().StandardWorkingDay() / 8 * overtime * overtimeMutiplier.Multiplier();
      if( not isnull( salary )){
        salary.SetValue( salary.GetValueAsReal() + temp_salary );
      }else{
        salaryByEmployeeTypeTree.Root().AddChild( salaryByEmployeeTypeHandle,temp_salary );
      }
      value := value + temp_salary;
    }
    return value;
  *]
}
_Main/BL/Type_LocalCell_Default/Method_SetBreakDayOverTimeDurction.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
Quintiq file version 2.0
#parent: #root
Method SetBreakDayOverTimeDurction (
  String outcome
)
{
  TextBody:
  [*
    // rislai Jul-10-2024 (created)
    overtime := 0.0;
    nextDayOvertime := 0.0;
    if( outcome = "一班" ){
      overtime := 8.5;
      nextDayOvertime := 0.0;
    }else if( outcome = "二班" ){
      overtime := 16;
      nextDayOvertime := 0.5;
    }else if(outcome = "9+9"){
      overtime := 16;
      nextDayOvertime := 2.5;
    }else if(outcome = "10+10"){
      overtime := 16;
      nextDayOvertime := 4.5;
    }else if(outcome = "三班"){
      overtime := 16;
      nextDayOvertime := 8;
    }
    this.RealValue( this.RealValue() + overtime + nextDayOvertime );
  *]
}
_Main/BL/Type_LocalCell_Default/Method_SetOvertimeDurction.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
Quintiq file version 2.0
#parent: #root
Method SetOvertimeDurction (
  String outcome
)
{
  TextBody:
  [*
    // rislai Jul-10-2024 (created)
    overtime := 0.0;
    nextDayOvertime := 0.0;
    if( outcome = "一班" ){
      overtime := 0.5;
      nextDayOvertime := 0.0;
    }else if( outcome = "二班" ){
      overtime := 8;
      nextDayOvertime := 0.5;
    }else if(outcome = "9+9"){
      overtime := 8;
      nextDayOvertime := 2.5;
    }else if(outcome = "10+10"){
      overtime := 8;
      nextDayOvertime := 4.5;
    }else if(outcome = "三班"){
      overtime := 8;
      nextDayOvertime := 8;
    }
    this.RealValue( this.RealValue() + overtime + nextDayOvertime );
  *]
}
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport#1.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,110 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GenerateComprehensiveHoursReport (
  MacroPlan macroPlan,
  const constcontent ShiftPlans shiftPlans,
  RecycleBin owner
) as LocalTable
{
  Description: '综合工时制报表'
  TextBody:
  [*
    // rislai Jul-9-2024 (created)
    table := owner.LocalTable( relnew,Name := "综合工时制报表");
    //column1  := table.LocalColumn( relnew,Name := "工厂" ,Index := 1);
    //column2  := table.LocalColumn( relnew,Name := "产线" ,Index := 2);
    column3  := table.LocalColumn( relnew,Name := "生产天数" ,Index := 3);
    column4  := table.LocalColumn( relnew,Name := "加班/欠工时长" ,Index := 4);
    column5  := table.LocalColumn( relnew,Name := "节假日加班时长" ,Index := 6);
    column6  := table.LocalColumn( relnew,Name := "加班/欠工费" ,Index := 8);
    column7 := table.LocalColumn( relnew,Name := "节假日加班费" ,Index := 10);
    units := selectset( shiftPlans,Elements.UnitPeriodTime.Unit,unit,true );
    rows := construct( LocalRows );
    rowIndexTree := NamedValueTree::Create();
    cells := construct( LocalCell_Defaults );
    cellIndexTree := NamedValueTree::Create();
    unitIndexTree := NamedValueTree::Create();
    for( i := 0; i < units.Size(); i++){
      unit := units.Element( i );
      row := table.LocalRow( relnew,Index := table.GetRowIndexCache() ,CustomName := unit.ID());
      rowHandle := rowIndexTree.GetHandle( unit.ID() );
      rows.Add( row );
      rowIndexTree.Root().AddChild( rowHandle,rows.Size() - 1 );
      unitIndexTree.Root().AddChild( unitIndexTree.GetHandle( unit.ID() ),i );
    }
    traverse( shiftPlans,Elements,shiftPlan ){
      rowKey := shiftPlan.UnitPeriodTime().Unit().ID();
      row := rows.Element( rowIndexTree.Root().Child( rowIndexTree.GetHandle( rowKey )).GetValueAsNumber() );
      // gongchangCell := LocalCell_Default::GetCell(  rowKey + column1.Name(), cellIndexTree, cells, row, column1 );
      // chanxianxCell := LocalCell_Default::GetCell(  rowKey + column2.Name(), cellIndexTree, cells, row, column2 );
      shengchanCell := LocalCell_Default::GetCell(  rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
      week := shiftPlan.UnitPeriodTime().Period_MP().StartDate().DayOfWeek();
      if( shiftPlan.Outcome() <> "" ){
        shengchanCell.RealValue( shengchanCell.RealValue() + 1 );
        if( shiftPlan.IsHoliday() ){
          // èŠ‚å‡æ—¥åŠ ç­
          jiejiariCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
          jiejiariCell.SetBreakDayOverTimeDurction( shiftPlan.Outcome() );
        }else if( week = 6 or week = 7 ){
          // ä¼‘息日加班
          xiuxiCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
          xiuxiCell.SetBreakDayOverTimeDurction( shiftPlan.Outcome() );
        }else{
          // å¹³æ—¶åŠ ç­
          jiabanCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
          jiabanCell.SetOvertimeDurction( shiftPlan.Outcome() );
        }
      }else{
        if( not shiftPlan.IsHoliday() and not ( week = 6 or week = 7 )){
          qiangongCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
          qiangongCell.RealValue( qiangongCell.RealValue() - 8 );
        }
      }
    }
    // å¹³æ—¶åŠ ç­å€çŽ‡
    defaultMultiplier := select( macroPlan,OvertimeMultiplier,object,object.Name() = "平时加班倍率" );
    if( isnull( defaultMultiplier )){
      defaultMultiplier := macroPlan.OvertimeMultiplier( relnew,Name := "平时加班倍率",Multiplier := 1 );
    }
    // ä¼‘息日加班倍率
    breakDayMultiplier := select( macroPlan,OvertimeMultiplier,object,object.Name() = "休息日加班倍率");
    if( isnull( breakDayMultiplier )){
      breakDayMultiplier := macroPlan.OvertimeMultiplier( relnew, Name := "休息日加班倍率",Multiplier := 2 );
    }
    // èŠ‚å‡æ—¥åŠ ç­å€çŽ‡
    holidayMultiplier := select( macroPlan,OvertimeMultiplier,object,object.Name() = "节假日加班倍率");
    if( isnull( holidayMultiplier )){
      holidayMultiplier := macroPlan.OvertimeMultiplier( relnew, Name := "节假日加班倍率",Multiplier := 3 );
    }
    traverse( table,LocalRow,row ){
      rowKey := row.CustomName();
      unit := units.Element( unitIndexTree.Root().Child( unitIndexTree.GetHandle( rowKey )).GetValueAsNumber() );
      jiejiariCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
      jiejiarifeiCell := LocalCell_Default::GetCell(  rowKey + column6.Name(), cellIndexTree, cells, row, column6 );
      jiejiarifeiCell.RealValue( EmployeeCost::GetSalary( unit,defaultMultiplier,jiejiariCell.RealValue()));
      qiangongCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
      qiangongfeiCell := LocalCell_Default::GetCell(  rowKey + column7.Name(), cellIndexTree, cells, row, column7 );
      qiangongfeiCell.RealValue( EmployeeCost::GetSalary( unit,defaultMultiplier,qiangongCell.RealValue() ));
    }
    return table;
  *]
}
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,122 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GenerateStandardHoursReport (
  MacroPlan macroPlan,
  const constcontent ShiftPlans shiftPlans,
  RecycleBin owner
) as LocalTable
{
  Description: '标准工时制报表'
  TextBody:
  [*
    // rislai Jul-4-2024 (created)
    table := owner.LocalTable( relnew,Name := "标准工时制报表");
    //column1  := table.LocalColumn( relnew,Name := "工厂" ,Index := 1);
    //column2  := table.LocalColumn( relnew,Name := "产线" ,Index := 2);
    column3  := table.LocalColumn( relnew,Name := "生产天数" ,Index := 3);
    column4  := table.LocalColumn( relnew,Name := "平日加班时长" ,Index := 4);
    column5  := table.LocalColumn( relnew,Name := "休息日加班时长" ,Index := 5);
    column6  := table.LocalColumn( relnew,Name := "节假日加班时长" ,Index := 6);
    column7  := table.LocalColumn( relnew,Name := "欠工时长" ,Index := 7);
    column8  := table.LocalColumn( relnew,Name := "平日加班费" ,Index := 8);
    column9  := table.LocalColumn( relnew,Name := "休息日加班费" ,Index := 9);
    column10 := table.LocalColumn( relnew,Name := "节假日加班费" ,Index := 10);
    column11 := table.LocalColumn( relnew,Name := "欠工费" ,Index := 11);
    units := selectset( shiftPlans,Elements.UnitPeriodTime.Unit,unit,true );
    rows := construct( LocalRows );
    rowIndexTree := NamedValueTree::Create();
    cells := construct( LocalCell_Defaults );
    cellIndexTree := NamedValueTree::Create();
    unitIndexTree := NamedValueTree::Create();
    for( i := 0; i < units.Size(); i++){
      unit := units.Element( i );
      row := table.LocalRow( relnew,Index := table.GetRowIndexCache() ,CustomName := unit.ID());
      rowHandle := rowIndexTree.GetHandle( unit.ID() );
      rows.Add( row );
      rowIndexTree.Root().AddChild( rowHandle,rows.Size() - 1 );
      unitIndexTree.Root().AddChild( unitIndexTree.GetHandle( unit.ID() ),i );
    }
    traverse( shiftPlans,Elements,shiftPlan ){
      rowKey := shiftPlan.UnitPeriodTime().Unit().ID();
      row := rows.Element( rowIndexTree.Root().Child( rowIndexTree.GetHandle( rowKey )).GetValueAsNumber() );
      // gongchangCell := LocalCell_Default::GetCell(  rowKey + column1.Name(), cellIndexTree, cells, row, column1 );
      // chanxianxCell := LocalCell_Default::GetCell(  rowKey + column2.Name(), cellIndexTree, cells, row, column2 );
      shengchanCell := LocalCell_Default::GetCell(  rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
      week := shiftPlan.UnitPeriodTime().Period_MP().StartDate().DayOfWeek();
      if( shiftPlan.Outcome() <> "" ){
        shengchanCell.RealValue( shengchanCell.RealValue() + 1 );
        if( shiftPlan.IsHoliday() ){
          // èŠ‚å‡æ—¥åŠ ç­
          jiejiariCell := LocalCell_Default::GetCell(  rowKey + column6.Name(), cellIndexTree, cells, row, column6 );
          jiejiariCell.SetBreakDayOverTimeDurction( shiftPlan.Outcome() );
        }else if( week = 6 or week = 7 ){
          // ä¼‘息日加班
          xiuxiCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
          xiuxiCell.SetBreakDayOverTimeDurction( shiftPlan.Outcome() );
        }else{
          // å¹³æ—¶åŠ ç­
          jiabanCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
          jiabanCell.SetOvertimeDurction( shiftPlan.Outcome() );
        }
      }else{
        if( not shiftPlan.IsHoliday() and not ( week = 6 or week = 7 )){
          qiangongCell := LocalCell_Default::GetCell(  rowKey + column7.Name(), cellIndexTree, cells, row, column7 );
          qiangongCell.RealValue( qiangongCell.RealValue() + 8 );
        }
      }
    }
    // å¹³æ—¶åŠ ç­å€çŽ‡
    defaultMultiplier := select( macroPlan,OvertimeMultiplier,object,object.Name() = "平时加班倍率" );
    if( isnull( defaultMultiplier )){
      defaultMultiplier := macroPlan.OvertimeMultiplier( relnew,Name := "平时加班倍率",Multiplier := 1 );
    }
    // ä¼‘息日加班倍率
    breakDayMultiplier := select( macroPlan,OvertimeMultiplier,object,object.Name() = "休息日加班倍率");
    if( isnull( breakDayMultiplier )){
      breakDayMultiplier := macroPlan.OvertimeMultiplier( relnew, Name := "休息日加班倍率",Multiplier := 2 );
    }
    // èŠ‚å‡æ—¥åŠ ç­å€çŽ‡
    holidayMultiplier := select( macroPlan,OvertimeMultiplier,object,object.Name() = "节假日加班倍率");
    if( isnull( holidayMultiplier )){
      holidayMultiplier := macroPlan.OvertimeMultiplier( relnew, Name := "节假日加班倍率",Multiplier := 3 );
    }
    traverse( table,LocalRow,row ){
      rowKey := row.CustomName();
      unit := units.Element( unitIndexTree.Root().Child( unitIndexTree.GetHandle( rowKey )).GetValueAsNumber() );
      jiejiariCell := LocalCell_Default::GetCell(  rowKey + column6.Name(), cellIndexTree, cells, row, column6 );
      jiejiarifeiCell := LocalCell_Default::GetCell(  rowKey + column10.Name(), cellIndexTree, cells, row, column10 );
      jiejiarifeiCell.RealValue( EmployeeCost::GetSalary( unit,defaultMultiplier,jiejiariCell.RealValue()));
      xiuxiCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
      xiuxifeiCell := LocalCell_Default::GetCell(  rowKey + column9.Name(), cellIndexTree, cells, row, column9 );
      xiuxifeiCell.RealValue( EmployeeCost::GetSalary( unit,breakDayMultiplier,xiuxiCell.RealValue()));
      jiabanCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
      jiabanfeiCell := LocalCell_Default::GetCell(  rowKey + column8.Name(), cellIndexTree, cells, row, column8 );
      jiabanfeiCell.RealValue( EmployeeCost::GetSalary( unit,holidayMultiplier,jiabanCell.RealValue()));
      qiangongCell := LocalCell_Default::GetCell(  rowKey + column7.Name(), cellIndexTree, cells, row, column7 );
      qiangongfeiCell := LocalCell_Default::GetCell(  rowKey + column11.Name(), cellIndexTree, cells, row, column11 );
      qiangongfeiCell.RealValue( EmployeeCost::GetSalary( unit,defaultMultiplier,qiangongCell.RealValue() ));
    }
    return table;
  *]
}
_Main/BL/Type_LocalCell_Default/StaticMethod_GetCell.qbl
@@ -14,7 +14,7 @@
    cellHandle := cellIndexTree.GetHandle( cellKey );
    cellIndex := guard( cellIndexTree.Root().Child( cellHandle ),null( NamedValue ));
    cell := null( LocalCell_Default );
    if( isnull( cell )){
    if( isnull( cellIndex )){
       cell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column );
       cells.Add( cell );
       cellIndexTree.Root().AddChild( cellHandle,cells.Size() - 1 );
_Main/BL/Type_LocalCell_Default/StaticMethod_NewStaticMethod.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_LocalTool/StaticMethod_IsAnyDurationContained.qbl
@@ -5,7 +5,7 @@
  DateTime end1,
  DateTime start2,
  DateTime end2
) const declarative as Boolean
) const declarative remote as Boolean
{
  TextBody:
  [*
_Main/BL/Type_LocalTool/StaticMethod_IsOverlap.qbl
@@ -5,11 +5,11 @@
  Date end1,
  Date start2,
  Date end2
) const declarative as Boolean
) const declarative remote as Boolean
{
  TextBody:
  [*
    // rislai Jun-14-2024 (created)
    return start1 < end2 and start2 < end1 ;
    return start1 <= end2 and start2 <= end1 ;
  *]
}
_Main/BL/Type_MacroPlan/DefaultValue_StandardWorkingDay.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  ISOValue: '21.75'
  TargetAttribute: StandardWorkingDay
}
_Main/BL/Type_ShiftPlan/Attribute_IsHoliday.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute IsHoliday
{
  #keys: '3[412672.1.34300030][412672.1.34300029][412672.1.34300031]'
  ValueType: Boolean
}
_Main/BL/Type_ShiftPlan/Function_CalcIsHoliday.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Function CalcIsHoliday
{
  TextBody:
  [*
    // rislai Jul-9-2024 (created)
    value := false
    if( this.EventType() = "法定节假日"){
      value := true;
    }
    this.IsHoliday( value );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
@@ -49,6 +49,17 @@
        Taborder: 3
      ]
    }
    Component ButtonComprehensiveStandardHoursReport
    {
      #keys: '[412672.1.39734996]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'DOCUMENT_CHART'
        Label: '工时制报表'
        Taborder: 4
      ]
    }
    Component ButtonEnginePipelineReport
    {
      #keys: '[415136.0.884991586]'
@@ -57,7 +68,7 @@
      [
        Image: 'DOCUMENT_CONNECTION'
        Label: 'Engine pipeline report'
        Taborder: 4
        Taborder: 5
      ]
    }
  ]
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_ButtonComprehensiveStandardHoursR.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: ActionBarGroupReport/ButtonComprehensiveStandardHoursReport
Response OnClick () id:Response_MacroPlanner_ActionBarGroupReport_ButtonComprehensiveStandardHoursReport_OnClick
{
  #keys: '[412672.1.36822187]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      // Open view
      ApplicationMacroPlanner.OpenView( 'ComprehensiveStandardHoursReport', ButtonComprehensiveStandardHoursReport );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_MatrixEditor859.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
Quintiq file version 2.0
Component MatrixEditor859
{
  #keys: '[412672.1.33151379]'
  BaseType: 'WebMatrixEditor'
  Children:
  [
    Component MatrixEditorCell642
    {
      #keys: '[412672.1.33151380]'
      BaseType: 'WebMatrixEditorCell'
      Children:
      [
        Component DataExtractor872
        {
          #keys: '[412672.1.33151381]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'LocalTable'
            Source: 'dhTable'
            Taborder: 0
            Transformation: 'LocalRow.LocalCell.astype(LocalCell_Default)'
          ]
        }
      ]
      Properties:
      [
        Attributes: 'RealValue'
        Column: 'LocalColumn'
        Row: 'LocalRow'
        Taborder: 0
      ]
    }
    Component MatrixEditorRows590
    {
      #keys: '[412672.1.33151384]'
      BaseType: 'WebMatrixEditorHeaderLevel'
      Children:
      [
        Component DataExtractor862
        {
          #keys: '[412672.1.33151385]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'LocalTable'
            Source: 'dhTable'
            Taborder: 0
            Transformation: 'LocalRow'
          ]
        }
      ]
      Properties:
      [
        Legend: 'Name'
        SortCriteria: 'Index'
        Taborder: 1
      ]
    }
    Component MatrixEditorColumns481
    {
      #keys: '[412672.1.33151388]'
      BaseType: 'WebMatrixEditorHeaderLevel'
      Children:
      [
        Component DataExtractor661
        {
          #keys: '[412672.1.33151389]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'LocalTable'
            Source: 'dhTable'
            Taborder: 0
            Transformation: 'LocalColumn'
          ]
        }
      ]
      Properties:
      [
        Legend: 'Name'
        SortCriteria: 'Index'
        Taborder: 2
      ]
    }
    #child: matrixEditorActionBarPage681
    #child: matrixeditorContextMenu445
  ]
  Properties:
  [
    Columns: 'MatrixEditorColumns481'
    ContextMenu: 'matrixeditorContextMenu445'
    Rows: 'MatrixEditorRows590'
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_Panel743.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
Component Panel743
{
  #keys: '[412672.1.33151321]'
  BaseType: 'WebPanel'
  Children:
  [
    #child: MatrixEditor859
    Component dhTable
    {
      #keys: '[412672.1.33151419]'
      BaseType: 'WebDataHolder'
      Databinding: 'LocalTable'
      Properties:
      [
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_matrixEditorActionBarPage681.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component matrixEditorActionBarPage681
{
  #keys: '[412672.1.33151392]'
  BaseType: 'matrixEditorActionBarPage'
  Properties:
  [
    Taborder: 3
  ]
}
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_matrixeditorContextMenu445.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component matrixeditorContextMenu445
{
  #keys: '[412672.1.33151395]'
  BaseType: 'matrixeditorContextMenu'
  Properties:
  [
    Taborder: 4
  ]
}
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_pMain.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
Component pMain
{
  #keys: '[412672.1.33151242]'
  BaseType: 'WebPanel'
  Children:
  [
    #child: Panel743
    #child: pOperaction
  ]
  Properties:
  [
    Orientation: 'horizontal'
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Component_pOperaction#633.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,65 @@
Quintiq file version 2.0
Component pOperaction
{
  #keys: '[412672.1.33151285]'
  BaseType: 'WebPanel'
  Children:
  [
    Component cbStandardHours
    {
      #keys: '[412672.1.33151450]'
      BaseType: 'WebCheckbox'
      Properties:
      [
        CheckboxType: 'toggle'
        Label: '标准工时制'
        Taborder: 0
      ]
    }
    Component cbComprehensiveHours
    {
      #keys: '[412672.1.33151469]'
      BaseType: 'WebCheckbox'
      Properties:
      [
        CheckboxType: 'toggle'
        Label: '综合工时制'
        Taborder: 1
      ]
    }
    Component dsStartDate
    {
      #keys: '[412672.1.33151495]'
      BaseType: 'WebDateSelector'
      Properties:
      [
        Taborder: 2
      ]
    }
    Component dsEndDate
    {
      #keys: '[412672.1.33151514]'
      BaseType: 'WebDateSelector'
      Properties:
      [
        Date: 9999-12-31
        Taborder: 3
      ]
    }
    Component bCalculating
    {
      #keys: '[412672.1.33180446]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'Calculating'
        Taborder: 4
      ]
    }
  ]
  Properties:
  [
    FixedSize: true
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_bCalculating_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: pOperaction/bCalculating
Response OnClick () id:Response_pOperaction_bCalculating_OnClick
{
  #keys: '[412672.1.33160729]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      shiftPlans := selectset( MacroPlan,Unit.UnitPeriod.astype( UnitPeriodTime ).ShiftPlan,shiftPlan,LocalTool::IsOverlap( dsStartDate.Date(),dsEndDate.Date(),shiftPlan.UnitPeriodTime().Period_MP().StartDate(),shiftPlan.UnitPeriodTime().Period_MP().EndDate()));
      if( cbStandardHours.Checked() ){
        dhTable.Data( LocalCell_Default::GenerateStandardHoursReport( MacroPlan ,shiftPlans ,RecycleBin ));
      }
      if( cbComprehensiveHours.Checked()){
        dhTable.Data( LocalCell_Default::GenerateComprehensiveHoursReport( MacroPlan ,shiftPlans ,RecycleBin ));
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_cbComprehensiveHours_OnUserChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: pOperaction/cbComprehensiveHours
Response OnUserChanged () id:Response_pOperaction_cbComprehensiveHours_OnUserChanged
{
  #keys: '[412672.1.33151755]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebCheckbox_OnUserChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      cbStandardHours.Checked( not this.Checked() );
      if( this.Checked() ){
        FormComprehensiveStandardHoursReport.Title( "综合工时制报表" );
      }else{
        FormComprehensiveStandardHoursReport.Title( "标准工时制报表" );
      }
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_cbStandardHours_OnUserChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: pOperaction/cbStandardHours
Response OnUserChanged () id:Response_pOperaction_cbStandardHours_OnUserChanged
{
  #keys: '[412672.1.33151672]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebCheckbox_OnUserChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      cbComprehensiveHours.Checked( not this.Checked() );
      if( this.Checked() ){
        FormComprehensiveStandardHoursReport.Title( "标准工时制报表" );
      }else{
        FormComprehensiveStandardHoursReport.Title( "综合工时制报表" );
      }
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/_ROOT_Component_FormComprehensiveStandardHoursReport.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#root
#parent: MacroPlannerWebApp
OrphanComponent FormComprehensiveStandardHoursReport
{
  #keys: '[412672.1.33151116]'
  BaseType: 'WebForm'
  Children:
  [
    #child: pMain
  ]
  Properties:
  [
    Image: 'DOCUMENT_CHART'
  ]
}
_Main/UI/MacroPlannerWebApp/Views/ComprehensiveStandardHoursReport.vw
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
{
  viewcontents
  {
    page: ''
    group: ''
    index: 0
    image: 'DOCUMENT_CHART'
    description: ''
  }
  formatversion: 2
  id: 'ComprehensiveStandardHoursReport'
  name: 'ComprehensiveStandardHoursReport'
  isglobal: false
  isroot: true
}
_Main/UI/MacroPlannerWebApp/Views/Labor_Costs.vw
@@ -2,10 +2,10 @@
{
  viewcontents
  {
    image: 'MONEY_BILL_FIRE'
    page: ''
    group: ''
    index: 0
    image: 'MONEY_BILL_FIRE'
    description: ''
  }
  formatversion: 2
_Main/UI/MacroPlannerWebApp/Views/ShiftPlan.vw
@@ -2,10 +2,10 @@
{
  viewcontents
  {
    image: 'COMPASSES'
    page: ''
    group: ''
    index: 0
    image: 'COMPASSES'
    description: ''
  }
  formatversion: 2