lazhen
2024-09-13 b343b593893e2f3278f2695d1411f3aacaeedfc8
客户需求报表数据调整
已添加30个文件
已修改13个文件
已删除3个文件
598 ■■■■ 文件已修改
_Main/BL/Relations/Relation_CustomerDemandIDSRow_Product_MP_Product_MP_CustomerDemandIDSRow.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CustomerDemandIDSSearch_InterfaceDataset_InterfaceDataset_CustomerD.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CustomerDemandIDSSearch_MacroPlan_MacroPlan_CustomerDemandIDSSearch.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CustomerDemandIDS_InterfaceDataset_InterfaceDataset_CustomerDemandI.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CustomerDemandIDS_MacroPlan_MacroPlan_CustomerDemandIDS.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_InterfaceForecast_InterfaceDataset_InterfaceDataset_InterfaceForeca.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/Method_GetRowByUnit.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDSRow/Method_Initialize.qbl 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDSSearch/Attribute_EndDate.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDSSearch/Attribute_Product.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDSSearch/Attribute_StartDate.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/Attribute_Date.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/Attribute_Factory.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/Attribute_Generation.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/Attribute_MLBMQB.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/Attribute_Origin.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/Attribute_PartNumber.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/Attribute_Power.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/Attribute_Quantity.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/DefaultValue_Factory.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/DefaultValue_Generation.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/DefaultValue_MLBMQB.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/DefaultValue_PartNumber.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/DefaultValue_Power.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/StaticMethod_ArchivedData.qbl 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceForecast/_ROOT_Type_InterfaceForecast.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_MatrixEditorTable.def 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelGeneration.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelGeneration743.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelHeader.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelMLBMQB.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelOperation.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelPeriod#549.def 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelPower.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelProduct.def 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelTimeUnit.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_OnCreated.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration743_ddslGeneration859_OnCreated.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration743_ddslGeneration859_OnSelectionChanged.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPeriod_549_DateSelectorEnd_OnChanged.def 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPeriod_549_DateSelectorStart_OnChanged.def 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelProduct_ddslProduct_OnCreated.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelProduct_ddslProduct_OnSelectionChanged.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CustomerDemandIDSRow_Product_MP_Product_MP_CustomerDemandIDSRow.qbl
ÎļþÒÑɾ³ý
_Main/BL/Relations/Relation_CustomerDemandIDSSearch_InterfaceDataset_InterfaceDataset_CustomerD.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation CustomerDemandIDSSearch_InterfaceDataset_InterfaceDataset_CustomerDemandIDSSearch
{
  #keys: '1[415136.0.1137040071]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide InterfaceDataset
  {
    #keys: '3[415136.0.1137040073][415136.0.1137040072][415136.0.1137040074]'
    Cardinality: '0to1'
    ObjectDefinition: CustomerDemandIDSSearch
    OwningSide: 'Reference'
  }
  RelationSide.RightSide CustomerDemandIDSSearch
  {
    #keys: '3[415136.0.1137040076][415136.0.1137040075][415136.0.1137040077]'
    Cardinality: '0to1'
    ObjectDefinition: InterfaceDataset
    OwningSide: 'Owned'
  }
}
_Main/BL/Relations/Relation_CustomerDemandIDSSearch_MacroPlan_MacroPlan_CustomerDemandIDSSearch.qbl
ÎļþÒÑɾ³ý
_Main/BL/Relations/Relation_CustomerDemandIDS_InterfaceDataset_InterfaceDataset_CustomerDemandI.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation CustomerDemandIDS_InterfaceDataset_InterfaceDataset_CustomerDemandIDS
{
  #keys: '1[415136.0.1137040055]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide InterfaceDataset
  {
    #keys: '3[415136.0.1137040057][415136.0.1137040056][415136.0.1137040058]'
    Cardinality: '0to1'
    ObjectDefinition: CustomerDemandIDS
    OwningSide: 'Reference'
  }
  RelationSide.RightSide CustomerDemandIDS
  {
    #keys: '3[415136.0.1137040060][415136.0.1137040059][415136.0.1137040061]'
    Cardinality: '1toN'
    ObjectDefinition: InterfaceDataset
    OwningSide: 'Owned'
  }
}
_Main/BL/Relations/Relation_CustomerDemandIDS_MacroPlan_MacroPlan_CustomerDemandIDS.qbl
ÎļþÒÑɾ³ý
_Main/BL/Relations/Relation_InterfaceForecast_InterfaceDataset_InterfaceDataset_InterfaceForeca.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation InterfaceForecast_InterfaceDataset_InterfaceDataset_InterfaceForecast
{
  #keys: '1[415136.0.1136940384]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide InterfaceDataset
  {
    #keys: '3[415136.0.1136940386][415136.0.1136940385][415136.0.1136940387]'
    Cardinality: '0to1'
    ObjectDefinition: InterfaceForecast
    OwningSide: 'Reference'
  }
  RelationSide.RightSide InterfaceForecast
  {
    #keys: '3[415136.0.1136940389][415136.0.1136940388][415136.0.1136940390]'
    Cardinality: '1toN'
    ObjectDefinition: InterfaceDataset
    OwningSide: 'Owned'
  }
}
_Main/BL/Type_CustomerDemandIDS/Method_GetRowByUnit.qbl
@@ -1,20 +1,19 @@
Quintiq file version 2.0
#parent: #root
Method GetRowByUnit (
  Product_MP product,
  String product,
  String unit
) as CustomerDemandIDSRow
{
  TextBody:
  [*
    // ç”„兰鸽 Sep-6-2024 (created)
    row := selectobject( this, Row, row, row.Name() = product.ID() and row.Factory() = unit );
    row := selectobject( this, Row, row, row.Name() = product and row.Factory() = unit );
    if( isnull( row ) ){
      //初始化单元格 
      row := this.Row( relnew, Name := product.ID(), Factory := unit );
      row.Product_MP( relset, product );
      row := this.Row( relnew, Name := product, Factory := unit );
      traverse( this, Column, column ){
        row.Initialize( column, product, unit );
        row.Initialize( column );
      }
    }
    return row;
_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GenerateData (
  MacroPlan macroplan,
  InterfaceDataset interface,
  RecycleBin recycle,
  const Archive archive
)
@@ -10,11 +10,11 @@
  TextBody:
  [*
    // ç”„兰鸽 Aug-20-2024 (created)
    macroplan.CustomerDemandIDS( relflush );
    macroplan.CustomerDemandIDSSearch( relflush );
    interface.CustomerDemandIDS( relflush );
    interface.CustomerDemandIDSSearch( relflush );
    allunit               := CustomerDemandIDS::GetDefaultAllUnit();
    macroplan.CustomerDemandIDSSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit );
    idstable              := macroplan.CustomerDemandIDS( relnew, ID := '客户需求', Name := '客户需求' );
    interface.CustomerDemandIDSSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit );
    idstable              := interface.CustomerDemandIDS( relnew, ID := '客户需求', Name := '客户需求' );
    binaryValue           := TemplateManager::GetIDSFullTable( archive, Date::ActualDate().Year() );
    source                := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
    source.ReadStructure();
@@ -23,18 +23,19 @@
    cnv2.SetCustomConversion();
    cnv2.CustomFormatString( "yyyy/MM/dd" );
    idsdates              := selectuniquevalues( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() > 2, cnv2.Convert( column.Name() ) );
    ppadates              := construct( Dates );
    traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
      ppadates            := ppadates.Union( selectuniquevalues( forecast, PlanningSalesDemandInPeriod, salesdemand, salesdemand.StartDate() ) );
    }
    ppadates              := selectuniquevalues( interface, InterfaceForecast, forecast, forecast.Origin() = 'PPA', forecast.Date() );
    //ppadates              := construct( Dates );
    //traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
    //  ppadates            := ppadates.Union( selectuniquevalues( forecast, PlanningSalesDemandInPeriod, salesdemand, salesdemand.StartDate() ) );
    //}
    periods               := idsdates.Union( ppadates );
    periods               := selectuniquevalues( periods, Elements, e, e );
    idstable.GenerateColumn( periods.Sort() );
    traverse( recycle, GeneralExcelImportAndExportDataSource.GeneralExcelImportAndExportDataTable, table ){
      traverse( table, GeneralExcelImportAndExportDataRow, row ){
        productcell       := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
        factorycell       := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 );
        product           := selectobject( macroplan, Product_MP, product, product.ID() = productcell.Value() );
        idsrow            := idstable.GetRowByUnit( product, factorycell.Value() );
        idsrow            := idstable.GetRowByUnit( productcell.Value(), factorycell.Value() );
        traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){
          period          := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() );
          daycolumn       := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), period );
@@ -46,17 +47,14 @@
        }
      }
    }
    traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
      product             := forecast.Product_MP();
      idsrow              := idstable.GetRowByUnit( product, forecast.SalesSegmentName() );
      traverse( forecast, PlanningSalesDemandInPeriod, salesdemand ){
        daycolumn         := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), salesdemand.StartDate() );
        weekcolumn        := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Week(), salesdemand.StartDate() );
        monthcolumn       := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Month(), salesdemand.StartDate() );
        idsrow.SetCellValue( daycolumn, [Number]salesdemand.Quantity() );
        idsrow.SetCellValue( weekcolumn, [Number]salesdemand.Quantity() );
        idsrow.SetCellValue( monthcolumn, [Number]salesdemand.Quantity() );
      }
    traverse( interface, InterfaceForecast, forecast, forecast.Origin() = 'PPA' ){
      idsrow              := idstable.GetRowByUnit( forecast.PartNumber(), forecast.Factory() );
      daycolumn           := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), forecast.Date() );
      weekcolumn          := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Week(), forecast.Date() );
      monthcolumn         := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Month(), forecast.Date() );
      idsrow.SetCellValue( daycolumn, [Number]forecast.Quantity() );
      idsrow.SetCellValue( weekcolumn, [Number]forecast.Quantity() );
      idsrow.SetCellValue( monthcolumn, [Number]forecast.Quantity() );
    }
    
    source.Delete();
_Main/BL/Type_CustomerDemandIDSRow/Method_Initialize.qbl
@@ -1,9 +1,7 @@
Quintiq file version 2.0
#parent: #root
Method Initialize (
  CustomerDemandIDSColumn column,
  Product_MP product,
  String unit
  CustomerDemandIDSColumn column
)
{
  Description: '初始化单元格'
_Main/BL/Type_CustomerDemandIDSSearch/Attribute_EndDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute EndDate
{
  #keys: '3[415136.0.1136940457][415136.0.1136940456][415136.0.1136940458]'
  ValueType: Date
}
_Main/BL/Type_CustomerDemandIDSSearch/Attribute_Product.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Product
{
  #keys: '3[415136.0.1136940443][415136.0.1136940442][415136.0.1136940444]'
  ValueType: String
}
_Main/BL/Type_CustomerDemandIDSSearch/Attribute_StartDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute StartDate
{
  #keys: '3[415136.0.1136940453][415136.0.1136940452][415136.0.1136940454]'
  ValueType: Date
}
_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
@@ -1,8 +1,8 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GenerateData (
  const MacroPlan macroplan,
  InterfaceDataset interfaceDataset,
  const MacroPlan macroplan,
  String executor,
  Boolean versionflag
)
@@ -31,7 +31,7 @@
                                                                 , ReturnMsg                 := 'Success'
                                                                 , Success                   := true
                                                                  );
    traverse( macroplan, CustomerDemandIDS.Row, row ){
    traverse( interfaceDataset, CustomerDemandIDS.Row, row ){
      traverse( row, Cell, cell ){
        cd                  :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product           := row.Name()
                                                                     , DemandDate              := cell.Column().StartDate()
_Main/BL/Type_InterfaceForecast/Attribute_Date.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Date
{
  #keys: '3[415136.0.1136940360][415136.0.1136940359][415136.0.1136940361]'
  Description: '日期'
  ValueType: Date
}
_Main/BL/Type_InterfaceForecast/Attribute_Factory.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Factory
{
  #keys: '3[415136.0.1136940363][415136.0.1136940362][415136.0.1136940364]'
  Description: '工厂'
  ValueType: String
}
_Main/BL/Type_InterfaceForecast/Attribute_Generation.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Generation
{
  #keys: '3[415136.0.1136940366][415136.0.1136940365][415136.0.1136940367]'
  ValueType: String
}
_Main/BL/Type_InterfaceForecast/Attribute_MLBMQB.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute MLBMQB
{
  #keys: '3[415136.0.1136940369][415136.0.1136940368][415136.0.1136940370]'
  ValueType: String
}
_Main/BL/Type_InterfaceForecast/Attribute_Origin.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Origin
{
  #keys: '3[415136.0.1136940398][415136.0.1136940397][415136.0.1136940399]'
  ValueType: String
}
_Main/BL/Type_InterfaceForecast/Attribute_PartNumber.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute PartNumber
{
  #keys: '3[415136.0.1136940372][415136.0.1136940371][415136.0.1136940373]'
  Description: '零件号'
  ValueType: String
}
_Main/BL/Type_InterfaceForecast/Attribute_Power.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Power
{
  #keys: '3[415136.0.1136940375][415136.0.1136940374][415136.0.1136940376]'
  ValueType: String
}
_Main/BL/Type_InterfaceForecast/Attribute_Quantity.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Quantity
{
  #keys: '3[415136.0.1136940378][415136.0.1136940377][415136.0.1136940379]'
  ValueType: Real
}
_Main/BL/Type_InterfaceForecast/DefaultValue_Factory.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: Factory
}
_Main/BL/Type_InterfaceForecast/DefaultValue_Generation.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: Generation
}
_Main/BL/Type_InterfaceForecast/DefaultValue_MLBMQB.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: MLBMQB
}
_Main/BL/Type_InterfaceForecast/DefaultValue_PartNumber.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: PartNumber
}
_Main/BL/Type_InterfaceForecast/DefaultValue_Power.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: Power
}
_Main/BL/Type_InterfaceForecast/StaticMethod_ArchivedData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
Quintiq file version 2.0
#parent: #root
StaticMethod ArchivedData (
  InterfaceDataset interfaceDataset,
  MacroPlan macroPlan
)
{
  TextBody:
  [*
    traverse ( macroPlan, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.Product_MP() ) ){
    //  factory := f.Origin().Tokenize( "-" ).Element( 0 );
      product := forecast.Product_MP();
      traverse( forecast, PlanningSalesDemandInPeriod, sdip ){
        itrcf := selectobject( interfaceDataset, InterfaceForecast, tempITRCF, tempITRCF.PartNumber() = forecast.ProductID() and tempITRCF.Date() = sdip.StartDate() );
        if ( not isnull( itrcf ) ) {
          itrcf.Delete();
        }
        interfaceDataset.InterfaceForecast( relnew,
                                             Date       := sdip.StartDate(),
                                             Factory    := forecast.SalesSegmentName(),
                                             PartNumber := forecast.ProductID(),
                                             Quantity   := sdip.Quantity(),
                                             Generation := product.Generation(),
                                             MLBMQB     := product.MQBMLB(),
                                             Power      := product.Power(),
                                             Origin     := forecast.Origin()
                                            );
      }
    }
  *]
}
_Main/BL/Type_InterfaceForecast/_ROOT_Type_InterfaceForecast.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type InterfaceForecast
{
  #keys: '5[415136.0.1136940357][415136.0.1136940355][0.0.0][415136.0.1136940356][415136.0.1136940358]'
  BaseType: Object
  StructuredName: 'InterfaceForecasts'
}
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def
@@ -11,7 +11,7 @@
    currentuser  := QuintiqUser::CurrentUser().DisplayName();
    isactive     := ifexpr( rbgVersionFlag.BoundValue() = "true", true, false );
    if( efInterfacename.Text() = Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() ){//客户需求
      CustomerDemandPPAIDS::GenerateData( MacroPlan, InterfaceDataset, currentuser, isactive );
      CustomerDemandPPAIDS::GenerateData( InterfaceDataset, MacroPlan, currentuser, isactive );
    }
    if( efInterfacename.Text() = Translations::InterfaceDataset_AssemblyOnlinePlanPPPSPush_Name()){//装配上线
      AssemblyOnlinePlanPPPSPush::GenerateData( MacroPlan, InterfaceDataset, currentuser, isactive );
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_MatrixEditorTable.def
@@ -17,10 +17,10 @@
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'MacroPlan'
            DataType: 'InterfaceDataset'
            FilterArguments: 'search:QMacroPlanner::FormCustomerDemandPPAIDS.dhSearch'
            FixedFilter: 'object.Column().TimeUnit() = search.TimeUnit()'
            Source: 'MacroPlan'
            FixedFilter: 'object.Column().TimeUnit() = search.TimeUnit() and object.Column().StartDate() >= search.StartDate() and object.Column().StartDate() <= search.EndDate()'
            Source: 'InterfaceDataset'
            Taborder: 0
            Transformation: 'CustomerDemandIDS.Row.Cell'
          ]
@@ -46,10 +46,11 @@
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'MacroPlan'
            DataType: 'InterfaceDataset'
            Description: "( search.Generation() = '<All>' or object.Product_MP().Generation() = search.Generation() ) and ( search.MqbMlb() = '<All>' or object.Product_MP().MQBMLB() = search.MqbMlb() ) and ( search.Power() = '<All>' or object.Product_MP().Power() = search.Power() )"
            FilterArguments: 'search:QMacroPlanner::FormCustomerDemandPPAIDS.dhSearch'
            FixedFilter: "( search.Generation() = '<All>' or object.Product_MP().Generation() = search.Generation() ) and ( search.MqbMlb() = '<All>' or object.Product_MP().MQBMLB() = search.MqbMlb() ) and ( search.Power() = '<All>' or object.Product_MP().Power() = search.Power() )"
            Source: 'MacroPlan'
            FixedFilter: "search.Product() = '<All>' or object.Name() = search.Product()"
            Source: 'InterfaceDataset'
            Taborder: 0
            Transformation: 'CustomerDemandIDS.Row'
          ]
@@ -74,10 +75,10 @@
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'MacroPlan'
            DataType: 'InterfaceDataset'
            FilterArguments: 'search:QMacroPlanner::FormCustomerDemandPPAIDS.dhSearch'
            FixedFilter: 'object.TimeUnit() = search.TimeUnit()'
            Source: 'MacroPlan'
            FixedFilter: 'object.TimeUnit() = search.TimeUnit() and object.StartDate() >= search.StartDate() and object.StartDate() <= search.EndDate()'
            Source: 'InterfaceDataset'
            Taborder: 0
            Transformation: 'CustomerDemandIDS.Column'
          ]
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelGeneration.def
@@ -15,9 +15,11 @@
        Taborder: 0
      ]
    }
    #child: PanelGeneration743
  ]
  Properties:
  [
    Taborder: 0
    Visible: false
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelGeneration743.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
Component PanelGeneration743
{
  #keys: '[415136.0.1137311846]'
  BaseType: 'WebPanel'
  Children:
  [
    Component ddslGeneration859
    {
      #keys: '[415136.0.1137311847]'
      BaseType: 'WebDropDownStringList'
      Properties:
      [
        Label: 'Generation'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelHeader.def
@@ -10,6 +10,8 @@
    #child: PanelMLBMQB
    #child: PanelTimeUnit
    #child: PanelOperation
    #child: PanelProduct
    #child: PanelPeriod_549
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelMLBMQB.def
@@ -19,5 +19,6 @@
  Properties:
  [
    Taborder: 1
    Visible: false
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelOperation.def
@@ -18,7 +18,7 @@
  ]
  Properties:
  [
    Taborder: 4
    Taborder: 6
    Visible: false
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelPeriod#549.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
Quintiq file version 2.0
Component PanelPeriod id:PanelPeriod_549
{
  #keys: '[415136.0.1137311802]'
  BaseType: 'WebPanel'
  Children:
  [
    Component DateSelectorStart
    {
      #keys: '[415136.0.1137311803]'
      BaseType: 'WebDateSelector'
      Properties:
      [
        Label: 'Start date'
        Taborder: 0
      ]
    }
    Component DateSelectorEnd
    {
      #keys: '[415136.0.1137311804]'
      BaseType: 'WebDateSelector'
      Properties:
      [
        Date: 9999-12-31
        Label: 'End date'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    Orientation: 'horizontal'
    Taborder: 4
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelPower.def
@@ -19,5 +19,6 @@
  Properties:
  [
    Taborder: 2
    Visible: false
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelProduct.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
Component PanelProduct
{
  #keys: '[415136.0.1137311860]'
  BaseType: 'WebPanel'
  Children:
  [
    Component ddslProduct
    {
      #keys: '[415136.0.1137311861]'
      BaseType: 'WebDropDownStringList'
      Properties:
      [
        FixedSize: false
        Label: 'Product'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Taborder: 3
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelTimeUnit.def
@@ -21,6 +21,6 @@
  ]
  Properties:
  [
    Taborder: 3
    Taborder: 5
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_OnCreated.def
@@ -10,9 +10,9 @@
    Body:
    [*
      //初始化 
      CustomerDemandIDS::GenerateData( MacroPlan, RecycleBin, Archive );
      CustomerDemandIDS::GenerateData( InterfaceDataset, RecycleBin, Archive );
      
      dhSearch.Data( MacroPlan.CustomerDemandIDSSearch() );
      dhSearch.Data( InterfaceDataset.CustomerDemandIDSSearch() );
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration743_ddslGeneration859_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: PanelGeneration743/ddslGeneration859
Response OnCreated () id:Response_PanelGeneration743_ddslGeneration859_OnCreated
{
  #keys: '[415136.0.1137311845]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
  {
    Body:
    [*
      values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.Generation() );
      valueString := values.Concatenate( ";" );
      valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" );
      valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString;
      this.Strings( valueString );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration743_ddslGeneration859_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: PanelGeneration743/ddslGeneration859
Response OnSelectionChanged () id:Response_PanelGeneration743_ddslGeneration859_OnSelectionChanged
{
  #keys: '[415136.0.1137311844]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
  QuillAction
  {
    Body:
    [*
      if( dhSearch.Data().Generation() <> selection ){
        dhSearch.Data().Generation( selection );
      //  DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() );
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPeriod_549_DateSelectorEnd_OnChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
#parent: PanelPeriod_549/DateSelectorEnd
Response OnChanged () id:Response_PanelPeriod_549_DateSelectorEnd_OnChanged
{
  #keys: '[415136.0.1137311800]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebDateTimeFieldBase_OnChanged'
  QuillAction
  {
    Body:
    [*
      //日期改变后刷新显示
      if( this.Date() < DateSelectorStart.Date() ){
        this.HintError( 'The end date cannot be less than the start date!' );
      }else{
        if( dhSearch.Data().EndDate() <> this.Date() ){
          dhSearch.Data().EndDate( this.Date() );
      //    DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() );
        }
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPeriod_549_DateSelectorStart_OnChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
#parent: PanelPeriod_549/DateSelectorStart
Response OnChanged () id:Response_PanelPeriod_549_DateSelectorStart_OnChanged
{
  #keys: '[415136.0.1137311801]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebDateTimeFieldBase_OnChanged'
  QuillAction
  {
    Body:
    [*
      //日期改变后刷新显示
      if( this.Date() > DateSelectorEnd.Date() ){
        this.HintError( 'The start date cannot be later than the end date!' );
      }else{
        if( dhSearch.Data().StartDate() <> this.Date() ){
          dhSearch.Data().StartDate( this.Date() );
      //    DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() );
        }
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelProduct_ddslProduct_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: PanelProduct/ddslProduct
Response OnCreated () id:Response_PanelProduct_ddslProduct_OnCreated
{
  #keys: '[415136.0.1137311859]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
  {
    Body:
    [*
      values := selectuniquevalues( InterfaceDataset, CustomerDemandIDS.Row, row, true, row.Name() );
      valueString := values.Concatenate( ";" );
      valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" );
      valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString;
      this.Strings( valueString );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelProduct_ddslProduct_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: PanelProduct/ddslProduct
Response OnSelectionChanged () id:Response_PanelProduct_ddslProduct_OnSelectionChanged
{
  #keys: '[415136.0.1137311858]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
  QuillAction
  {
    Body:
    [*
      if( dhSearch.Data().Product() <> selection ){
        dhSearch.Data().Product( selection );
      //  DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() );
      }
    *]
    GroupServerCalls: false
  }
}