1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method IsRoundingOrZeroFilling4 ( 
 |    MacroPlan macroPlan, 
 |    Unit unit 
 |  ) 
 |  { 
 |    Description: '车道整班' 
 |    TextBody: 
 |    [* 
 |      us  := unit.Name().Tokenize( " " ); 
 |      tmq := select( macroPlan, TransferMinimumQuantity, tempTMQ, tempTMQ.FactoryAbbreviation() = us.Element( 0 ) and tempTMQ.ProductID() = us.Element( 3 ) ); 
 |       
 |      if ( not isnull( tmq ) ) { 
 |      //  info( "最小包装lotsize:", tmq.Quantity() ); 
 |        traverse ( unit, Lane.LaneLeg.Trip, t ) { 
 |          needRoundTransferQuantity := tmq.Quantity() - ( [Number]t.Quantity() mod tmq.Quantity() ); 
 |          if ( needRoundTransferQuantity <> 0 and needRoundTransferQuantity <> tmq.Quantity() ) { 
 |      //      info( "时间:", t.Departure().Date().Format( "Y-M2-D2" ), "    余数:", needRoundTransferQuantity ); 
 |            pit := minselect( t, ProductInTrip, tempPIT, tempPIT.Quantity() > 0, tempPIT.Quantity() ); 
 |            pit.Update( pit.Quantity() + needRoundTransferQuantity, true ); 
 |          } 
 |        } 
 |      } 
 |    *] 
 |  } 
 |  
  |