| | |
| | | productids.Add( quantityrow.ProductID() ); |
| | | } |
| | | |
| | | pir.PIRData( relnew, Product := quantityrow.ProductID(), PlanningDate := column.StartDate(), PlanningQty := [Number]cell.Value(), Werk := rowwerk ); |
| | | pir.PIRData( relnew, Product := quantityrow.ProductID(), PlanningDate := column.StartDate(), PlanningQty := [Number]cell.Quantity(), Werk := rowwerk ); |
| | | } |
| | | } |
| | | } |
| | |
| | | if( isnull( pirdata ) ){ |
| | | pirdata := pir.PIRData( relnew, Product := row.ProductID(), PlanningDate := column.StartDate(), PlanningQty := 0, Werk := rowwerk ); |
| | | } |
| | | pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Value() ); |
| | | pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Quantity() ); |
| | | } |
| | | } |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | //根据当前版本的装配上线计划 |
| | | interface.AssemblyOnlinePlanVersion( relflush ); |
| | | //interface.AssemblyOnlinePlanVersion( relflush ); |
| | | allunit := AssemblyOnlinePlanVersion::GetDefaultAllUnit(); |
| | | name := AssemblyOnlinePlanVersion::GetDefaultName();//search := |
| | | interface.AssemblyOnlinePlanVersionSearch( relnew, Product := allunit, ProductionLine := allunit, Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );//, TimeUnit := Translations::MP_GlobalParameters_Day() |
| | |
| | | } |
| | | traverse( macroPlan, NewAssemblyOnlinePlanRow, aoprow, aoprow.Type() = '1' ){ |
| | | row := table.GetRow( aoprow ); |
| | | traverse( table, Column, column ){//, aopcolumns.Find( column.StartDate() ) > -1 |
| | | traverse( table, Column, column, exists( aopcolumns, Elements, e, e = column.StartDate() ) ){//, aopcolumns.Find( column.StartDate() ) > -1 |
| | | qty := sum( aoprow, NewAssemblyOnlinePlanCell, aopcell, column.StartDate() <= aopcell.NewAssemblyOnlinePlanColumn().StartDate() |
| | | and column.EndDate() >= aopcell.NewAssemblyOnlinePlanColumn().StartDate(), aopcell.Quantity() ); |
| | | |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | if( isnull( cell ) ){ |
| | | cell := column.Cell( relnew, InventoryWeight := 0, ProductionSerialNumber := 0, Quantity := 0, Shift := '', Value := '' ); |
| | | row.Cell( relinsert, cell ); |
| | | } |
| | | cell.Quantity( qty ); |
| | | } |
| | | } |
| | |
| | | [* |
| | | // 甄兰鸽 Jun-24-2024 (created) |
| | | cell := selectobject( this, Cell, cell, cell.Column() = column ); |
| | | if( isnull( cell ) ){ |
| | | cell := this.Cell( relnew, PlanQuantity := 0, ActualQuantity := 0 ); |
| | | |
| | | column.Cell( relinsert, cell ); |
| | | } |
| | | cell.PlanQuantity( cell.PlanQuantity() + planqty ); |
| | | cell.ActualQuantity( cell.ActualQuantity() + actualaty ); |
| | | *] |
| | |
| | | actproductiontree := NamedValueTree::Create(); |
| | | for( i := 0; i< actproductiondatas.Size(); i++ ){ |
| | | actproduction := actproductiondatas.Element( i ); |
| | | actproductionKey := actproduction.ProductNo() + actproduction.ProductionDate().AsQUILL(); |
| | | linename := actproduction.Fac().Concat( ' ' ); |
| | | if( actproduction.LineName().FindString( '/', 0 ) > -1 ){ |
| | | linenames := actproduction.LineName().Tokenize( '/' ); |
| | | traverse( linenames, Elements, e ){ |
| | | actproductionKey := actproduction.ProductNo() + linename + e + actproduction.ProductionDate().AsQUILL(); |
| | | actproductionhandle := actproductiontree.GetHandle( actproductionKey ); |
| | | actproductiontree.Root().AddChild( actproductionhandle,i ); |
| | | } |
| | | }else{ |
| | | actproductionKey := actproduction.ProductNo() + linename + actproduction.LineName() + actproduction.ProductionDate().AsQUILL(); |
| | | actproductionhandle := actproductiontree.GetHandle( actproductionKey ); |
| | | actproductiontree.Root().AddChild( actproductionhandle,i ); |
| | | } |
| | | } |
| | | |
| | | traverse( noptable, NewOfflinePlanRow, noprow, noprow.Type() = '1' ){ |
| | |
| | | traverse( noprow, NewOfflinePlanCell, nopcell ){ |
| | | column := selectobject( table, Column, column, column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() );//column.TimeUnit() = Translations::MP_GlobalParameters_Day() and |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | actproductionKey := noprow.ProductID() + column.StartDate().AsQUILL(); |
| | | actproductionKey := noprow.ProductID() + noprow.ProductionLine() + column.StartDate().AsQUILL(); |
| | | actproductionhandle:= actproductiontree.GetHandle( actproductionKey ); |
| | | actproductionindex := guard( actproductiontree.Root().Child( actproductionhandle ),null( NamedValue )); |
| | | |
| | | actproductionqty := 0.0; |
| | | if( not isnull( actproductionindex )){ |
| | | actproduction := actproductiondatas.Element( actproductionindex.GetValueAsNumber() ); |
| | | actproductionqty := actproduction.ActualOut(); |
| | | } |
| | | if( isnull( cell ) ){ |
| | | cell := row.Cell( relnew, InventoryWeight := 0, ProductionSerialNumber := 0, Quantity := 0, Shift := '', Value := '' ); |
| | | column.Cell( relinsert, cell ); |
| | | } |
| | | cell.ActualProductionQty( actproductionqty ); |
| | | cell.InventoryWeight( nopcell.InventoryWeight() ); |
| | | cell.Order( nopcell.Order() ); |