From 422a8b5ee62bc8407506fdbdaebbce187d1bd9cc Mon Sep 17 00:00:00 2001 From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com> Date: 星期一, 25 十一月 2024 20:42:11 +0800 Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev --- _Main/BL/Type_InventoryPlanArchiveRow/Method_SetQuantity.qbl | 7 ++++++- _Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl | 23 ++++++++++++++++++----- _Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl | 4 ++-- _Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl | 8 ++++++-- 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl index 9621261..e6fab67 100644 --- a/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl +++ b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl @@ -45,7 +45,7 @@ productids.Add( quantityrow.ProductID() ); } - pir.PIRData( relnew, Product := quantityrow.ProductID(), PlanningDate := column.StartDate(), PlanningQty := [Number]cell.Value(), Werk := rowwerk ); + pir.PIRData( relnew, Product := quantityrow.ProductID(), PlanningDate := column.StartDate(), PlanningQty := [Number]cell.Quantity(), Werk := rowwerk ); } } } @@ -63,7 +63,7 @@ if( isnull( pirdata ) ){ pirdata := pir.PIRData( relnew, Product := row.ProductID(), PlanningDate := column.StartDate(), PlanningQty := 0, Werk := rowwerk ); } - pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Value() ); + pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Quantity() ); } } } diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl index edb6767..fcc429a 100644 --- a/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl +++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl @@ -8,7 +8,7 @@ TextBody: [* //鏍规嵁褰撳墠鐗堟湰鐨勮閰嶄笂绾胯鍒� - interface.AssemblyOnlinePlanVersion( relflush ); + //interface.AssemblyOnlinePlanVersion( relflush ); allunit := AssemblyOnlinePlanVersion::GetDefaultAllUnit(); name := AssemblyOnlinePlanVersion::GetDefaultName();//search := interface.AssemblyOnlinePlanVersionSearch( relnew, Product := allunit, ProductionLine := allunit, Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );//, TimeUnit := Translations::MP_GlobalParameters_Day() @@ -26,11 +26,15 @@ } traverse( macroPlan, NewAssemblyOnlinePlanRow, aoprow, aoprow.Type() = '1' ){ row := table.GetRow( aoprow ); - traverse( table, Column, column ){//, aopcolumns.Find( column.StartDate() ) > -1 + traverse( table, Column, column, exists( aopcolumns, Elements, e, e = column.StartDate() ) ){//, aopcolumns.Find( column.StartDate() ) > -1 qty := sum( aoprow, NewAssemblyOnlinePlanCell, aopcell, column.StartDate() <= aopcell.NewAssemblyOnlinePlanColumn().StartDate() and column.EndDate() >= aopcell.NewAssemblyOnlinePlanColumn().StartDate(), aopcell.Quantity() ); cell := selectobject( row, Cell, cell, cell.Column() = column ); + if( isnull( cell ) ){ + cell := column.Cell( relnew, InventoryWeight := 0, ProductionSerialNumber := 0, Quantity := 0, Shift := '', Value := '' ); + row.Cell( relinsert, cell ); + } cell.Quantity( qty ); } } diff --git a/_Main/BL/Type_InventoryPlanArchiveRow/Method_SetQuantity.qbl b/_Main/BL/Type_InventoryPlanArchiveRow/Method_SetQuantity.qbl index 9896048..8fad06d 100644 --- a/_Main/BL/Type_InventoryPlanArchiveRow/Method_SetQuantity.qbl +++ b/_Main/BL/Type_InventoryPlanArchiveRow/Method_SetQuantity.qbl @@ -9,7 +9,12 @@ TextBody: [* // 鐢勫叞楦� Jun-24-2024 (created) - cell := selectobject( this, Cell, cell, cell.Column() = column ); + cell := selectobject( this, Cell, cell, cell.Column() = column ); + if( isnull( cell ) ){ + cell := this.Cell( relnew, PlanQuantity := 0, ActualQuantity := 0 ); + + column.Cell( relinsert, cell ); + } cell.PlanQuantity( cell.PlanQuantity() + planqty ); cell.ActualQuantity( cell.ActualQuantity() + actualaty ); *] 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