xiaoding721
2024-11-14 7a48109b4bc75b886dd7180d7db35ad2bf33fb67
修复一些bug
已重命名5个文件
已修改10个文件
已添加3个文件
已删除1个文件
304 ■■■■ 文件已修改
_Main/BL/Type_LockPeriod/Method_Enable.qbl 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LockPeriod/StaticMethod_Create.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_Create.qbl 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_CreateFullTable.qbl 128 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_CreateTempTable.qbl 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersion/Method_GetRow.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersionRow/Attribute_StockingPointID.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateLockPeriod/Component_pProduct#661.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateLockPeriod/Response_pnlActions_btnOk_OnClick.def 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form701/Component_pRibbon.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form701/Component_pRibbon504.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_bExport_OnClick.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_pRibbon504_bComparison_OnClick.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_pRibbon504_bExport_OnClick.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_pRibbon504_dhTimeUnit_OnCreated.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_pRibbon504_dhXMLDataListener_OnDataChanged.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_pRibbon504_rbgTimeUnit_OnUserChanged.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Response_ListLockPeriod_mEnable_OnClick#21.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon763_184_bExport_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LockPeriod/Method_Enable.qbl
@@ -1,19 +1,19 @@
Quintiq file version 2.0
#parent: #root
Method Enable (
  const NewOfflinePlanTable offlinePlanTable
  const OfflinePlanArchiveVersion offlinePlanTable
)
{
  TextBody:
  [*
    // Akari Oct-30-2024 (created)
    offlinePlanRow := select( offlinePlanTable,NewOfflinePlanRow,row,row.ProductID() = this.ProductInStockingPoint_MP().ProductID() and row.StockingPointID() = this.ProductInStockingPoint_MP().StockingPointID() );
    offlinePlanRow := select( offlinePlanTable,Row,row,row.ProductID() = this.ProductInStockingPoint_MP().ProductID() and row.StockingPointID() = this.ProductInStockingPoint_MP().StockingPointID() );
    
    offlinePlanCells := selectset( offlinePlanRow, NewOfflinePlanCell,cell,true );
    offlinePlanCells := selectset( offlinePlanRow, Cell,cell,cell.Column().TimeUnit() = "Day" );
    offlinePlanCellIndexTree := NamedValueTree::Create();
    for( i := 0; i< offlinePlanCells.Size(); i++ ){
      offlinePlanCell := offlinePlanCells.Element( i );
      offlinePlanCellHandle := offlinePlanCellIndexTree.GetHandle( offlinePlanCell.NewOfflinePlanColumn().StartDate().AsQUILL() );
      offlinePlanCellHandle := offlinePlanCellIndexTree.GetHandle( offlinePlanCell.Column().StartDate().AsQUILL() );
      offlinePlanCellIndexTree.Root().AddChild( offlinePlanCellHandle,i );
    }
    
_Main/BL/Type_LockPeriod/StaticMethod_Create.qbl
@@ -2,7 +2,8 @@
#parent: #root
StaticMethod Create (
  ProductInStockingPoint_MP owner,
  Date lockDate
  Date lockDate,
  const InterfaceDataset interfaceDataset
)
{
  TextBody:
@@ -10,9 +11,7 @@
    // rislai Jun-13-2024 (created)
    lockPeriod := owner.LockPeriod( relnew, LockDate := lockDate );
    
    macroPlan := owner.MacroPlan();
    offlineTable := select( macroPlan,NewOfflinePlanTable,table,true );
    offlineTable := select( interfaceDataset,OfflinePlanArchiveVersion,table,not table.IsShow() );
    
    if( not isnull( offlineTable )){
      lockPeriod.Enable( offlineTable ); 
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_Create.qbl
@@ -17,7 +17,8 @@
    table := archive.ArchiveTable( relnew,Name := ArchiveCell_ScheduleSummary::GetTableName(),MacroPlanMDSID := macroPlan.MDSID(),MacroPlanName := macroPlan.MDSMacroPlan().Description());
    
    startDate := macroPlan.StartOfPlanning().Date();
    endDate := maxselect( macroPlan,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.TimeUnit() = Translations::MP_GlobalParameters_Day(),period.EndDate()).EndDate();
    endDate := macroPlan.StartOfPlanning().Date() + 7;
    //endDate := maxselect( macroPlan,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.TimeUnit() = Translations::MP_GlobalParameters_Day(),period.EndDate()).EndDate();
    
    columns := construct( ArchiveColumns );
    columnIndexTree := NamedValueTree::Create();
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_CreateFullTable.qbl
@@ -9,12 +9,14 @@
  TextBody:
  [*
    // rislai Aug-7-2024 (created)
    // èŽ·å–å­˜æ¡£æ•°æ®
    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() ));
    // æž„建实际生产数据索引
    for( i :=0;i < scheduleSummaryOutputDatas.Size();i++ ){
      scheduleSummaryOutputData := scheduleSummaryOutputDatas.Element( i );
      scheduleSummaryOutputDataKey := scheduleSummaryOutputData.ScheduleSummaryOutputLine().LineName() + scheduleSummaryOutputData.Date().AsQUILL();
@@ -22,14 +24,17 @@
      scheduleSummaryOutputDataIndexTree.Root().AddChild( scheduleSummaryOutputDataHandle,i );
    }
    
    // æ¸…除历史数据
    traverse( recycleBin,LocalTable,table,table.Name() = ArchiveCell_ScheduleSummary::GetTableName() ){
      table.Delete();
    }
    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();
    
    // æž„建LocalColumn的索引
    localColumns := construct( LocalColumns );
    localColumnIndexTree := NamedValueTree::Create();
    for( i := startDate.StartOfMonth(); i <= endDate.StartOfMonth(); i := i.StartOfNextMonth() ){
@@ -39,12 +44,15 @@
       localColumnIndexTree.Root().AddChild( localColumnHandle,localColumns.Size() - 1 );
    }
    
    // LocalRow的索引
    localRows := construct( LocalRows );
    localRowIndexTree := NamedValueTree::Create();
    
    // LocalCell的索引
    localCells := construct( LocalCell_ScheduleSummarys );
    localCellIndexTree := NamedValueTree::Create();
    
    // unit的索引
    units := selectset( macroPlan,Unit,unit,unit.HasCapacityTypeTime() and not unit.HasChild());
    unitIndexTree := NamedValueTree::Create();
    for( i := 0 ; i< units.Size() ; i++ ){
@@ -53,9 +61,9 @@
      unitIndexTree.Root().AddChild( unitHandle,i );
    }
    
    // å¼€å§‹æ‹¼æŽ¥å­˜æ¡£æ•°æ®
    traverse( tables,Elements.ArchiveRow,row ){
       rowMacroPlanMDSID := row.ArchiveTable().MacroPlanMDSID();
       // å…ˆå¯»æ‰¾localRow,找不到就新建,并创建索引
       localRow := null( LocalRow );
       {
         localRowHandle := localRowIndexTree.GetHandle( row.Name() );
@@ -68,32 +76,20 @@
           localRow := localRows.Element( localRowIndex.GetValueAsNumber());
         }
       }
       // å¾ªçŽ¯åˆ›å»ºæœˆæ•°æ®
       traverse( localColumns,Elements,localColumn ){
          cells := selectset( row,ArchiveCell.astype( ArchiveCell_ScheduleSummary ),cell,
                              ifexpr( rowMacroPlanMDSID = macroPlan.MDSID() , true , cell.IsFristWeekData()) and
          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;
          if( isFuture ){
            unitHandle := unitIndexTree.GetHandle( row.Name() );
            unitIndex := guard( unitIndexTree.Root().Child( unitHandle ),null( NamedValue ));
            if( not isnull( unitIndex )){
              unit := units.Element( unitIndex.GetValueAsNumber() );
              output := sum( unit,UnitPeriod.astype( UnitPeriodTime ).PeriodTask_MP.NewSupply,np,
                             np.PeriodTask_MP().UnitPeriod().StartDate() >= localColumn.CustomDate() and
                             np.PeriodTask_MP().UnitPeriod().StartDate() < localColumn.CustomDate().StartOfNextMonth() and
                             np.PeriodTask_MP().UnitPeriod().Period_MP().TimeUnit() = "Day",
                             np.Quantity() );
              output := sum( unit,StockingPoint_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod,pispip,
                             pispip.Period_MP().StartDate() >= localColumn.CustomDate() and
                             pispip.Period_MP().StartDate() < localColumn.CustomDate().StartOfNextMonth() and
                             pispip.Period_MP().TimeUnit() = "Day",
                             pispip.NewSupplyProductionQuantity());
            }
          }else{
          shiftPatterns := construct( Strings );
          if( not isFuture ){
            scheduleSummaryOutputDataKey := row.Name() + localColumn.CustomDate().AsQUILL();
            scheduleSummaryOutputDataHandle := scheduleSummaryOutputDataIndexTree.GetHandle( scheduleSummaryOutputDataKey );
            scheduleSummaryOutputDataIndex := guard( scheduleSummaryOutputDataIndexTree.Root().Child( scheduleSummaryOutputDataHandle ),null( NamedValue ));
@@ -102,11 +98,8 @@
              output := scheduleSummaryOutputData.Output();
            }
          }
          workingDay := 0;
          capacity := 0.0;
          shiftPatterns := construct( Strings );
          traverse( cells,Elements,cell ){
          traverse( archiveCells,Elements,cell ){
             workingDay := workingDay + cell.WorkingDay();
             capacity := capacity + cell.Capacity();
             if( cell.ShiftPattern() <> "" ){
@@ -133,21 +126,80 @@
       }
    }
    
    tempArchiveTable := ArchiveCell_ScheduleSummary::CreateTempTable( macroPlan,recycleBin );
    traverse( tempArchiveTable,LocalRow,row ){
       localRow := null( LocalRow );
       {
         localRowHandle := localRowIndexTree.GetHandle( row.CustomName());
         localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
         if( isnull( localRowIndex )){
           localRow := localTable.LocalRow( relnew,CustomName := row.CustomName(),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,LocalCell.astype( LocalCell_ScheduleSummary ),cell,
                              cell.LocalColumn().CustomDate() >= localColumn.CustomDate() and
                              cell.LocalColumn().CustomDate() < localColumn.CustomDate().StartOfNextMonth() );
          workingDay := 0;
          capacity := 0.0;
          output := 0.0;
          shiftPatterns := construct( Strings );
          isFuture := 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,pispip,
                             pispip.Period_MP().StartDate() >= localColumn.CustomDate() and
                             pispip.Period_MP().StartDate() < localColumn.CustomDate().StartOfNextMonth() and
                             pispip.Period_MP().TimeUnit() = "Day",
                             pispip.NewSupplyProductionQuantity());
            }
          }
          traverse( archiveCells,Elements,cell ){
             workingDay := workingDay + cell.WorkingDay();
             capacity := capacity + cell.Capacity();
             if( cell.ShiftPattern() <> "" ){
               shiftPatterns.Add( cell.ShiftPattern() );
             }
          }
          localCell := null( LocalCell_ScheduleSummary );
          {
            localCellHandle := localCellIndexTree.GetHandle( row.CustomName() + 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( localTable,LocalRow.LocalCell.astype( LocalCell_ScheduleSummary ),cell ){
      cell.Capacity( cell.Capacity() / tables.Size() );
      cell.Output( cell.Output() / tables.Size() );
    }
    //startDate := owner.StartOfPlanning().Date() + 7;
    //endDate := maxselect( owner,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.EndDate(),period.TimeUnit() = "Month" ).EndDate();
    //columns := construct( ArchiveColumns );
    //columnIndexTree := NamedValueTree::Create();
    //for( i := startDate;i < endDate; i := i + 1){
    //  column := table.ArchiveColumn( relnew,CustomDate := i );
    //  columnHandle := columnIndexTree.GetHandle( i.AsQUILL() );
    //  columns.Add( column );
    //  columnIndexTree.Root().AddChild( columnHandle,columns.Size() - 1 );
    //}
    
    AsyncFlag::Success( recycleBin,ArchiveCell_ScheduleSummary::GetTableName() );
    return localTable;
_Main/BL/Type_MP_Cell_ScheduleSummary0/StaticMethod_CreateTempTable.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,77 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateTempTable (
  const MacroPlan macroPlan,
  RecycleBin recycleBin
) as LocalTable
{
  TextBody:
  [*
      // rislai Aug-6-2024 (created)
    zeroDuration := Duration::Construct( 0,0,0,0 );
    table := recycleBin.LocalTable( relnew,Name := ArchiveCell_ScheduleSummary::GetTableName());
    startDate := macroPlan.StartOfPlanning().Date() + 8;
    endDate := maxselect( macroPlan,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.TimeUnit() = Translations::MP_GlobalParameters_Day(),period.EndDate()).EndDate();
    columns := construct( LocalColumns );
    columnIndexTree := NamedValueTree::Create();
    for( i := startDate;i < endDate; i := i + 1){
      column := table.LocalColumn( relnew,CustomDate := i );
      columnHandle := columnIndexTree.GetHandle( i.AsQUILL() );
      columns.Add( column );
      columnIndexTree.Root().AddChild( columnHandle,columns.Size() - 1 );
    }
    traverse( macroPlan,Unit,unit,unit.HasCapacityTypeTime() and not unit.HasChild()){
      // unit.AsEntity().DisplayNameForSelection()
      row := table.LocalRow( relnew,CustomName := unit.ID(),Index := table.GetRowIndexCache() );
      throughput := guard( sum( unit,Operation,operation,operation.Throughput() ) / unit.Operation( relsize ) , 0 );
      unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,
                                        unitPeriodTime.Period_MP().StartDate() >= startDate
                                    and unitPeriodTime.Period_MP().EndDate() <= endDate
                                    and unitPeriodTime.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day());
      traverse( unitPeriodTimes,Elements,unitPeriodTime ){
        columnHandle := columnIndexTree.GetHandle( unitPeriodTime.Period_MP().StartDate().AsQUILL() );
        columnIndex := guard( columnIndexTree.Root().Child( columnHandle ),null( NamedValue ));
        if( not isnull( columnIndex )){
          // å½“arrowedAvailableCapacity不为0,工作日 + 1
          arrowedAvailableCapacity := unitPeriodTime.TotalAvailableCapacity();
          workDay := ifexpr( arrowedAvailableCapacity <> zeroDuration, 1,0 );
          if( workDay = 0 ){
            workDay := ifexpr( unitPeriodTime.ShiftPlan().Outcome() <> "",1,0 );
          }
          column := columns.Element( columnIndex.GetValueAsNumber() );
          dayOfWeek := column.CustomDate().DayOfWeek();
          workHours := select( unitPeriodTime,ShiftPattern.ShiftDay,shifDay,shifDay.Day_MP().ID() = dayOfWeek );
          capacity := 0.0;
          if( not isnull( workHours )){
            capacity := workDay * throughput //* workHours.Capacity().HoursAsReal()
          }
          row.LocalCell( relnew,LocalCell_ScheduleSummary,LocalColumn := column,
                       ShiftPattern := unitPeriodTime.ShiftPatternName(),
                       WorkingDay := workDay,
                       Capacity := capacity,
                       Output := 0 );
        }
      }
    }
    traverse( table,LocalColumn,column,column.LocalCell( relsize ) = 0 ){
      column.Delete();
    }
    return table;
  *]
}
_Main/BL/Type_OfflinePlanArchiveVersion/Method_GetRow.qbl
@@ -7,13 +7,13 @@
  TextBody:
  [*
    // ç”„兰鸽 Oct-11-2024 (created)
    row       := selectobject( this, Row, row, row.ProductID() = noprow.ProductID() and row.ProductionLine() = noprow.ProductionLine() and row.Type() = noprow.Type() );
    row       := selectobject( this, Row, row, row.ProductID() = noprow.ProductID() and row.ProductionLine() = noprow.ProductionLine() and row.Type() = noprow.Type() and row.StockingPointID() = noprow.StockingPointID() );
    
    if( isnull( row ) ){
      product := selectobject( noprow.NewOfflinePlanTable().MacroPlan(), Product_MP, product, product.ID() = noprow.ProductID() );
      if( not isnull( product ) ){
        unit    := ifexpr( noprow.ProductionLine().FindString( "CC", 0 ) > -1, FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() );
        row     := this.Row( relnew, Name := noprow.ProductID(), ProductionLine := noprow.ProductionLine(), Type := noprow.Type(), Unit := unit
        row     := this.Row( relnew, Name := noprow.ProductID(), ProductionLine := noprow.ProductionLine(), Type := noprow.Type(), Unit := unit,StockingPointID := noprow.StockingPointID()
                             , ProductID := ifexpr( exists( product.GetAllParent(), Elements, e, e.ID() = EnginePipelineReport::GetDefaultProductParent() ), product.Notes(), product.ID() ) );
        //初始化单元格
        row.InitializeCell();
_Main/BL/Type_OfflinePlanArchiveVersionRow/Attribute_StockingPointID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute StockingPointID
{
  #keys: '3[414996.1.237454745][414996.1.237454744][414996.1.237454746]'
  ValueType: String
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateLockPeriod/Component_pProduct#661.def
@@ -27,7 +27,7 @@
      ]
      Properties:
      [
        DisplayField: 'ProductID'
        DisplayField: 'ID'
        Label: '产品'
        NumberOfColumns: 50
        Taborder: 0
_Main/UI/MacroPlannerWebApp/Component_DialogCreateLockPeriod/Response_pnlActions_btnOk_OnClick.def
@@ -14,14 +14,14 @@
          // é”å®šå…¨éƒ¨äº§å“
          traverse( MacroPlan,Product_MP,product ){
            traverse( product,ProductInStockingPoint_MP,productInStockingPoint ){
              LockPeriod::Create( productInStockingPoint,dsLockDate.Date() );
              LockPeriod::Create( productInStockingPoint,dsLockDate.Date(),InterfaceDataset );
            }
          }
        }else{
          // é”å®šæŒ‡å®šäº§å“ä¸‹çš„全部库存点
          product := ddlProduct.Data();
          traverse( product,ProductInStockingPoint_MP,productInStockingPoint){
            LockPeriod::Create( productInStockingPoint,dsLockDate.Date() );
            LockPeriod::Create( productInStockingPoint,dsLockDate.Date(), InterfaceDataset );
          }
        }
      }else{
@@ -29,13 +29,13 @@
          // é”å®šæŒ‡å®šåº“存点下的全部产品
          stockingPoint := ddlStockingPoint.Data();
          traverse( stockingPoint,ProductInStockingPoint_MP,productInStockingPoint ){
            LockPeriod::Create( productInStockingPoint,dsLockDate.Date() );
            LockPeriod::Create( productInStockingPoint,dsLockDate.Date(), InterfaceDataset );
          }
        }else{
          // é”å®šæŒ‡å®šåº“存点的指定产品
          productInStockingPoint := select( ddlProduct.Data(),ProductInStockingPoint_MP,pisp,pisp.StockingPoint_MP() = ddlStockingPoint.Data() );
          if( not isnull( productInStockingPoint )){
            LockPeriod::Create( productInStockingPoint,dsLockDate.Date() );
            LockPeriod::Create( productInStockingPoint,dsLockDate.Date(),InterfaceDataset );
          }
        } 
      }
_Main/UI/MacroPlannerWebApp/Component_Form701/Component_pRibbon.def
@@ -6,7 +6,7 @@
  Children:
  [
    #child: PanelFilter_490
    #child: PanelRibbon504
    #child: pRibbon504
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_Form701/Component_pRibbon504.def
ÎļþÃû´Ó _Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelRibbon504.def ÐÞ¸Ä
@@ -1,5 +1,5 @@
Quintiq file version 2.0
Component PanelRibbon504
Component pRibbon504
{
  #keys: '[414996.1.211223991]'
  BaseType: 'WebPanel'
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_bExport_OnClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_pRibbon504_bComparison_OnClick.def
ÎļþÃû´Ó _Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_bComparison_OnClick.def ÐÞ¸Ä
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: PanelRibbon504/bComparison
Response OnClick () id:Response_PanelRibbon504_bComparison_OnClick
#parent: pRibbon504/bComparison
Response OnClick () id:Response_pRibbon504_bComparison_OnClick
{
  #keys: '[414996.1.211223970]'
  CanBindMultiple: false
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_pRibbon504_bExport_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: pRibbon504/bExport
Response OnClick () id:Response_pRibbon504_bExport_OnClick
{
  #keys: '[414996.1.211223969]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      rows := selectset( dhTable.Data(),LocalRow,row,exists( dhFinelProducts.Data(),Elements,product,product.ID() = row.ProductID()));
      columns := selectset( dhTable.Data( ),LocalColumn,column, not column.IsAttrbuteColumn() and dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() and column.TimeUnit() = dhTimeUnit.Data() );
      LocalCell_OfflinePlanComparison::AsyncExport( RecycleBin, rows, columns, MacroPlan );
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_pRibbon504_dhTimeUnit_OnCreated.def
ÎļþÃû´Ó _Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_dhTimeUnit_OnCreated.def ÐÞ¸Ä
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: PanelRibbon504/dhTimeUnit
Response OnCreated () id:Response_PanelRibbon504_dhTimeUnit_OnCreated
#parent: pRibbon504/dhTimeUnit
Response OnCreated () id:Response_pRibbon504_dhTimeUnit_OnCreated
{
  #keys: '[414996.1.211223966]'
  CanBindMultiple: false
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_pRibbon504_dhXMLDataListener_OnDataChanged.def
ÎļþÃû´Ó _Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_dhXMLDataListener_OnDataChanged.def ÐÞ¸Ä
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: PanelRibbon504/dhXMLDataListener
Response OnDataChanged () id:Response_PanelRibbon504_dhXMLDataListener_OnDataChanged
#parent: pRibbon504/dhXMLDataListener
Response OnDataChanged () id:Response_pRibbon504_dhXMLDataListener_OnDataChanged
{
  #keys: '[414996.1.211223968]'
  CanBindMultiple: false
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_pRibbon504_rbgTimeUnit_OnUserChanged.def
ÎļþÃû´Ó _Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_rbgTimeUnit_OnUserChanged.def ÐÞ¸Ä
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: PanelRibbon504/rbgTimeUnit
Response OnUserChanged () id:Response_PanelRibbon504_rbgTimeUnit_OnUserChanged
#parent: pRibbon504/rbgTimeUnit
Response OnUserChanged () id:Response_pRibbon504_rbgTimeUnit_OnUserChanged
{
  #keys: '[414996.1.211223967]'
  CanBindMultiple: false
_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Response_ListLockPeriod_mEnable_OnClick#21.def
@@ -13,7 +13,7 @@
  {
    Body:
    [*
      offlinePlanTable := select( MacroPlan,NewOfflinePlanTable,table,true );
      offlinePlanTable := select( InterfaceDataset,OfflinePlanArchiveVersion,table,not table.IsShow() );
      traverse( selection,Elements,element ,not element.IsEnable() ){
        element.Enable( offlinePlanTable ); 
      }
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon763_184_bExport_OnClick.def
@@ -11,7 +11,7 @@
    Body:
    [*
      rows := selectset( dhTable.Data(),LocalRow,row,exists( dhFinelProducts.Data(),Elements,product,product.ID() = row.ProductID()));
      columns := selectset( dhTable.Data( ),LocalColumn,column,not column.IsAttrbuteColumn() and dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() );
      columns := selectset( dhTable.Data( ),LocalColumn,column,not column.IsAttrbuteColumn() and dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() and dhTimeUnit.Data() = column.TimeUnit() );
      LocalCell_ProductionComparison::AsyncExport( RecycleBin, rows, columns, MacroPlan );
    *]
  }