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/Method_Generate.qbl | 2 +-
_Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl | 2 ++
_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl | 2 +-
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl | 18 +++++++++---------
_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl | 2 --
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
index ae69bdb..5dab725 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
+++ b/_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() );
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 ){
diff --git a/_Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl b/_Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl
index 1dad475..871cb05 100644
--- a/_Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl
+++ b/_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 ){
//澶�
diff --git a/_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl b/_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
index 407d96a..5238527 100644
--- a/_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
+++ b/_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 );
//搴撳瓨鏁伴噺涓篈ctual inventories閲岄潰鐨勭偣Planned inventories瀛楁搴撳瓨閲忓姞鎬�
traverse( owner, StockingPoint_MP, stockingpoint ){
unit := stockingpoint.Unit();
diff --git a/_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl b/_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl
index 843e310..07abf2d 100644
--- a/_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl
+++ b/_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() );
//瑁呴厤绾�
--
Gitblit v1.9.3