|  |  | 
 |  |  |     // 生成调拨计划 | 
 |  |  |     traverse ( macroPlan, Unit, u, u.HasCapacityTypeTransportQuantity() ) { | 
 |  |  |       traverse ( u, Lane.LaneLeg.Trip, t ) { | 
 |  |  |         traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 ) { | 
 |  |  |         traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 and exists( pit.Product_MP(), AllParent.AsParent, tempP, tempP.ID() = "机加件" ) ) { | 
 |  |  |           // 找行 | 
 |  |  |           tpr := TransferPlanRow::FindTransferPlanRowTypeIndex( TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ), | 
 |  |  |                                                                 TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ), | 
 |  |  | 
 |  |  |       indexDate := indexDate + 1; | 
 |  |  |     } | 
 |  |  |      | 
 |  |  |     // 补齐空格子 | 
 |  |  |     traverse ( macroPlan, TransferPlanRow, tpr ) { | 
 |  |  |       traverse ( macroPlan, TransferPlanColumn, tpc, tpc.ColumnDate() >= minselect( macroPlan, TransferPlanColumn, tempTPC, true, tempTPC.ColumnDate() ).ColumnDate() ) { | 
 |  |  |         cell := select( tpr, TransferPlanCell, tempTPC, tempTPC.TransferPlanColumn() = tpc ); | 
 |  |  |         if ( isnull( cell ) ) { | 
 |  |  |           cell := tpc.TransferPlanCell( relnew, Value := "" ); | 
 |  |  |           cell.TransferPlanRow( relset, tpr ); | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |      | 
 |  |  |     // 生成产品列 | 
 |  |  |     minDateTPC := macroPlan.TransferPlanColumn( relnew, |