Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation FinancialSalesImportData_Cell_FinancialSalesCell_FSImportData |
| | | { |
| | | #keys: '1[415136.0.984654733]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide Cell |
| | | { |
| | | #keys: '3[415136.0.984654735][415136.0.984654734][415136.0.984654736]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: FinancialSalesImportData |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide FSImportData |
| | | { |
| | | #keys: '3[415136.0.984654738][415136.0.984654737][415136.0.984654739]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: FinancialSalesCell |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation FinancialSalesImportData_MacroPlan_MacroPlan_FSImportData |
| | | { |
| | | #keys: '1[415136.0.984654720]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide MacroPlan |
| | | { |
| | | #keys: '3[415136.0.984654722][415136.0.984654721][415136.0.984654723]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: FinancialSalesImportData |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide FSImportData |
| | | { |
| | | #keys: '3[415136.0.984654725][415136.0.984654724][415136.0.984654726]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: MacroPlan |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
| | |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | table := selectobject( this, Source.Report, report, not report.IsShow() ); |
| | | |
| | | //æ¸
空ä¹ååå¨çæ¾ç¤ºæ°æ® |
| | | this.Clear( search.TimeUnit(), search.StartDate(), search.EndDate() ); |
| | | Transaction::Transaction().Propagate( attribute( EnginePipelineColumn, Index ) ); |
| | |
| | | showrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'é¿æ¥äº§é', rownr + 2, false ); |
| | | showrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'éæ±', rownr + 3, false ); |
| | | rownr := rownr + 4; |
| | | traverse( models, Elements, model ){ |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), model, rownr, false ); |
| | | modelsnr := rownr + 3; |
| | | models := construct( Strings ); |
| | | uniquemodels := selectuniquevalues( row, Cell.Demand, demand, true, demand.Model() ); |
| | | |
| | | traverse( uniquemodels, Elements, e ){ |
| | | |
| | | if( rownr < modelsnr ){ |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), e, rownr, false ); |
| | | models.Add( e ); |
| | | rownr := rownr + 1; |
| | | } |
| | | } |
| | | |
| | | for( rownr := rownr; rownr < modelsnr; rownr ++ ){ |
| | | |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '', rownr, false ); |
| | | rownr := rownr + 1; |
| | | } |
| | | showrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'åºå', rownr, false ); |
| | |
| | | production := column.CellValue( relnew, Value := [String]cell.ProductionQuantity() ); |
| | | showrowproduction.CellValue( relinsert, production ); |
| | | sumproduction := selectobject( column, CellValue, c, c.Row() = sumrowproduction ); |
| | | |
| | | if( isnull( sumproduction ) ){ |
| | | sumproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowproduction.CellValue( relinsert, sumproduction ); |
| | |
| | | dlproduction := column.CellValue( relnew, Value := [String]dlproductionquantity ); |
| | | showrowdlproduction.CellValue( relinsert, dlproduction ); |
| | | sumdlproduction := selectobject( column, CellValue, c, c.Row() = sumrowdlproduction ); |
| | | |
| | | if( isnull( sumdlproduction ) ){ |
| | | sumdlproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowdlproduction.CellValue( relinsert, sumdlproduction ); |
| | |
| | | ccproduction := column.CellValue( relnew, Value := [String]ccproductionquantity ); |
| | | showrowccproduction.CellValue( relinsert, ccproduction ); |
| | | sumccproduction := selectobject( column, CellValue, c, c.Row() = sumrowccproduction ); |
| | | |
| | | if( isnull( sumccproduction ) ){ |
| | | sumccproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowccproduction.CellValue( relinsert, sumccproduction ); |
| | |
| | | } |
| | | sumdemand.Value( [String]( [Real]sumdemand.Value() + cell.DemandQuantity() ) ); |
| | | |
| | | traverse( cell, Demand, demand ){ |
| | | demandrow := selectobject( this, Row, r, r.Name() = row.Name() and exists( r, CellValue, cv, cv.Value() = demand.Model() ) ); |
| | | sumdemandrow := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Value() = demand.Model() ) ); |
| | | traverse( cell, Demand, demand, exists( models, Elements, model, model = demand.Model() ) ){ |
| | | demandrow := selectobject( this, Row, r, r.Name() = row.Name() and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model() ) ); |
| | | sumdemandrow := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model() ) ); |
| | | |
| | | if( not isnull( demandrow ) ){ |
| | | demandcell := column.CellValue( relnew, Value := [String]demand.Quantity() ); |
| | | demandrow.CellValue( relinsert, demandcell ); |
| | | } |
| | | |
| | | if( not isnull( sumdemandrow ) ){ |
| | | sumdemandcell := selectobject( column, CellValue, c, c.Row() = sumdemandrow ); |
| | | if( isnull( sumdemandcell ) ){ |
| | | sumdemandcell := column.CellValue( relnew, Value := [String]0 ); |
| | | sumdemandrow.CellValue( relinsert, sumdemandcell ); |
| | | } |
| | | sumdemandcell.Value( [String]( [Real]sumdemandcell.Value() + demand.Quantity() ) ); |
| | | } |
| | | } |
| | | |
| | | for( demandr := showrowdemand.RowNr() + 1; demandr < showrowinventory.RowNr(); demandr := demandr + 1 ){ |
| | |
| | | traverse( this, Column, column ){ |
| | | for( demandr := sumrowdemand.RowNr() + 1; demandr < sumrowinventory.RowNr(); demandr := demandr + 1 ){ |
| | | demandrow := selectobject( this, Row, r, r.RowNr() = demandr ); |
| | | // info( '------------------14----------------' ); |
| | | if( not isnull( demandrow ) and not exists( demandrow, CellValue, cv, cv.Column() = column ) ){ |
| | | demandcell := column.CellValue( relnew, Value := '' ); |
| | | demandrow.CellValue( relinsert, demandcell ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | rows := selectsortedset( this, Row, row, row.Name(), row.RowNr() ); |
| | | i := 0; |
| | | traverse( rows, Elements, e ){ |
| | | e.RowNr( i ); |
| | | i := i + 1; |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultCCALineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'é¿æ¥è£
é
线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultCCMPLineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'é¿æ¥æºå 线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultDLALineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return '大è¿è£
é
线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultDLMPLineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'å¤§è¿æºå 线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
| | |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | owner.EnginePipelineSource( relflush ); |
| | | ccunit := EnginePipelineReport::GetDefaultCCUnit(); |
| | | dlunit := EnginePipelineReport::GetDefaultDLUnit(); |
| | | //ccunit := EnginePipelineReport::GetDefaultCCUnit(); |
| | | //dlunit := EnginePipelineReport::GetDefaultDLUnit(); |
| | | ccalineunit := FinancialProductionReport::GetDefaultCCALineUnit(); |
| | | dlalienunit := FinancialProductionReport::GetDefaultDLALineUnit() |
| | | ccmplineunit := FinancialProductionReport::GetDefaultCCMPLineUnit() |
| | | dlmplineunit := FinancialProductionReport::GetDefaultDLMPLineUnit(); |
| | | //allunit := EnginePipelineReport::GetDefaultAllUnit(); |
| | | source := owner.EnginePipelineSource( relnew, Name := EnginePipelineReport::GetDefaultName() ); |
| | | table := source.Report( relnew, ID := source.Name(), Name := source.Name() ); |
| | |
| | | unit := stockingpoint.Unit(); |
| | | parentunits := unit.GetAllParent(); |
| | | //æ¯å¦å±äºé¿æ¥å·¥å |
| | | iscc := unit.ID() = ccunit or exists( parentunits, Elements, punit, punit.ID() = ccunit ); |
| | | iscc := unit.ID() = ccalineunit or unit.ID() = ccmplineunit or exists( parentunits, Elements, punit, punit.ID() = ccalineunit or punit.ID() = ccmplineunit ); |
| | | //æ¯å¦å±äºå¤§è¿å·¥å |
| | | isdl := unit.ID() = dlunit or exists( parentunits, Elements, punit, punit.ID() = dlunit ); |
| | | isdl := unit.ID() = dlalienunit or unit.ID() = dlmplineunit or exists( parentunits, Elements, punit, punit.ID() = dlalienunit or punit.ID() = dlmplineunit ); |
| | | |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and not pisp.IsSystem() ){ |
| | | weekstart := owner.StartOfPlanning().Date(); |
| | |
| | | daycolumn := table.GetColumnByUnit( Translations::MP_GlobalParameters_Day(), pispip.Start().Date() ); |
| | | //å¨ |
| | | weekcolumn := table.GetColumnByUnit( Translations::MP_GlobalParameters_Week(), weekstart ); |
| | | supplyquantity := [Real]ceil( pispip.NewSupplyQuantity() );//åä¸åæ´ |
| | | inventoryquantity := [Real]ceil( pispip.PlannedInventoryLevelEnd() );//åä¸åæ´ |
| | | supplyquantity := [Number]pispip.NewSupplyQuantity();//åèäºå
¥ |
| | | inventoryquantity := [Number]pispip.PlannedInventoryLevelEnd();//åèäºå
¥ |
| | | //äº§éæ¯å æ» |
| | | if( iscc or isdl ){ |
| | | row.SetCellProductionValue( daycolumn, iscc, supplyquantity ); |
| | | row.SetCellProductionValue( weekcolumn, iscc, supplyquantity ); |
| | | row.SetCellProductionValue( daycolumn, iscc, [Real]supplyquantity ); |
| | | row.SetCellProductionValue( weekcolumn, iscc, [Real]supplyquantity ); |
| | | } |
| | | //åºåéè¦åæåä¸å¤© |
| | | row.SetCellInventoryValue( daycolumn, pispip.PlannedInventoryLevelEnd() ); |
| | | row.SetCellInventoryValue( daycolumn, [Real]inventoryquantity ); |
| | | |
| | | if( pispip.Start() = weekstart + Duration::Days( 6 ) or pispip.Period_MP() = endperiod ){ |
| | | weekstart := ( weekstart + Duration::Days( 7 ) ).Date(); |
| | | |
| | | row.SetCellInventoryValue( weekcolumn, inventoryquantity ); |
| | | row.SetCellInventoryValue( weekcolumn, [Real]inventoryquantity ); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultCCALineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'é¿æ¥è£
é
线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultCCMPLineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'é¿æ¥æºå 线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultDLALineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return '大è¿è£
é
线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultDLMPLineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'å¤§è¿æºå 线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
| | |
| | | String unit |
| | | ) |
| | | { |
| | | Description: 'åå§ååå
æ ¼' |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | |
| | | owner.FPImportData( relflush ); |
| | | ccunit := FinancialProductionReport::GetDefaultCCUnit(); |
| | | dlunit := FinancialProductionReport::GetDefaultDLUnit(); |
| | | ccalineunit := FinancialProductionReport::GetDefaultCCALineUnit(); |
| | | dlalienunit := FinancialProductionReport::GetDefaultDLALineUnit() |
| | | ccmplineunit := FinancialProductionReport::GetDefaultCCMPLineUnit() |
| | | dlmplineunit := FinancialProductionReport::GetDefaultDLMPLineUnit(); |
| | | allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | source := owner.FinancialProductionSource( relnew, IsImport := false, Name := FinancialProductionReport::GetDefaultName() ); |
| | | table := source.FinancialProductionReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false ); |
| | |
| | | unit := stockingpoint.Unit(); |
| | | parentunits := unit.GetAllParent(); |
| | | //æ¯å¦å±äºé¿æ¥å·¥å |
| | | iscc := unit.ID() = ccunit or exists( parentunits, Elements, punit, punit.ID() = ccunit ); |
| | | iscc := unit.ID() = ccalineunit or unit.ID() = ccmplineunit or exists( parentunits, Elements, punit, punit.ID() = ccalineunit or punit.ID() = ccmplineunit ); |
| | | //æ¯å¦å±äºå¤§è¿å·¥å |
| | | isdl := unit.ID() = dlunit or exists( parentunits, Elements, punit, punit.ID() = dlunit ); |
| | | isdl := unit.ID() = dlalienunit or unit.ID() = dlmplineunit or exists( parentunits, Elements, punit, punit.ID() = dlalienunit or punit.ID() = dlmplineunit ); |
| | | if( iscc or isdl ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() ){ |
| | | //è·åå·¥åè¡ |
| | |
| | | ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | quantity := ceil( pispip.NewSupplyQuantity() );//åä¸åæ´ |
| | | quantity := [Number]pispip.NewSupplyQuantity();//åèäºå
¥ |
| | | |
| | | column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Generation |
| | | { |
| | | #keys: '3[415136.0.984654696][415136.0.984654695][415136.0.984654697]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MqbMlb |
| | | { |
| | | #keys: '3[415136.0.984654699][415136.0.984654698][415136.0.984654700]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Power |
| | | { |
| | | #keys: '3[415136.0.984654702][415136.0.984654701][415136.0.984654703]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ProductID |
| | | { |
| | | #keys: '3[415136.0.984654705][415136.0.984654704][415136.0.984654706]' |
| | | Description: '产åID' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Quantity |
| | | { |
| | | #keys: '3[415136.0.984654708][415136.0.984654707][415136.0.984654709]' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute StartDate |
| | | { |
| | | #keys: '3[415136.0.984654711][415136.0.984654710][415136.0.984654712]' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Unit |
| | | { |
| | | #keys: '3[415136.0.984654714][415136.0.984654713][415136.0.984654715]' |
| | | Description: 'å·¥ååç§°' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Generation |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: MqbMlb |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Power |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: ProductID |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Unit |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcQuantity |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-9-2024 (created) |
| | | |
| | | value := guard( [Number]this.Cell().Value(), 0 ); |
| | | |
| | | this.Quantity( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type FinancialSalesImportData |
| | | { |
| | | #keys: '5[415136.0.984654693][415136.0.984654691][0.0.0][415136.0.984654692][415136.0.984654694]' |
| | | BaseType: Object |
| | | Description: 'è´¢å¡éæ¥è¡¨äºç»´è¡¨' |
| | | StructuredName: 'FinancialSalesImportDatas' |
| | | } |
| | |
| | | #parent: #root |
| | | Method GetRow ( |
| | | String salessegment, |
| | | String product |
| | | Product_MP product |
| | | ) as FinancialSalesRow |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | row := selectobject( this, FinancialSalesRow, row, row.Name() = product and row.Unit() = salessegment ); |
| | | row := selectobject( this, FinancialSalesRow, row, row.Name() = product.ID() and row.Unit() = salessegment ); |
| | | |
| | | if( isnull( row ) ){ |
| | | row := this.FinancialSalesRow( relnew, Name := product, Unit := salessegment ); |
| | | row := this.FinancialSalesRow( relnew, Name := product.ID(), Unit := salessegment ); |
| | | //åå§ååå
æ ¼ |
| | | row.InitializeCell( this ); |
| | | row.InitializeCell( this, product ); |
| | | } |
| | | |
| | | return row; |
| | |
| | | // çå
°é¸½ Aug-5-2024 (created) |
| | | unit := sp.Unit(); |
| | | parentunits := unit.GetAllParent(); |
| | | return unit.ID() = unitname or exists( parentunits, Elements, punit, punit.ID() = unitname ); |
| | | return sp.ID() = unitname or unit.ID() = unitname or exists( parentunits, Elements, punit, punit.ID() = unitname ); |
| | | *] |
| | | } |
| | |
| | | #parent: #root |
| | | Method Initialize ( |
| | | FinancialSalesColumn column, |
| | | Product_MP product, |
| | | String unit |
| | | ) |
| | | { |
| | | Description: 'åå§ååå
æ ¼' |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := column.FinancialSalesCell( relnew, Value := '' ); |
| | | |
| | | this.FinancialSalesCell( relinsert, cell ); |
| | | if( unit <> FinancialProductionReport::GetDefaultAllUnit() ){ |
| | | importdata := product.MacroPlan().FSImportData( relnew, Generation := product.Generation() |
| | | , MqbMlb := product.MQBMLB() |
| | | , Power := product.Power() |
| | | , ProductID := product.ID() |
| | | , StartDate := column.Period() |
| | | , Unit := unit ); |
| | | importdata.Cell( relset, cell ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method InitializeCell ( |
| | | FinancialSalesReport table |
| | | FinancialSalesReport table, |
| | | Product_MP product |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | traverse( table, FinancialSalesColumn, column ){ |
| | | this.Initialize( column, this.Unit() ); |
| | | this.Initialize( column, product, this.Unit() ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | if( ( iscc and forecast.Product_MP().MQBMLB() = 'MLB' ) or isdl ){ |
| | | product := forecast.Product_MP(); |
| | | //è·ååè®¡è¡ |
| | | allrow := table.GetRow( allunit, product.ID() ); |
| | | allrow := table.GetRow( allunit, product ); |
| | | //è·åå·¥åè¡ |
| | | factoryrow := table.GetRow( ifexpr( iscc and forecast.Product_MP().MQBMLB() = 'MLB', ccunit, dlunit ), product.ID() ); |
| | | factoryrow := table.GetRow( ifexpr( iscc and forecast.Product_MP().MQBMLB() = 'MLB', ccunit, dlunit ), product ); |
| | | |
| | | if( products.Find( product ) < 0 ){ |
| | | products.Add( product ); |
| | |
| | | // info( '-------------------------', periodname, periodtime ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | // info( '-------------------------', column.Name() ); |
| | | quantity := ceil( psdip.Quantity() );//åä¸åæ´ |
| | | quantity := [Number]psdip.Quantity();//åèäºå
¥ |
| | | |
| | | factoryrow.Initialize( column, quantity ); |
| | | allrow.Initialize( column, quantity ); |
| | |
| | | // iscc := unit.ID() = ccspline or exists( parentunits, Elements, punit, punit.ID() = ccspline ); |
| | | if( table.IsInUnit( stockingpoint, ccspline ) ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and pisp.Product_MP().MQBMLB() = 'MQB' ){//产å为MQB |
| | | allrow := table.GetRow( allunit, pisp.ProductID() ); |
| | | ccrow := table.GetRow( ccunit, pisp.ProductID() ); |
| | | allrow := table.GetRow( allunit, pisp.Product_MP() ); |
| | | ccrow := table.GetRow( ccunit, pisp.Product_MP() ); |
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | quantity := ceil( pispip.DependentDemandAndSalesDemandQuantity() );//åä¸åæ´ |
| | | quantity := [Number]pispip.DependentDemandAndSalesDemandQuantity();//åèäºå
¥ |
| | | |
| | | ccrow.Initialize( column, quantity );//åTotal Demandåæ®µæææ±æ»éæ±æ°é |
| | | allrow.Initialize( column, quantity ); |
| | |
| | | |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | traverse( trip, ProductInTrip, pit ){ |
| | | quantity := ceil( pit.Quantity() );//åä¸åæ´ |
| | | dlrow := table.GetRow( dlunit, pit.ProductID() ); |
| | | quantity := [Number]pit.Quantity();//åèäºå
¥ |
| | | dlrow := table.GetRow( dlunit, pit.Product_MP() ); |
| | | dlrow.Initialize( column, quantity );//æ±æ»æ°é |
| | | |
| | | allrow := table.GetRow( allunit, pit.ProductID() ); |
| | | allrow := table.GetRow( allunit, pit.Product_MP() ); |
| | | allrow.Initialize( column, quantity ); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultCCALineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'é¿æ¥è£
é
线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultCCMPLineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'é¿æ¥æºå 线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultDLALineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return '大è¿è£
é
线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultDLMPLineUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'å¤§è¿æºå 线'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
| | |
| | | allunit := InventorySummaryReport::GetDefaultAllUnit(); |
| | | ccunit := InventorySummaryReport::GetDefaultCCUnit(); |
| | | dlunit := InventorySummaryReport::GetDefaultDLUnit(); |
| | | ccalineunit := FinancialProductionReport::GetDefaultCCALineUnit(); |
| | | dlalienunit := FinancialProductionReport::GetDefaultDLALineUnit() |
| | | ccmplineunit := FinancialProductionReport::GetDefaultCCMPLineUnit() |
| | | dlmplineunit := FinancialProductionReport::GetDefaultDLMPLineUnit(); |
| | | |
| | | source := owner.InventorySummarySource( relnew, ID := InventorySummaryReport::GetDefaultName(), Name := InventorySummaryReport::GetDefaultName() ); |
| | | table := source.InventorySummaryReport( relnew, ID := source.Name(), Name := source.Name() ); |
| | |
| | | unit := stockingpoint.Unit(); |
| | | parentunits := unit.GetAllParent(); |
| | | //æ¯å¦å±äºé¿æ¥å·¥å |
| | | iscc := unit.ID() = ccunit or exists( parentunits, Elements, punit, punit.ID() = ccunit ); |
| | | iscc := unit.ID() = ccalineunit or unit.ID() = ccmplineunit or exists( parentunits, Elements, punit, punit.ID() = ccalineunit or punit.ID() = ccmplineunit ); |
| | | //æ¯å¦å±äºå¤§è¿å·¥å |
| | | isdl := unit.ID() = dlunit or exists( parentunits, Elements, punit, punit.ID() = dlunit ); |
| | | isdl := unit.ID() = dlalienunit or unit.ID() = dlmplineunit or exists( parentunits, Elements, punit, punit.ID() = dlalienunit or punit.ID() = dlmplineunit ); |
| | | if( iscc or isdl ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() ){ |
| | | //è·åå·¥åè¡ |
| | |
| | | //å¨ |
| | | weekcolumn := table.GetColumnByUnit( Translations::MP_GlobalParameters_Week(), weekstart ); |
| | | |
| | | supplyquantity := [Real]ceil( pispip.NewSupplyQuantity() );//åä¸åæ´ |
| | | inventoryquantity := [Real]ceil( pispip.PlannedInventoryLevelEnd() );//åä¸åæ´ |
| | | supplyquantity := [Number]pispip.NewSupplyQuantity();//åèäºå
¥ |
| | | inventoryquantity := [Number]pispip.PlannedInventoryLevelEnd();//åèäºå
¥ |
| | | |
| | | //è£
é
线 |
| | | if( isccassemnly or isdlassemnly ){ |
| | | row.SetCellAssemblyValue( daycolumn, isccassemnly, supplyquantity ); |
| | | row.SetCellAssemblyValue( weekcolumn, isccassemnly, supplyquantity ); |
| | | row.SetCellAssemblyValue( daycolumn, isccassemnly, [Real]supplyquantity ); |
| | | row.SetCellAssemblyValue( weekcolumn, isccassemnly, [Real]supplyquantity ); |
| | | } |
| | | |
| | | //æºå 线 |
| | | if( isccproduction or isdlproduction ){ |
| | | row.SetCellProductionValue( daycolumn, isccproduction, supplyquantity ); |
| | | row.SetCellProductionValue( weekcolumn, isccproduction, supplyquantity ); |
| | | row.SetCellProductionValue( daycolumn, isccproduction, [Real]supplyquantity ); |
| | | row.SetCellProductionValue( weekcolumn, isccproduction, [Real]supplyquantity ); |
| | | } |
| | | //åºå |
| | | if( iscc or isdl ){ |
| | | row.SetCellInventoryValue( daycolumn, iscc, inventoryquantity ); |
| | | row.SetCellInventoryValue( daycolumn, iscc, [Real]inventoryquantity ); |
| | | if( pispip.Start() = weekstart + Duration::Days( 6 ) or pispip.Period_MP() = endperiod ){ |
| | | weekstart := ( weekstart + Duration::Days( 7 ) ).Date(); |
| | | row.SetCellInventoryValue( weekcolumn, iscc, inventoryquantity ); |
| | | row.SetCellInventoryValue( weekcolumn, iscc, [Real]inventoryquantity ); |
| | | } |
| | | } |
| | | } |