_Main/BL/Type_PackagingPlanCell/Attribute_NewSupply.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_PackagingPlanCell/StaticMethod_SetPackagingAndUnpackingValues.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/Sys/Repr/Global/PackagingPlanCell.qrp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_MatrixEditor493.def | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
_Main/BL/Type_PackagingPlanCell/Attribute_NewSupply.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,8 @@ Quintiq file version 2.0 #parent: #root Attribute NewSupply { #keys: '3[415754.0.436130246][415754.0.436130245][415754.0.436130247]' Description: 'ä¾åº' ValueType: Real } _Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
@@ -62,15 +62,17 @@ // 大è¿å·¥åè®¾ç½®å¼ if ( factory = "大è¿å·¥å" ) { // åéæ±&å©ä½åºå // åéæ±&å©ä½åºå&ä¾åºé cell.NetDemand( cell.NetDemand() + pispipl.DependentDemandAndSalesDemandQuantity() ); cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() ); cell.NewSupply( cell.NewSupply() + pispipl.NewSupplyQuantity() ); } // é¿æ¥å·¥åè®¾ç½®å¼ if ( factory = "é¿æ¥å·¥å" ) { // å©ä½åºå // å©ä½åºå&ä¾åºé cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() ); cell.NewSupply( cell.NewSupply() + pispipl.NewSupplyQuantity() ); // åéæ±ãåªå线边åºã&å è£ åºå&éå è£ åºå if ( pisp.StockingPointID().Regex( "å¤ç§åº" ) ) { _Main/BL/Type_PackagingPlanCell/StaticMethod_SetPackagingAndUnpackingValues.qbl
@@ -91,5 +91,56 @@ } } } // 设置æå å¼ï¼ç¬¦ålotsizeå䏿¥æå¤§å è£ éï¼ traverse ( macroPlan, PackagingPlanRow, ppr/*, ppr.Factory() = "大è¿å·¥å" and ppr.ProductID() = "06K103011CM"*/ ) { traverse ( ppr, PackagingPlanCell, ppcell/*, ppcell.StartDate() <= Date::Construct( 2025, 1, 4 )*/ ) { // Product_MP pmp := select( macroPlan, Product_MP, tempPMP, tempPMP.IsLeaf() and tempPMP.ID() = ppr.ProductID() ); // å è£ lotsize ppls := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() = ppr.Factory() and tempPPLS.ProductID() = ifexpr( exists( macroPlan, PackagingPlanLotSize, tempPPLS1, tempPPLS1.ProductID() = pmp.ID() ), pmp.ID(), pmp.ParentID() ) ); // 䏿¥å è£ å®¹é ppnc := select( macroPlan, PackagingPlanNewCapability, tempPPNC, tempPPNC.Factory() = ppr.Factory() and tempPPNC.ProductID() = ifexpr( exists( macroPlan, PackagingPlanNewCapability, tempPPNC1, tempPPNC1.ProductID() = pmp.ID() ), pmp.ID(), pmp.ParentID() ) ); // Unit us := selectset( macroPlan, Unit, tempU, tempU.ID().Regex( ppr.FactoryAbbreviation() + " " + ppr.Category() ) ); // å½åéå è£ åºå + ä¸ä¸å¤©çNewSupply < ä¸ä¸å¤©çåéæ± if ( ppcell.UnpackagedInventory() < guard( ppcell.Next().NetDemand(), 0 ) and not isnull( ppls ) and not isnull( ppnc ) ) { // éè¦å è£ çæ°é needPackagingQuantity := abs( ppcell.PackagingInventory() ).Round( 0 ); // å è£ å¼å§çç´¢å¼ indexPPCell := ppcell.Previous(); // info( "产线个æ°ï¼", us.Size(), " å¼å§æ¶é´ï¼", ppcell.StartDate().Format( "Y-M2-D2" ), " å è£ åºåæ°éï¼", ppcell.PackagingInventory(), " éè¦å è£ çæ°éï¼", needPackagingQuantity, // " å è£ lotsizeï¼",guard( ppls.LotSize(), 0 ), " æå¤§å è£ å®¹éï¼", ppnc.MaximumDailyPackagingQuantity() ); while ( not isnull( indexPPCell ) and indexPPCell.StartDate() >= plannedStartDate and exists( us, Elements.UnitPeriod.astype( UnitPeriodTime ).ShiftPlan, tempSP, tempSP.UnitPeriodTime().StartDate() = indexPPCell.StartDate(), tempSP.Outcome() <> "" ) and needPackagingQuantity > 0 ) { // è½å è£ çæ°é canPackagingQuantity := ifexpr( ceil( needPackagingQuantity / ppls.LotSize() ) < floor( ppnc.MaximumDailyPackagingQuantity() / ppls.LotSize() ), ceil( needPackagingQuantity / ppls.LotSize() ), floor( ppnc.MaximumDailyPackagingQuantity() / ppls.LotSize() ) ) * ppls.LotSize(); // info( "å¼å§å è£ çæ¥æï¼", indexPPCell.StartDate().Format( "Y-M2-D2" ), " è½å è£ çæ°é:", canPackagingQuantity ); indexPPCell.Package( canPackagingQuantity ); Transaction::Transaction().Propagate( attribute( PackagingPlanCell, PackagingInventory ) ); Transaction::Transaction().Propagate( attribute( PackagingPlanCell, UnpackagedInventory ) ); needPackagingQuantity := needPackagingQuantity - canPackagingQuantity; indexPPCell := indexPPCell.Previous(); } } } } *] } _Main/Sys/Repr/Global/PackagingPlanCell.qrp
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,51 @@ Quintiq file version 2.0 #parent: #root TypeRepresentation PackagingPlanCell { AttributeRepresentation EndingInventory { AttributeKey: '[413988.0.1393320114]' Synonym: 'Inventory end' } AttributeRepresentation NetDemand { AttributeKey: '[413988.0.1393320104]' Synonym: 'Demand' } AttributeRepresentation NewSupply { AttributeKey: '[415754.0.436130245]' Synonym: 'New supply' } AttributeRepresentation Out { AttributeKey: '[413988.0.1393320156]' Synonym: 'Transport-out' } AttributeRepresentation Package { AttributeKey: '[413988.0.1393320188]' Synonym: 'Package' } AttributeRepresentation PackagingInventory { AttributeKey: '[413988.0.1393320143]' Synonym: 'Packaged' } AttributeRepresentation TransferIn { AttributeKey: '[413988.0.1393320166]' Synonym: 'Transport-in' } AttributeRepresentation UnpackagedInventory { AttributeKey: '[413988.0.1393320130]' Synonym: 'Unpackaged' } AttributeRepresentation Unpacking { AttributeKey: '[413988.0.1393320198]' Synonym: 'Unpackage' } RelationRepresentation AsFirst { RelationKey: '[413988.0.1425205682]' Visibility: 'Normal' } } _Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_MatrixEditor493.def
@@ -26,7 +26,7 @@ ] Properties: [ Attributes: 'NetDemand;EndingInventory;UnpackagedInventory;PackagingInventory;Out;TransferIn;Package;Unpacking' Attributes: 'NetDemand;NewSupply;EndingInventory;Out;TransferIn;UnpackagedInventory;PackagingInventory;Package;Unpacking' Column: 'PackagingPlanColumn' Row: 'PackagingPlanRow' Taborder: 0