¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CC_PackagingInventory |
| | | { |
| | | #keys: '3[415754.0.351286657][415754.0.351286656][415754.0.351286658]' |
| | | Description: 'é¿æ¥å·¥åå
è£
åºå' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CC_UnpackagedInventory |
| | | { |
| | | #keys: '3[415754.0.351197962][415754.0.351197961][415754.0.351197963]' |
| | | Description: 'é¿æ¥å·¥åéå
è£
åºå' |
| | | ValueType: Real |
| | | } |
| | |
| | | [* |
| | | // lihongji Jul-26-2024 (created) |
| | | |
| | | value := this.InitialPackagingInventory() + guard( this.Previous().PackagingInventory() + |
| | | guard( this.Previous().Package(), 0.0 ) - |
| | | value := ifexpr( this.PackagingPlanRow().Factory() = "é¿æ¥å·¥å", this.CC_PackagingInventory(), |
| | | this.InitialPackagingInventory() + guard( this.Previous().PackagingInventory() + |
| | | guard( this.Package(), 0.0 ) - |
| | | ifexpr( this.TransferIn() > 0.0, 0, this.Unpacking() ), |
| | | 0.0 ) |
| | | - this.Out(); |
| | | - this.Out() |
| | | ); |
| | | |
| | | this.PackagingInventory( value ); |
| | | *] |
| | |
| | | [* |
| | | // lihongji Jul-24-2024 (created) |
| | | |
| | | value := guard( this.EndingInventory() - this.PackagingInventory(), 0.0 ); |
| | | value := ifexpr( this.PackagingPlanRow().Factory() = "é¿æ¥å·¥å", this.UnpackagedInventory(), |
| | | guard( this.EndingInventory() - this.PackagingInventory(), 0.0 ) ); |
| | | |
| | | this.UnpackagedInventory( value ); |
| | | *] |
| | |
| | | ( pisp.StockingPointID().Regex( "CC" ) or pisp.StockingPointID().Regex( "DL" ) or pisp.StockingPointID().Regex( "大è¿" ) or pisp.StockingPointID().Regex( "é¿æ¥" ) ) ) { |
| | | // å½åpispæå¤å°ç¹ |
| | | factory := ifexpr( pisp.StockingPointID().Regex( "CC" ) or pisp.StockingPointID().Regex( "é¿æ¥" ), "é¿æ¥å·¥å", "大è¿å·¥å" ); |
| | | factoryAbbreviation := ifexpr( pisp.StockingPointID().Regex( "CC" ) or pisp.StockingPointID().Regex( "é¿æ¥" ), "CC", "DL" ); |
| | | |
| | | // åå»ºè¡ |
| | | ppr := select( macroPlan, PackagingPlanRow, tempPPR, tempPPR.ProductID() = pisp.ProductID() and tempPPR.Factory() = factory ); |
| | |
| | | } |
| | | |
| | | // åºåå°åºåç¹Trip |
| | | originTrips := selectset( macroPlan, Unit.Lane.LaneLeg.Trip, tempT, tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID() = pisp.StockingPointID() ); |
| | | originTrips := selectset( macroPlan, Unit.Lane.LaneLeg.Trip, tempT, tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID().Regex( factoryAbbreviation ) and |
| | | TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ) <> TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ) ); |
| | | // ç®çå°åºåç¹Trip |
| | | destinationTrips := selectset( macroPlan, Unit.Lane.LaneLeg.Trip, tempT, tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID() = pisp.StockingPointID() ); |
| | | destinationTrips := selectset( macroPlan, Unit.Lane.LaneLeg.Trip, tempT, tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID().Regex( factoryAbbreviation ) and |
| | | TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ) <> TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ) ); |
| | | |
| | | // å建åå
æ ¼ |
| | | // 循ç¯pispippl |
| | | traverse ( pisp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispipl, not pispipl.IsPeriodFrozen() ) { |
| | | // å建å |
| | | ppc := select( macroPlan, PackagingPlanColumn, tempPPC, tempPPC.StartDate() = pispipl.Start().Date() ); |
| | |
| | | |
| | | // 设置è°åº |
| | | outs := selectset( originTrips, Elements, tempT, tempT.Departure().Date() = pispipl.Start().Date() ); |
| | | traverse ( outs, Elements, out ) { |
| | | cell.Out( cell.Out() + out.Quantity() ); |
| | | traverse ( outs, Elements.ProductInTrip, outPIT, outPIT.ProductID() = pisp.ProductID() ) { |
| | | cell.Out( cell.Out() + outPIT.Quantity() ); |
| | | } |
| | | |
| | | // 设置è°è¿ |
| | | transferIns := selectset( destinationTrips, Elements, tempT, tempT.Arrival().Date() = pispipl.Start().Date() ); |
| | | traverse ( transferIns, Elements, ti ) { |
| | | cell.TransferIn( cell.TransferIn() + ti.Quantity() ); |
| | | traverse ( transferIns, Elements.ProductInTrip, tiPIT, tiPIT.ProductID() = pisp.ProductID() ) { |
| | | cell.TransferIn( cell.TransferIn() + tiPIT.Quantity() ); |
| | | } |
| | | |
| | | // é¿æ¥å·¥åç¹æ®æ
åµè®¾ç½®å
è£
åºååéå
è£
åºå |
| | | if ( factory = "é¿æ¥å·¥å" ) { |
| | | if ( pisp.StockingPointID().Regex( "å¤ç§åº" ) ) { |
| | | cell.CC_PackagingInventory( pispipl.InventoryLevelEnd() ); |
| | | } else if ( pisp.StockingPointID().Regex( "线边åº" ) ) { |
| | | cell.CC_UnpackagedInventory( pispipl.InventoryLevelEnd() ); |
| | | } |
| | | } |
| | | |
| | | // 设置åä¸å¤©åºå |
| | |
| | | // çæè°æ¨è®¡å |
| | | traverse ( macroPlan, Unit, u, u.HasCapacityTypeTransportQuantity() ) { |
| | | traverse ( u, Lane.LaneLeg.Trip, t ) { |
| | | traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 and exists( pit.Product_MP(), AllParent.AsParent, tempP, tempP.ID() = "æºå ä»¶" ) ) { |
| | | originFactory := TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ); // èµ·å§å·¥å |
| | | destinationFactory := TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ); // ç®æ å·¥å |
| | | traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 and // æ°é大äº0 |
| | | exists( pit.Product_MP(), AllParent.AsParent, tempP, tempP.ID() = "æºå ä»¶" ) and // åªåæºå ä»¶ |
| | | originFactory <> destinationFactory // èµ·å§å·¥åä¸è½åç®æ å·¥åä¸è´ |
| | | ) { |
| | | // æ¾è¡ |
| | | tpr := TransferPlanRow::FindTransferPlanRowTypeIndex( TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ), |
| | | TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ), |