From 63c7e5158f06baee49dba32e78f9d360b502ed8c Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期二, 03 十二月 2024 10:34:50 +0800
Subject: [PATCH] SAP接口PL数量乘以四
---
_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl | 16 +++++++++++++---
_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def | 2 +-
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
index e9f1a0f..ab3a4e0 100644
--- a/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
@@ -2,6 +2,7 @@
#parent: #root
StaticMethod GenerateData (
InterfaceDataset owner,
+ MacroPlan macroplan,
String werk,
String version,
Date startdate,
@@ -45,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 );
}
}
}
@@ -64,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 );
}
}
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def
index e65ea3c..c2ceec4 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def
@@ -8,7 +8,7 @@
Form.ApplyChanges();
if( WebMessageBox::Question( this, '鏄惁纭鎺ㄩ��', 'OK|Cancel' ) = 0 ){
msg := '';
- loginfo := AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, ddslFactory.Text(), efVersion.Text(), dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName(), msg );
+ loginfo := AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, MacroPlan, ddslFactory.Text(), efVersion.Text(), dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName(), msg );
sucproduct := selectuniquevalues( loginfo, SAPResponseLoginfo, e, e.IsSuccess(), e.Msg_v1() );
if( sucproduct.Size() = loginfo.SAPResponseLoginfo( relsize ) ){
WebMessageBox::Success( ApplicationMacroPlanner, '鎺ㄩ�佹垚鍔�' );
--
Gitblit v1.9.3