From 008dadc9f4d3c57a13a29ab75f3785e21666157b Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期三, 16 十月 2024 13:25:41 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
---
_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl | 88 ++++++++++++++++++++++----------------------
1 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl b/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
index a8a7fcc..fad645a 100644
--- a/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
+++ b/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
@@ -54,51 +54,51 @@
}
// 澶勭悊鏃ュ巻浜嬩欢
- //pls := selectuniquevalues( macroPlan, AssemblyOnlinePlanRow, tempAOPR, true, tempAOPR.ProductionLine() );
- //traverse ( pls, Elements, pl ) {
- // targetQuantity := ifexpr( pl = "CC MoMo", guard( macroPlan.AssemblyOnlineQuantity().CCMoMo(), 0 ),
- // ifexpr( pl = "DL MoMo", guard( macroPlan.AssemblyOnlineQuantity().DLMoMo(), 0 ), guard( macroPlan.AssemblyOnlineQuantity().DLZKM(), 0 ) )
- // );
- //
- // u := select( macroPlan, Unit, tempU, tempU.ID() = pl );
- // drainPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "鎷夌┖" ), false ) );
- // lineLyingPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "閾虹嚎" ), false ) );
- //
- // // 澶勭悊鎺掔┖
+ pls := selectuniquevalues( macroPlan, NewAssemblyOnlinePlanRow, tempNAOPR, true, tempNAOPR.ProductionLine() );
+ traverse ( pls, Elements, pl ) {
+ targetQuantity := ifexpr( pl = "CC MoMo", guard( macroPlan.AssemblyOnlineQuantity().CCMoMo(), 0 ),
+ ifexpr( pl = "DL MoMo", guard( macroPlan.AssemblyOnlineQuantity().DLMoMo(), 0 ), guard( macroPlan.AssemblyOnlineQuantity().DLZKM(), 0 ) )
+ );
+
+ u := select( macroPlan, Unit, tempU, tempU.ID() = pl );
+ 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, " 澶勭悊鎷夌┖--------------------------" );
- // traverse ( drainPs, Elements, p ) {
- // traverse ( p, ExplicitTimeInterval, eti ) {
+ 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" ) );
- // 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,
- // [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 ) );
- // }
- // }
- //
- // info( "褰撳墠浜х嚎锛�", pl, " 澶勭悊閾虹嚎--------------------------" );
- // // 澶勭悊閾虹嚎
- // 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 ) );
- // }
- // }
- //}
+
+ cell := maxselect( macroPlan, NewAssemblyOnlinePlanRow.NewAssemblyOnlinePlanCell, tempNAOPCell,
+ tempNAOPCell.NewAssemblyOnlinePlanRow().ProductionLine() = pl and
+ tempNAOPCell.NewAssemblyOnlinePlanColumn().StartDate() = ( eti.Start().Date() - 1 ) and
+ tempNAOPCell.NewAssemblyOnlinePlanRow().Type() = "1",
+ tempNAOPCell.OrderNr() );
+
+ if ( not isnull( cell ) ) {
+ cell.Quantity( cell.Quantity() - targetQuantity );
+ }
+ }
+ }
+
+ info( "褰撳墠浜х嚎锛�", pl, " 澶勭悊閾虹嚎--------------------------" );
+ // 澶勭悊閾虹嚎
+ traverse ( lineLyingPs, Elements, p ) {
+ traverse ( p, ExplicitTimeInterval, eti ) {
+ info( "寮�濮嬫椂闂达細", eti.Start().Format( "Y-M2-D2" ), " 缁撴潫鏃堕棿锛�", eti.End().Format( "Y-M2-D2" ) );
+
+ cell := minselect( macroPlan, NewAssemblyOnlinePlanRow.NewAssemblyOnlinePlanCell, tempNAOPCell,
+ tempNAOPCell.NewAssemblyOnlinePlanRow().ProductionLine() = pl and
+ tempNAOPCell.NewAssemblyOnlinePlanColumn().StartDate() = eti.Start().Date() and
+ tempNAOPCell.NewAssemblyOnlinePlanRow().Type() = "1" and
+ tempNAOPCell.OrderNr() > 0,
+ tempNAOPCell.OrderNr() );
+ if ( not isnull( cell ) ) {
+ cell.Quantity( cell.Quantity() + targetQuantity );
+ }
+ }
+ }
+ }
*]
}
--
Gitblit v1.9.3