From 9900634760ba0678301cb9e839036eee1124a4b2 Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期三, 09 十月 2024 19:38:34 +0800
Subject: [PATCH] 上线计划优化
---
_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl b/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
index ce8bc30..d262ddd 100644
--- a/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
+++ b/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
@@ -12,8 +12,11 @@
// 鎵捐閰嶇嚎琛�
oprs := selectsortedset( opt, OfflinePlanRow, tempOPR,
- tempOPR.ProductionLine() = "DL MoMo"
- // or tempOPR.ProductionLine() = "CC MoMo" or tempOPR.ProductionLine() = "DL ZKM"
+ // tempOPR.ProductionLine() = "DL MoMo"
+ // or
+ tempOPR.ProductionLine() = "CC MoMo"
+ // or
+ // tempOPR.ProductionLine() = "DL ZKM"
,
tempOPR.ProductionLine(), tempOPR.ProductID(), tempOPR.Type() );
opcs := selectsortedset( opt, OfflinePlanColumn, tempOPC, true, tempOPC.ColumnDate() );
@@ -43,17 +46,17 @@
);
u := select( macroPlan, Unit, tempU, tempU.ID() = pl );
- drainPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject() = "鎺掔┖", false ) );
- lineLyingPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject() = "閾虹嚎", false ) );
+ drainPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "鎷夌┖" ), false ) );
+ lineLyingPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "閾虹嚎" ), false ) );
// 澶勭悊鎺掔┖
- info( "褰撳墠浜х嚎锛�", pl, " 澶勭悊鎺掔┖--------------------------" );
+ info( "褰撳墠浜х嚎锛�", pl, " 澶勭悊鎷夌┖--------------------------" );
traverse ( drainPs, Elements, p ) {
traverse ( p, ExplicitTimeInterval, eti ) {
info( "寮�濮嬫椂闂达細", eti.Start().Format( "Y-M2-D2" ), " 缁撴潫鏃堕棿锛�", eti.End().Format( "Y-M2-D2" ) );
// 鍓嶄竴澶╂棩鍘�
aopc := select( macroPlan, AssemblyOnlinePlanColumn, tempAOPC, tempAOPC.ColumnDate() = ( eti.Start().Date() - 1 ) );
- info( "闇�瑕佹帓绌虹殑涓婄嚎璁″垝鏃堕棿锛�", aopc.ColumnDate().Format( "Y-M2-D2" ) );
+ info( "闇�瑕佹媺绌虹殑涓婄嚎璁″垝鏃堕棿锛�", aopc.ColumnDate().Format( "Y-M2-D2" ) );
aoprs := selectset( macroPlan, AssemblyOnlinePlanRow, tempAOPR, tempAOPR.ProductionLine() = pl and tempAOPR.Type() = "2" and
exists( tempAOPR, AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc and tempAOPC.Value() <> "" ) );
aopr := maxselect( aoprs, Elements.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc,
@@ -70,6 +73,15 @@
traverse ( lineLyingPs, Elements, p ) {
traverse ( p, ExplicitTimeInterval, eti ) {
info( "寮�濮嬫椂闂达細", eti.Start().Format( "Y-M2-D2" ), " 缁撴潫鏃堕棿锛�", eti.End().Format( "Y-M2-D2" ) );
+ info( "闇�瑕侀摵绾跨殑涓婄嚎璁″垝鏃堕棿锛�", eti.Start().Format( "Y-M2-D2" ) );
+ aopc := select( macroPlan, AssemblyOnlinePlanColumn, tempAOPC, tempAOPC.ColumnDate() = eti.Start().Date() );
+ aoprs := selectset( macroPlan, AssemblyOnlinePlanRow, tempAOPR, tempAOPR.ProductionLine() = pl and tempAOPR.Type() = "2" and
+ exists( tempAOPR, AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc and tempAOPC.Value() <> "" ) );
+ aopr := minselect( aoprs, Elements.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc,
+ [Number]tempAOPC.Value().ReplaceAll( "#0", "" ) );
+ cell := select( macroPlan, AssemblyOnlinePlanRow.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanRow().ProductionLine() = pl and tempAOPC.AssemblyOnlinePlanColumn() = aopc and
+ tempAOPC.AssemblyOnlinePlanRow().Type() = "1" and tempAOPC.AssemblyOnlinePlanRow().ProductID() = aopr.AssemblyOnlinePlanRow().ProductID() );
+ cell.Value( [String] ( [Number]cell.Value() + targetQuantity ) );
}
}
}
--
Gitblit v1.9.3