| | |
| | | // 生成调拨计划 |
| | | 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() ), |