¶Ô±ÈÐÂÎļþ |
| | |
| | | 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' |
| | | } |
| | | } |
| | |
| | | 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 ); |
| | | } |
| | | } |
| | | } |
| | |
| | | String unit |
| | | ) |
| | | { |
| | | Description: 'åå§ååå
æ ¼' |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | |
| | | #parent: #root |
| | | Method Initialize ( |
| | | FinancialSalesColumn column, |
| | | Product_MP product, |
| | | String unit |
| | | ) |
| | | { |
| | | Description: 'åå§ååå
æ ¼' |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ 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 ); |
| | |
| | | // 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 ); |
| | | traverse( trip, ProductInTrip, pit ){ |
| | | quantity := [Number]pit.Quantity();//åèäºå
¥ |
| | | dlrow := table.GetRow( dlunit, pit.ProductID() ); |
| | | 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 ); |
| | | } |
| | | } |
| | |
| | | //å¨ |
| | | 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 ); |
| | | } |
| | | } |
| | | } |