From 89c96171bb971dcaed7cf289b58ef44ca689523c Mon Sep 17 00:00:00 2001
From: limj <limj@taizhitech.com>
Date: 星期四, 21 九月 2023 09:11:20 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lmj
---
_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning#662.qbl | 32 +++++++++++++++++++++++++++-----
1 files changed, 27 insertions(+), 5 deletions(-)
diff --git "a/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning\043662.qbl" "b/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning\043662.qbl"
index a8478db..2b88918 100644
--- "a/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning\043662.qbl"
+++ "b/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning\043662.qbl"
@@ -1,6 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod FromSupplyPlanning (
+ GlobalOTDTable otdTable,
MacroPlan macroPlan,
MacroPlan mappingRoot,
ProductInStockingPointInPeriod pispip
@@ -17,12 +18,13 @@
stockingPoint := pisp.StockingPoint_MP();
period := pispip.Period_MP();
mappingProduct := MappingProduct::GetByProductId( mappingRoot, product.ID() );
+ matAttrSetting := MatAttrSettingAndPlanStrategy::GetExistByMatCode( otdTable, product.ID() );
// 鎺ュ彛/涓棿琛ㄦ殏鏃�
mappingProviderCapacity := "鏆傛棤";
erpData := "鏆傛棤";
// 鏍规嵁pispip
- result.MRPCalverNo( pispip.MRPCalverNo() );
+ result.MRPCalverNo( ifexpr( pispip.MRPCalverNo() = "", "鏆傛棤", pispip.MRPCalverNo() ) );
result.Quantity( pispip.NewSupplyQuantity() );
// 鏍规嵁product
@@ -37,14 +39,34 @@
result.PRSuggestionDate( ifexpr( (result.ProduceRequiredDate() - Duration::Days( 7 )).Date() >= Date::Today(),
Date::Today(), (result.ProduceRequiredDate() - Duration::Days( 7 )).Date() ) );
+ // 鏍规嵁 鐗╂枡灞炴�ф爣绛捐瀹�&鐗╂枡璁″垝绛栫暐
+ result.IsPanelMaterial( "鏆傛棤" );
+ if( isnull( matAttrSetting ) ) {
+ result.IsGenericMaterial( "鏆傛棤" );
+ result.IsLongLeadItem( "鏆傛棤" );
+ result.MaterialMRPType( "鏆傛棤" );
+ } else {
+ result.IsGenericMaterial( matAttrSetting.FlagGeneric() );
+ result.IsLongLeadItem( matAttrSetting.FlagLongTerm() );
+ result.MaterialMRPType( ifexpr( matAttrSetting.PlanningStrategyCustom() <> "", matAttrSetting.PlanningStrategyCustom(), matAttrSetting.PlanningStrategyAuto() ) );
+ }
+
+
// 鏍规嵁product涓棿琛�
- result.BusinessType( mappingProduct.BusinessType() );
- result.OrganCode( mappingProduct.OrgCode() );
- result.UnitOfMeasure( mappingProduct.UnitOfMeasureName() );
+ if( isnull( mappingProduct ) ) {
+ result.BusinessType( "鏆傛棤" );
+ result.OrganCode( "鏆傛棤" );
+ result.UnitOfMeasure( "鏆傛棤" );
+ } else {
+ result.BusinessType( mappingProduct.BusinessType() );
+ result.OrganCode( mappingProduct.OrgCode() );
+ result.UnitOfMeasure( mappingProduct.UnitOfMeasureName() );
+ }
// 鏍规嵁渚涘簲鍟嗚兘鍔涗腑闂磋〃
result.ProviderCode( mappingProviderCapacity );
result.ProductName( mappingProviderCapacity );
+ result.LeadTime( 0.0 );
// 鏍规嵁erp鎺ュ彛 鍥哄畾鍊�
result.RequisitionType( "PURCHASE" );
@@ -68,7 +90,7 @@
// 鍙戦�佷俊鎭�
result.SendStatus( "" );
result.SendBy( "" );
- result.SendTIme( DateTime::MinDateTime() );
+ result.SendTime( DateTime::MinDateTime() );
return result;
*]
--
Gitblit v1.9.3