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_Create.qbl | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl index d5c3eee..53b1182 100644 --- a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl +++ b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl @@ -12,10 +12,11 @@ table.Delete(); } + zeroDuration := Duration::Construct( 0,0,0,0 ); + table := owner.MP_Table( relnew,Name := MP_Cell_ScheduleSummary::GetTableName()); startDate := owner.StartOfPlanning().Date(); - endDate := maxselect( owner,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.TimeUnit() = Translations::MP_GlobalParameters_Day(),period.EndDate()).EndDate(); columns := construct( MP_Columns ); @@ -40,9 +41,14 @@ columnHandle := columnIndexTree.GetHandle( unitPeriodTime.Period_MP().StartDate().AsQUILL() ); columnIndex := guard( columnIndexTree.Root().Child( columnHandle ),null( NamedValue )); if( not isnull( columnIndex )){ + // 褰揳rrowedAvailableCapacity涓嶄负0锛屽伐浣滄棩 + 1 arrowedAvailableCapacity := unitPeriodTime.TotalAvailableCapacity(); - zeroDuration := Duration::Construct( 0,0,0,0 ); + workDay := ifexpr( arrowedAvailableCapacity <> zeroDuration, 1,0 ); + + if( workDay = 0 ){ + workDay := ifexpr( unitPeriodTime.ShiftPlan().Outcome() <> "",1,0 ); + } column := columns.Element( columnIndex.GetValueAsNumber() ); @@ -50,7 +56,7 @@ workHours := select( unitPeriodTime,ShiftPattern.ShiftDay,shifDay,shifDay.Day_MP().ID() = dayOfWeek ); capacity := 0.0; - workDay := ifexpr( arrowedAvailableCapacity <> zeroDuration, 1,0 ); + if( not isnull( workHours )){ capacity := workDay * throughput * workHours.Capacity().HoursAsReal() } -- Gitblit v1.9.3