From 63de54ec601c2b1c6c62b011442458d963ef9036 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期五, 30 八月 2024 10:20:53 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg

---
 _Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
index cc699fc..3f4b090 100644
--- a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
+++ b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
@@ -15,7 +15,8 @@
     table := owner.MP_Table( relnew,Name := MP_Cell_ScheduleSummary::GetTableName());
     
     startDate := owner.StartOfPlanning().Date();
-    endDate := startDate + 7;
+    
+    endDate := maxselect( owner,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.TimeUnit() = Translations::MP_GlobalParameters_Day(),period.EndDate()).EndDate();
     
     columns := construct( MP_Columns );
     columnIndexTree := NamedValueTree::Create();
@@ -54,7 +55,14 @@
             capacity := workDay * throughput * workHours.Capacity().HoursAsReal()
           }
           
+          isFirstWeekData := true;
+          
+          if( column.CustomDate() > startDate + 7 ){
+            isFirstWeekData := false; 
+          }
+          
           row.MP_Cell( relnew,MP_Cell_ScheduleSummary,MP_Column := column,
+                       IsFristWeekData := isFirstWeekData,
                        ShiftPattern := unitPeriodTime.ShiftPatternName(),
                        WorkingDay := workDay,
                        Capacity := capacity,
@@ -62,7 +70,9 @@
         }
       }
     }
-    
+    traverse( table,MP_Column,column,column.MP_Cell( relsize ) = 0 ){
+      column.Delete(); 
+    }
     return table;
   *]
 }

--
Gitblit v1.9.3