admin
2024-09-05 20470cd32eaebc49c5b8eea0e1908743846ade67
修复一些bug
已修改3个文件
29 ■■■■■ 文件已修改
_Main/BL/Type_Archive/StaticMethod_Archive.qbl 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Archive/StaticMethod_GenerateForecast.qbl 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Test/StaticMethod_Test.qbl 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Archive/StaticMethod_Archive.qbl
@@ -15,7 +15,7 @@
    archiveFileJSONs := respJSON.Get( "archiveFiles" );
    info( archiveFileJSONs.AsString() );
    
    if ( code = 200 ) {
    if ( code = 200 or code = 201 ) {
      for ( i := 0; i < archiveFileJSONs.Size(); i++ ) {
        archiveFileJSON := archiveFileJSONs.Get( i );
        
@@ -57,6 +57,7 @@
      
      // 存档Curve
      if ( curveFileName <> "" and curveBinaryValue.Size() > 0 ) {
        info( "存档Curve:" + curveFileName );
        ac := select( archive, ArchiveCurve, tempAC, true );
        if ( not isnull( ac ) ) {
          ac.Delete();
_Main/BL/Type_Archive/StaticMethod_GenerateForecast.qbl
@@ -12,7 +12,11 @@
    }
    
    traverse ( archiveExecutionStatus, TemporaryDemandData, tdd ,tdd.Origin() = "" or tdd.StartDate() >= macroPlan.StartOfPlanning().Date()) {
      targetProduct_MP       := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = tdd.ProductID() );
      targetProduct_MP       := select( macroPlan, Product_MP, tempPMP, tempPMP.Notes() = tdd.ProductID() );
      if( isnull( targetProduct_MP )){
        targetProduct_MP       := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = tdd.ProductID() );
      }
      // targetProduct_MP       := select( macroPlan, Product_MP, tempPMP, tempPMP.Notes() = tdd.ProductID() );
      targetStockingPoint_MP := select( macroPlan, StockingPoint_MP, tempSPMP, tempSPMP.ID() = tdd.StockingPointID() );
      // info( tdd.SalesSegmentName() );
      if ( not isnull( targetProduct_MP ) and not isnull( targetStockingPoint_MP ) ) {
@@ -32,6 +36,9 @@
                          false );
        forcest.Origin( tdd.Origin() );
      }
      if( isnull( targetProduct_MP )){
        info( tdd.ProductID() + " -> 未找到" );
      }
    }
  *]
}
_Main/BL/Type_Test/StaticMethod_Test.qbl
@@ -10,21 +10,8 @@
{
  TextBody:
  [*
    archive.ArchivePP( relflush );
    archive.ArchiveBudget( relflush );
     prod := select( macroPlan,Product_MP,prod,prod.Notes() = "06R100012A" );
    
    archive.ArchivePP( relnew,Name := "2025 M" )
    archive.ArchivePP( relnew,Name := "2025 W" )
    archive.ArchivePP( relnew,Name := "2026 M" )
    archive.ArchivePP( relnew,Name := "2026 W" )
    archive.ArchivePP( relnew,Name := "2027 M" )
    archive.ArchivePP( relnew,Name := "2027 W" )
    archive.ArchiveBudget( relnew,Name := "2025 M" )
    archive.ArchiveBudget( relnew,Name := "2025 W" )
    archive.ArchiveBudget( relnew,Name := "2026 M" )
    archive.ArchiveBudget( relnew,Name := "2026 W" )
    archive.ArchiveBudget( relnew,Name := "2027 M" )
    archive.ArchiveBudget( relnew,Name := "2027 W" )
    error( prod.ID() );
  *]
}