From f8c73b21d8c6ceb3a2eed55ec9859aeb12772228 Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期四, 17 十月 2024 15:37:34 +0800
Subject: [PATCH] 上线计划优化
---
_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl | 21 ++++++++++++++++-----
_Main/UI/MacroPlannerWebApp/Views/NewAssemblyOnlinePlan.vw | 4 ++--
_Main/UI/MacroPlannerWebApp/Views/NewOfflinePlan.vw | 4 ++--
3 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl b/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
index fad645a..b4505ca 100644
--- a/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
+++ b/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
@@ -61,7 +61,7 @@
);
u := select( macroPlan, Unit, tempU, tempU.ID() = pl );
- drainPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "鎷夌┖" ), false ) );
+ drainPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "鎷夌┖" ) or tempP.Event().Subject().Regex( "鎺掔┖" ), false ) );
lineLyingPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "閾虹嚎" ), false ) );
// 澶勭悊鎷夌┖
@@ -69,13 +69,24 @@
traverse ( drainPs, Elements, p ) {
traverse ( p, ExplicitTimeInterval, eti ) {
// info( "寮�濮嬫椂闂达細", eti.Start().Format( "Y-M2-D2" ), " 缁撴潫鏃堕棿锛�", eti.End().Format( "Y-M2-D2" ) );
+ naopc := select( macroPlan, NewAssemblyOnlinePlanColumn, tempNAOPC, tempNAOPC.StartDate() = ( eti.Start().Date() - 1 ) );
cell := maxselect( macroPlan, NewAssemblyOnlinePlanRow.NewAssemblyOnlinePlanCell, tempNAOPCell,
- tempNAOPCell.NewAssemblyOnlinePlanRow().ProductionLine() = pl and
- tempNAOPCell.NewAssemblyOnlinePlanColumn().StartDate() = ( eti.Start().Date() - 1 ) and
- tempNAOPCell.NewAssemblyOnlinePlanRow().Type() = "1",
+ tempNAOPCell.NewAssemblyOnlinePlanRow().ProductionLine() = pl and
+ tempNAOPCell.NewAssemblyOnlinePlanColumn() = naopc and
+ tempNAOPCell.NewAssemblyOnlinePlanRow().Type() = "1" and
+ tempNAOPCell.Quantity() > 0,
tempNAOPCell.OrderNr() );
-
+ while ( isnull( cell ) and not isnull( naopc ) ){
+ naopc := naopc.PreviousNAOPColumn();
+
+ cell := maxselect( macroPlan, NewAssemblyOnlinePlanRow.NewAssemblyOnlinePlanCell, tempNAOPCell,
+ tempNAOPCell.NewAssemblyOnlinePlanRow().ProductionLine() = pl and
+ tempNAOPCell.NewAssemblyOnlinePlanColumn() = naopc and
+ tempNAOPCell.NewAssemblyOnlinePlanRow().Type() = "1" and
+ tempNAOPCell.Quantity() > 0,
+ tempNAOPCell.OrderNr() );
+ }
if ( not isnull( cell ) ) {
cell.Quantity( cell.Quantity() - targetQuantity );
}
diff --git a/_Main/UI/MacroPlannerWebApp/Views/NewAssemblyOnlinePlan.vw b/_Main/UI/MacroPlannerWebApp/Views/NewAssemblyOnlinePlan.vw
index 422e55c..60242ae 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/NewAssemblyOnlinePlan.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/NewAssemblyOnlinePlan.vw
@@ -30,7 +30,7 @@
FormNewAssemblyOnlinePlan_MatrixEditor515
{
gridColor: '#c4c4c4'
- totalHeaderWidth: 530
+ totalHeaderWidth: 335
attributeHeaderWidthRatio: 0.6
nameHeaderWidthRatio: 0.4
columnWidth: 100
@@ -87,7 +87,7 @@
FormNewAssemblyOnlinePlan_MatrixEditor583
{
gridColor: '#c4c4c4'
- totalHeaderWidth: 532
+ totalHeaderWidth: 340
attributeHeaderWidthRatio: 0.6
nameHeaderWidthRatio: 0.4
columnWidth: 100
diff --git a/_Main/UI/MacroPlannerWebApp/Views/NewOfflinePlan.vw b/_Main/UI/MacroPlannerWebApp/Views/NewOfflinePlan.vw
index 31f8d84..ae2b965 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/NewOfflinePlan.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/NewOfflinePlan.vw
@@ -30,7 +30,7 @@
FormNewOfflinePlan_MatrixEditor515
{
gridColor: '#c4c4c4'
- totalHeaderWidth: 507
+ totalHeaderWidth: 342
attributeHeaderWidthRatio: 0.6
nameHeaderWidthRatio: 0.4
columnWidth: 100
@@ -87,7 +87,7 @@
FormNewOfflinePlan_MatrixEditor583
{
gridColor: '#c4c4c4'
- totalHeaderWidth: 509
+ totalHeaderWidth: 342
attributeHeaderWidthRatio: 0.6
nameHeaderWidthRatio: 0.4
columnWidth: 100
--
Gitblit v1.9.3