lazhen
2024-08-19 99edabe2217eb17b81a461305a2b4dcda27c2e2a
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
@@ -37,8 +37,7 @@
            //查询对应的发动机成本
            enginecost          := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
                                                 and engine.MLB_MQB() = product.MQBMLB()
                                                 and engine.Factory() = ccunit
                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
                                                 and engine.Factory() = ccunit );
            if( not isnull( enginecost ) ){
              products.Add( product );
              traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' ){
@@ -64,8 +63,7 @@
            //查询对应的发动机成本
            enginecost          := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
                                                 and engine.MLB_MQB() = product.MQBMLB()
                                                 and engine.Factory() = ccunit
                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
                                                 and engine.Factory() = ccunit );
            if( not isnull( enginecost ) ){
              products.Add( product );
              traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' ){
@@ -102,8 +100,7 @@
              //在发动机成本参数表找到对应的包装容量
              enginecost       := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
                                                 and engine.MLB_MQB() = product.MQBMLB()
                                                 and engine.Factory() = ccunit
                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
                                                 and engine.Factory() = ccunit );
              //在运输成本参数表里找到发动机对应运输单价和装载容量
              transcost        := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = ccline 
                                                and trans.Destination() = ccrent 
@@ -134,8 +131,7 @@
            //查询对应的发动机成本
            enginecost         := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
                                                 and engine.MLB_MQB() = product.MQBMLB()
                                                 and engine.Factory() = ccunit
                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
                                                 and engine.Factory() = ccunit );
            if( not isnull( enginecost ) ){
              products.Add( product );
              //当product planning的日期区间在需要的日期区间内