From f8001ff6f7b5d06a87068c840fe5265ca1001923 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期二, 03 十二月 2024 15:51:00 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
---
_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
index b6203e2..ab3a4e0 100644
--- a/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
@@ -2,12 +2,14 @@
#parent: #root
StaticMethod GenerateData (
InterfaceDataset owner,
+ MacroPlan macroplan,
String werk,
String version,
Date startdate,
Date enddate,
- String executor
-) as String
+ String executor,
+ String feedback
+) as InterfaceLoginfo
{
TextBody:
[*
@@ -44,8 +46,12 @@
if( not exists( productids, Elements, e, e = quantityrow.ProductID() ) ){
productids.Add( quantityrow.ProductID() );
}
-
- pir.PIRData( relnew, Product := quantityrow.ProductID(), PlanningDate := column.StartDate(), PlanningQty := [Number]cell.Quantity(), Werk := rowwerk );
+ product := selectobject( macroplan, Product_MP, product, product.ID() = quantityrow.Name() );
+ planqty := [Number]cell.Quantity();
+ if( not isnull( product ) and exists( product.GetAllParent(), Elements, proparent, proparent.ID() = 'PL' ) ){
+ planqty := planqty * 4;
+ }
+ pir.PIRData( relnew, Product := quantityrow.ProductID(), PlanningDate := column.StartDate(), PlanningQty := planqty, Werk := rowwerk );
}
}
}
@@ -63,7 +69,12 @@
if( isnull( pirdata ) ){
pirdata := pir.PIRData( relnew, Product := row.ProductID(), PlanningDate := column.StartDate(), PlanningQty := 0, Werk := rowwerk );
}
- pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Quantity() );
+ product := selectobject( macroplan, Product_MP, product, product.ID() = row.Name() );
+ planqty := [Number]cell.Quantity();
+ if( not isnull( product ) and exists( product.GetAllParent(), Elements, proparent, proparent.ID() = 'PL' ) ){
+ planqty := planqty * 4;
+ }
+ pirdata.PlanningQty( pirdata.PlanningQty() + planqty );
}
}
}
@@ -80,6 +91,7 @@
}
}
loginfo.TotalRow( pir.PIRData( relsize ) );
- return AOnlineAndMOfflinePlanPIR::Publish( owner, loginfo );
+ feedback := AOnlineAndMOfflinePlanPIR::Publish( owner, loginfo );
+ return loginfo;
*]
}
--
Gitblit v1.9.3