From 28a800b62eb8098f7266081272d21c33f4ffcf1e Mon Sep 17 00:00:00 2001
From: lihongji <3117313295@qq.com>
Date: 星期四, 18 七月 2024 11:03:42 +0800
Subject: [PATCH] 班次时间
---
_Main/BL/Type_OfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl | 38 ++++++++++++++++++++++++++++++++++----
1 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/_Main/BL/Type_OfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl b/_Main/BL/Type_OfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl
index 75941d4..e21f43c 100644
--- a/_Main/BL/Type_OfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl
+++ b/_Main/BL/Type_OfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl
@@ -11,7 +11,7 @@
opt := macroPlan.OfflinePlanTable( relnew, SaveDateTime := DateTime::ActualTime() );
// 鐢熸垚涓嬬嚎璁″垝琛�
- traverse ( macroPlan, Unit, u, u.HasCapacityTypeTime() /*and u.Name() = "Spider Assy Line 1"*/ ) {
+ traverse ( macroPlan, Unit, u, u.HasCapacityTypeTime() /*and u.Name() = "Body in White Line 1"*/ ) {
// 鍒涘缓浜х嚎琛�
opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := "", Type := "0" );
@@ -45,6 +45,10 @@
opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := "Z", Type := "3" );
// 鍒涘缓鐝琛�
opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := "Z", Type := "4" );
+ // 鍒涘缓鐝寮�濮嬫椂闂磋
+ opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := "Z", Type := "5" );
+ // 鍒涘缓鐝缁撴潫鏃堕棿琛�
+ opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := "Z", Type := "6" );
}
// 鍒涘缓浜у搧鍒�&绫诲瀷鍒�
@@ -70,12 +74,20 @@
} else if ( opr.Type() = "4" ) {
shiftCell := typeOPC.OfflinePlanCell( relnew, Value := "鐝" );
shiftCell.OfflinePlanRow( relset, opr );
+ } else if ( opr.Type() = "5" ) {
+ shiftStartDateCell := typeOPC.OfflinePlanCell( relnew, Value := "鐝寮�濮嬫椂闂�" );
+ shiftStartDateCell.OfflinePlanRow( relset, opr );
+ } else if ( opr.Type() = "6" ) {
+ shiftEndDateCell := typeOPC.OfflinePlanCell( relnew, Value := "鐝缁撴潫鏃堕棿" );
+ shiftEndDateCell.OfflinePlanRow( relset, opr );
}
}
- // 琛ュ叏鎬婚噺鍜岀彮娆�
- totalOPRs := selectset( opt, OfflinePlanRow, tempOPR, tempOPR.Type() = "3" );
- shiftOPRs := selectset( opt, OfflinePlanRow, tempOPR, tempOPR.Type() = "4" );
+ // 琛ュ叏鎬婚噺&鐝&鐝寮�濮嬫椂闂�&鐝缁撴潫鏃堕棿
+ totalOPRs := selectset( opt, OfflinePlanRow, tempOPR, tempOPR.Type() = "3" );
+ shiftOPRs := selectset( opt, OfflinePlanRow, tempOPR, tempOPR.Type() = "4" );
+ shiftStartDateOPRs := selectset( opt, OfflinePlanRow, tempOPR, tempOPR.Type() = "5" );
+ shiftEndDateOPRs := selectset( opt, OfflinePlanRow, tempOPR, tempOPR.Type() = "6" );
traverse ( opt, OfflinePlanColumn, opc, opc.OfflinePlanCell( relsize ) > 0 and opc.ColumnDate() >= macroPlan.StartOfPlanning().Date() ) {
traverse ( totalOPRs, Elements, totalOPR ) {
total := sum( opc, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanRow().ProductionLine() = totalOPR.ProductionLine() and tempOPC.OfflinePlanRow().Type() = "1", [Real]tempOPC.Value() );
@@ -90,6 +102,24 @@
shiftCell.OfflinePlanRow( relset, shiftOPR );
}
}
+
+ traverse ( shiftStartDateOPRs, Elements, ssdOPR ) {
+ shift := select( opc, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanRow().ProductionLine() = ssdOPR.ProductionLine() and tempOPC.OfflinePlanRow().Type() = "1" );
+ if ( not isnull( shift ) ) {
+ startDate := guard( minselect( macroPlan, ShiftPattern.ShiftDay.ShiftDayTime, tempSDT, tempSDT.ShiftDay().ShiftPatternName() = shift.Shift(), tempSDT.Sequence() ).StartDateTime().Format( "H:m" ), "" );
+ startDateCell := opc.OfflinePlanCell( relnew, Value := startDate );
+ startDateCell.OfflinePlanRow( relset, ssdOPR );
+ }
+ }
+
+ traverse ( shiftEndDateOPRs, Elements, sedOPR ) {
+ shift := select( opc, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanRow().ProductionLine() = sedOPR.ProductionLine() and tempOPC.OfflinePlanRow().Type() = "1" );
+ if ( not isnull( shift ) ) {
+ endDate := guard( maxselect( macroPlan, ShiftPattern.ShiftDay.ShiftDayTime, tempSDT, tempSDT.ShiftDay().ShiftPatternName() = shift.Shift(), tempSDT.Sequence() ).EndDateTIme().Format( "H:m" ), "" );
+ endDateCell := opc.OfflinePlanCell( relnew, Value := endDate );
+ endDateCell.OfflinePlanRow( relset, sedOPR );
+ }
+ }
}
// 琛ュ叏鏃堕棿鍒�
--
Gitblit v1.9.3