| | |
| | | // 生成下线计划表 |
| | | traverse ( macroPlan, Unit, u, u.HasCapacityTypeTime() |
| | | // and u.Name() = "eMotor Assy (France)" // 测试本地场景时可以过滤 |
| | | // and u.Name() = "CC-MoMo" // 测试实际场景时可以过滤 |
| | | // and u.Name() = "DL-MoMo" // 测试实际场景时可以过滤 |
| | | ) { |
| | | // 创建产线行 |
| | | opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := "", Type := "0" ); |
| | |
| | | previousColumn := indexColumn.PreviousColumn(); |
| | | nextColumn := indexColumn.NextColumn(); |
| | | |
| | | while ( not isnull( indexColumn.NextColumn() ) ) { |
| | | while ( not isnull( indexColumn.NextColumn() ) |
| | | // and indexColumn.ColumnDate() <= Date::Construct( 2024, 4, 16 ) // 测试实际场景时可以过滤 |
| | | ) { |
| | | productionSerialNumber := 1; |
| | | opcs := selectsortedset( indexColumn, OfflinePlanCell, tempOPC, tempOPC.FindType( "2", pl ), tempOPC.InventoryWeight() ); |
| | | initialSize := opcs.Size(); |
| | | if ( opcs.Size() > 0 ) { |
| | | // 判定1 |
| | | previousOPC := maxselect( previousColumn, OfflinePlanCell, tempOPC, tempOPC.FindType( "2", pl ), tempOPC.ProductionSerialNumber() ); |
| | |
| | | exists( nextColumn, OfflinePlanCell, nextOPC, nextOPC.FindType( "2", pl ) and nextOPC.OfflinePlanRow().ProductID() = tempOPC.OfflinePlanRow().ProductID() ) ); |
| | | if ( nextOPCs.Size() = 1 ) { |
| | | opc := nextOPCs.Element( 0 ); |
| | | opc.Value( "#" + opcs.Size().Format( "N(LPad0(2))" ) ); |
| | | opc.ProductionSerialNumber( opcs.Size() ); |
| | | opc.Value( "#" + initialSize.Format( "N(LPad0(2))" ) ); |
| | | opc.ProductionSerialNumber( initialSize ); |
| | | opcs.Remove( opc ); |
| | | } |
| | | |