lazhen
2024-10-09 e3be809e286304dc5e3f6ea4cddbfa894f9df95c
机加管线的装配线数量bug
已修改5个文件
26 ■■■■ 文件已修改
_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
@@ -51,7 +51,7 @@
                                      , WerkToDLRentTransCost        := cell.WerkToDLRentTransCost()
                                      , DLRentStorCost            := cell.DLRentStorCost() );
          column.Cell( relinsert, showcell );
          sumcell.CCRentOutOfCost( cell.CCRentOutOfCost() + sumcell.CCRentOutOfCost() );
          sumcell.CCRentInCost( cell.CCRentInCost() + sumcell.CCRentInCost() );
          sumcell.CCRentOutOfCost( cell.CCRentOutOfCost() + sumcell.CCRentOutOfCost() );
          sumcell.CCLongTransCost( cell.CCLongTransCost() + sumcell.CCLongTransCost() );
          sumcell.CCShorTransCost( cell.CCShorTransCost() + sumcell.CCShorTransCost() );
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
@@ -49,7 +49,7 @@
          productparents      := product.GetAllParent();
          if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//查询产品类型是发动机
            row               := table.GetRow( pisp.ProductID() );
            enginecosts       := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() and engine.MLB_MQB() = product.MQBMLB() );
            enginecosts       := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() and engine.MLB_MQB() = product.MQBMLB() );
            if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
              products.Add( pisp.Product_MP() );
              traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0  ){
@@ -72,7 +72,7 @@
                       //长春外租库入库费用:入库量/包装容量*入库单价
                       entercost  := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
                       //长春外租库出库费用: 出库量/包装容量*出库单价
                       outcost    := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
                       outcost    := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.OutboundPrice();
                       cell.CCRentInCost( cell.CCRentInCost() + entercost );
                       cell.CCRentOutOfCost( cell.CCRentOutOfCost() + outcost );
                     }
@@ -104,8 +104,8 @@
          periodname         := periodtime.Format( "M2/D2/Y" );
          
          column             := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
          enginecosts        := selectset( owner, LogisticsCostEngine, engine, engine.StartDate() <= trip.Departure().Date() and engine.EndDate() >= trip.Departure().Date() );
          transcosts         := selectset( owner, LogisticsCostTransport, trans, trans.StartDate() <= trip.Departure().Date() and trans.EndDate() >= trip.Departure().Date() );
          enginecosts        := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= trip.Departure().Date() and engine.EndDate() >= trip.Departure().Date() );
          transcosts         := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= trip.Departure().Date() and trans.EndDate() >= trip.Departure().Date() );
          if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){
            traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 and not isnull( column ) and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ) ){//查询产品类型是发动机
              quantity       := [Number]pit.Quantity();
@@ -141,7 +141,7 @@
          productparents     := product.GetAllParent();
          if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//查询产品类型是发动机
            //查询对应的发动机成本
            enginecosts      := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower()
            enginecosts      := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower()
                                                 and engine.MLB_MQB() = product.MQBMLB()
                                                 and engine.Factory() = dlfactory );
            if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
@@ -169,7 +169,7 @@
          productparents     := product.GetAllParent();
          if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//查询产品类型是发动机
            //查询对应的发动机成本
            enginecosts      := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower()
            enginecosts      := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower()
                                                 and engine.MLB_MQB() = product.MQBMLB()
                                                 and engine.Factory() = dlfactory );
            if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
@@ -200,11 +200,11 @@
        iscc                   := tprow.TargetStockpoingPointID().EndsWith( '外租库' ) and ( tprow.TargetStockpoingPointID().StartsWith( '长春' ) or tprow.TargetStockpoingPointID().StartsWith( 'CC' ) );
        if( isdl and iscc ){
          //查询对应的发动机成本
          enginecosts          := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower()
          enginecosts          := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower()
                                                 and engine.MLB_MQB() = product.MQBMLB()
                                                 and engine.Factory() = ccfactory );
          //在运输成本参数表里找到发动机对应运输单价和装载容量
          transcosts           := selectset( owner, LogisticsCostTransport, trans, trans.Origin() = tprow.SourceStockpoingPointID()
          transcosts           := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.Origin() = tprow.SourceStockpoingPointID()
                                                  and trans.Destination() = tprow.TargetStockpoingPointID() 
                                                  and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( '发动机', 0 ) >= 0, e.ID() = produtparent,  e.ID() = trans.Product() ) ) );
          if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){
@@ -239,7 +239,7 @@
        productparents        := product.GetAllParent();
        if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//查询产品类型是发动机
          //查询对应的发动机成本
          enginecosts         := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower()
          enginecosts         := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower()
                                                 and engine.MLB_MQB() = product.MQBMLB()
                                                 and engine.Factory() = ccfactory );
          if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
_Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl
@@ -34,6 +34,7 @@
        pispips             := selectsortedset( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() 
                                                    and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day(), pispip.Start() );
        row := table.GetRow( pisp.ProductID() );
        products.Add( pisp.Product_MP() );
        traverse( pispips, Elements, pispip ){
          //天
          daycolumn         := table.GetColumnByUnit( Translations::MP_GlobalParameters_Day(), pispip.Start().Date() );
@@ -63,6 +64,7 @@
              and exists( forecast.Product_MP().GetAllParent(), Elements, e, e.ID() = productparent )
              and exists( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 ) ){
      row                 := table.GetRow( forecast.ProductID() );
      products.Add( forecast.Product_MP() );
    //  weekstart           := owner.StartOfPlanning().Date();
      traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 ){
        //天
_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
@@ -24,7 +24,7 @@
    
    search                    := owner.InventorySummarySearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit, Category := Translations::MP_GlobalParameters_Day(), StartDate := Date::MinDate(), EndDate := Date::MaxDate() );
    
    table.GenerateColumn( owner, 'All', startofyear, startofnextyear );
    table.GenerateColumn( owner, Translations::MP_GlobalParameters_Day(), startofyear, startofnextyear );
    //库存数量为Actual inventories里面的点Planned inventories字段库存量加总
    traverse( owner, StockingPoint_MP, stockingpoint ){
      unit                    := stockingpoint.Unit();
_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl
@@ -55,8 +55,6 @@
            //周
            weekcolumn        := table.GetColumnByUnit( Translations::MP_GlobalParameters_Week(), pispip.Start().Date() );
            
            product           := pisp.Product_MP();
            productparents    := product.GetAllParent();
            row               := table.GetRow( pisp.ProductID() );
              
            //装配线