xiaoding721
2024-10-17 b431995d0cdfde5047ee028ddba76150d93120a2
修复一些bug
已修改14个文件
已添加3个文件
已删除2个文件
324 ■■■■■ 文件已修改
_Main/BL/Type_ExportXMLData/Method_CalculatePriority.qbl 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ExportXMLManager/StaticMethod_AwaitLocalTableXMLData.qbl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport#1.qbl 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/StaticMethod_GetColumnXML.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_GenerateColumnIndex.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalColumn/Attribute_CustomName.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalColumn/Function_CalcDate.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalColumn/Function_CalcName.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pExport.def 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_PanelAnnualPlan_dhComparisonData854_OnCreated.def 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bDownload_OnClick.def 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bExport_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_dhXMLDataListener_OnDataChanged.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged.def 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_dhXMLDataListener_OnDataChanged.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ExportXMLData/Method_CalculatePriority.qbl
@@ -11,38 +11,40 @@
      priority := 1 ;
    }else if( element.LikeUserLocale( "<name>产线</name>" )){
      priority := 2 ;
    }else if( element.LikeUserLocale( "<name>Attribute</name>" )){
    }else if( element.LikeUserLocale( "<name>    </name>" )){
      priority := 3 ;
    }else if( element.LikeUserLocale( "<name>产地</name>" )){
    }else if( element.LikeUserLocale( "<name>Attribute</name>" )){
      priority := 4 ;
    }else if( element.LikeUserLocale( "<name>车型</name>" )){
    }else if( element.LikeUserLocale( "<name>产地</name>" )){
      priority := 5 ;
    }else if( element.LikeUserLocale( "<name>发动机零件号</name>" )){
    }else if( element.LikeUserLocale( "<name>车型</name>" )){
      priority := 6 ;
    }else if( element.LikeUserLocale( "<name>发动机四位码</name>" )){
    }else if( element.LikeUserLocale( "<name>发动机零件号</name>" )){
      priority := 7 ;
    }else if( element.LikeUserLocale( "<name>生产天数</name>" )){
    }else if( element.LikeUserLocale( "<name>发动机四位码</name>" )){
      priority := 8 ;
    }else if( element.LikeUserLocale( "<name>加班/欠工时长</name>" )){
    }else if( element.LikeUserLocale( "<name>生产天数</name>" )){
      priority := 9 ;
    }else if( element.LikeUserLocale( "<name>平日加班时长</name>" )){
    }else if( element.LikeUserLocale( "<name>加班/欠工时长</name>" )){
      priority := 10 ;
    }else if( element.LikeUserLocale( "<name>休息日加班时长</name>" )){
    }else if( element.LikeUserLocale( "<name>平日加班时长</name>" )){
      priority := 11 ;
    }else if( element.LikeUserLocale( "<name>节假日加班时长</name>" )){
    }else if( element.LikeUserLocale( "<name>休息日加班时长</name>" )){
      priority := 12 ;
    }else if( element.LikeUserLocale( "<name>欠工时长</name>" )){
    }else if( element.LikeUserLocale( "<name>节假日加班时长</name>" )){
      priority := 13 ;
    }else if( element.LikeUserLocale( "<name>加班/欠工费</name>" )){
    }else if( element.LikeUserLocale( "<name>欠工时长</name>" )){
      priority := 14 ;
    }else if( element.LikeUserLocale( "<name>平日加班费</name>" )){
    }else if( element.LikeUserLocale( "<name>加班/欠工费</name>" )){
      priority := 15 ;
    }else if( element.LikeUserLocale( "<name>休息日加班费</name>" )){
    }else if( element.LikeUserLocale( "<name>平日加班费</name>" )){
      priority := 16 ;
    }else if( element.LikeUserLocale( "<name>节假日加班费</name>" )){
    }else if( element.LikeUserLocale( "<name>休息日加班费</name>" )){
      priority := 17 ;
    }else if( element.LikeUserLocale( "<name>欠工费</name>" )){
    }else if( element.LikeUserLocale( "<name>节假日加班费</name>" )){
      priority := 18 ;
    }else if( element.LikeUserLocale( "<name>欠工费</name>" )){
      priority := 19 ;
    }else{
      //  <column><name>2020/04/01</name>
      priority := [Number]element.SubString( 14,10 ).ReplaceAll( "/","") ;
_Main/BL/Type_ExportXMLManager/StaticMethod_AwaitLocalTableXMLData.qbl
@@ -21,7 +21,6 @@
       }onerror{
         info( element );
       }
    }
  *]
}
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport#1.qbl
@@ -15,13 +15,13 @@
    //column1  := table.LocalColumn( relnew,Name := "工厂" ,CustomIndex := 1);
    //column2  := table.LocalColumn( relnew,Name := "产线" ,CustomIndex := 2);
    
    column3  := table.LocalColumn( relnew,Name := "生产天数" ,CustomIndex := 3);
    column3  := table.LocalColumn( relnew,CustomName := "生产天数" ,CustomIndex := 3);
    
    column4  := table.LocalColumn( relnew,Name := "加班/欠工时长" ,CustomIndex := 4);
    column5  := table.LocalColumn( relnew,Name := "节假日加班时长" ,CustomIndex := 6);
    column4  := table.LocalColumn( relnew,CustomName := "加班/欠工时长" ,CustomIndex := 4);
    column5  := table.LocalColumn( relnew,CustomName := "节假日加班时长" ,CustomIndex := 6);
    
    column6  := table.LocalColumn( relnew,Name := "加班/欠工费" ,CustomIndex := 8);
    column7 := table.LocalColumn( relnew,Name := "节假日加班费" ,CustomIndex := 10);
    column6  := table.LocalColumn( relnew,CustomName := "加班/欠工费" ,CustomIndex := 8);
    column7 := table.LocalColumn( relnew,CustomName := "节假日加班费" ,CustomIndex := 10);
    
    units := selectset( shiftPlans,Elements.UnitPeriodTime.Unit,unit,true );
    
@@ -73,13 +73,13 @@
      // chanxianxCell := LocalCell_Default::GetCell(  rowKey + column2.Name(), cellIndexTree, cells, row, column2 );
      
      // å·¥ä½œæ—¥
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.CustomName(), cellIndexTree, cells, row, column3 );
      // èŠ‚å‡æ—¥åŠ ç­ 
      holidayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
      holidayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
      // ä¼‘息日加班 
      breakDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
      breakDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
      // å¹³æ—¶åŠ ç­
      defaultDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
      defaultDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
      
      if( shiftPlan.Outcome() <> "" ){
        workingDayCell.RealValue( workingDayCell.RealValue() + 1 );
@@ -144,7 +144,7 @@
        }
      }else{
        if( not shiftPlan.IsHoliday() and not ( shiftPlan.DefaultRemark().LikeUserLocale( "周六" ) or shiftPlan.DefaultRemark().LikeUserLocale( "周日" ) )){
          qiangongCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
          qiangongCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
          qiangongCell.RealValue( qiangongCell.RealValue() - 8 );
        }
      }
@@ -183,14 +183,14 @@
      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 + column7.Name(), cellIndexTree, cells, row, column7 );
      jiejiariCell := LocalCell_Default::GetCell(  rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
      jiejiarifeiCell := LocalCell_Default::GetCell(  rowKey + column7.CustomName(), cellIndexTree, cells, row, column7 );
      jiejiarifeiCell.RealValue( EmployeeCost::GetSalary( unit,holidayMultiplier,jiejiariCell.RealValue()));
      
      qiangongCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
      qiangongCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
      qiangongCell.RealValue( qiangongCell.RealValue() - 8 );
      
      qiangongfeiCell := LocalCell_Default::GetCell(  rowKey + column6.Name(), cellIndexTree, cells, row, column6 );
      qiangongfeiCell := LocalCell_Default::GetCell(  rowKey + column6.CustomName(), cellIndexTree, cells, row, column6 );
      qiangongfeiCell.RealValue( EmployeeCost::GetSalary( unit,defaultMultiplier,qiangongCell.RealValue() ));
    }
    
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl
@@ -15,17 +15,17 @@
    //column1  := table.LocalColumn( relnew,Name := "工厂" ,CustomIndex := 1);
    //column2  := table.LocalColumn( relnew,Name := "产线" ,CustomIndex := 2);
    
    column3  := table.LocalColumn( relnew,Name := "生产天数" ,CustomIndex := 3);
    column3  := table.LocalColumn( relnew,CustomName := "生产天数" ,CustomIndex := 3);
    
    column4  := table.LocalColumn( relnew,Name := "平日加班时长" ,CustomIndex := 4);
    column5  := table.LocalColumn( relnew,Name := "休息日加班时长" ,CustomIndex := 5);
    column6  := table.LocalColumn( relnew,Name := "节假日加班时长" ,CustomIndex := 6);
    column7  := table.LocalColumn( relnew,Name := "欠工时长" ,CustomIndex := 7);
    column4  := table.LocalColumn( relnew,CustomName := "平日加班时长" ,CustomIndex := 4);
    column5  := table.LocalColumn( relnew,CustomName := "休息日加班时长" ,CustomIndex := 5);
    column6  := table.LocalColumn( relnew,CustomName := "节假日加班时长" ,CustomIndex := 6);
    column7  := table.LocalColumn( relnew,CustomName := "欠工时长" ,CustomIndex := 7);
    
    column8  := table.LocalColumn( relnew,Name := "平日加班费" ,CustomIndex := 8);
    column9  := table.LocalColumn( relnew,Name := "休息日加班费" ,CustomIndex := 9);
    column10 := table.LocalColumn( relnew,Name := "节假日加班费" ,CustomIndex := 10);
    column11 := table.LocalColumn( relnew,Name := "欠工费" ,CustomIndex := 11);
    column8  := table.LocalColumn( relnew,CustomName := "平日加班费" ,CustomIndex := 8);
    column9  := table.LocalColumn( relnew,CustomName := "休息日加班费" ,CustomIndex := 9);
    column10 := table.LocalColumn( relnew,CustomName := "节假日加班费" ,CustomIndex := 10);
    column11 := table.LocalColumn( relnew,CustomName := "欠工费" ,CustomIndex := 11);
    
    units := selectset( shiftPlans,Elements.UnitPeriodTime.Unit,unit,true );
    
@@ -76,14 +76,14 @@
      // gongchangCell := LocalCell_Default::GetCell(  rowKey + column1.Name(), cellIndexTree, cells, row, column1 );
      // chanxianxCell := LocalCell_Default::GetCell(  rowKey + column2.Name(), cellIndexTree, cells, row, column2 );
      // å·¥ä½œæ—¥
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.CustomName(), cellIndexTree, cells, row, column3 );
      // èŠ‚å‡æ—¥åŠ ç­ 
      holidayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column6.Name(), cellIndexTree, cells, row, column6 );
      holidayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column6.CustomName(), cellIndexTree, cells, row, column6 );
      // ä¼‘息日加班 
      breakDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
      breakDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
      // å¹³æ—¶åŠ ç­
      defaultDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
      defaultDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
      if( shiftPlan.Outcome() <> "" ){
        workingDayCell.RealValue( workingDayCell.RealValue() + 1 );
        if( shiftPlan.IsHoliday() ){
@@ -145,7 +145,7 @@
        }
      }else{
        if( not shiftPlan.IsHoliday() and not ( shiftPlan.DefaultRemark().LikeUserLocale( "周六" ) or shiftPlan.DefaultRemark().LikeUserLocale( "周日" ) )){
          qiangongCell := LocalCell_Default::GetCell(  rowKey + column7.Name(), cellIndexTree, cells, row, column7 );
          qiangongCell := LocalCell_Default::GetCell(  rowKey + column7.CustomName(), cellIndexTree, cells, row, column7 );
          qiangongCell.RealValue( qiangongCell.RealValue() + 8 );
        }
      }
@@ -185,30 +185,30 @@
      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 );
      jiejiariCell := LocalCell_Default::GetCell(  rowKey + column6.CustomName(), cellIndexTree, cells, row, column6 );
      jiejiarifeiCell := LocalCell_Default::GetCell(  rowKey + column10.CustomName(), cellIndexTree, cells, row, column10 );
      jiejiarifeiCell.RealValue( EmployeeCost::GetSalary( unit,holidayMultiplier,jiejiariCell.RealValue()));
      
      // ä¼‘息日加班费
      xiuxiCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
      xiuxifeiCell := LocalCell_Default::GetCell(  rowKey + column9.Name(), cellIndexTree, cells, row, column9 );
      xiuxiCell := LocalCell_Default::GetCell(  rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
      xiuxifeiCell := LocalCell_Default::GetCell(  rowKey + column9.CustomName(), 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 );
      jiabanCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
      jiabanfeiCell := LocalCell_Default::GetCell(  rowKey + column8.CustomName(), cellIndexTree, cells, row, column8 );
      jiabanfeiCell.RealValue( EmployeeCost::GetSalary( unit,defaultMultiplier ,jiabanCell.RealValue()));
      
      // æ¬ å·¥è´¹
      qiangongCell := LocalCell_Default::GetCell(  rowKey + column7.Name(), cellIndexTree, cells, row, column7 );
      qiangongCell := LocalCell_Default::GetCell(  rowKey + column7.CustomName(), cellIndexTree, cells, row, column7 );
      qiangongCell.RealValue( qiangongCell.RealValue() - 8 );
      
      qiangongfeiCell := LocalCell_Default::GetCell(  rowKey + column11.Name(), cellIndexTree, cells, row, column11 );
      qiangongfeiCell := LocalCell_Default::GetCell(  rowKey + column11.CustomName(), cellIndexTree, cells, row, column11 );
      qiangongfeiCell.RealValue( EmployeeCost::GetSalary( unit,qiangongMultiplier,qiangongCell.RealValue() ));
      
      
      // å·¥ä½œæ—¥
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.CustomName(), cellIndexTree, cells, row, column3 );
      workingDayCell.RealValue( workingDayCell.RealValue() );
    }
    
_Main/BL/Type_LocalCell_Default/StaticMethod_GetColumnXML.qbl
@@ -14,7 +14,7 @@
    cells := selectsortedset( column, LocalCell.astype( LocalCell_Default ), cell,
                                  exists( rows,Elements,element,element = cell.LocalRow()), cell.LocalRow().Index());
    if( type = "data" ){
      columnXML := "<column><name>" + column.Name() + "</name><type>String</type>";
      columnXML := "<column><name>" + column.Name() + "</name><type>Number</type>";
      traverse ( cells, Elements, cell ) {
        cellXML := '<cell value="' + cell.RealValue().Format( "N(Dec)" ) + '"/>'
        columnXML := columnXML + cellXML;
@@ -22,7 +22,7 @@
      columnXML := columnXML + "</column>";
    }
    if( type = "attribute" ){
      columnXML1 := "<column><name>产线</name><type>String</type>";
      columnXML1 := "<column><name>    </name><type>String</type>";
      traverse ( cells, Elements, cell ) {
        cellXML := '<cell value="' + cell.LocalRow().Name() + '"/>'
        columnXML1 := columnXML1 + cellXML;
_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_GenerateColumnIndex.qbl
@@ -30,7 +30,7 @@
          // 2023/01/01
          index := [Number]generalColumn.Name().ReplaceAll( "/", "" );
        }
        column := localTable.LocalColumn( relnew, Name := generalColumn.Name(),CustomIndex := index );
        column := localTable.LocalColumn( relnew, CustomName := generalColumn.Name(),CustomIndex := index );
        columns.Add( column );
        columnTree.Root().AddChild( tempHandle,columns.Size() - 1 );
      }
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
@@ -70,9 +70,13 @@
        }
      }
    }
    traverse( table,MP_Column,column,column.MP_Cell( relsize ) = 0 ){
      column.Delete(); 
    }
    return table;
  *]
}
_Main/BL/Type_LocalColumn/Attribute_CustomName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute CustomName
{
  #keys: '3[414996.1.141371567][414996.1.141371566][414996.1.141371568]'
  ValueType: String
}
_Main/BL/Type_LocalColumn/Function_CalcDate.qbl
@@ -6,7 +6,7 @@
  [*
    // rislai Jun-28-2024 (created)
    if( not this.IsAttrbuteColumn() ){
      names := this.Name().Tokenize( "/" );
      names := this.CustomName().Tokenize( "/" );
      this.Date( ifexpr( this.CustomDate() <> Date::MinDate(),this.CustomDate(),guard( Date::Construct( [Number]names.Element( 0 ),[Number]names.Element( 1 ),[Number]names.Element( 2 )),Date::MinDate() )));
    }
  *]
_Main/BL/Type_LocalColumn/Function_CalcName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcName
{
  TextBody:
  [*
    // Akari Oct-16-2024 (created)
    value := ifexpr( this.CustomName() <> "", this.CustomName(),this.Date().Format( "Y/M2/D2"))
    this.Name( value );
  *]
}
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl
@@ -39,7 +39,6 @@
          columnIndex := guard( columnIndexTree.Root().Child( columnHandle ),null( NamedValue ));
          if( not isnull( columnIndex )){
            column := columns.Element( columnIndex.GetValueAsNumber() );
            row.MP_Cell( relnew,MP_Cell_AnnualPlanReport,MP_Column := column ,NewSupply := pispippl.NewSupplyQuantity());
          }
        }
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl
@@ -14,6 +14,11 @@
    startDate := minselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate();
    endDate := maxselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate();
    
    localCells := construct( LocalCell_Defaults );
    localCellIndexTree := NamedValueTree::Create();
    localRows := construct( LocalRows );
    localRowIndexTree := NamedValueTree::Create();
    localColumns := construct( LocalColumns );
    localColumnIndexTree := NamedValueTree::Create();
    for( i := startDate; i <= endDate; i := i + 1 ){
@@ -35,7 +40,17 @@
       localColumnIndexTree.Root().AddChild( localColumnHandle,localColumns.Size() - 1 );
    }
    traverse( tables,Elements.MP_Row,row ){
       localRow := localTable.LocalRow( relnew,CustomName := row.Name(),ProductID := row.ProductID(),StockingPointID := row.StockingPointID(),Index := localTable.GetRowIndexCache() );
       localRowHandle := localRowIndexTree.GetHandle( row.ProductID() + row.StockingPointID() );
       localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
       localRow := null( LocalRow );
       if( isnull( localRowIndex )){
         localRow := localTable.LocalRow( relnew,CustomName := row.Name(),ProductID := row.ProductID(),StockingPointID := row.StockingPointID(),Index := localTable.GetRowIndexCache() );
         localRows.Add( localRow );
         localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
       }else{
         localRow := localRows.Element( localRowIndex.GetValueAsNumber() );
       }
       traverse( row,MP_Cell.astype( MP_Cell_AnnualPlanReport ),cell ){
         localColumnHandle := localColumnIndexTree.GetHandle( cell.MP_Column().Date().AsQUILL() );
         localColumnIndex := guard( localColumnIndexTree.Root().Child( localColumnHandle ),null( NamedValue ));
@@ -43,26 +58,83 @@
           localColumn := localColumns.Element( localColumnIndex.GetValueAsNumber() );
           localCell := localRow.LocalCell( relnew,LocalCell_Default,LocalColumn := localColumn );
           localCell.RealValue( cell.NewSupply() );
           localCellHandle := localCellIndexTree.GetHandle( localRow.ProductID() + localRow.StockingPointID() + localColumn.CustomDate().AsQUILL() + localColumn.TimeUnit() );
           localCells.Add( localCell );
           localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
         }
       }
    }
    owner := maxselect( owners,Elements,element,element.StartOfPlanning() );
    traverse( owner,Product_MP.ProductInStockingPoint_MP,pisp_mp ){
      pispippls := selectset( pisp_mp,ProductInStockingPointInPeriod.astype( ProductInStockingPointInPeriodPlanningLeaf ),pispippl,
                                        pispippl.Period_MP().StartDate() > endDate
                                    and pispippl.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day());
      if( pispippls.Size() <> 0 ){
        localRowHandle := localRowIndexTree.GetHandle( pisp_mp.ProductID() + pisp_mp.StockingPointID() );
        localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
        localRow := null( LocalRow );
        if( isnull( localRowIndex )){
          localRow := localTable.LocalRow( relnew,CustomName := pisp_mp.Name(),ProductID := pisp_mp.ProductID(),StockingPointID := pisp_mp.StockingPointID(),Index := localTable.GetRowIndexCache() );
          localRows.Add( localRow );
          localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
        }else{
          localRow := localRows.Element( localRowIndex.GetValueAsNumber() );
        }
        traverse( pispippls,Elements,pispippl ){
          columnHandle := localColumnIndexTree.GetHandle( pispippl.Period_MP().StartDate().AsQUILL() );
          columnIndex := guard( localColumnIndexTree.Root().Child( columnHandle ),null( NamedValue ));
          if( not isnull( columnIndex )){
            column := localColumns.Element( columnIndex.GetValueAsNumber() );
            localCell := localRow.LocalCell( relnew,LocalCell_Default,LocalColumn := column );
            localCell.RealValue( pispippl.NewSupplyQuantity() );
          }
        }
      }
    }
    traverse( localTable,LocalRow,row ){
      traverse( localTable,LocalColumn,column,column.TimeUnit() = "Week" ){
        value := sum( row,LocalCell.astype( LocalCell_Default ),cell,
                      cell.LocalColumn().TimeUnit() = "Day" and 
                      cell.LocalColumn().CustomDate() >= column.CustomDate() and 
                      cell.LocalColumn().CustomDate() < column.CustomDate().StartOfNextWeek(),cell.RealValue());
        row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
        localCell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
        localCellHandle := localCellIndexTree.GetHandle( row.ProductID() + row.StockingPointID() + column.CustomDate().AsQUILL() + column.TimeUnit() );
        localCells.Add( localCell );
        localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
      }
      traverse( localTable,LocalColumn,column,column.TimeUnit() = "Month" ){
        value := sum( row,LocalCell.astype( LocalCell_Default ),cell,
                      cell.LocalColumn().TimeUnit() = "Day" and 
                      cell.LocalColumn().CustomDate() >= column.CustomDate() and 
                      cell.LocalColumn().CustomDate() < column.CustomDate().StartOfNextMonth(),cell.RealValue());
        row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
        localCell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
        localCellHandle := localCellIndexTree.GetHandle( row.ProductID() + row.StockingPointID() + column.CustomDate().AsQUILL() + column.TimeUnit() );
        localCells.Add( localCell );
        localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
      }
    }
    
    traverse( localTable,LocalColumn,column,column.LocalCell( relsize ) = 0 ){
      column.Delete();
    }
    //traverse( localTable,LocalRow,row ){
    //  traverse( localTable,LocalColumn,column ){
    //    localCellHandle := localCellIndexTree.GetHandle( row.ProductID() + row.StockingPointID() + column.CustomDate().AsQUILL() + column.TimeUnit() );
    //    localCellIndex := guard( localCellIndexTree.Root().Child( localCellHandle ),null( NamedValue ));
    //    if( isnull( localCellIndex )){
    //      localCell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := 0.0 );
    //      localCells.Add( localCell );
    //      localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
    //    }
    //  }
    //}
    return localTable;
  *]
}
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pExport.def
@@ -29,7 +29,7 @@
          Properties:
          [
            DataType: 'RecycleBin'
            FixedFilter: 'object.Name() = MP_Cell_ScheduleSummary::GetTableName()'
            FixedFilter: 'object.Name() = MP_Cell_AnnualPlanReport::GetTableName()'
            Source: 'RecycleBin'
            Taborder: 0
            Transformation: 'ExportXMLManager'
@@ -39,16 +39,6 @@
      Properties:
      [
        Taborder: 1
      ]
    }
    Component bDownload id:bDownload_520
    {
      #keys: '[412672.1.111158091]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'DOWNLOAD'
        Taborder: 2
      ]
    }
  ]
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_PanelAnnualPlan_dhComparisonData854_OnCreated.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bDownload_OnClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bExport_OnClick.def
@@ -10,7 +10,7 @@
    Body:
    [*
      rows := selectset( dhComparisonData854.Data(),LocalRow,row,exists( dhFinelProduct.Data(),Elements,entity,entity.ID() = row.ProductID()) and exists( dhFinelStockingPoint.Data(),Elements,entity,entity.DisplayName() = row.StockingPointID())); 
      columns := selectset( dhComparisonData854.Data(),LocalColumn,column,dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() );
      columns := selectset( dhComparisonData854.Data(),LocalColumn,column,dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() and column.TimeUnit() = dhTimeUnit.Data());
      LocalCell_Default::AsyncExport( RecycleBin,rows,columns );
      //Application.Download( "产出导入模板.xlsx",data.AsBinaryData() );
    *]
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_dhXMLDataListener_OnDataChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: pExport/dhXMLDataListener_801
Response OnDataChanged () id:Response_pExport_dhXMLDataListener_OnDataChanged
{
  #keys: '[414996.1.140601534]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
  QuillAction
  {
    Body:
    [*
      if( not isnull( this.Data() )){
        binaryValue := dhXMLDataListener.Data( ).Export();
        Application.Download( MP_Cell_AnnualPlanReport::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
        dhXMLDataListener.Data( ).Delete();
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged.def
@@ -9,11 +9,11 @@
  {
    Body:
    [*
      binaryValue := dhXMLDataListener.Data( ).Export();
      Application.Download( MP_Cell_ScheduleSummary::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
      dhXMLDataListener.Data( ).Delete();
      if( not isnull( this.Data() )){
        binaryValue := dhXMLDataListener.Data( ).Export();
        Application.Download( MP_Cell_ScheduleSummary::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
        dhXMLDataListener.Data( ).Delete();
      }
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_dhXMLDataListener_OnDataChanged.def
@@ -9,12 +9,16 @@
  {
    Body:
    [*
      traverse( dhXMLDataListener.Data(),Elements,element ){
        binaryValue := element.Export();
        Application.Download( element.Name() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
        element.Delete();
      try{
        traverse( dhXMLDataListener.Data(),Elements,element ){
          binaryValue := element.Export();
          Application.Download( element.Name() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
          element.Delete();
        }
      }onerror{
        traverse( dhXMLDataListener.Data(),Elements,element ){
          element.Delete();
        }
      }
    *]
    GroupServerCalls: false