| | |
| | | } |
| | | } |
| | | |
| | | traverse( row,NewOfflinePlanCell,cell, startDate <= cell.NewOfflinePlanColumn().StartDate() and endDate >= cell.NewOfflinePlanColumn().EndDate()){ |
| | | traverse( row,NewOfflinePlanCell,cell, startDate <= cell.NewOfflinePlanColumn().StartDate() and endDate >= cell.NewOfflinePlanColumn().EndDate() and cell.Quantity() > 0){ |
| | | product := null( DispatchShiftSchedulingProduct ); |
| | | tips := ""; |
| | | if( not isnull( unit )){ |
| | |
| | | productIndex := guard( productIndexTree.Root().Child( productHandle ),null( NamedValue )); |
| | | if( isnull( productIndex )){ |
| | | product := line.DispatchShiftSchedulingProduct( relnew,ProductID := row.ProductID() ); |
| | | product.OrderNumber( cell.OrderNr() ); |
| | | product.ProductionQuantity( cell.Quantity() ); |
| | | products.Add( product ); |
| | | productIndexTree.Root().AddChild( productHandle,products.Size() - 1 ); |
| | |
| | | } |
| | | } |
| | | |
| | | traverse( row,NewAssemblyOnlinePlanCell,cell, startDate <= cell.NewAssemblyOnlinePlanColumn().StartDate() and endDate >= cell.NewAssemblyOnlinePlanColumn().EndDate()){ |
| | | traverse( row,NewAssemblyOnlinePlanCell,cell, startDate <= cell.NewAssemblyOnlinePlanColumn().StartDate() and endDate >= cell.NewAssemblyOnlinePlanColumn().EndDate() and cell.Quantity() > 0){ |
| | | product := null( DispatchShiftSchedulingProduct ); |
| | | tips := ""; |
| | | if( not isnull( unit )){ |
| | |
| | | productIndex := guard( productIndexTree.Root().Child( productHandle ),null( NamedValue )); |
| | | if( isnull( productIndex )){ |
| | | product := line.DispatchShiftSchedulingProduct( relnew,ProductID := row.ProductID() ); |
| | | product.OrderNumber( cell.OrderNr() ); |
| | | product.ProductionQuantity( cell.Quantity() ); |
| | | products.Add( product ); |
| | | productIndexTree.Root().AddChild( productHandle,products.Size() - 1 ); |
| | |
| | | // 481 |
| | | lineQuantity := line.LineQuantity(); |
| | | |
| | | tempProducts := selectsortedset( line,DispatchShiftSchedulingProduct,object,object.ProductionQuantity() ); |
| | | tempProducts := selectsortedset( line,DispatchShiftSchedulingProduct,object,object.OrderNumber() ); |
| | | |
| | | if( line.ShiftName() = "3" ){ |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | for( i := tempProducts.Size() - 1;i >= 0; i-- ){ |
| | | for( i := 0;i < tempProducts.Size(); i++ ){ |
| | | product := tempProducts.Element( i ); |
| | | productionQuantity := product.ProductionQuantity(); |
| | | |
| | |
| | | singleShiftVolume3 := singleShiftVolume3 - productionQuantity; |
| | | productionQuantity := productionQuantity - detail.ShiftVolume(); |
| | | }else{ |
| | | product.DispatchShiftSchedulingDetail( relnew,ShiftVolume := 0 ,SingleShiftName := "三班"); |
| | | if( i = tempProducts.Size() - 1 ){ |
| | | product.DispatchShiftSchedulingDetail( relnew,ShiftVolume := 0 ,SingleShiftName := "三班"); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | for( i := tempProducts.Size() - 1;i >= 0; i-- ){ |
| | | for( i := 0 ;i < tempProducts.Size(); i++ ){ |
| | | product := tempProducts.Element( i ); |
| | | productionQuantity := product.ProductionQuantity(); |
| | | |
| | |
| | | detail := product.DispatchShiftSchedulingDetail( relnew,ShiftVolume := ifexpr( tempProductQuantity > 0 ,productionQuantity,singleShiftVolume2 ) ,SingleShiftName := "二班"); |
| | | singleShiftVolume2 := singleShiftVolume2 - productionQuantity; |
| | | productionQuantity := productionQuantity - detail.ShiftVolume(); |
| | | }else{ |
| | | if( i = tempProducts.Size() - 1 ){ |
| | | product.DispatchShiftSchedulingDetail( relnew,ShiftVolume := 0 ,SingleShiftName := "二班"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | }else if( line.ShiftName() = "1" ){ |
| | | singleShiftVolume1 := lineQuantity; |
| | | |
| | | for( i := tempProducts.Size() - 1;i >= 0; i-- ){ |
| | | for( i := 0 ;i < tempProducts.Size(); i++ ){ |
| | | product := tempProducts.Element( i ); |
| | | productionQuantity := product.ProductionQuantity(); |
| | | if( singleShiftVolume1 > 0 and productionQuantity > 0){ |