xiaoding721
2024-12-03 6c75b96c8b75d10226546637445c4ac50db3897d
修复一些bug
已重命名2个文件
已修改7个文件
已添加5个文件
400 ■■■■■ 文件已修改
_Main/BL/EDI/Broker_MP_ExportSingleShiftConfigBroker.qbl 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_GenerateDispatchData.qbl 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_CreateFullTable.qbl 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_CreateTempTable.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_ExportOutputTemplate.qbl 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_ImportOutput.qbl 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ScheduleSummaryOutputData/Attribute_Capacity.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ScheduleSummaryOutputData/Attribute_ShiftPattern.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ScheduleSummaryOutputData/Attribute_WorkingDay.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ScheduleSummaryOutputData/DefaultValue_ShiftPattern.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_SingleShiftConfig/Attribute_FirstSingleShiftQuantity.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_SingleShiftConfig/Attribute_SecondSingleShiftQuantity.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_SingleShiftConfig/Attribute_ThirdSingleShiftQuantity.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_SingleShiftConfig/StaticMethod_Import.qbl 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/EDI/Broker_MP_ExportSingleShiftConfigBroker.qbl
@@ -9,11 +9,14 @@
  {
    EDIMLTable SingleShiftConfig
    {
      PrimaryKeyColumns: ID
      TargetType: SingleShiftConfig
      TypeIndex: SingleShiftConfigTypeIndex
      EDIMLColumn FirstSingleShiftQuantity { Attribute: FirstSingleShiftQuantity ValueType: Real }
      EDIMLColumn ID { Attribute: ID ValueType: String }
      EDIMLColumn SecondSingleShiftQuantity { Attribute: SecondSingleShiftQuantity ValueType: Real }
      EDIMLColumn ShiftName { Attribute: ShiftName ValueType: String }
      EDIMLColumn SingleShiftName { Attribute: SingleShiftName ValueType: String }
      EDIMLColumn StandardYield { Attribute: StandardYield ValueType: Real }
      EDIMLColumn ThirdSingleShiftQuantity { Attribute: ThirdSingleShiftQuantity ValueType: Real }
      EDIMLColumn UnitID { Attribute: UnitID ValueType: String }
    }
  }
@@ -23,10 +26,11 @@
    {
      InputTable: SingleShiftConfig
      OutputTable: SingleShiftConfig
      EDIColumnMatch { InputColumn: FirstSingleShiftQuantity OutputColumn: FirstSingleShiftQuantity }
      EDIColumnMatch { InputColumn: ID OutputColumn: ID }
      EDIColumnMatch { InputColumn: SecondSingleShiftQuantity OutputColumn: SecondSingleShiftQuantity }
      EDIColumnMatch { InputColumn: ShiftName OutputColumn: ShiftName }
      EDIColumnMatch { InputColumn: SingleShiftName OutputColumn: SingleShiftName }
      EDIColumnMatch { InputColumn: StandardYield OutputColumn: StandardYield }
      EDIColumnMatch { InputColumn: ThirdSingleShiftQuantity OutputColumn: ThirdSingleShiftQuantity }
      EDIColumnMatch { InputColumn: UnitID OutputColumn: UnitID }
    }
  }
@@ -38,10 +42,11 @@
      Columns:
      [
        EDIXLSLinkColumn ID { ValueType: String }
        EDIXLSLinkColumn ShiftName { ValueType: String }
        EDIXLSLinkColumn SingleShiftName { ValueType: String }
        EDIXLSLinkColumn StandardYield { ValueType: Real }
        EDIXLSLinkColumn UnitID { ValueType: String }
        EDIXLSLinkColumn ShiftName { ValueType: String }
        EDIXLSLinkColumn FirstSingleShiftQuantity { ValueType: Real }
        EDIXLSLinkColumn SecondSingleShiftQuantity { ValueType: Real }
        EDIXLSLinkColumn ThirdSingleShiftQuantity { ValueType: Real }
      ]
    }
  }
_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_GenerateDispatchData.qbl
@@ -165,24 +165,26 @@
        singleShiftVolume2 := 0.0;
        singleShiftVolume3 := 0.0;
        
        singleShiftConfigs := selectset( unit,SingleShiftConfig,config,config.ShiftName() = "3" );
        traverse( singleShiftConfigs,Elements,singleShiftConfig ){
        singleShiftConfig := select( unit,SingleShiftConfig,config,config.ShiftName() = "3" );
        if( not isnull( singleShiftConfig ) ){
          if( line.Tips().LikeUserLocale( "保养" )){
            if( singleShiftConfig.SingleShiftName() = "白班"){
              singleShiftVolume1 := 0.0;
            }else if( singleShiftConfig.SingleShiftName() = "二班"){
              singleShiftVolume2 := singleShiftConfig.StandardYield();
            }else if( singleShiftConfig.SingleShiftName() = "三班"){
              singleShiftVolume3 := singleShiftConfig.StandardYield();
            singleShiftVolume2 := singleShiftConfig.SecondSingleShiftQuantity();
            singleShiftVolume3 := singleShiftConfig.ThirdSingleShiftQuantity();
          }else{
            singleShiftVolume1 := singleShiftConfig.FirstSingleShiftQuantity();
            singleShiftVolume2 := singleShiftConfig.SecondSingleShiftQuantity();
            singleShiftVolume3 := singleShiftConfig.ThirdSingleShiftQuantity();
            }
          }else{
            if( singleShiftConfig.SingleShiftName() = "白班"){
              singleShiftVolume1 := singleShiftConfig.StandardYield();
            }else if( singleShiftConfig.SingleShiftName() = "二班"){
              singleShiftVolume2 := singleShiftConfig.StandardYield();
            }else if( singleShiftConfig.SingleShiftName() = "三班"){
              singleShiftVolume3 := singleShiftConfig.StandardYield();
            }
          if( line.Tips().LikeUserLocale( "保养" )){
            singleShiftVolume1 := 0.0;
            singleShiftVolume2 := lineQuantity / 2;
            singleShiftVolume3 := lineQuantity / 2;
          }else{
            singleShiftVolume1 := lineQuantity / 3;
            singleShiftVolume2 := lineQuantity / 3;
            singleShiftVolume3 := lineQuantity / 3;
          }
        }
        
@@ -219,20 +221,22 @@
        singleShiftVolume1 := 0.0;
        singleShiftVolume2 := 0.0;
        
        singleShiftConfigs := selectset( unit,SingleShiftConfig,config,config.ShiftName() = line.ShiftName() );
        traverse( singleShiftConfigs,Elements,singleShiftConfig ){
        singleShiftConfig := select( unit,SingleShiftConfig,config,config.ShiftName() = line.ShiftName() );
        if( not isnull( singleShiftConfig )){
          if( line.Tips().LikeUserLocale( "保养" )){
            if( singleShiftConfig.SingleShiftName() = "白班"){
              singleShiftVolume1 := 0.0;
            }else if( singleShiftConfig.SingleShiftName() = "二班"){
              singleShiftVolume2 := singleShiftConfig.StandardYield();
            singleShiftVolume2 := singleShiftConfig.SecondSingleShiftQuantity();
          }else{
            singleShiftVolume1 := singleShiftConfig.FirstSingleShiftQuantity();
            singleShiftVolume2 := singleShiftConfig.SecondSingleShiftQuantity();
            }
          }else{
            if( singleShiftConfig.SingleShiftName() = "白班"){
              singleShiftVolume1 := singleShiftConfig.StandardYield();
            }else if( singleShiftConfig.SingleShiftName() = "二班"){
              singleShiftVolume2 := singleShiftConfig.StandardYield();
            }
          if( line.Tips().LikeUserLocale( "保养" )){
            singleShiftVolume1 := 0.0;
            singleShiftVolume2 := lineQuantity;
          }else{
            singleShiftVolume1 := lineQuantity / 2;
            singleShiftVolume2 := lineQuantity / 2;
          }
        }
    
@@ -260,13 +264,7 @@
        }
        
      }else if( line.ShiftName() = "1" ){
        singleShiftVolume1 := lineQuantity / 1;
        if( line.Tips().LikeUserLocale( "保养" )){
          singleShiftVolume1 := lineQuantity / 1;
        }else{
          singleShiftVolume1 := lineQuantity / 1;
        }
        singleShiftVolume1 := lineQuantity;
        
        for( i := tempProducts.Size() - 1;i >= 0; i-- ){
          product := tempProducts.Element( i );
@@ -280,7 +278,7 @@
        }
        
      }else{
        info( "不支持的班次名称【" + line.ShiftName() + "】");
      }
    }
    
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_CreateFullTable.qbl
@@ -10,18 +10,30 @@
  [*
    // rislai Aug-7-2024 (created)
    // èŽ·å–å­˜æ¡£æ•°æ®
    tables := selectset( archive,ArchiveTable,table,table.Name() = ArchiveCell_ScheduleSummary::GetTableName() );
    //tables := selectset( archive,ArchiveTable,table,table.Name() = ArchiveCell_ScheduleSummary::GetTableName() );
    
    // èŽ·å–å®žé™…ç”Ÿäº§æ•°æ®
    // èŽ·å–å¯¼å…¥ç”Ÿäº§æ•°æ®
    scheduleSummaryOutputDataIndexTree := NamedValueTree::Create();
    scheduleSummaryOutputDatas := selectset( archive,ScheduleSummaryOutputLine.ScheduleSummaryOutputData,data,
                                             exists( tables,Elements.ArchiveRow,row,row.CustomName() = data.ScheduleSummaryOutputLine().LineName() ));
    // æž„建实际生产数据索引
    scheduleSummaryOutputDatas := selectset( archive,ScheduleSummaryOutputLine.ScheduleSummaryOutputData,data, true );
    //                                         exists( tables,Elements.ArchiveRow,row,row.CustomName() = data.ScheduleSummaryOutputLine().LineName() ));
    // æž„建导入生产数据索引
    for( i :=0;i < scheduleSummaryOutputDatas.Size();i++ ){
      scheduleSummaryOutputData := scheduleSummaryOutputDatas.Element( i );
      scheduleSummaryOutputDataKey := scheduleSummaryOutputData.ScheduleSummaryOutputLine().LineName() + scheduleSummaryOutputData.Date().AsQUILL();
      scheduleSummaryOutputDataHandle := scheduleSummaryOutputDataIndexTree.GetHandle( scheduleSummaryOutputDataKey );
      scheduleSummaryOutputDataIndexTree.Root().AddChild( scheduleSummaryOutputDataHandle,i );
    }
    // èŽ·å–å®žé™…ç”Ÿäº§æ•°æ®
    actualDailyProductionDataIndexTree := NamedValueTree::Create();
    actualDailyProductionDatas := selectset( archive,ActualDailyProductionData,data, true );
    //                                         exists( tables,Elements.ArchiveRow,row,row.CustomName() = data.LineName() ));
    // æž„建实际生产数据索引
    for( i :=0;i < actualDailyProductionDatas.Size();i++ ){
      actualDailyProductionData := actualDailyProductionDatas.Element( i );
      actualDailyProductionDataKey := actualDailyProductionData.LineName() + actualDailyProductionData.ProductionDate().AsQUILL();
      actualDailyProductionDataHandle := actualDailyProductionDataIndexTree.GetHandle( actualDailyProductionDataKey );
      actualDailyProductionDataIndexTree.Root().AddChild( actualDailyProductionDataHandle,i );
    }
    
    // æ¸…除历史数据
@@ -31,8 +43,8 @@
    localTable := recycleBin.LocalTable( relnew,Name := ArchiveCell_ScheduleSummary::GetTableName() );
    
    // èŽ·å–å¼€å§‹æ—¶é—´å’Œç»“æŸæ—¶é—´
    startDate := minselect( tables,Elements.ArchiveColumn,column,column.CustomDate() ).CustomDate();
    endDate := maxselect( tables,Elements.ArchiveColumn,column,column.CustomDate() ).CustomDate();
    startDate := minselect( archive,ActualDailyProductionData,data,data.ProductionDate() ).ProductionDate();
    endDate := maxselect( macroPlan,Period_MP,period,period.EndDate() ).EndDate();
    
    // æž„建LocalColumn的索引
    localColumns := construct( LocalColumns );
@@ -61,73 +73,62 @@
      unitIndexTree.Root().AddChild( unitHandle,i );
    }
    
    // å¼€å§‹æ‹¼æŽ¥å­˜æ¡£æ•°æ®
    traverse( tables,Elements.ArchiveRow,row ){
       // å…ˆå¯»æ‰¾localRow,找不到就新建,并创建索引
       localRow := null( LocalRow );
       {
         localRowHandle := localRowIndexTree.GetHandle( row.Name() );
         localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
         if( isnull( localRowIndex )){
           localRow := localTable.LocalRow( relnew,CustomName := row.Name(),Index := localTable.GetRowIndexCache() );
           localRows.Add( localRow );
           localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
         }else{
           localRow := localRows.Element( localRowIndex.GetValueAsNumber());
         }
       }
       // å¾ªçŽ¯åˆ›å»ºæœˆæ•°æ®
       traverse( localColumns,Elements,localColumn ){
          archiveCells := selectset( row,ArchiveCell.astype( ArchiveCell_ScheduleSummary ),cell,
                              cell.IsFristWeekData() and
                              cell.ArchiveColumn().CustomDate() >= localColumn.CustomDate() and
                              cell.ArchiveColumn().CustomDate() < localColumn.CustomDate().StartOfNextMonth() );
          isFuture := macroPlan.StartOfPlanning().Date() <= localColumn.CustomDate();
          workingDay := 0;
          capacity := 0.0;
          output := 0.0;
          shiftPatterns := construct( Strings );
          if( not isFuture ){
            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();
            }
          }
          traverse( archiveCells,Elements,cell,cell.IsFristWeekData() ){
             workingDay := workingDay + cell.WorkingDay();
             capacity := capacity + cell.Capacity();
             if( cell.ShiftPattern() <> "" ){
               shiftPatterns.Add( cell.ShiftPattern() );
             }
          }
          localCell := null( LocalCell_ScheduleSummary );
          {
            localCellHandle := localCellIndexTree.GetHandle( row.Name() + localColumn.CustomDate().AsQUILL() );
            localCellIndex := guard( localCellIndexTree.Root().Child( localCellHandle ),null( NamedValue ));
            if( isnull( localCellIndex )){
              localCell := localRow.LocalCell( relnew,LocalCell_ScheduleSummary,LocalColumn := localColumn );
              localCells.Add( localCell );
              localCellIndexTree.Root().AddChild( localCellHandle , localCells.Size() - 1 );
            }else{
              localCell := localCells.Element( localCellIndex.GetValueAsNumber() );
            }
          }
          localCell.ShiftPattern( selectuniquevalues( shiftPatterns,Elements,element,element ).Concatenate( "/" ) );
          localCell.WorkingDay( localCell.WorkingDay() + workingDay );
          localCell.Capacity( localCell.Capacity() + capacity );
          localCell.Output( localCell.Output() + output );
       }
    }
    //// å¼€å§‹æ‹¼æŽ¥å­˜æ¡£æ•°æ®
    //traverse( tables,Elements.ArchiveRow,row ){
    //   // å…ˆå¯»æ‰¾localRow,找不到就新建,并创建索引
    //   localRow := null( LocalRow );
    //   {
    //     localRowHandle := localRowIndexTree.GetHandle( row.Name() );
    //     localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
    //     if( isnull( localRowIndex )){
    //       localRow := localTable.LocalRow( relnew,CustomName := row.Name(),Index := localTable.GetRowIndexCache() );
    //       localRows.Add( localRow );
    //       localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
    //     }else{
    //       localRow := localRows.Element( localRowIndex.GetValueAsNumber());
    //     }
    //   }
    //   // å¾ªçŽ¯åˆ›å»ºæœˆæ•°æ®
    //   traverse( localColumns,Elements,localColumn ){
    //      archiveCells := selectset( row,ArchiveCell.astype( ArchiveCell_ScheduleSummary ),cell,
    //                          cell.IsFristWeekData() and
    //                          cell.ArchiveColumn().CustomDate() >= localColumn.CustomDate() and
    //                          cell.ArchiveColumn().CustomDate() < localColumn.CustomDate().StartOfNextMonth() );
    //
    //      isFuture := macroPlan.StartOfPlanning().Date() <= localColumn.CustomDate();
    //
    //      workingDay := 0;
    //      capacity := 0.0;
    //      output := 0.0;
    //      shiftPatterns := construct( Strings );
    //
    //      localCell := null( LocalCell_ScheduleSummary );
    //      {
    //        localCellHandle := localCellIndexTree.GetHandle( row.Name() + localColumn.CustomDate().AsQUILL() );
    //        localCellIndex := guard( localCellIndexTree.Root().Child( localCellHandle ),null( NamedValue ));
    //        if( isnull( localCellIndex )){
    //          localCell := localRow.LocalCell( relnew,LocalCell_ScheduleSummary,LocalColumn := localColumn );
    //          localCells.Add( localCell );
    //          localCellIndexTree.Root().AddChild( localCellHandle , localCells.Size() - 1 );
    //        }else{
    //          localCell := localCells.Element( localCellIndex.GetValueAsNumber() );
    //        }
    //      }
    //
    //      traverse( archiveCells,Elements,cell,cell.IsFristWeekData() ){
    //         workingDay := workingDay + cell.WorkingDay();
    //         capacity := capacity + cell.Capacity();
    //         if( cell.ShiftPattern() <> "" ){
    //           shiftPatterns.Add( cell.ShiftPattern() );
    //         }
    //      }
    //
    //      localCell.ShiftPattern( selectuniquevalues( shiftPatterns,Elements,element,element ).Concatenate( "/" ) );
    //      localCell.WorkingDay( localCell.WorkingDay() + workingDay );
    //      localCell.Capacity( localCell.Capacity() + capacity );
    //      localCell.Output( localCell.Output() + output );
    //   }
    //}
    
    tempArchiveTable := ArchiveCell_ScheduleSummary::CreateTempTable( macroPlan,recycleBin );
    traverse( tempArchiveTable,LocalRow,row ){
@@ -153,22 +154,34 @@
          capacity := 0.0;
          output := 0.0;
          shiftPatterns := construct( Strings );
          isFuture := macroPlan.StartOfPlanning().Date() <= localColumn.CustomDate();
          startDate := ifexpr( macroPlan.StartOfPlanning().Date() >= localColumn.CustomDate(), macroPlan.StartOfPlanning().Date(), localColumn.CustomDate() );
          
          if( isFuture ){
          {
            unitHandle := unitIndexTree.GetHandle( row.CustomName() );
            unitIndex := guard( unitIndexTree.Root().Child( unitHandle ),null( NamedValue ));
            if( not isnull( unitIndex )){
              unit := units.Element( unitIndex.GetValueAsNumber() );
              output := sum( unit,StockingPoint_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod.astype( ProductInStockingPointInPeriodPlanningLeaf ).NewSupply,newSupply,
                             newSupply.PeriodTask_MP().istype( PeriodTaskOperation ) and not newSupply.PeriodTask_MP().astype( PeriodTaskOperation ).IsSupplier() and // åˆ—表过滤条件:FormProductionPlanDetails
                             newSupply.ProductInStockingPointInPeriodPlanning().Period_MP().StartDate() >= localColumn.CustomDate() and
                             newSupply.ProductInStockingPointInPeriodPlanning().Period_MP().StartDate() >= startDate and
                             newSupply.ProductInStockingPointInPeriodPlanning().Period_MP().StartDate() < localColumn.CustomDate().StartOfNextMonth() and
                             newSupply.ProductInStockingPointInPeriodPlanning().Period_MP().TimeUnit() = "Day",
                             newSupply.Quantity());
            }
          }
            
          // è®¡åˆ’开始之前的产出取实际每日生产接口
          if( localColumn.CustomDate() < macroPlan.StartOfPlanning().Date() ){
            historyStartDate := ifexpr( macroPlan.StartOfPlanning().Date() <= localColumn.CustomDate(), macroPlan.StartOfPlanning().Date(), localColumn.CustomDate() );
            historyEndDate := ifexpr( macroPlan.StartOfPlanning().Date() > localColumn.CustomDate().StartOfNextMonth() and
                                      macroPlan.StartOfPlanning().Date().Month() = localColumn.CustomDate().Month() and
                                      macroPlan.StartOfPlanning().Date().Year() = localColumn.CustomDate().Year() ,macroPlan.StartOfPlanning().Date(), localColumn.CustomDate().StartOfNextMonth() );
            {
              actualOut := sum( archive,ActualDailyProductionData,data,data.LineName() = row.CustomName() and
                                data.ProductionDate() >= historyStartDate and
                                data.ProductionDate() < historyEndDate,data.ActualOut() );
              output := output + actualOut;
            }
          }
          
          traverse( archiveCells,Elements,cell ){
@@ -201,10 +214,40 @@
       }
    }
    
    traverse( localTable,LocalRow.LocalCell.astype( LocalCell_ScheduleSummary ),cell,cell.WorkingDay() <> 0 ){
    traverse( localTable,LocalRow.LocalCell.astype( LocalCell_ScheduleSummary ),cell ){
      if( cell.WorkingDay() <> 0  ){
      cell.Capacity( cell.Capacity() / cell.WorkingDay() );
    }
    
      // å–导入的数据
          row := cell.LocalRow();
          localColumn := cell.LocalColumn();
          {
            scheduleSummaryOutputDataKey := row.CustomName() + localColumn.CustomDate().AsQUILL();
            scheduleSummaryOutputDataHandle := scheduleSummaryOutputDataIndexTree.GetHandle( scheduleSummaryOutputDataKey );
            scheduleSummaryOutputDataIndex := guard( scheduleSummaryOutputDataIndexTree.Root().Child( scheduleSummaryOutputDataHandle ),null( NamedValue ));
            if( not isnull( scheduleSummaryOutputDataIndex )){
              scheduleSummaryOutputData := scheduleSummaryOutputDatas.Element( scheduleSummaryOutputDataIndex.GetValueAsNumber() );
              if( scheduleSummaryOutputData.Output() <> -1 ){
                output := scheduleSummaryOutputData.Output();
                cell.Output( output );
              }
              if( scheduleSummaryOutputData.WorkingDay() <> -1 ){
                workingDay := scheduleSummaryOutputData.WorkingDay();
                cell.WorkingDay( workingDay );
              }
              if( scheduleSummaryOutputData.Capacity() <> -1 ){
                capacity := scheduleSummaryOutputData.Capacity();
                cell.Capacity( capacity );
              }
              if( scheduleSummaryOutputData.ShiftPattern() <> "-1"){
                shiftPattern := scheduleSummaryOutputData.ShiftPattern();
                cell.ShiftPattern( shiftPattern );
              }
            }
          }
    }
    AsyncFlag::Success( recycleBin,ArchiveCell_ScheduleSummary::GetTableName() );
    return localTable;
  *]
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_CreateTempTable.qbl
@@ -12,7 +12,7 @@
    
    table := recycleBin.LocalTable( relnew,Name := ArchiveCell_ScheduleSummary::GetTableName());
    
    startDate := macroPlan.StartOfPlanning().Date() + 8;
    startDate := macroPlan.StartOfPlanning().Date();
    endDate := maxselect( macroPlan,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.TimeUnit() = Translations::MP_GlobalParameters_Day(),period.EndDate()).EndDate();
    
    columns := construct( LocalColumns );
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_ExportOutputTemplate.qbl
@@ -8,19 +8,45 @@
  TextBody:
  [*
    // rislai Aug-6-2024 (created)
    // Akari May-18-2024 (created)
    // rislai Jan-19-2024 (created)
    sheetName := "产出";
    xmlTemplate := '<?xml version="1.0" encoding="UTF-16"?><table><name>'+ sheetName +'</name>';
    
    xmlTemplate := xmlTemplate + "<column><name>产线</name><type>String</type>";
    // xmlTemplate := xmlTemplate + '<cell value=" "/>';
    xmlTemplate := xmlTemplate + '<cell value="示例产线"/>';
    xmlTemplate := xmlTemplate + '<cell value=" "/>';
    xmlTemplate := xmlTemplate + '<cell value=" "/>';
    xmlTemplate := xmlTemplate + '<cell value=" "/>';
    xmlTemplate := xmlTemplate + "</column>";
    
    xmlTemplate := xmlTemplate + "<column><name>属性</name><type>String</type>";
    xmlTemplate := xmlTemplate + '<cell value="班次"/>';
    xmlTemplate := xmlTemplate + '<cell value="工作日"/>';
    xmlTemplate := xmlTemplate + '<cell value="产能"/>';
    xmlTemplate := xmlTemplate + '<cell value="产出"/>';
    xmlTemplate := xmlTemplate + "</column>";
    for( i := 6 ; i <= 12 ; i++ ){
      xmlTemplate := xmlTemplate + "<column><name>" + Date::Construct( year - 1,i,1 ).Format( "Y/M/D" ) + "</name><type>Number</type>";
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + "</column>";
    }
    for( i := 1 ; i <= 12 ; i++ ){
      xmlTemplate := xmlTemplate + "<column><name>" + Date::Construct( year,i,1 ).Format( "Y/M/D" ) + "</name><type>Number</type>";
      // xmlTemplate := xmlTemplate + '<cell value=" "/>';
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + "</column>";
    }
    for( i := 1 ; i <= 6 ; i++ ){
      xmlTemplate := xmlTemplate + "<column><name>" + Date::Construct( year + 1,i,1 ).Format( "Y/M/D" ) + "</name><type>Number</type>";
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + '<cell value="0"/>';
      xmlTemplate := xmlTemplate + "</column>";
    }
    
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_ImportOutput.qbl
@@ -25,13 +25,14 @@
      lineIndexTree.Root().AddChild( lineHandle,lines.Size() - 1 );
    }
    
    traverse( outputTable,GeneralExcelImportAndExportDataRow,row ){
      count := 0;
    countRow := 0;
      line := null( ScheduleSummaryOutputLine );
      datas := construct( ScheduleSummaryOutputDatas );
      dataIndexTree := NamedValueTree::Create();
    traverse( outputTable,GeneralExcelImportAndExportDataRow,row ){
      count := 0;
      traverse( row,GeneralExcelImportAndExportDataCell,cell ){
        if( count = 0 ){
        if( count = 0 and countRow mod 4 = 0){
          lineName := cell.Value();
          lineHandle := lineIndexTree.GetHandle( lineName );
          lineIndex := guard( lineIndexTree.Root().Child( lineHandle ),null( NamedValue ));
@@ -47,22 +48,33 @@
              dataIndexTree.Root().AddChild( dataHandle,datas.Size() - 1 );
            }
          }
        }else{
        }else if( count <> 1 and count <> 0 ){
          stringsDate := cell.GeneralExcelImportAndExportDataColumn().Name().Tokenize( "/" );
          date := guard( Date::Construct( [Number]stringsDate.Element( 0 ),[Number]stringsDate.Element( 1 ),[Number]stringsDate.Element( 2 )),Date::MinDate() );
          dataHandle := dataIndexTree.GetHandle( date.AsQUILL() );
          dataIndex := guard( dataIndexTree.Root().Child( dataHandle ),null( NamedValue ));
          data := null( ScheduleSummaryOutputData );
          if( isnull( dataIndex )){
            data := line.ScheduleSummaryOutputData( relnew,Date := date,Output := [Real]cell.Value() );
            data := line.ScheduleSummaryOutputData( relnew,Date := date );
            datas.Add( data );
            dataIndexTree.Root().AddChild( dataHandle,datas.Size() - 1 );
          }else{
            data := datas.Element( dataIndex.GetValueAsNumber() );
          }
          if( countRow mod 4 = 0 ){
            data.ShiftPattern( cell.Value() );
          }else if( countRow mod 4 = 1 ){
            data.WorkingDay( [Number]cell.Value() );
          }else if( countRow mod 4 = 2 ){
            data.Capacity( [Real]cell.Value() );
          }else if( countRow mod 4 = 3 ){
            data.Output( [Real]cell.Value() );
          }
        }
        count ++;
      } 
      countRow ++;
    }
  *]
}
_Main/BL/Type_ScheduleSummaryOutputData/Attribute_Capacity.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Capacity
{
  #keys: '3[414996.1.259744817][414996.1.259744816][414996.1.259744818]'
  Description: '产能'
  ValueType: Real
}
_Main/BL/Type_ScheduleSummaryOutputData/Attribute_ShiftPattern.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute ShiftPattern
{
  #keys: '3[414996.1.259744814][414996.1.259744813][414996.1.259744815]'
  ValueType: String
}
_Main/BL/Type_ScheduleSummaryOutputData/Attribute_WorkingDay.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute WorkingDay
{
  #keys: '3[414996.1.259744811][414996.1.259744810][414996.1.259744812]'
  Description: '工作日'
  ValueType: Number
}
_Main/BL/Type_ScheduleSummaryOutputData/DefaultValue_ShiftPattern.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: ShiftPattern
}
_Main/BL/Type_SingleShiftConfig/Attribute_FirstSingleShiftQuantity.qbl
ÎļþÃû´Ó _Main/BL/Type_SingleShiftConfig/Attribute_SingleShiftName.qbl ÐÞ¸Ä
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute SingleShiftName
Attribute FirstSingleShiftQuantity
{
  #keys: '3[414996.1.251280114][414996.1.251280113][414996.1.251280115]'
  ValueType: String
  ValueType: Real
}
_Main/BL/Type_SingleShiftConfig/Attribute_SecondSingleShiftQuantity.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute SecondSingleShiftQuantity
{
  #keys: '3[414996.1.260510622][414996.1.260510621][414996.1.260510623]'
  ValueType: Real
}
_Main/BL/Type_SingleShiftConfig/Attribute_ThirdSingleShiftQuantity.qbl
ÎļþÃû´Ó _Main/BL/Type_SingleShiftConfig/Attribute_StandardYield.qbl ÐÞ¸Ä
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
Attribute StandardYield
Attribute ThirdSingleShiftQuantity
{
  #keys: '3[414996.1.251280101][414996.1.251280100][414996.1.251280102]'
  ValueType: Real
_Main/BL/Type_SingleShiftConfig/StaticMethod_Import.qbl
@@ -28,11 +28,12 @@
    
    traverse( rows,Elements,row ){
      
      // idCell             := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 );
      shiftNameCell            := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 1 );
      singleShiftNameCell     := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
      standardYieldCell           := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 3 );
      unitIDCell            := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 4 );
      unitIDCell := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 1 );
      shiftNameCell := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
      firstSingleShiftQuantityCell := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 3 );
      secondSingleShiftQuantityCell := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 4 );
      thirdSingleShiftQuantityCell := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 5 );
      
      unitID := guard( unitIDCell.Value(), "" );
      if( unitID = "" ){
@@ -45,8 +46,9 @@
        unit.SingleShiftConfig( relnew,
                                ID := IDHolder::GetGUID(),
                                ShiftName := guard( shiftNameCell.Value(), "" ),
                                SingleShiftName := guard( singleShiftNameCell.Value(), "" ),
                                StandardYield := [Real]guard( standardYieldCell.Value(), "0" ));
                                FirstSingleShiftQuantity := guard( [Real]firstSingleShiftQuantityCell.Value(), 0.0 ),
                                SecondSingleShiftQuantity := guard( [Real]secondSingleShiftQuantityCell.Value(), 0.0 ),
                                ThirdSingleShiftQuantity := guard( [Real]thirdSingleShiftQuantityCell.Value(), 0.0 ) );
      }else{
        error( "无法在【" + macroPlan.MDSMacroPlan().Description() + "】内找到产线【" + unitID + "】。");
      }