From a35a334af2f2c626538e0f6245a36f1ce5a5536f Mon Sep 17 00:00:00 2001 From: lazhen <17772815105@139.com> Date: 星期一, 25 十一月 2024 17:46:05 +0800 Subject: [PATCH] 上线/下线/库存存档bug --- _Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl b/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl index e4fee3e..7d8f457 100644 --- a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl +++ b/_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() ); -- Gitblit v1.9.3