Merge remote-tracking branch 'origin/dev' into dev
已重命名2个文件
已添加30个文件
已修改15个文件
已删除6个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GetCurrentPeriod ( |
| | | Date startofplanning, |
| | | Period_MPs periods |
| | | ) as owning Period_MPs |
| | | { |
| | | Description: 'è·åå½åæç计å卿---------------åºå¼' |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-2-2024 (created) |
| | | //å¼å§æ¥æå°ä¸ä¸ªæçé´éå¤©æ° |
| | | currentperiods := construct( Period_MPs ); |
| | | startofnextmonth := startofplanning.StartOfNextMonth(); |
| | | //ç¹æ®æ
åµï¼å½å¼å§æ¥ææ£å¥½æ¯è¿ä¸ªæç¬¬ä¸å¤©ï¼ åç´æ¥ä½¿ç¨TimeUnit为æçæ°æ® |
| | | if( startofplanning.StartOfMonth() = startofplanning ){ |
| | | period := selectobject( periods, Elements, period, period.TimeUnit() = Translations::MP_GlobalParameters_Month() and period.StartDate() = startofplanning ); |
| | | currentperiods.Add( period ); |
| | | } else if( startofplanning.StartOfWeek() = startofplanning ){ |
| | | //ç¹æ®æ
åµï¼å½å¼å§æ¥ææ£å¥½æ¯è¿ä¸ªå¨ç¬¬ä¸å¤©ï¼ åç´æ¥ä½¿ç¨TimeUnit为å¨çæ°æ®ï¼ è·¨å¨æ¶ä½¿ç¨day |
| | | traverse( periods, Elements, period, ( period.TimeUnit() = Translations::MP_GlobalParameters_Week() and period.StartDate() < startofnextmonth ) |
| | | or ( period.TimeUnit() = Translations::MP_GlobalParameters_Day() and period.EndDate() = startofnextmonth ) ){ |
| | | currentperiods.Add( period ); |
| | | } |
| | | } else { |
| | | duration := startofplanning.StartOfNextMonth() - startofplanning; |
| | | //å¦æè®¡åå¼å§æ¥æå°ä¸ä¸ªæå°äº7天ï¼åå¯ä»¥ç´æ¥ä½¿ç¨PeriodçTimeUnitä¸ºå¤©çæ°æ® |
| | | if( duration <= 7 ){ |
| | | i := 1; |
| | | traverse( periods, Elements, period, period.TimeUnit() = Translations::MP_GlobalParameters_Day() and i < duration ){ |
| | | currentperiods.Add( period ); |
| | | i ++; |
| | | } |
| | | }else{ |
| | | //åä¹éè¦å¨å ä¸PeriodçTimeUnit为å¨çæ°æ® |
| | | day := startofplanning; |
| | | while( day < startofnextmonth ){ |
| | | if( day = day.StartOfWeek() ){ |
| | | period := selectobject( periods, Elements, cperiod, cperiod.TimeUnit() = Translations::MP_GlobalParameters_Week() and cperiod.StartDate() = day ); |
| | | day := period.EndDate(); |
| | | currentperiods.Add( period ); |
| | | } else { |
| | | period := selectobject( periods, Elements, cperiod, cperiod.TimeUnit() = Translations::MP_GlobalParameters_Day() and cperiod.StartDate() = day ); |
| | | day := period.EndDate(); |
| | | currentperiods.Add( period ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ¤tperiods; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GetRowByUnit ( |
| | | String product, |
| | | String unit |
| | | ) as FinancialProductionRow |
| | | { |
| | | Description: 'æ ¹æ®å·¥åè·åè¡' |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-2-2024 (created) |
| | | row := selectobject( this, FinancialProductionRow, row, row.Name() = product and row.Unit() = unit ); |
| | | if( isnull( row ) ){ |
| | | //åå§ååå
æ ¼ |
| | | row := this.FinancialProductionRow( relnew, Name := product, Unit := unit ); |
| | | traverse( this, FinancialProductionColumn, column ){ |
| | | row.Initialize( column, unit ); |
| | | } |
| | | } |
| | | return row; |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'é¿æ¥'; |
| | | return 'é¿æ¥å·¥å'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return '大è¿'; |
| | | return '大è¿å·¥å'; |
| | | //return 'Assembly Plant (Spain)'; |
| | | *] |
| | | } |
| | |
| | | #parent: #root |
| | | Method Initialize ( |
| | | FinancialProductionColumn column, |
| | | Real quantity |
| | | Number quantity |
| | | ) |
| | | { |
| | | TextBody: |
| | |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, FinancialProductionCell, cell, cell.FinancialProductionColumn() = column ); |
| | | |
| | | value := [Real]cell.Value() + quantity; |
| | | value := [Number]cell.Value() + quantity; |
| | | cell.Value( [String]value ); |
| | | *] |
| | | } |
| | |
| | | source := owner.FinancialProductionSource( relnew, IsImport := false, Name := FinancialProductionReport::GetDefaultName() ); |
| | | table := source.FinancialProductionReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false ); |
| | | showtable := source.FinancialProductionReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true ); |
| | | startofplanning := owner.StartOfPlanning(); |
| | | startofnextmonth := owner.StartOfPlanning().StartOfNextMonth(); |
| | | startofyear := startofplanning.StartOfYear(); |
| | | startofplanning := owner.StartOfPlanning().Date(); |
| | | //startofnextmonth := startofplanning.StartOfNextMonth(); |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | search := source.FinancialProductionSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit ); |
| | | |
| | | products := construct( Product_MPs ); |
| | | |
| | | //éè¦çæ¥æåºé´ï¼ å¨å天çåªéè¦å½åæ |
| | | //periods := selectset( owner, Period_MP, period, not period.IsHistorical() |
| | | // and period.StartDate() < startofnextmonth |
| | | // and period.TimeUnit() <> Translations::MP_GlobalParameters_Quarter() |
| | | // ); |
| | | //è·åå½åæéè¦çPeriod |
| | | //currentperiods := table.GetCurrentPeriod( startofplanning, periods ); |
| | | table.GenerateColumn( owner ); |
| | | |
| | | traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){ |
| | | unit := pisp.StockingPoint_MP().UnitID(); |
| | | info( unit, pisp.ProductID() ); |
| | | ccrow := null( FinancialProductionRow ); |
| | | dlrow := null( FinancialProductionRow ); |
| | | allrow := selectobject( table, FinancialProductionRow, row, row.Name() = pisp.ProductID() and row.Unit() = allunit ); |
| | | if( unit = ccunit ){ |
| | | ccrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := unit ); |
| | | }else{ |
| | | dlrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := unit ); |
| | | } |
| | | if( isnull( allrow ) ){ |
| | | //åå½åçæ¬çproduct planningénew supplyåæ®µï¼å大è¿åé¿æ¥å·¥åç产线ï¼è¿è¡å æ» |
| | | traverse( owner, StockingPoint_MP, stockingpoint ){ |
| | | unit := stockingpoint.Unit(); |
| | | parentunits := unit.GetAllParent(); |
| | | //æ¯å¦å±äºé¿æ¥å·¥å |
| | | iscc := unit.ID() = ccunit or exists( parentunits, Elements, punit, punit.ID() = ccunit ); |
| | | //æ¯å¦å±äºå¤§è¿å·¥å |
| | | isdl := unit.ID() = dlunit or exists( parentunits, Elements, punit, punit.ID() = dlunit ); |
| | | if( iscc or isdl ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() ){ |
| | | //è·åå·¥åè¡ |
| | | factoryrow := table.GetRowByUnit( pisp.ProductID(), ifexpr( iscc, ccunit, dlunit ) ); |
| | | //è·ååè®¡è¡ |
| | | allrow := table.GetRowByUnit( pisp.ProductID(), allunit ); |
| | | products.Add( pisp.Product_MP() ); |
| | | allrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := allunit ); |
| | | } |
| | | |
| | | for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){ |
| | | periodtime := start.Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | |
| | | if( not isnull( ccrow ) ){ |
| | | ccrow.Initialize( column, ccunit ); |
| | | } |
| | | if( not isnull( dlrow ) ){ |
| | | dlrow.Initialize( column, dlunit ); |
| | | } |
| | | if( not exists( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = column ) ){ |
| | | allrow.Initialize( column, allunit ); |
| | | } |
| | | } |
| | | |
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, pispip.Start() >= startofplanning |
| | | and ( ( pispip.Start() < startofnextmonth and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day() ) |
| | | or ( pispip.Start() < startofnextyear and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Month() ) ) ){ |
| | | //å½product planningçæ¥æåºé´å¨éè¦çæ¥æåºé´å
|
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear |
| | | // and ( ( pispip.Period_MP().StartDate().StartOfMonth() = startofplanning.StartOfMonth() and currentperiods.Find( pispip.Period_MP() ) >= 0 ) |
| | | // or ( pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Month() and pispip.Period_MP().StartDate() < startofnextyear ) ) |
| | | ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | quantity := ceil( pispip.NewSupplyQuantity() );//åä¸åæ´ |
| | | |
| | | column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | |
| | | if( not isnull( ccrow ) ){ |
| | | ccrow.Initialize( column, pispip.NewSupplyProductionQuantity() ); |
| | | } |
| | | if( not isnull( dlrow ) ){ |
| | | dlrow.Initialize( column, pispip.NewSupplyProductionQuantity() ); |
| | | } |
| | | allrow.Initialize( column, pispip.NewSupplyProductionQuantity() ); |
| | | factoryrow.Initialize( column, quantity ); |
| | | allrow.Initialize( column, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | rows := selectsortedset( table, FinancialProductionRow, row, row.Name() ); |
| | | i := 0; |
| | | traverse( rows, Elements, e ){ |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | return 'é¿æ¥'; |
| | | return 'é¿æ¥å·¥ç¨'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | return '大è¿'; |
| | | return '大è¿å·¥å'; |
| | | //return 'Assembly Plant (Spain)'; |
| | | *] |
| | | } |
| | |
| | | table.GenerateColumn( owner, 'All', startofyear, startofnextyear ); |
| | | //info( '-----------------------------------', table.InventorySummaryColumn( relsize ) ); |
| | | //åºåæ°é为Actual inventorieséé¢çç¹Planned inventoriesåæ®µåºåéå æ» |
| | | traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.IsLeaf() and not pisp.IsSystem() and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){ |
| | | traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.IsLeaf() and not pisp.IsSystem() and not isnull( pisp.StockingPoint_MP() ) and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){ |
| | | unit := pisp.StockingPoint_MP().UnitID(); |
| | | product := pisp.Product_MP(); |
| | | // info( '-----------------------------------', unit, product.ID() ); |
| | |
| | | feedback_o := Translations::MP_LibCal_Event_ValidDate(); |
| | | } |
| | | return feedback_o = ''; |
| | | //return true; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MaxDayDate |
| | | { |
| | | #keys: '3[415136.0.960591378][415136.0.960591377][415136.0.960591379]' |
| | | Description: 'æå¤§æ¥æ-天' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MaxMonthDate |
| | | { |
| | | #keys: '3[415136.0.960591412][415136.0.960591411][415136.0.960591413]' |
| | | Description: 'æå¤§æ¥æ-æ' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MaxWeekDate |
| | | { |
| | | #keys: '3[415136.0.960591398][415136.0.960591397][415136.0.960591399]' |
| | | Description: 'æå¤§æ¥æ-å¨' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MinDayDate |
| | | { |
| | | #keys: '3[415136.0.960591388][415136.0.960591387][415136.0.960591389]' |
| | | Description: 'æå°æ¥æ-天' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MinMonthDate |
| | | { |
| | | #keys: '3[415136.0.960591419][415136.0.960591418][415136.0.960591420]' |
| | | Description: 'æå°æ¥æ-æ' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MinWeekDate |
| | | { |
| | | #keys: '3[415136.0.960591405][415136.0.960591404][415136.0.960591406]' |
| | | Description: 'æå°æ¥æ-å¨' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMaxDayDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := maxobject( this,LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day(), column.Period() ); |
| | | |
| | | this.MaxDayDate( value.Period() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMaxMonthDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := maxobject( this,LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Month(), column.Period() ); |
| | | |
| | | this.MaxMonthDate( value.Period() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMaxWeekDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := maxobject( this,LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Week(), column.Period() ); |
| | | |
| | | this.MaxWeekDate( value.Period() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMinDayDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := minobject( this, LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day(), column.Period() ); |
| | | |
| | | this.MinDayDate( value.Period() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMinMonthDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := minobject( this, LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Month(), column.Period() ); |
| | | |
| | | this.MinMonthDate( value.Period() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMinWeekDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := minobject( this, LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Week(), column.Period() ); |
| | | |
| | | this.MinWeekDate( value.Period() ); |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jul-26-2024 (created) |
| | | column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time.Format( 'M/D/Y' ) ); |
| | | column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time.Format( 'M/D/Y' ), column.TimeUnit() = timeunit ); |
| | | if( isnull( column ) ){ |
| | | column := table.LibCal_SubscriberEventColumn( relnew, Name := time.Format( 'M/D/Y' ), Period := time, TimeUnit := timeunit ); |
| | | } |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | //info( '----------------------1------------------------', this.LibCal_SubscriberEventColumn( relsize ) ); |
| | | //traverse( this, LibCal_SubscriberEventColumn, column ){ |
| | | // traverse( this, LibCal_SubscriberEventRow, row ){ |
| | | // if( not exists( column, LibCal_SubscriberEventCell, cell, cell.LibCal_SubscriberEventRow() = row ) ) { |
| | | // cell := column.LibCal_SubscriberEventCell( relnew, Value := '' ); |
| | | // row.LibCal_SubscriberEventCell( relinsert, cell ); |
| | | // info( '------------------------', column.Name(), column.Period(), column.TimeUnit() ); |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxDayDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxWeekDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxMonthDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinDayDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinWeekDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinMonthDate ) ); |
| | | this.ProcessColumnDay(); |
| | | this.ProcessColumnWeek(); |
| | | this.ProcessColumnMonth(); |
| | | traverse( this, LibCal_SubscriberEventColumn, column ){ |
| | | traverse( this, LibCal_SubscriberEventRow, row ){ |
| | | if( not exists( column, LibCal_SubscriberEventCell, cell, cell.LibCal_SubscriberEventRow() = row ) ) { |
| | | cell := column.LibCal_SubscriberEventCell( relnew, Value := '' ); |
| | | row.LibCal_SubscriberEventCell( relinsert, cell ); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method ProcessColumnDay |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | day := ( this.MinDayDate() + Duration::Days( 1 ) ).Date(); |
| | | |
| | | while( day < this.MaxDayDate() ){ |
| | | if( not exists( this, LibCal_SubscriberEventColumn, column, column.Period() = day and column.TimeUnit() = Translations::MP_GlobalParameters_Day() ) ){ |
| | | this.LibCal_SubscriberEventColumn( relnew, Name := day.Format( 'M/D/Y' ), Period := day, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | } |
| | | day := ( day + Duration::Days( 1 ) ).Date(); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method ProcessColumnMonth |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | day := this.MinMonthDate().StartOfNextMonth(); |
| | | |
| | | while( day < this.MaxMonthDate()){ |
| | | if( not exists( this, LibCal_SubscriberEventColumn, column, column.Period() = day and column.TimeUnit() = Translations::MP_GlobalParameters_Month()) ){ |
| | | this.LibCal_SubscriberEventColumn( relnew, Name := day.Format( 'M/D/Y' ), Period := day, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | } |
| | | day := day.StartOfNextMonth(); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method ProcessColumnWeek |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | day := this.MinWeekDate().StartOfNextWeek(); |
| | | |
| | | while( day < this.MaxWeekDate() ){ |
| | | if( not exists( this, LibCal_SubscriberEventColumn, column, column.Period() = day and column.TimeUnit() = Translations::MP_GlobalParameters_Week() ) ){ |
| | | this.LibCal_SubscriberEventColumn( relnew, Name := day.Format( 'M/D/Y' ), Period := day, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | } |
| | | day := day.StartOfNextWeek(); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute BaseVersion |
| | | { |
| | | #keys: '3[412672.1.76654685][412672.1.76654684][412672.1.76654686]' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute BaseVersionValue |
| | | { |
| | | #keys: '3[412672.1.76654688][412672.1.76654687][412672.1.76654689]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CompareVersion |
| | | { |
| | | #keys: '3[412672.1.76654691][412672.1.76654690][412672.1.76654692]' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CompareVersionValue |
| | | { |
| | | #keys: '3[412672.1.76654694][412672.1.76654693][412672.1.76654695]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Gap |
| | | { |
| | | #keys: '3[412672.1.76654697][412672.1.76654696][412672.1.76654698]' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcGap |
| | | { |
| | | TextBody: |
| | | [* |
| | | // rislai Jun-21-2024 (created) |
| | | |
| | | value := this.BaseVersion() - this.CompareVersion(); |
| | | |
| | | this.Gap( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GetAttributeByName ( |
| | | String attributeName |
| | | ) const declarative as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // rislai Jun-21-2024 (created) |
| | | value := ""; |
| | | |
| | | if( attributeName = "BaseVersion" ){ |
| | | if( not this.LocalColumn().IsAttrbuteColumn() ){ |
| | | value := this.BaseVersion().Format( "N(Dec)" ); |
| | | } |
| | | } |
| | | if( attributeName = "CompareVersion" ){ |
| | | if( not this.LocalColumn().IsAttrbuteColumn() ){ |
| | | value := this.CompareVersion().Format( "N(Dec)" ); |
| | | } |
| | | } |
| | | if( attributeName = "Gap" ){ |
| | | if( not this.LocalColumn().IsAttrbuteColumn() ){ |
| | | value := this.Gap().Format( "N(Dec)" ); |
| | | } |
| | | } |
| | | if( attributeName = "BaseVersionValue" ){ |
| | | if( not this.LocalColumn().IsAttrbuteColumn() ){ |
| | | value := "0"; |
| | | }else{ |
| | | value := this.BaseVersionValue(); |
| | | } |
| | | } |
| | | if( attributeName = "CompareVersionValue" ){ |
| | | if( not this.LocalColumn().IsAttrbuteColumn() ){ |
| | | value := "0"; |
| | | }else{ |
| | | value := this.CompareVersionValue(); |
| | | } |
| | | } |
| | | |
| | | return value; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod AsyncExport ( |
| | | RecycleBin recycleBin, |
| | | const constcontent LocalRows rows, |
| | | const constcontent LocalColumns columns, |
| | | const MacroPlan macroPlan |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // rislai Jun-20-2024 (created) |
| | | sortColumns := selectsortedset( columns,Elements,column,true,column.Index()); |
| | | |
| | | attributeNames := LocalCell_DemandComparison::GetAttributeNames(); |
| | | |
| | | columnstring := emit( "" ); |
| | | flag := true; |
| | | traverse( sortColumns,Elements,sortColumn ){ |
| | | if( flag ){ |
| | | attributeXML := rows -> LocalCell_DemandComparison::GetColumnXML( sortColumn,attributeNames,"attribute",macroPlan ); |
| | | columnstring := columnstring.Merge( attributeXML ) |
| | | flag := false; |
| | | } |
| | | |
| | | cellxml := rows -> LocalCell_DemandComparison::GetColumnXML( sortColumn,attributeNames ,"data",macroPlan ); |
| | | columnstring := columnstring.Merge( cellxml); |
| | | } |
| | | |
| | | columnstring -> GroupAll() -> ExportXMLManager::AwaitLocalTableXMLData( recycleBin,guard( rows.Element(0).LocalTable().Name(),"Sheet1") ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Compared ( |
| | | RecycleBin recycleBin, |
| | | const OfflinePlanTable baseOfflinePlan, |
| | | const OfflinePlanTable compareOfflinePlan |
| | | ) as LocalTable |
| | | { |
| | | TextBody: |
| | | [* |
| | | // rislai Jun-20-2024 (created) |
| | | table := recycleBin.LocalTable( relnew,Name := "ä¸çº¿è®¡åæ¥è¡¨å¯¹æ¯"); |
| | | |
| | | localColumns := construct( LocalColumns ); |
| | | localColumnIndexTree := NamedValueTree::Create(); |
| | | traverse( baseOfflinePlan,OfflinePlanColumn,column,column.ColumnDate() >= baseOfflinePlan.MacroPlan().StartOfPlanning().Date()){ |
| | | localColumnHandle := localColumnIndexTree.GetHandle( column.ColumnDate().AsQUILL() ); |
| | | localColumnIndex := guard( localColumnIndexTree.Root().Child( localColumnHandle ),null( NamedValue )); |
| | | if( isnull( localColumnIndex )){ |
| | | localColumn := table.LocalColumn( relnew,CustomDate := column.ColumnDate()); |
| | | localColumns.Add( localColumn ); |
| | | localColumnIndexTree.Root().AddChild( localColumnHandle,localColumns.Size() - 1 ); |
| | | } |
| | | } |
| | | traverse( compareOfflinePlan,OfflinePlanColumn,column,column.ColumnDate() >= compareOfflinePlan.MacroPlan().StartOfPlanning().Date()){ |
| | | localColumnHandle := localColumnIndexTree.GetHandle( column.ColumnDate().AsQUILL() ); |
| | | localColumnIndex := guard( localColumnIndexTree.Root().Child( localColumnHandle ),null( NamedValue )); |
| | | if( isnull( localColumnIndex )){ |
| | | localColumn := table.LocalColumn( relnew,CustomDate := column.ColumnDate()); |
| | | localColumns.Add( localColumn ); |
| | | localColumnIndexTree.Root().AddChild( localColumnHandle,localColumns.Size() - 1 ); |
| | | } |
| | | } |
| | | |
| | | baseOfflinePlanCells := construct( OfflinePlanCells, constcontent ); |
| | | baseOfflinePlanCellIndexTree := NamedValueTree::Create(); |
| | | compareOfflinePlanCells := construct( OfflinePlanCells, constcontent ); |
| | | compareOfflinePlanCellIndexTree := NamedValueTree::Create(); |
| | | |
| | | localRows := construct( LocalRows ); |
| | | localRowIndexTree := NamedValueTree::Create(); |
| | | |
| | | traverse( baseOfflinePlan,OfflinePlanRow,row,row.Type() = "1" ){ |
| | | rowKey := row.ProductID() + "@$#" + row.ProductionLine()+ "@$#"; |
| | | localRowHandle := localRowIndexTree.GetHandle( rowKey ); |
| | | localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue )); |
| | | if( isnull( localRowIndex )){ |
| | | localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),CustomName := row.ProductID(),Remark := rowKey ); |
| | | localRows.Add( localRow ); |
| | | localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 ); |
| | | } |
| | | traverse( row,OfflinePlanCell,cell ){ |
| | | columnKey := cell.OfflinePlanColumn().ColumnDate().AsQUILL(); |
| | | cellKey := rowKey + columnKey; |
| | | cellHandle := baseOfflinePlanCellIndexTree.GetHandle( cellKey ); |
| | | baseOfflinePlanCells.Add( cell ); |
| | | baseOfflinePlanCellIndexTree.Root().AddChild( cellHandle,baseOfflinePlanCells.Size() - 1 ); |
| | | } |
| | | } |
| | | traverse( compareOfflinePlan,OfflinePlanRow,row,row.Type() = "1" ){ |
| | | rowKey := row.ProductID() + "@$#" + row.ProductionLine()+ "@$#"; |
| | | localRowHandle := localRowIndexTree.GetHandle( rowKey ); |
| | | localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue )); |
| | | if( isnull( localRowIndex )){ |
| | | localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),CustomName := row.ProductID(),Remark := rowKey ); |
| | | localRows.Add( localRow ); |
| | | localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 ); |
| | | } |
| | | traverse( row,OfflinePlanCell,cell ){ |
| | | columnKey := cell.OfflinePlanColumn().ColumnDate().AsQUILL(); |
| | | cellHandle := compareOfflinePlanCellIndexTree.GetHandle( rowKey + columnKey ); |
| | | compareOfflinePlanCells.Add( cell ); |
| | | compareOfflinePlanCellIndexTree.Root().AddChild( cellHandle,compareOfflinePlanCells.Size() - 1 ); |
| | | } |
| | | } |
| | | |
| | | traverse( localRows,Elements,localRow ){ |
| | | rowKey := localRow.Remark(); |
| | | traverse( localColumns,Elements,localColumn ){ |
| | | columnKey := localColumn.CustomDate().AsQUILL(); |
| | | cellKey := rowKey + columnKey; |
| | | |
| | | baseOfflinePlanCell := constnull( OfflinePlanCell ); |
| | | compareOfflinePlanCell := constnull( OfflinePlanCell ); |
| | | baseOfflinePlanCellIndex := guard( baseOfflinePlanCellIndexTree.Root().Child( baseOfflinePlanCellIndexTree.GetHandle( cellKey ) ),null( NamedValue )); |
| | | compareOfflinePlanCellIndex := guard( compareOfflinePlanCellIndexTree.Root().Child( compareOfflinePlanCellIndexTree.GetHandle( cellKey ) ),null( NamedValue )); |
| | | if( not isnull( baseOfflinePlanCellIndex )){ |
| | | baseOfflinePlanCell := baseOfflinePlanCells.Element( baseOfflinePlanCellIndex.GetValueAsNumber() ); |
| | | } |
| | | if( not isnull( compareOfflinePlanCellIndex )){ |
| | | compareOfflinePlanCell := compareOfflinePlanCells.Element( compareOfflinePlanCellIndex.GetValueAsNumber() ); |
| | | } |
| | | |
| | | localRow.LocalCell( relnew,LocalCell_OfflinePlanComparison,LocalColumn := localColumn, |
| | | BaseVersion := ifexpr( isnull( baseOfflinePlanCell),0.0,baseOfflinePlanCell.Quantity()), |
| | | CompareVersion := ifexpr( isnull( compareOfflinePlanCell),0.0,compareOfflinePlanCell.Quantity())); |
| | | } |
| | | } |
| | | traverse( table,LocalColumn,column ){ |
| | | if( column.LocalCell( relsize ) = 0 ){ |
| | | column.Delete(); |
| | | } |
| | | } |
| | | |
| | | return table; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetAttributeNames () const declarative as owning Strings |
| | | { |
| | | TextBody: |
| | | [* |
| | | // rislai Jun-21-2024 (created) |
| | | attributeNames := construct( Strings ); |
| | | |
| | | attributeNames.Add( "BaseVersion" ); |
| | | attributeNames.Add( "CompareVersion" ); |
| | | attributeNames.Add( "Gap" ); |
| | | |
| | | return &attributeNames; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetColumnXML ( |
| | | const constcontent LocalRows rows, |
| | | const LocalColumn column, |
| | | const Strings attributeNames, |
| | | String type, |
| | | const MacroPlan macroPlan |
| | | ) const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // rislai Jun-21-2024 (created) |
| | | // rislai Jun-20-2024 (created) |
| | | columnXML := ""; |
| | | cells := selectsortedset( column, LocalCell.astype( LocalCell_DemandComparison ), cell, |
| | | exists( rows,Elements,element,element = cell.LocalRow()), cell.LocalRow().Index()); |
| | | if( type = "data" ){ |
| | | columnXML := ""; |
| | | if( column.IsAttrbuteColumn() ){ |
| | | columnXML := "<column><name>" + column.Name() + "</name><type>String</type>"; |
| | | }else{ |
| | | columnXML := "<column><name>" + column.Name() + "</name><type>Number</type>"; |
| | | } |
| | | traverse ( cells, Elements, cell ) { |
| | | traverse( attributeNames ,Elements,e ){ |
| | | cellXML := '<cell value="' + cell.GetAttributeByName( e ) + '"/>' |
| | | columnXML := columnXML + cellXML; |
| | | } |
| | | } |
| | | columnXML := columnXML + "</column>"; |
| | | } |
| | | if( type = "attribute" ){ |
| | | columnXML0_1 := "<column><name>Sales Segment</name><type>String</type>"; |
| | | columnXML0_2 := "<column><name>Generation</name><type>String</type>"; |
| | | columnXML0_3 := "<column><name>MQB/MLB</name><type>String</type>"; |
| | | columnXML0_4 := "<column><name>åç</name><type>String</type>"; |
| | | |
| | | columnXML1 := "<column><name>Product ID</name><type>String</type>"; |
| | | columnXML2 := "<column><name>Attribute</name><type>String</type>"; |
| | | |
| | | traverse ( cells, Elements, cell ) { |
| | | flag := true; |
| | | traverse( attributeNames ,Elements,e ){ |
| | | if( flag ){ |
| | | cellXML := '<cell value="' + cell.LocalRow().Name() + '"/>' |
| | | columnXML1 := columnXML1 + cellXML; |
| | | |
| | | salesSegment := select( cell.LocalRow().LocalTable(),LocalColumn.LocalCell.astype( LocalCell_DemandComparison ),temp_cell,temp_cell.LocalRow() = cell.LocalRow() and temp_cell.LocalColumn().Name() = "产å°"); |
| | | if( not isnull( salesSegment )){ |
| | | cellXML0_1 := '<cell value="' + ifexpr( salesSegment.BaseVersionValue() <> "空",salesSegment.BaseVersionValue(),salesSegment.CompareVersionValue()) + '"/>'; |
| | | columnXML0_1 := columnXML0_1 + cellXML0_1; |
| | | }else{ |
| | | cellXML0_1 := '<cell value=" "/>' |
| | | columnXML0_1 := columnXML0_1 + cellXML0_1; |
| | | } |
| | | |
| | | product := select( macroPlan,Product_MP,product,product.ID() = cell.LocalRow().Name() ); |
| | | if( not isnull( product )){ |
| | | cellXML0_2 := '<cell value="' + product.Generation() + '"/>'; |
| | | cellXML0_3 := '<cell value="' + product.MQBMLB() + '"/>'; |
| | | cellXML0_4 := '<cell value="' + product.Power() + '"/>'; |
| | | columnXML0_2 := columnXML0_2 + cellXML0_2; |
| | | columnXML0_3 := columnXML0_3 + cellXML0_3; |
| | | columnXML0_4 := columnXML0_4 + cellXML0_4; |
| | | }else{ |
| | | cellXML0_2 := '<cell value=" "/>'; |
| | | cellXML0_3 := '<cell value=" "/>'; |
| | | cellXML0_4 := '<cell value=" "/>'; |
| | | columnXML0_2 := columnXML0_2 + cellXML0_2; |
| | | columnXML0_3 := columnXML0_3 + cellXML0_3; |
| | | columnXML0_4 := columnXML0_4 + cellXML0_4; |
| | | } |
| | | |
| | | flag := false; |
| | | }else{ |
| | | cellXML := '<cell value=" "/>' |
| | | columnXML1 := columnXML1 + cellXML; |
| | | cellXML0_1 := '<cell value=" "/>' |
| | | cellXML0_2 := '<cell value=" "/>'; |
| | | cellXML0_3 := '<cell value=" "/>'; |
| | | cellXML0_4 := '<cell value=" "/>'; |
| | | columnXML0_1 := columnXML0_1 + cellXML0_1; |
| | | columnXML0_2 := columnXML0_2 + cellXML0_2; |
| | | columnXML0_3 := columnXML0_3 + cellXML0_3; |
| | | columnXML0_4 := columnXML0_4 + cellXML0_4; |
| | | } |
| | | cellXML := '<cell value="' + e + '"/>' |
| | | columnXML2 := columnXML2 + cellXML; |
| | | } |
| | | } |
| | | columnXML := columnXML0_1 + "</column>" + columnXML0_2 + "</column>" + columnXML0_3 + "</column>" + columnXML0_4 + "</column>" + columnXML1 + "</column>" + columnXML2 + "</column>"; |
| | | } |
| | | |
| | | return columnXML; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | TypeSpecialization LocalCell_OfflinePlanComparison |
| | | { |
| | | #keys: '2[412672.1.76654683][412672.1.76654682]' |
| | | Parent: LocalCell |
| | | StructuredName: 'LocalCell_OfflinePlanComparisons' |
| | | } |
| | |
| | | // rislai Jun-21-2024 (created) |
| | | value := ""; |
| | | |
| | | if( attributeName = "BaseVersion" ){ |
| | | if( attributeName = "Plan" ){ |
| | | if( not this.LocalColumn().IsAttrbuteColumn() ){ |
| | | value := this.Plan().Format( "N(Dec)" ); |
| | | } |
| | | } |
| | | if( attributeName = "CompareVersion" ){ |
| | | if( attributeName = "Actual" ){ |
| | | if( not this.LocalColumn().IsAttrbuteColumn() ){ |
| | | value := this.Actual().Format( "N(Dec)" ); |
| | | } |
| | |
| | | if( attributeName = "Gap" ){ |
| | | if( not this.LocalColumn().IsAttrbuteColumn() ){ |
| | | value := this.Gap().Format( "N(Dec)" ); |
| | | } |
| | | } |
| | | if( attributeName = "BaseVersionValue" ){ |
| | | if( not this.LocalColumn().IsAttrbuteColumn() ){ |
| | | value := "0"; |
| | | }else{ |
| | | value := this.BaseVersionValue(); |
| | | } |
| | | } |
| | | if( attributeName = "CompareVersionValue" ){ |
| | | if( not this.LocalColumn().IsAttrbuteColumn() ){ |
| | | value := "0"; |
| | | }else{ |
| | | value := this.CompareVersionValue(); |
| | | } |
| | | } |
| | | |
| | |
| | | // rislai Jun-21-2024 (created) |
| | | attributeNames := construct( Strings ); |
| | | |
| | | attributeNames.Add( "BaseVersion" ); |
| | | attributeNames.Add( "CompareVersion" ); |
| | | attributeNames.Add( "Actual" ); |
| | | attributeNames.Add( "Plan" ); |
| | | attributeNames.Add( "Gap" ); |
| | | |
| | | return &attributeNames; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Remark |
| | | { |
| | | #keys: '3[412672.1.76649345][412672.1.76649344][412672.1.76649346]' |
| | | ValueType: String |
| | | } |
| | |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | |
| | | xmlTemplate := xmlTemplate + "<column><name>AUDI B9 PA</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>AUDI B9 PA</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>AUDI C8</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>AUDI C8</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Q5 Derivat</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Q5 Derivat</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Q5 NF PA</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Q5 NF PA</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Magotan B8L FL</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Magotan B8L FL</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Magotan B9</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Magotan B9</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>CC FB PA</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>CC FB PA</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>CC ShBr</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>CC ShBr</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>B-SMV</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>B-SMV</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>B-Main SUV</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>B-Main SUV</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Tayron PA</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Tayron PA</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Tayron NF</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Tayron NF</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Tayron X PA</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Tayron X PA</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Tayron GTE</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Tayron GTE</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Q3 NF</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Q3 NF</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Q3 Derivat</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + "<column><name>Q3 Derivat</name><type>String</type>"; |
| | | for( i := 0; i < totalDate ; i++ ){ |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | } |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | |
| | |
| | | xmlTemplate := '<?xml version="1.0" encoding="UTF-16"?><table><name>'+ sheetName +'</name>'; |
| | | |
| | | xmlTemplate := xmlTemplate + "<column><name>产å°</name><type>String</type>"; |
| | | xmlTemplate := xmlTemplate + '<cell value="é¿æ¥"/>'; |
| | | // xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | |
| | | xmlTemplate := xmlTemplate + "<column><name>车å</name><type>String</type>"; |
| | | xmlTemplate := xmlTemplate + '<cell value="30C"/>'; |
| | | // xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | |
| | | xmlTemplate := xmlTemplate + "<column><name>å卿ºå·</name><type>String</type>"; |
| | | xmlTemplate := xmlTemplate + '<cell value="06S 100 010 N"/>'; |
| | | // xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | |
| | | actualDate := Date::ActualDate(); |
| | | |
| | | for( i := 0 ; i < dateNumber ; i++ ){ |
| | | xmlTemplate := xmlTemplate + "<column><name>" + (actualDate + i).Format( "Y/M/D" ) + "</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | // xmlTemplate := xmlTemplate + '<cell value=""/>'; |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | } |
| | | |
| | |
| | | |
| | | xmlTemplate := xmlTemplate + "<column><name>å
ä½ç </name><type>String</type>"; |
| | | |
| | | xmlTemplate := xmlTemplate + '<cell value="86LC2G"/>'; |
| | | // xmlTemplate := xmlTemplate + '<cell value=" "/>'; |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | |
| | | actualDate := Date::ActualDate(); |
| | | |
| | | for( i := 1 ; i <= 12 ; i++ ){ |
| | | xmlTemplate := xmlTemplate + "<column><name>" + Date::Construct( actualDate.Year(),i,1 ).Format( "Y/M/D" ) + "</name><type>Number</type>"; |
| | | xmlTemplate := xmlTemplate + '<cell value="0"/>'; |
| | | // xmlTemplate := xmlTemplate + '<cell value=" "/>'; |
| | | xmlTemplate := xmlTemplate + "</column>"; |
| | | } |
| | | |