xiaoding721
2024-11-25 422a8b5ee62bc8407506fdbdaebbce187d1bd9cc
Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
已修改4个文件
42 ■■■■ 文件已修改
_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryPlanArchiveRow/Method_SetQuantity.qbl 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
@@ -45,7 +45,7 @@
            productids.Add( quantityrow.ProductID() );
          }
      
          pir.PIRData( relnew, Product := quantityrow.ProductID(), PlanningDate := column.StartDate(), PlanningQty := [Number]cell.Value(), Werk := rowwerk );
          pir.PIRData( relnew, Product := quantityrow.ProductID(), PlanningDate := column.StartDate(), PlanningQty := [Number]cell.Quantity(), Werk := rowwerk );
        }
      }
    }
@@ -63,7 +63,7 @@
          if( isnull( pirdata ) ){
            pirdata        := pir.PIRData( relnew, Product := row.ProductID(), PlanningDate := column.StartDate(), PlanningQty := 0, Werk := rowwerk );
          }
          pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Value() );
          pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Quantity() );
        }
      }
    }
_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl
@@ -8,7 +8,7 @@
  TextBody:
  [*
    //根据当前版本的装配上线计划
    interface.AssemblyOnlinePlanVersion( relflush );
    //interface.AssemblyOnlinePlanVersion( relflush );
    allunit                := AssemblyOnlinePlanVersion::GetDefaultAllUnit();
    name                   := AssemblyOnlinePlanVersion::GetDefaultName();//search                 :=
    interface.AssemblyOnlinePlanVersionSearch( relnew, Product := allunit, ProductionLine := allunit, Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );//, TimeUnit := Translations::MP_GlobalParameters_Day()
@@ -26,11 +26,15 @@
    }
    traverse( macroPlan, NewAssemblyOnlinePlanRow, aoprow, aoprow.Type() = '1' ){
      row                  := table.GetRow( aoprow );
      traverse( table, Column, column ){//, aopcolumns.Find( column.StartDate() ) > -1
      traverse( table, Column, column, exists( aopcolumns, Elements, e, e = column.StartDate() ) ){//, aopcolumns.Find( column.StartDate() ) > -1
        qty                := sum( aoprow, NewAssemblyOnlinePlanCell, aopcell, column.StartDate() <= aopcell.NewAssemblyOnlinePlanColumn().StartDate()
                                         and column.EndDate() >= aopcell.NewAssemblyOnlinePlanColumn().StartDate(), aopcell.Quantity() );
        
        cell               := selectobject( row, Cell, cell, cell.Column() = column );
        if( isnull( cell ) ){
          cell             := column.Cell( relnew, InventoryWeight := 0, ProductionSerialNumber := 0, Quantity := 0, Shift := '', Value := '' );
          row.Cell( relinsert, cell );
        }
        cell.Quantity( qty );
      }
    }
_Main/BL/Type_InventoryPlanArchiveRow/Method_SetQuantity.qbl
@@ -9,7 +9,12 @@
  TextBody:
  [*
    // 甄兰鸽 Jun-24-2024 (created)
    cell := selectobject( this, Cell, cell, cell.Column() = column );
    cell        := selectobject( this, Cell, cell, cell.Column() = column );
    if( isnull( cell ) ){
      cell      := this.Cell( relnew, PlanQuantity := 0, ActualQuantity := 0 );
      column.Cell( relinsert, cell );
    }
    cell.PlanQuantity( cell.PlanQuantity() + planqty );
    cell.ActualQuantity( cell.ActualQuantity() + actualaty );
  *]
_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
@@ -29,9 +29,19 @@
    actproductiontree      := NamedValueTree::Create();
    for( i := 0; i< actproductiondatas.Size(); i++ ){
      actproduction        := actproductiondatas.Element( i );
      actproductionKey     := actproduction.ProductNo() + actproduction.ProductionDate().AsQUILL();
      actproductionhandle  := actproductiontree.GetHandle( actproductionKey );
      actproductiontree.Root().AddChild( actproductionhandle,i );
      linename             := actproduction.Fac().Concat( ' ' );
      if( actproduction.LineName().FindString( '/', 0 ) > -1 ){
        linenames          := actproduction.LineName().Tokenize( '/' );
        traverse( linenames, Elements, e ){
          actproductionKey     := actproduction.ProductNo() + linename + e + actproduction.ProductionDate().AsQUILL();
          actproductionhandle  := actproductiontree.GetHandle( actproductionKey );
          actproductiontree.Root().AddChild( actproductionhandle,i );
        }
      }else{
        actproductionKey     := actproduction.ProductNo() + linename + actproduction.LineName() + actproduction.ProductionDate().AsQUILL();
        actproductionhandle  := actproductiontree.GetHandle( actproductionKey );
        actproductiontree.Root().AddChild( actproductionhandle,i );
      }
    }
    
    traverse( noptable, NewOfflinePlanRow, noprow, noprow.Type() = '1' ){
@@ -40,15 +50,18 @@
        traverse( noprow, NewOfflinePlanCell, nopcell ){
          column             := selectobject( table, Column, column, column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() );//column.TimeUnit() = Translations::MP_GlobalParameters_Day() and 
          cell               := selectobject( row, Cell, cell, cell.Column() = column );
          actproductionKey   := noprow.ProductID() + column.StartDate().AsQUILL();
          actproductionKey   := noprow.ProductID() + noprow.ProductionLine() + column.StartDate().AsQUILL();
          actproductionhandle:= actproductiontree.GetHandle( actproductionKey );
          actproductionindex := guard( actproductiontree.Root().Child( actproductionhandle ),null( NamedValue ));
          actproductionqty       := 0.0;
          if( not isnull( actproductionindex )){
            actproduction        := actproductiondatas.Element( actproductionindex.GetValueAsNumber() );
            actproductionqty     := actproduction.ActualOut();
          }
          if( isnull( cell ) ){
            cell             := row.Cell( relnew, InventoryWeight := 0, ProductionSerialNumber := 0, Quantity := 0, Shift := '', Value := '' );
            column.Cell( relinsert, cell );
          }
          cell.ActualProductionQty( actproductionqty );
          cell.InventoryWeight( nopcell.InventoryWeight() );
          cell.Order( nopcell.Order() );