| | |
| | | } |
| | | } |
| | | //é¿æ¥çéè¿è¾è´¹ç¨ï¼å®¢æ·éæ±æ°é/å
è£
容é/è£
载容é*è¿è¾åä»·ï¼å®¢æ·éæ±æ°éåèªforecastésales segmentä¸ºé¿æ¥çæ°éæ±æ»ï¼åç¨å
¬å¼è®¡ç®ï¼æåº¦è¿è¡æ±æ»ï¼å客æ·éæ±æ°éæ¢ç®æè½¦æ¬¡ï¼ |
| | | traverse( owner, SalesDemand.astype( Forecast ), forecast, forecast.StartDate() < startofnextyear ){ |
| | | traverse( owner, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.SalesSegment_MP() ) and forecast.StartDate() < startofnextyear ){ |
| | | salessegment := forecast.SalesSegment_MP(); |
| | | parentsalessegments := salessegment.GetAllParent(); |
| | | //æ¯å¦å±äºé¿æ¥ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute EndDate |
| | | { |
| | | #keys: '3[415136.0.999760039][415136.0.999760038][415136.0.999760040]' |
| | | Description: 'ç»ææ¥æ' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute StartDate |
| | | { |
| | | #keys: '3[415136.0.999760029][415136.0.999760028][415136.0.999760030]' |
| | | Description: 'å¼å§æ¥æ' |
| | | ValueType: Date |
| | | } |
| | |
| | | } |
| | | |
| | | for( demandr := showrowdemand.RowNr() + 1; demandr < showrowinventory.RowNr(); demandr := demandr + 1 ){ |
| | | demandrow := selectobject( this, Row, r, r.RowNr() = demandr ); |
| | | demandrow := selectobject( this, Row, r, r.RowNr() = demandr and r.Name() = row.Name() ); |
| | | if( not isnull( demandrow ) and not exists( demandrow, CellValue, cv, cv.Column() = column ) ){ |
| | | demandcell := column.CellValue( relnew, Value := '' ); |
| | | demandrow.CellValue( relinsert, demandcell ); |
| | |
| | | } |
| | | traverse( this, Column, column ){ |
| | | for( demandr := sumrowdemand.RowNr() + 1; demandr < sumrowinventory.RowNr(); demandr := demandr + 1 ){ |
| | | demandrow := selectobject( this, Row, r, r.RowNr() = demandr ); |
| | | demandrow := selectobject( this, Row, r, r.RowNr() = demandr and r.Name() = 'SUM' ); |
| | | // info( '------------------14----------------' ); |
| | | if( not isnull( demandrow ) and not exists( demandrow, CellValue, cv, cv.Column() = column ) ){ |
| | | demandcell := column.CellValue( relnew, Value := '' ); |
| | |
| | | periodtime := period.StartDate(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | this.Column( relnew, Name := periodname, Period := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | this.Column( relnew, Name := periodname, StartDate := periodtime, EndDate := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | } |
| | | |
| | | if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | if( period.StartDate() = weekstart ){ |
| | | weekperiodname := weekstart.Format( "M2/D2/Y" ); |
| | | this.Column( relnew, Name := weekperiodname, Period := weekstart, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | this.Column( relnew, Name := weekperiodname, StartDate := weekstart, EndDate := ( weekstart + Duration::Days( 6 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | weekstart := ( weekstart + Duration::Days( 7 ) ).Date(); |
| | | } |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-7-2024 (created) |
| | | periodname := period.Format( "M2/D2/Y" ); |
| | | //periodname := period.Format( "M2/D2/Y" ); |
| | | |
| | | column := selectobject( this, Column, column, column.Name() = periodname and column.Period() = period and column.TimeUnit() = unit ); |
| | | column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period and column.TimeUnit() = unit ); |
| | | |
| | | return column; |
| | | *] |
| | |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, Cell, cell, cell.Column() = column ); |
| | | |
| | | demand := selectobject( cell, Demand, demand, demand.EngineType() = cell.Row().Name() and demand.Model() = segment and demand.Period() = column.Period() ); |
| | | demand := selectobject( cell, Demand, demand, demand.EngineType() = cell.Row().Name() and demand.Model() = segment and demand.Period() = column.StartDate() ); |
| | | |
| | | if( isnull( demand ) ){ |
| | | demand := cell.Demand( relnew, EngineType := cell.Row().Name(), Period := column.Period(), Model := segment, Quantity := 0 ); |
| | | demand := cell.Demand( relnew, EngineType := cell.Row().Name(), Period := column.StartDate(), Model := segment, Quantity := 0 ); |
| | | } |
| | | |
| | | demand.Quantity( demand.Quantity() + quantity ); |
| | |
| | | production := cell.Production(); |
| | | |
| | | if( isnull( production ) ){ |
| | | production := cell.Production( relnew, EngineType := cell.Row().Name(), Period := column.Period(), DLProduction := 0, CCProduction := 0 ); |
| | | production := cell.Production( relnew, EngineType := cell.Row().Name(), Period := column.StartDate(), DLProduction := 0, CCProduction := 0 ); |
| | | } |
| | | |
| | | if( isccunit ){ |
| | |
| | | //天 |
| | | daycolumn := table.GetColumnByUnit( Translations::MP_GlobalParameters_Day(), pispip.Start().Date() ); |
| | | //å¨ |
| | | weekcolumn := table.GetColumnByUnit( Translations::MP_GlobalParameters_Week(), weekstart ); |
| | | weekcolumn := table.GetColumnByUnit( Translations::MP_GlobalParameters_Week(), pispip.Start().Date() ); |
| | | supplyquantity := [Number]pispip.NewSupplyQuantity();//åèäºå
¥ |
| | | inventoryquantity := [Number]pispip.PlannedInventoryLevelEnd();//åèäºå
¥ |
| | | //äº§éæ¯å æ» |
| | |
| | | } |
| | | |
| | | //çæéæ±æ°æ® |
| | | traverse( owner, SalesDemand.astype( Forecast ), forecast, forecast.StartDate() < endperiod.StartDate() and forecast.Quantity() <> 0 |
| | | traverse( owner, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.SalesSegment_MP() ) and forecast.StartDate() < endperiod.StartDate() and forecast.Quantity() <> 0 |
| | | and exists( forecast.Product_MP().GetAllParent(), Elements, e, e.ID() = productparent ) |
| | | and exists( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 ) ){ |
| | | row := table.GetRow( forecast.ProductID() ); |
| | | weekstart := owner.StartOfPlanning().Date(); |
| | | // weekstart := owner.StartOfPlanning().Date(); |
| | | traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 ){ |
| | | //天 |
| | | daycolumn := table.GetColumnByUnit( Translations::MP_GlobalParameters_Day(), psdip.StartDate() ); |
| | | //å¨ |
| | | weekcolumn := table.GetColumnByUnit( Translations::MP_GlobalParameters_Week(), weekstart ); |
| | | weekcolumn := table.GetColumnByUnit( Translations::MP_GlobalParameters_Week(), psdip.StartDate() ); |
| | | |
| | | if( not isnull( daycolumn ) ){ |
| | | row.SetCellDemandValue( daycolumn, forecast.SalesSegmentName(), forecast.Quantity() ); |
| | |
| | | if( not isnull( weekcolumn ) ){ |
| | | row.SetCellDemandValue( weekcolumn, forecast.SalesSegmentName(), forecast.Quantity() ); |
| | | } |
| | | if( psdip.StartDate() = ( weekstart + Duration::Days( 6 ) ).Date() or psdip.PeriodStart() = endperiod.StartDate() ){ |
| | | weekstart := ( weekstart + Duration::Days( 7 ) ).Date(); |
| | | } |
| | | // if( psdip.StartDate() = ( weekstart + Duration::Days( 6 ) ).Date() or psdip.PeriodStart() = endperiod.StartDate() ){ |
| | | // weekstart := ( weekstart + Duration::Days( 7 ) ).Date(); |
| | | // } |
| | | } |
| | | } |
| | | |
| | |
| | | table.GenerateColumn( owner ); |
| | | |
| | | //é¦å
å¨forecastç颿¥æ¾sales segmentä¸ºé¿æ¥çææéæ±ï¼è¯å«åºMLBçææäº§åï¼æ¯ä¸ªäº§åæææ±æ»éæ±æ°é |
| | | traverse( owner, SalesDemand.astype( Forecast ), forecast, forecast.StartDate() < startofnextyear and forecast.Quantity() <> 0 |
| | | traverse( owner, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.SalesSegment_MP() ) and forecast.StartDate() < startofnextyear and forecast.Quantity() <> 0 |
| | | and exists( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 ) ){ |
| | | salessegment := forecast.SalesSegment_MP(); |
| | | parentsalessegments := salessegment.GetAllParent(); |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'é¿æ¥æºå 产线'; |
| | | return 'é¿æ¥æºå 线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'å¤§è¿æºå 产线'; |
| | | return 'å¤§è¿æºå 线'; |
| | | //return 'Assembly Plant (Spain)'; |
| | | *] |
| | | } |