From ffb76f7a9a094cd200367d23b6822f4c1f7c873c Mon Sep 17 00:00:00 2001 From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com> Date: 星期四, 17 十月 2024 19:19:09 +0800 Subject: [PATCH] 修复一些bug --- _Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl index ed6a26c..2612599 100644 --- a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl +++ b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl @@ -80,10 +80,16 @@ unitIndex := guard( unitIndexTree.Root().Child( unitHandle ),null( NamedValue )); if( not isnull( unitIndex )){ unit := units.Element( unitIndex.GetValueAsNumber() ); - output := sum( unit,UnitPeriod.PeriodTask_MP.NewSupply,np, + output := sum( unit,UnitPeriod.astype( UnitPeriodTime ).PeriodTask_MP.NewSupply,np, np.PeriodTask_MP().UnitPeriod().StartDate() >= localColumn.CustomDate() and - np.PeriodTask_MP().UnitPeriod().StartDate() < localColumn.CustomDate().StartOfNextMonth(), + np.PeriodTask_MP().UnitPeriod().StartDate() < localColumn.CustomDate().StartOfNextMonth() and + np.PeriodTask_MP().UnitPeriod().Period_MP().TimeUnit() = "Day", np.Quantity() ); + output := sum( unit,StockingPoint_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod,pispip, + pispip.Period_MP().StartDate() >= localColumn.CustomDate() and + pispip.Period_MP().StartDate() < localColumn.CustomDate().StartOfNextMonth() and + pispip.Period_MP().TimeUnit() = "Day", + pispip.NewSupplyProductionQuantity()); } }else{ scheduleSummaryOutputDataKey := row.Name() + localColumn.CustomDate().AsQUILL(); @@ -138,6 +144,11 @@ } } + traverse( localTable,LocalRow.LocalCell.astype( LocalCell_ScheduleSummary ),cell ){ + cell.Capacity( cell.Capacity() / tables.Size() ); + cell.Output( cell.Output() / tables.Size() ); + } + //startDate := owner.StartOfPlanning().Date() + 7; //endDate := maxselect( owner,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.EndDate(),period.TimeUnit() = "Month" ).EndDate(); //columns := construct( MP_Columns ); -- Gitblit v1.9.3