From e3be809e286304dc5e3f6ea4cddbfa894f9df95c Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期三, 09 十月 2024 09:36:43 +0800
Subject: [PATCH] 机加管线的装配线数量bug

---
 _Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
index 3ab7f55..47d9f59 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
+++ b/_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 ){

--
Gitblit v1.9.3