lazhen
2024-09-06 ead7f5c6ccba143a88fb38568606a8a8e8be419d
删除无用方法
已添加1个文件
已修改1个文件
已删除13个文件
324 ■■■■ 文件已修改
_Main/BL/Type_CustomerDemandIDS/Method_SyncRows.qbl 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/StaticMethod_ReadStructure.qbl 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLElementId_Key.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLElementId_QuintiqType.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_cell.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_column.qbl 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_table.qbl 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/_ROOT_XML_CustomerDemandIDSXML.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLElementId_Key.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLElementId_QuintiqType.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLObjectBase_column.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLObjectBase_table.qbl 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/_ROOT_XML_CustomerDemandIDSXMLHeaders.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/Method_SyncRows.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,74 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GenerateData (
  const MacroPlan macroplan,
  RecycleBin recycle,
  const Archive archive,
  InterfaceDataset interfaceDataset,
  String executor,
  Boolean versionflag
)
{
  Description: '生成可以下发的客户需求(PPA+IDS)数据'
  TextBody:
  [*
    // ç”„兰鸽 Aug-20-2024 (created)
    loginfo                := maxobject(  interfaceDataset, InterfaceLoginfo, loginfo, loginfo.Name() = Translations::InterfaceDataset_CustomerDemandPPAIDS_Name(), loginfo.InterfaceDateTime() );
    if( not isnull( loginfo ) ){
      if( not loginfo.IsShow() ){
        loginfo.Delete();
      }else{
        loginfo.Last( false );
      }
      interfaceDataset.CustomerDemandPPAIDS( relflush );
    }
    nowdate                := DateTime::ActualTime();
    loginfo                := interfaceDataset.InterfaceLoginfo( relnew, ExecuteUser         := executor
                                                                 , Name                      := Translations::InterfaceDataset_CustomerDemandPPAIDS_Name()
                                                                 , InterfaceDateTime         := nowdate
                                                                 , Message                   := '客户需求(PPA+IDS)数据推送'
                                                                 , Last                      := true
                                                                 , IsShow                    := false
                                                                 , ReturnSuccess             := true
                                                                 , ReturnMsg                 := 'Success'
                                                                 , Success                   := true
                                                                  );
    traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
      info( forecast.ProductID() );
      cd                  :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product           := forecast.ProductID()
                                                                   , DemandDate              := forecast.StartDate()
                                                                   , DemandQty               := [Number]forecast.Quantity()
                                                                   , VersionName             := macroplan.ScenarioName()
                                                                   , InterfaceTime           := nowdate
                                                                   , VersionFlag             := versionflag
                                                                   );
      loginfo.CustomerDemandPPAIDS( relinsert, cd );
    }
    binaryValue           := TemplateManager::GetIDSFullTable( archive, Date::ActualDate().Year() );
    source                := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
    source.ReadStructure();
    Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
    cnv2 := StringToDate::StandardConverter();
    cnv2.SetCustomConversion();
    cnv2.CustomFormatString( "dd/MM/yyyy" );
    traverse( recycle, GeneralExcelImportAndExportDataSource.GeneralExcelImportAndExportDataTable, table ){
      traverse( table, GeneralExcelImportAndExportDataRow, row ){
        product             := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
        traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){
          info( cell.GeneralExcelImportAndExportDataColumn().ColumnIndex(), cell.Value(), product.Value() );
          period := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() );
          cd                :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product           := product.Value()
                                                                       , DemandDate              := period
                                                                       , DemandQty               := [Number]cell.Value()
                                                                       , VersionName             := macroplan.ScenarioName()
                                                                       , InterfaceTime           := nowdate
                                                                       , VersionFlag             := versionflag
                                                                       );
          loginfo.CustomerDemandPPAIDS( relinsert, cd );
        }
      }
    }
    source.Delete();
    loginfo.TotalRow( loginfo.CustomerDemandPPAIDS( relsize ) );
  *]
}
_Main/BL/Type_CustomerDemandIDS/StaticMethod_ReadStructure.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLElementId_Key.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLElementId_QuintiqType.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_cell.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_column.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_table.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/_ROOT_XML_CustomerDemandIDSXML.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLElementId_Key.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLElementId_QuintiqType.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLObjectBase_column.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLObjectBase_table.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/_ROOT_XML_CustomerDemandIDSXMLHeaders.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
@@ -2,6 +2,7 @@
#parent: #root
StaticMethod GenerateData (
  const MacroPlan macroplan,
  RecycleBin recycle,
  const Archive archive,
  InterfaceDataset interfaceDataset,
  String executor,
@@ -33,6 +34,7 @@
                                                                 , Success                   := true
                                                                  );
    traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
      info( forecast.ProductID() );
      cd                  :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product           := forecast.ProductID()
                                                                   , DemandDate              := forecast.StartDate()
                                                                   , DemandQty               := [Number]forecast.Quantity()
@@ -43,15 +45,18 @@
      loginfo.CustomerDemandPPAIDS( relinsert, cd );
    }
    binaryValue           := TemplateManager::GetIDSFullTable( archive, Date::ActualDate().Year() );
    CustomerDemandIDS::ReadStructure( binaryValue, interfaceDataset );
    productcolumn         := select( interfaceDataset, CustomerDemandIDS.Column, column, column.Index() = 1 );
    source                := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
    source.ReadStructure();
    Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
    cnv2 := StringToDate::StandardConverter();
    cnv2.SetCustomConversion();
    cnv2.CustomFormatString( "dd/MM/yyyy" );
    traverse( interfaceDataset, CustomerDemandIDS.Row, row ){
      product             := selectobject( row, Cell, cell, cell.Column() = productcolumn );
      traverse( row, Cell, cell, cell.Column().Index() > 3 ){
        period := cnv2.Convert( cell.Column().Name() );
    traverse( recycle, GeneralExcelImportAndExportDataSource.GeneralExcelImportAndExportDataTable, table ){
      traverse( table, GeneralExcelImportAndExportDataRow, row ){
        product             := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
        traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){
          info( cell.GeneralExcelImportAndExportDataColumn().ColumnIndex(), cell.Value(), product.Value() );
          period := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() );
        cd                  :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product           := product.Value()
                                                                     , DemandDate              := period
                                                                     , DemandQty               := [Number]cell.Value()
@@ -62,6 +67,8 @@
        loginfo.CustomerDemandPPAIDS( relinsert, cd );
      }
    }
    }
    source.Delete();
    loginfo.TotalRow( loginfo.CustomerDemandPPAIDS( relsize ) );
  *]
}