¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation AssemblyOnlinePlanVersionSearch_InterfaceDataset_InterfaceDataset_AssemblyOnlinePlanVersionSearch |
| | | { |
| | | #keys: '1[415136.0.1184120209]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide InterfaceDataset |
| | | { |
| | | #keys: '3[415136.0.1184120211][415136.0.1184120210][415136.0.1184120212]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: AssemblyOnlinePlanVersionSearch |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide AssemblyOnlinePlanVersionSearch |
| | | { |
| | | #keys: '3[415136.0.1184120214][415136.0.1184120213][415136.0.1184120215]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: InterfaceDataset |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation AssemblyOnlinePlanVersion_Column_AssemblyOnlinePlanVersionColumn_Version |
| | | { |
| | | #keys: '1[415136.0.1184171015]' |
| | | DeclarativeSequenceRelationStrategy |
| | | { |
| | | #keys: '13[0.0.0][415136.0.1184171034][415136.0.1184171028][415136.0.1184171035][415136.0.1184171029][415136.0.1184171036][415136.0.1184171030][415136.0.1184171037][415136.0.1184171031][415136.0.1184171038][415136.0.1184171032][415136.0.1184171039][415136.0.1184171033]' |
| | | SequenceElementSuffix: 'VersionColumn' |
| | | SequenceSuffix: 'VersionColumn' |
| | | } |
| | | RelationSide.LeftSide Column |
| | | { |
| | | #keys: '3[415136.0.1184171017][415136.0.1184171016][415136.0.1184171018]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: AssemblyOnlinePlanVersion |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide Version |
| | | { |
| | | #keys: '3[415136.0.1184171020][415136.0.1184171019][415136.0.1184171021]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: AssemblyOnlinePlanVersionColumn |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation AssemblyOnlinePlanVersion_InterfaceDataset_InterfaceDataset_AssemblyOnlinePlanVersion |
| | | { |
| | | #keys: '1[415136.0.1184171001]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide InterfaceDataset |
| | | { |
| | | #keys: '3[415136.0.1184171003][415136.0.1184171002][415136.0.1184171004]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: AssemblyOnlinePlanVersion |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide AssemblyOnlinePlanVersion |
| | | { |
| | | #keys: '3[415136.0.1184171006][415136.0.1184171005][415136.0.1184171007]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: InterfaceDataset |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation AssemblyOnlinePlanVersion_Row_AssemblyOnlinePlanVersionRow_Version |
| | | { |
| | | #keys: '1[415136.0.1184170985]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide Row |
| | | { |
| | | #keys: '3[415136.0.1184170987][415136.0.1184170986][415136.0.1184170988]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: AssemblyOnlinePlanVersion |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide Version |
| | | { |
| | | #keys: '3[415136.0.1184170990][415136.0.1184170989][415136.0.1184170991]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: AssemblyOnlinePlanVersionRow |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
| | |
| | | StaticMethod GenerateData ( |
| | | InterfaceDataset owner, |
| | | String werk, |
| | | const MacroPlan macroplan, |
| | | String version, |
| | | Date startdate, |
| | | Date enddate, |
| | | String executor |
| | |
| | | , ReturnMsg := 'Success' |
| | | , Success := true |
| | | ); |
| | | pir := owner.AOnlineAndMOfflinePlanPIR( relnew, ZPPPSCode := OS::GenerateGUIDAsString(), Werk := werk, Version := macroplan.ScenarioName(), StartDate := startdate, EndDate := enddate ); |
| | | pir := owner.AOnlineAndMOfflinePlanPIR( relnew, ZPPPSCode := OS::GenerateGUIDAsString(), Werk := werk, Version := version, StartDate := startdate, EndDate := enddate ); |
| | | loginfo.AOnlineAndMOfflinePlanPIR( relinsert, pir ); |
| | | traverse( macroplan, AssemblyOnlinePlanColumn, column, column.ColumnDate() >= startdate and column.ColumnDate() <= enddate ){ |
| | | traverse( column, AssemblyOnlinePlanCell, cell, ( werk = 'All' or cell.AssemblyOnlinePlanRow().ProductionLine().FindString( werk, 0 ) > -1 ) |
| | | and cell.AssemblyOnlinePlanRow().Type() = '1' ){ |
| | | quantityrow := cell.AssemblyOnlinePlanRow(); |
| | | if( not exists( productids, Elements, e, e = quantityrow.ProductID() ) ){ |
| | | productids.Add( quantityrow.ProductID() ); |
| | | } |
| | | |
| | | pir.PIRData( relnew, Product := quantityrow.ProductID() |
| | | , PlanningDate := column.ColumnDate() |
| | | , PlanningQty := [Number]cell.Value()); |
| | | } |
| | | } |
| | | |
| | | traverse( macroplan, OfflinePlanTable, table ){ |
| | | traverse( table, OfflinePlanColumn, column, column.ColumnDate() >= startdate and column.ColumnDate() <= enddate ){ |
| | | traverse( column, OfflinePlanCell, cell, ( werk = 'All' or cell.OfflinePlanRow().ProductionLine().FindString( werk, 0 ) > -1 ) |
| | | and ( cell.OfflinePlanRow().ProductionLine() <> 'DL_MOMO' or cell.OfflinePlanRow().ProductionLine() <> 'CC_MOMO' ) |
| | | and cell.OfflinePlanRow().Type() = '1' ){ |
| | | row := cell.OfflinePlanRow(); |
| | | if( not exists( productids, Elements, e, e = row.ProductID() ) ){ |
| | | productids.Add( row.ProductID() ); |
| | | traverse( owner, AssemblyOnlinePlanVersion, verison, not verison.IsShow() ){ |
| | | traverse( verison, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() >= startdate and column.StartDate() <= enddate ){ |
| | | traverse( column, Cell, cell, ( werk = 'All' or cell.Row().ProductionLine().FindString( werk, 0 ) > -1 ) |
| | | and cell.Row().Type() = '1' ){ |
| | | quantityrow := cell.Row(); |
| | | if( not exists( productids, Elements, e, e = quantityrow.ProductID() ) ){ |
| | | productids.Add( quantityrow.ProductID() ); |
| | | } |
| | | pirdata := selectobject( pir, PIRData, pirdata, pirdata.Product() = row.ProductID() and pirdata.PlanningDate() = column.ColumnDate() ); |
| | | if( isnull( pirdata ) ){ |
| | | pirdata := pir.PIRData( relnew, Product := row.ProductID() |
| | | , PlanningDate := column.ColumnDate() |
| | | , PlanningQty := 0 ); |
| | | } |
| | | pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Value() ); |
| | | |
| | | pir.PIRData( relnew, Product := quantityrow.ProductID() |
| | | , PlanningDate := column.StartDate() |
| | | , PlanningQty := [Number]cell.Value()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //traverse( version, OfflinePlanTable, table ){ |
| | | // traverse( table, OfflinePlanColumn, column, column.ColumnDate() >= startdate and column.ColumnDate() <= enddate ){ |
| | | // traverse( column, OfflinePlanCell, cell, ( werk = 'All' or cell.OfflinePlanRow().ProductionLine().FindString( werk, 0 ) > -1 ) |
| | | // and ( cell.OfflinePlanRow().ProductionLine() <> 'DL_MOMO' or cell.OfflinePlanRow().ProductionLine() <> 'CC_MOMO' ) |
| | | // and cell.OfflinePlanRow().Type() = '1' ){ |
| | | // row := cell.OfflinePlanRow(); |
| | | // if( not exists( productids, Elements, e, e = row.ProductID() ) ){ |
| | | // productids.Add( row.ProductID() ); |
| | | // } |
| | | // pirdata := selectobject( pir, PIRData, pirdata, pirdata.Product() = row.ProductID() and pirdata.PlanningDate() = column.ColumnDate() ); |
| | | // if( isnull( pirdata ) ){ |
| | | // pirdata := pir.PIRData( relnew, Product := row.ProductID() |
| | | // , PlanningDate := column.ColumnDate() |
| | | // , PlanningQty := 0 ); |
| | | // } |
| | | // pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Value() ); |
| | | // } |
| | | // } |
| | | //} |
| | | traverse( productids, Elements, e ){ |
| | | for( date := startdate.StartOfWeek(); date <= enddate; date := ( date + Duration::Days( 1 ) ).Date() ){ |
| | | if( not exists( pir, PIRData, pirdata, pirdata.Product() = e and pirdata.PlanningDate() = date ) ){ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute EndDate |
| | | { |
| | | #keys: '3[415136.0.1184120166][415136.0.1184120165][415136.0.1184120167]' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute StartDate |
| | | { |
| | | #keys: '3[415136.0.1184120156][415136.0.1184120155][415136.0.1184120157]' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute TimeUnit |
| | | { |
| | | #keys: '3[415136.0.1184120146][415136.0.1184120145][415136.0.1184120147]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ID |
| | | { |
| | | #keys: '3[415136.0.1184170976][415136.0.1184170975][415136.0.1184170977]' |
| | | IsReadOnly: true |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsShow |
| | | { |
| | | #keys: '3[415136.0.1184120223][415136.0.1184120222][415136.0.1184120224]' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Name |
| | | { |
| | | #keys: '3[415136.0.1184170979][415136.0.1184170978][415136.0.1184170980]' |
| | | Description: 'åç§°' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: ID |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Name |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GenerateColumn ( |
| | | Dates periods, |
| | | String timeunit, |
| | | Date starttime, |
| | | Date endtime |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | mindate := min( periods, Elements, period, period ); |
| | | maxdate := max( periods, Elements, period, period ); |
| | | //æ¥è¯¢æ¥æè¿åéè¦å¨è®¡åæ¥æä¹å
|
| | | if( starttime < mindate and endtime > maxdate ){ |
| | | if( starttime < mindate ){ |
| | | starttime := mindate; |
| | | } |
| | | if( endtime > maxdate ){ |
| | | endtime := maxdate; |
| | | } |
| | | if( timeunit = Translations::MP_GlobalParameters_Day() ){ |
| | | for( start := starttime; start <= endtime; start := start.DateTime().StartOfNextDay().Date() ){ |
| | | periodname := start.Format( "M2/D2/Y" ); |
| | | if( not exists( this, Column, column, column.StartDate() = start ) ){ |
| | | this.Column( relnew, ColumnName := periodname, StartDate := start, EndDate := start, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | } |
| | | } |
| | | }else if( timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | // weekstartstr := ' KW'; |
| | | for( start := starttime; start <= endtime; start := start.StartOfNextWeek() ){ |
| | | weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();//.Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ) |
| | | |
| | | this.Column( relnew, ColumnName := weekend.Format( "M2/D2/Y" ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | } |
| | | }else if( timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | for( start := starttime; start <= endtime; start := start.StartOfNextMonth() ){ |
| | | monthend := ( start.StartOfNextMonth() - Duration::Days( 1 ) ).Date();//.Concat( ' ' ).Concat( monthend.Format( "MM", us_locale ).Concat( '/').Concat( [String]monthend.Month() ).Concat( 'æ' ) ) |
| | | // us_locale := Locale::Construct( 'en_us' ); |
| | | this.Column( relnew, ColumnName := monthend.Format( "M2/D2/Y" ), StartDate := start, EndDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | } |
| | | } |
| | | } |
| | | //weekstart := periods.Element( 0 ); |
| | | //monthstart := periods.Element( 0 ); |
| | | //traverse( periods, Elements, periodtime ){ |
| | | // periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // |
| | | // this.Column( relnew, Name := periodname, StartDate := periodtime, EndDate := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | // |
| | | // if( periodtime = weekstart ){ |
| | | // weekperiodname := weekstart.Format( "M2/D2/Y" ); |
| | | // this.Column( relnew, Name := weekperiodname, StartDate := weekstart, EndDate := ( weekstart + Duration::Days( 6 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | // weekstart := ( weekstart + Duration::Days( 7 ) ).Date(); |
| | | // } |
| | | // if( periodtime = monthstart ){ |
| | | // monthperiodname := monthstart.Format( "M2/D2/Y" ); |
| | | // enddate := ( monthstart.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | // this.Column( relnew, Name := monthperiodname, StartDate := monthstart, EndDate := enddate, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | // monthstart := monthstart.StartOfNextMonth(); |
| | | // } |
| | | //} |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GetColumnByTimeUnit ( |
| | | String unit, |
| | | Date period |
| | | ) as AssemblyOnlinePlanVersionColumn |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-7-2024 (created) |
| | | |
| | | column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period and column.TimeUnit() = unit ); |
| | | |
| | | return column; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GetRow ( |
| | | const AssemblyOnlinePlanRow aoprow |
| | | ) as AssemblyOnlinePlanVersionRow |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Oct-11-2024 (created) |
| | | row := selectobject( this, Row, row, row.ProductID() = aoprow.ProductID() and row.ProductionLine() = aoprow.ProductionLine() and row.Type() = aoprow.Type() ); |
| | | |
| | | if( isnull( row ) ){ |
| | | row := this.Row( relnew, ProductID := aoprow.ProductID(), ProductionLine := aoprow.ProductionLine(), Type := aoprow.Type() ); |
| | | //åå§ååå
æ ¼ |
| | | row.InitializeCell(); |
| | | } |
| | | |
| | | return row; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GenerateData ( |
| | | InterfaceDataset interface, |
| | | RecycleBin recycle, |
| | | const Archive archive |
| | | ) |
| | | { |
| | | Description: 'çæå¯ä»¥ä¸åç客æ·éæ±ï¼PPA+IDSï¼æ°æ®' |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-20-2024 (created) |
| | | interface.CustomerDemandIDS( relflush ); |
| | | interface.CustomerDemandIDSSearch( relflush ); |
| | | allunit := CustomerDemandIDS::GetDefaultAllUnit(); |
| | | interface.CustomerDemandIDSSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit ); |
| | | idstable := interface.CustomerDemandIDS( relnew, ID := '客æ·éæ±', Name := '客æ·éæ±' ); |
| | | binaryValue := TemplateManager::GetIDSFullTable( archive, Date::ActualDate().Year() ); |
| | | source := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" ); |
| | | source.ReadStructure(); |
| | | Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) ); |
| | | cnv2 := StringToDate::StandardConverter(); |
| | | cnv2.SetCustomConversion(); |
| | | cnv2.CustomFormatString( "yyyy/MM/dd" ); |
| | | idsdates := selectuniquevalues( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() > 2, cnv2.Convert( column.Name() ) ); |
| | | ppadates := selectuniquevalues( interface, InterfaceForecast, forecast, forecast.Origin() = 'PPA', forecast.Date() ); |
| | | //ppadates := construct( Dates ); |
| | | //traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){ |
| | | // ppadates := ppadates.Union( selectuniquevalues( forecast, PlanningSalesDemandInPeriod, salesdemand, salesdemand.StartDate() ) ); |
| | | //} |
| | | periods := idsdates.Union( ppadates ); |
| | | periods := selectuniquevalues( periods, Elements, e, e ); |
| | | idstable.GenerateColumn( periods.Sort() ); |
| | | traverse( recycle, GeneralExcelImportAndExportDataSource.GeneralExcelImportAndExportDataTable, table ){ |
| | | traverse( table, GeneralExcelImportAndExportDataRow, row ){ |
| | | productcell := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 ); |
| | | factorycell := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 ); |
| | | idsrow := idstable.GetRowByUnit( productcell.Value(), factorycell.Value() ); |
| | | traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){ |
| | | period := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() ); |
| | | daycolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), period ); |
| | | weekcolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Week(), period ); |
| | | monthcolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Month(), period ); |
| | | idsrow.SetCellValue( daycolumn, [Number]cell.Value() ); |
| | | idsrow.SetCellValue( weekcolumn, [Number]cell.Value() ); |
| | | idsrow.SetCellValue( monthcolumn, [Number]cell.Value() ); |
| | | } |
| | | } |
| | | } |
| | | traverse( interface, InterfaceForecast, forecast, forecast.Origin() = 'PPA' ){ |
| | | idsrow := idstable.GetRowByUnit( forecast.PartNumber(), forecast.Factory() ); |
| | | daycolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), forecast.Date() ); |
| | | weekcolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Week(), forecast.Date() ); |
| | | monthcolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Month(), forecast.Date() ); |
| | | idsrow.SetCellValue( daycolumn, [Number]forecast.Quantity() ); |
| | | idsrow.SetCellValue( weekcolumn, [Number]forecast.Quantity() ); |
| | | idsrow.SetCellValue( monthcolumn, [Number]forecast.Quantity() ); |
| | | } |
| | | |
| | | source.Delete(); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultAllUnit () const declarative as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return '<All>'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultName () const declarative as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'è£
é
ä¸çº¿è®¡åå
¨é表'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod RefreshData ( |
| | | InterfaceDataset interface, |
| | | const MacroPlan macroPlan |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | //æ ¹æ®å½åçæ¬çè£
é
ä¸çº¿è®¡å |
| | | allunit := AssemblyOnlinePlanVersion::GetDefaultAllUnit(); |
| | | name := AssemblyOnlinePlanVersion::GetDefaultName(); |
| | | search := interface.AssemblyOnlinePlanVersionSearch( relnew, Product := allunit, ProductionLine := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | table := selectobject( interface, AssemblyOnlinePlanVersion, version, not version.IsShow() ); |
| | | if( isnull( table ) ){ |
| | | table := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name ); |
| | | } |
| | | showtable := selectobject( interface, AssemblyOnlinePlanVersion, version, version.IsShow() ); |
| | | if( isnull( table ) ){ |
| | | showtable := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name, IsShow := true ); |
| | | } |
| | | aopcolumns := selectuniquevalues( macroPlan, AssemblyOnlinePlanColumn, aopcolumn, not exists( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = aopcolumn.ColumnDate() ), aopcolumn.ColumnDate() ); |
| | | table.GenerateColumn( aopcolumns, search.TimeUnit(), search.StartDate(), search.EndDate() ); |
| | | traverse( macroPlan, AssemblyOnlinePlanRow, aoprow ){ |
| | | row := table.GetRow( aoprow ); |
| | | traverse( aoprow, AssemblyOnlinePlanCell, aopcell ){ |
| | | column := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = aopcell.AssemblyOnlinePlanColumn().ColumnDate() ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.InventoryWeight( aopcell.InventoryWeight() ); |
| | | cell.ProductionSerialNumber( aopcell.ProductionSerialNumber() ); |
| | | cell.Quantity( aopcell.Quantity() ); |
| | | cell.Shift( aopcell.Shift() ); |
| | | cell.Value( aopcell.Value() ); |
| | | } |
| | | } |
| | | //showtable.Generate( search, products ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type AssemblyOnlinePlanVersion |
| | | { |
| | | #keys: '5[415136.0.1184170973][415136.0.1184170971][0.0.0][415136.0.1184170972][415136.0.1184170974]' |
| | | BaseType: Object |
| | | Description: 'è£
é
ä¸çº¿è®¡åå
¨è¡¨æ°æ®' |
| | | StructuredName: 'AssemblyOnlinePlanVersions' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Initialize ( |
| | | AssemblyOnlinePlanVersionColumn column |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := column.Cell( relnew, InventoryWeight := 0, ProductionSerialNumber := 0, Quantity := 0, Shift := '', Value := '' ); |
| | | |
| | | this.Cell( relinsert, cell ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method InitializeCell |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | traverse( this.Version(), Column, column ){ |
| | | this.Initialize( column ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute EndDate |
| | | { |
| | | #keys: '3[415136.0.1184120182][415136.0.1184120181][415136.0.1184120183]' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Product |
| | | { |
| | | #keys: '3[415136.0.1184120194][415136.0.1184120193][415136.0.1184120195]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ProductionLine |
| | | { |
| | | #keys: '3[415136.0.1184120240][415136.0.1184120239][415136.0.1184120241]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute StartDate |
| | | { |
| | | #keys: '3[415136.0.1184120197][415136.0.1184120196][415136.0.1184120198]' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute TimeUnit |
| | | { |
| | | #keys: '3[415136.0.1184120200][415136.0.1184120199][415136.0.1184120201]' |
| | | Description: 'æ¥æç±»å' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Unit |
| | | { |
| | | #keys: '3[415136.0.1184120203][415136.0.1184120202][415136.0.1184120204]' |
| | | Description: '产线' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Product |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: TimeUnit |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Unit |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type AssemblyOnlinePlanVersionSearch |
| | | { |
| | | #keys: '5[415136.0.1184120179][415136.0.1184120177][0.0.0][415136.0.1184120178][415136.0.1184120180]' |
| | | BaseType: Object |
| | | Description: 'æ¥è¯¢ç±»' |
| | | StructuredName: 'AssemblyOnlinePlanVersionSearchs' |
| | | } |
| | |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() ); |
| | | if( not isnull( enginecost ) ){ |
| | | //å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºé¿æ¥äº§é |
| | | quantity := ceil( cell.Quantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | quantity := ceil( cell.Quantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | //å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrow.SetRentEnterCost( column, quantity ); |
| | | } |
| | |
| | | destisp := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.DestinationStockingPointID() ); |
| | | isccrent := table.IsInUnit( destisp, ccrent ); |
| | | if( isccspline and isccrent ){ |
| | | traverse( laneleg, Trip, trip, trip.Arrival().Date() < startofnextyear ){ |
| | | periodtime := trip.Arrival().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= trip.Arrival().Date() and engine.EndDate() >= trip.Arrival().Date() ); |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= trip.Arrival().Date() and trans.EndDate() >= trip.Arrival().Date() ); |
| | | traverse( table, Column, column ){ |
| | | alltrips := selectset( laneleg, Trip, trip, trip.Arrival().Date() < column.StartDate().StartOfNextMonth() and trip.Arrival().Date() >= column.StartDate() ); |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= column.StartDate() and engine.EndDate() >= column.StartDate() ); |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= column.StartDate() and trans.EndDate() >= column.StartDate() ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){ |
| | | traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 ){ |
| | | product := pit.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){////æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccfactory ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( transcosts, Elements, trans, trans.Origin() = 'CC åå
åº' |
| | | and trans.Destination() = ccrent |
| | | and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | row := table.GetRow( pit.ProductID() ); |
| | | products.Add( product ); |
| | | //è¿è¾æ°é/å
è£
容é/è£
载容é*è¿è¾åä»· |
| | | quantity := ceil( ceil( [Number]pit.Quantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | |
| | | row.SetFactoryToRentTransCost( column, quantity ); |
| | | } |
| | | producttrips := selectuniquevalues( alltrips, Elements.ProductInTrip, pit, pit.Quantity() <> 0 and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ), pit.ProductID() ); |
| | | traverse( producttrips, Elements, producttrip ){ |
| | | row := table.GetRow( producttrip ); |
| | | product := selectobject( owner, Product_MP, product, product.ID() = producttrip ); |
| | | products.Add( product ); |
| | | quantity := sum( alltrips, Elements.ProductInTrip, pit, pit.Product_MP() = product, pit.Quantity() ); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() and engine.MLB_MQB() = product.MQBMLB() and engine.Factory() = ccfactory ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( transcosts, Elements, trans, trans.Origin() = 'CC åå
åº' and trans.Destination() = ccrent and exists( product.GetAllParent(), Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | row.SetFactoryToRentTransCost( column, cost ); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | //å¤ç§åºä»å¨è´¹ç¨ï¼ä»å¨æ°é/å
è£
容é*ä»å¨åä»·ï¼å¨Actual inventorieséåå°é¿æ¥å¤ç§åºè¯¥å卿ºçä»å¨éï¼æ ¹æ®å卿ºå·æ¾å°å¯¹åºçGeneration 忍ªçºµå¶ï¼å¨å卿ºææ¬åæ°è¡¨éæ¾å°å¯¹åºçä»å¨åä»·åå
è£
容éï¼ç¨å
¬å¼è®¡ç®ï¼æåº¦è¿è¡æ±æ» |
| | | traverse( owner, StockingPoint_MP, stockingpoint ){ |
| | | //æ¯å¦å±äºé¿æ¥å¤ç§åº |
| | | isccrent := table.IsInUnit( stockingpoint, ccrent ); |
| | | if( isccrent ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() |
| | | and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ) ){ |
| | | //è·åè¡ |
| | | product := pisp.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){////æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccfactory ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | row := table.GetRow( pisp.ProductID() ); |
| | | products.Add( product ); |
| | | //å½product planningçæ¥æåºé´å¨éè¦çæ¥æåºé´å
|
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ){ |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date() ); |
| | | if( not isnull( enginecost ) ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | quantity := ceil( [Number]pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | traverse( owner, StockingPoint_MP, stockingpoint, table.IsInUnit( stockingpoint, ccrent ) ){//æ¯å¦å±äºé¿æ¥å¤ç§åº |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and exists( pisp.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent )//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.PlannedInventoryLevelEnd() <> 0 ) ){ |
| | | //è·åè¡ |
| | | product := pisp.Product_MP(); |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() and engine.MLB_MQB() = product.MQBMLB()and engine.Factory() = ccfactory ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | row := table.GetRow( pisp.ProductID() ); |
| | | products.Add( product ); |
| | | //å½product planningçæ¥æåºé´å¨éè¦çæ¥æåºé´å
|
| | | // traverse( table, Column, column ){ |
| | | // pispips := selectset( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.PlannedInventoryLevelEnd() <> 0 |
| | | // and pispip.Start().Date() < column.StartDate().StartOfNextMonth() and pispip.Start().Date() >= column.StartDate() ); |
| | | |
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.PlannedInventoryLevelEnd() <> 0 ){ |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date() ); |
| | | if( not isnull( enginecost ) ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | quantity := ceil( pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | |
| | | row.SetRentStorageCost( column, quantity ); |
| | | } |
| | | } |
| | | row.SetRentStorageCost( column, quantity ); |
| | | } |
| | | } |
| | | } |
| | |
| | | // unit := stockingpoint.Unit(); |
| | | // parentunits := unit.GetAllParent(); |
| | | //æ¯å¦å±äºé¿æ¥å¤ç§åºç¨äºé¿æ¥å¤ç§åºä»å¨è´¹ç¨ |
| | | isccrent := stockingpoint.ID().StartsWith( 'é¿æ¥' ) or stockingpoint.ID().StartsWith( 'CC' ); |
| | | // isccrent := stockingpoint.ID().StartsWith( 'é¿æ¥' ) or stockingpoint.ID().StartsWith( 'CC' ); |
| | | //æ¯å¦å±äºå¤§è¿å卿ºçé¿æ¥å¤ç§åºç¨äºé¿æ¥å
¥åº/åºåºè´¹ç¨ |
| | | isdltoccrent := stockingpoint.ID().StartsWith( '大è¿å卿ºçé¿æ¥' ); |
| | | //æ¯å¦å±äºå¤§è¿å¤ç§åºç¨äºå¤§è¿å¤ç§åºä»å¨è´¹ç¨ |
| | | isdlrent := stockingpoint.ID().StartsWith( '大è¿' ) or stockingpoint.ID().StartsWith( 'DL' ); |
| | | if( isccrent or isdlrent ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() |
| | | and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ) ){ |
| | | isdlrent := not isdltoccrent and stockingpoint.ID().StartsWith( '大è¿' ) or stockingpoint.ID().StartsWith( 'DL' ); |
| | | // info( '--------------', isccrent, isdltoccrent, isdlrent ); |
| | | if( isdlrent or isdltoccrent){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() |
| | | and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and ( pispip.NewSupplyQuantity() <> 0 or pispip.PlannedInventoryLevelEnd() <> 0 ) ) ){ |
| | | //è·åè¡ |
| | | product := pisp.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | row := table.GetRow( pisp.ProductID() ); |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() and engine.MLB_MQB() = product.MQBMLB() ); |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.Origin() = '大è¿åå
åº' |
| | | and trans.Destination() = '大è¿å¤ç§åº' |
| | | and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | products.Add( pisp.Product_MP() ); |
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ){ |
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear |
| | | and ( pispip.NewSupplyQuantity() <> 0 or pispip.PlannedInventoryLevelEnd() <> 0 ) ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | |
| | | if( isccrent or isdltoccrent){ |
| | | if( isdltoccrent){ |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date() |
| | | and engine.Factory() = ccfactory ); |
| | | if( not isnull( enginecost ) ){ |
| | | if( isccrent ){ |
| | | cost := ceil( pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.CCRentStorCost( cell.CCRentStorCost() + cost );//é¿æ¥å¤ç§åºä»å¨è´¹ç¨ |
| | | }else{ |
| | | cell.CCRentQty( cell.CCRentQty() + pispip.NewSupplyQuantity() ); |
| | | cell.CCRentQty( cell.CCRentQty() + pispip.NewSupplyQuantity() ); |
| | | //é¿æ¥å¤ç§åºå
¥åºè´¹ç¨ï¼å
¥åºé/å
è£
容é*å
¥åºåä»· |
| | | entercost := ceil( pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | //é¿æ¥å¤ç§åºåºåºè´¹ç¨: åºåºé/å
è£
容é*åºåºåä»· |
| | | outcost := ceil( pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.OutboundPrice(); |
| | | cell.CCRentInCost( cell.CCRentInCost() + entercost ); |
| | | cell.CCRentOutOfCost( cell.CCRentOutOfCost() + outcost ); |
| | | } |
| | | } |
| | | cost := ceil( pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.CCRentStorCost( cell.CCRentStorCost() + cost );//é¿æ¥å¤ç§åºä»å¨è´¹ç¨ |
| | | } else { |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date() |
| | | and engine.Factory() = dlfactory ); |
| | | if( not isnull( enginecost ) ){ |
| | | cost := ceil( [Number]pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cost := ceil( pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.DLRentStorCost( cell.DLRentStorCost() + cost );//大è¿å¤ç§åºä»å¨è´¹ç¨ |
| | | // info( '**********************', pispip.NewSupplyQuantity() ); |
| | | row.SetDLRentEnterCost( column, enginecost, pispip.NewSupplyQuantity() );//大è¿å¤ç§åºå
¥åºè´¹ç¨ |
| | | transcost := selectobject( transcosts, Elements, trans, trans.StartDate() <= pispip.Start().Date() and trans.EndDate() >= pispip.Start().Date() ); |
| | | if( not isnull( transcost ) ){ |
| | | cost := ceil( ceil( pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | row.SetFactoryToRentTransCost( column, cost ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | //å¨ trip planéæ¾å°å¤§è¿è£
é
线边åºå°å¤§è¿å¤ç§åºçè¿è¾æ°é//大è¿åå
åºå°å¤ç§åº |
| | | traverse( owner, Unit.Lane.LaneLeg, laneleg ){ |
| | | //èµ·å§åºåç¹æ¯å¦æ¯å¤§è¿è£
é
çº¿è¾¹åº |
| | | isdlspline := laneleg.OriginStockingPointID().EndsWith( 'åå
åº' ) and ( laneleg.OriginStockingPointID().StartsWith( '大è¿' ) or laneleg.OriginStockingPointID().StartsWith( 'DL' ) ); |
| | | //ç®çå°æ¯å¦æ¯å¤§è¿å¤ç§åº |
| | | isdlrent := laneleg.DestinationStockingPointID().EndsWith( 'å¤ç§åº' ) and ( laneleg.DestinationStockingPointID().StartsWith( '大è¿' ) or laneleg.DestinationStockingPointID().StartsWith( 'DL' ) ); |
| | | if( isdlspline and isdlrent ){ |
| | | traverse( laneleg, Trip, trip, trip.Departure().Date() < startofnextyear ){//ç±äºéè¦èè产åè¿è¾lead timeï¼æ¯ä¸ªæçæ±æ»æ°æ®éè¦æ¨è¿ä¸¤å¤©è¿è¡è®¡ç® |
| | | periodtime := trip.Departure().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= trip.Departure().Date() and engine.EndDate() >= trip.Departure().Date() ); |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= trip.Departure().Date() and trans.EndDate() >= trip.Departure().Date() ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){ |
| | | traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 and not isnull( column ) and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | quantity := [Number]pit.Quantity(); |
| | | row := table.GetRow( pit.ProductID() ); |
| | | product := pit.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlfactory ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( transcosts, Elements, trans, trans.Origin() = laneleg.OriginStockingPointID() |
| | | and trans.Destination() = laneleg.DestinationStockingPointID() |
| | | and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | products.Add( product ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | //è¿è¾æ°é/å
è£
容é/è£
载容é*è¿è¾åä»· |
| | | cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | cell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + cost ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //大è¿å¤ç§åºå
¥åºè´¹ç¨ï¼å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºå¤§è¿å·¥å该产å产éåå»åå¾é¿æ¥(大è¿çé¿æ¥å¤ç§åºï¼çæ°é-newSupply |
| | | traverse( owner, FinancialProductionSource, source, not source.IsImport() ){//è´¢å¡äº§éæ¥è¡¨é导å
¥ |
| | | traverse( source, FinancialProductionReport, report, not report.IsShow() ){//è´¢å¡äº§éæ¥è¡¨ä¸æ¾ç¤º |
| | | traverse( report, FinancialProductionRow, row, row.Unit() = dlunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0' and not cell.FinancialProductionColumn().IsDay() ) ){//è´¢å¡äº§éæ¥è¡¨éç大è¿äº§é, ä¸ä¸º0 |
| | | product := row.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlfactory ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | products.Add( product ); |
| | | ccrow := table.GetRow( row.Name() ); |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and not cell.FinancialProductionColumn().IsDay() ){ |
| | | cellcolumn := cell.FinancialProductionColumn(); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() ); |
| | | if( not isnull( enginecost ) ){ |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | //大è¿å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrow.SetDLRentEnterCost( column, enginecost, cell ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //大è¿å¤ç§åºåºåºè´¹ç¨ï¼åºåºé/å
è£
容é*åºåºåä»·ï¼åºåºéçäºå¤§è¿å·¥å该产åééåå»åå¾é¿æ¥çæ°é-newSupply, 大è¿åå
åºï¼å¤§è¿å¤ç§åº |
| | | traverse( owner, FinancialSalesSource, source, not source.IsImport() ){//è´¢å¡ééæ¥è¡¨é导å
¥ |
| | | traverse( source, FinancialSalesReport, report, not report.IsShow() ){//è´¢å¡ééæ¥è¡¨ä¸æ¾ç¤º |
| | | traverse( report, FinancialSalesRow, row, row.Unit() = ccunit and exists( row, FinancialSalesCell, cell, cell.Value() <> '0' and not cell.FinancialSalesColumn().IsDay() ) ){//è´¢å¡ééæ¥è¡¨éç大è¿äº§é, ä¸ä¸º0 |
| | | product := row.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlfactory ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | products.Add( product ); |
| | | ccrow := table.GetRow( row.Name() ); |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and not cell.FinancialSalesColumn().IsDay() ){ |
| | | cellcolumn := cell.FinancialSalesColumn(); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() ); |
| | | if( not isnull( enginecost ) ){ |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() ); |
| | | //大è¿å¤ç§åºåºåºè´¹ç¨ |
| | | ccrow.SetDLRentOutCost( column, enginecost, cell ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //traverse( owner, Unit.Lane.LaneLeg, laneleg ){ |
| | | // isdlspline := laneleg.OriginStockingPointID().EndsWith( 'åå
åº' ) and ( laneleg.OriginStockingPointID().StartsWith( '大è¿' ) or laneleg.OriginStockingPointID().StartsWith( 'DL' ) ); |
| | | // //ç®çå°æ¯å¦æ¯å¤§è¿å¤ç§åº |
| | | // isdlrent := laneleg.DestinationStockingPointID().EndsWith( '大è¿å¤ç§åº' ); |
| | | // if( isdlspline and isdlrent ){ |
| | | // traverse( table, Column, column ){ |
| | | // alltrips := selectset( laneleg, Trip, trip, trip.Arrival().Date() < column.StartDate().StartOfNextMonth() and trip.Arrival().Date() >= column.StartDate() ); |
| | | //// info( '--------------------', alltrips.Size(), column.StartDate() ); |
| | | // enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= column.StartDate() and engine.EndDate() >= column.StartDate() ); |
| | | // transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= column.StartDate() and trans.EndDate() >= column.StartDate() ); |
| | | // if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){ |
| | | // producttrips := selectuniquevalues( alltrips, Elements.ProductInTrip, pit, pit.Quantity() <> 0 and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ), pit.ProductID() ); |
| | | //// info( '--------------2---------------', producttrips.Size() ); |
| | | // traverse( producttrips, Elements, producttrip ){ |
| | | // |
| | | // row := table.GetRow( producttrip ); |
| | | // product := selectobject( owner, Product_MP, product, product.ID() = producttrip ); |
| | | // products.Add( product ); |
| | | // quantity := sum( alltrips, Elements.ProductInTrip, pit, pit.Product_MP() = product, pit.Quantity() ); |
| | | // enginecost := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | // and engine.MLB_MQB() = product.MQBMLB() |
| | | // and engine.Factory() = ccfactory ); |
| | | // //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | // transcost := selectobject( transcosts, Elements, trans, trans.Origin() = laneleg.OriginStockingPointID() |
| | | // and trans.Destination() = laneleg.DestinationStockingPointID() |
| | | // and exists( product.GetAllParent(), Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | //// info( '-------------------', not isnull( enginecost ) and not isnull( transcost ), isnull( transcost ), product.ID() ); |
| | | // if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | //// info( '-------------------', product.ID(), transcost.LoadingCapacity() ); |
| | | // cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | // info( quantity, ceil( quantity / enginecost.PackagingCapacity() ), ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) ); |
| | | // row.SetFactoryToRentTransCost( column, cost ); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | //traverse( owner, Unit.Lane.LaneLeg, laneleg ){ |
| | | // //èµ·å§åºåç¹æ¯å¦æ¯å¤§è¿è£
é
çº¿è¾¹åº |
| | | // isdlspline := laneleg.OriginStockingPointID().EndsWith( 'åå
åº' ) and ( laneleg.OriginStockingPointID().StartsWith( '大è¿' ) or laneleg.OriginStockingPointID().StartsWith( 'DL' ) ); |
| | | // //ç®çå°æ¯å¦æ¯å¤§è¿å¤ç§åº |
| | | // isdlrent := laneleg.DestinationStockingPointID().EndsWith( 'å¤ç§åº' ) and ( laneleg.DestinationStockingPointID().StartsWith( '大è¿' ) or laneleg.DestinationStockingPointID().StartsWith( 'DL' ) ); |
| | | // if( isdlspline and isdlrent ){ |
| | | // traverse( laneleg, Trip, trip, trip.Departure().Date() < startofnextyear ){//ç±äºéè¦èè产åè¿è¾lead timeï¼æ¯ä¸ªæçæ±æ»æ°æ®éè¦æ¨è¿ä¸¤å¤©è¿è¡è®¡ç® |
| | | // periodtime := trip.Departure().StartOfMonth().Date(); |
| | | // periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // |
| | | // column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | // enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= trip.Departure().Date() and engine.EndDate() >= trip.Departure().Date() ); |
| | | // transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= trip.Departure().Date() and trans.EndDate() >= trip.Departure().Date() ); |
| | | // if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){ |
| | | // traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 and not isnull( column ) and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | // quantity := [Number]pit.Quantity(); |
| | | // row := table.GetRow( pit.ProductID() ); |
| | | // product := pit.Product_MP(); |
| | | // productparents := product.GetAllParent(); |
| | | // |
| | | // //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | // enginecost := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | // and engine.MLB_MQB() = product.MQBMLB() |
| | | // and engine.Factory() = dlfactory ); |
| | | // //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | // transcost := selectobject( transcosts, Elements, trans, trans.Origin() = laneleg.OriginStockingPointID() |
| | | // and trans.Destination() = laneleg.DestinationStockingPointID() |
| | | // and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | // if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | // products.Add( product ); |
| | | // cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | // //è¿è¾æ°é/å
è£
容é/è£
载容é*è¿è¾åä»· |
| | | // cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | // cell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + cost ); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | //é¿æ¥é¿éè¿è¾è´¹ç¨ï¼è°æ¨æ°é/å
è£
容é/è£
载容é*è¿è¾åä»·ï¼è°æ¨è®¡åéæ¾å°è¯¥äº§åä»DLå°CCçè°æ¨æ°éï¼å³èµ·å§å°å¤§è¿è£
é
线边åºï¼ç®çå°ä¸ºé¿æ¥å¤ç§åºå¯¹åºçè¿è¾æ°éï¼å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容éï¼å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容éï¼ç¨å
¬å¼è®¡ç®å¾åºç»æï¼æåº¦è¿è¡æ±æ» |
| | | traverse( owner, TransferPlanRow, tprow ){ |
| | | product := selectobject( owner, Product_MP, product, product.ID() = tprow.ProductID() ); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //èµ·å§åºåç¹æ¯å¦æ¯å¤§è¿(大è¿åå
åºï¼ |
| | | isdl := tprow.SourceStockpoingPointID().EndsWith( 'åå
åº' ) and ( tprow.TargetStockpoingPointID().StartsWith( '大è¿' ) or tprow.TargetStockpoingPointID().StartsWith( 'DL' ) ); |
| | | //ç®çå°åºåç¹æ¯å¦æ¯é¿æ¥ï¼é¿æ¥å¤ç§åºï¼ |
| | | iscc := tprow.TargetStockpoingPointID().EndsWith( 'å¤ç§åº' ) and ( tprow.TargetStockpoingPointID().StartsWith( 'é¿æ¥' ) or tprow.TargetStockpoingPointID().StartsWith( 'CC' ) ); |
| | | traverse( owner, Unit.Lane.LaneLeg, laneleg ){ |
| | | // isdlspline := laneleg.OriginStockingPointID().EndsWith( 'åå
åº' ) and ( laneleg.OriginStockingPointID().StartsWith( '大è¿' ) or laneleg.OriginStockingPointID().StartsWith( 'DL' ) ); |
| | | // //ç®çå°æ¯å¦æ¯å¤§è¿å¤ç§åº |
| | | // isdlrent := laneleg.DestinationStockingPointID().EndsWith( '大è¿å¤ç§åº' ); |
| | | //èµ·å§åºåç¹æ¯å¦æ¯å¤§è¿(大è¿åå
åºï¼ |
| | | isdl := laneleg.OriginStockingPointID().EndsWith( 'åå
åº' ) and ( laneleg.OriginStockingPointID().StartsWith( '大è¿' ) or laneleg.OriginStockingPointID().StartsWith( 'DL' ) ); |
| | | //ç®çå°åºåç¹æ¯å¦æ¯é¿æ¥ï¼é¿æ¥å¤ç§åºï¼ |
| | | iscc := laneleg.DestinationStockingPointID() = '大è¿å卿ºçé¿æ¥å¤ç§åº'; |
| | | if( isdl and iscc ){ |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccfactory ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.Origin() = tprow.SourceStockpoingPointID() |
| | | and trans.Destination() = tprow.TargetStockpoingPointID() |
| | | and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | // if( isdlspline and isdlrent ){ |
| | | traverse( table, Column, column){//, column.StartDate().Month() = 1 |
| | | alltrips := selectset( laneleg, Trip, trip, trip.Arrival().Date() < column.StartDate().StartOfNextMonth() and trip.Arrival().Date() >= column.StartDate() ); |
| | | // info( '--------------------', alltrips.Size(), column.StartDate() ); |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= column.StartDate() and engine.EndDate() >= column.StartDate() ); |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= column.StartDate() and trans.EndDate() >= column.StartDate() ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){ |
| | | row := table.GetRow( product.ID() ); |
| | | products.Add( product ); |
| | | traverse( tprow,TransferPlanCell, tpcell, tpcell.TransferPlanColumn().ColumnDate() <> Date::MinDate() and [Number]tpcell.Value() > 0){ |
| | | tpcolumndate := tpcell.TransferPlanColumn().ColumnDate(); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= tpcolumndate and engine.EndDate() >= tpcolumndate ); |
| | | transcost := selectobject( transcosts, Elements, trans, trans.StartDate() <= tpcolumndate and trans.EndDate() >= tpcolumndate ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | periodtime := tpcolumndate.StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | |
| | | cost := ceil( ceil( [Number]tpcell.Value() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice(); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCLongTransCost( cell.CCLongTransCost() + cost ); |
| | | } |
| | | producttrips := selectuniquevalues( alltrips, Elements.ProductInTrip, pit, pit.Quantity() <> 0 and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ), pit.ProductID() ); |
| | | // info( '--------------2---------------', producttrips.Size() ); |
| | | traverse( producttrips, Elements, producttrip ){//, producttrip = '6912' |
| | | |
| | | row := table.GetRow( producttrip ); |
| | | product := selectobject( owner, Product_MP, product, product.ID() = producttrip ); |
| | | products.Add( product ); |
| | | quantity := sum( alltrips, Elements.ProductInTrip, pit, pit.Product_MP() = product, pit.Quantity() ); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccfactory ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( transcosts, Elements, trans, trans.Origin() = laneleg.OriginStockingPointID() |
| | | and trans.Destination() = laneleg.DestinationStockingPointID() |
| | | and exists( product.GetAllParent(), Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | // info( '-------------------', not isnull( enginecost ) and not isnull( transcost ), isnull( transcost ), product.ID() ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | // info( '-------------------', product.ID(), transcost.LoadingCapacity() ); |
| | | cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | // info( quantity, ceil( quantity / enginecost.PackagingCapacity() ), ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) ); |
| | | // row.SetFactoryToRentTransCost( column, cost ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCLongTransCost( cell.CCLongTransCost() + cost ) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //traverse( owner, TransferPlanRow, tprow ){ |
| | | // product := selectobject( owner, Product_MP, product, product.ID() = tprow.ProductID() ); |
| | | // productparents := product.GetAllParent(); |
| | | // if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | // //èµ·å§åºåç¹æ¯å¦æ¯å¤§è¿(大è¿åå
åºï¼ |
| | | // isdl := tprow.SourceStockpoingPointID().EndsWith( 'åå
åº' ) and ( tprow.TargetStockpoingPointID().StartsWith( '大è¿' ) or tprow.TargetStockpoingPointID().StartsWith( 'DL' ) ); |
| | | // //ç®çå°åºåç¹æ¯å¦æ¯é¿æ¥ï¼é¿æ¥å¤ç§åºï¼ |
| | | // iscc := tprow.TargetStockpoingPointID().EndsWith( 'å¤ç§åº' ) and ( tprow.TargetStockpoingPointID().StartsWith( 'é¿æ¥' ) or tprow.TargetStockpoingPointID().StartsWith( 'CC' ) ); |
| | | // if( isdl and iscc ){ |
| | | // //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | // enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | // and engine.MLB_MQB() = product.MQBMLB() |
| | | // and engine.Factory() = ccfactory ); |
| | | // //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | // transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.Origin() = tprow.SourceStockpoingPointID() |
| | | // and trans.Destination() = tprow.TargetStockpoingPointID() |
| | | // and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | // if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){ |
| | | // row := table.GetRow( product.ID() ); |
| | | // products.Add( product ); |
| | | // traverse( tprow,TransferPlanCell, tpcell, tpcell.TransferPlanColumn().ColumnDate() <> Date::MinDate() and [Number]tpcell.Value() > 0){ |
| | | // tpcolumndate := tpcell.TransferPlanColumn().ColumnDate(); |
| | | // enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= tpcolumndate and engine.EndDate() >= tpcolumndate ); |
| | | // transcost := selectobject( transcosts, Elements, trans, trans.StartDate() <= tpcolumndate and trans.EndDate() >= tpcolumndate ); |
| | | // if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | // periodtime := tpcolumndate.StartOfMonth(); |
| | | // periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | // |
| | | // cost := ceil( ceil( [Number]tpcell.Value() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice(); |
| | | // cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | // cell.CCLongTransCost( cell.CCLongTransCost() + cost ); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | //é¿æ¥çéè¿è¾è´¹ç¨ï¼å®¢æ·éæ±æ°é/å
è£
容é/è£
载容é*è¿è¾åä»·ï¼å®¢æ·éæ±æ°éåèªforecastésales segmentä¸ºé¿æ¥çæ°éæ±æ»ï¼åç¨å
¬å¼è®¡ç®ï¼æåº¦è¿è¡æ±æ»ï¼å客æ·éæ±æ°éæ¢ç®æè½¦æ¬¡ï¼ |
| | | traverse( owner, SalesDemand.astype( Forecast ), forecast, forecast.Quantity() > 0 and not isnull( forecast.SalesSegment_MP() ) and forecast.StartDate() < startofnextyear ){ |
| | | salessegment := forecast.SalesSegment_MP(); |
| | | parentsalessegments := salessegment.GetAllParent(); |
| | | //æ¯å¦å±äºé¿æ¥ |
| | | iscc := salessegment.Name().StartsWith( 'Changchun' ) or exists( parentsalessegments, Elements, psalessegment, psalessegment.Name().StartsWith( 'Changchun' ) ); |
| | | if( iscc ){ |
| | | product := forecast.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | allforecast := selectset( owner, SalesDemand.astype( Forecast ), forecast, forecast.Quantity() > 0 and not isnull( forecast.SalesSegment_MP() ) and forecast.StartDate() < startofnextyear and //forecast.ProductID() = '6912' and forecast.StartDate().Month() = 1 and |
| | | ( forecast.SalesSegment_MP().Name().StartsWith( 'Changchun' ) or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Changchun' ) ) or forecast.SalesSegment_MP().Name().StartsWith( 'Foshan' ) or forecast.SalesSegment_MP().Name().StartsWith( 'Tianjin' ) |
| | | or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Foshan' ) or psalessegment.Name().StartsWith( 'Tianjin' ) ) ) |
| | | and exists( forecast.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ) ); |
| | | ccforecasts := selectset( allforecast, Elements, forecast, forecast.SalesSegment_MP().Name().StartsWith( 'Changchun' ) or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Changchun' ) ) ); |
| | | ccproducts := selectuniquevalues( ccforecasts, Elements, forecast, forecast.ProductID() ); |
| | | dlforecasts := selectset( allforecast, Elements, forecast, forecast.SalesSegment_MP().Name().StartsWith( 'Foshan' ) or forecast.SalesSegment_MP().Name().StartsWith( 'Tianjin' ) |
| | | or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Foshan' ) or psalessegment.Name().StartsWith( 'Tianjin' ) ) ); |
| | | dlproducts := selectuniquevalues( dlforecasts, Elements, forecast, forecast.ProductID() );; |
| | | traverse( ccproducts, Elements, ccproduct){ |
| | | product := selectobject( owner, Product_MP, product, product.ID() = ccproduct ); |
| | | // info( '************', product.ID(), exists( ccforecasts, Elements, forecast, forecast.Quantity() > 0 )); |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccfactory ); |
| | | and engine.MLB_MQB() = product.MQBMLB()and engine.Factory() = ccfactory ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.Origin() = 'é¿æ¥å¤ç§åº' |
| | | and trans.Destination() = '客æ·åº' |
| | | and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | products.Add( forecast.Product_MP() ); |
| | | row := table.GetRow( forecast.ProductID() ); |
| | | traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() > 0 ){ |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= psdip.StartDate() and engine.EndDate() >= psdip.StartDate() ); |
| | | transcost := selectobject( transcosts, Elements, trans, trans.StartDate() <= psdip.StartDate() and trans.EndDate() >= psdip.StartDate() ); |
| | | if( not isnull( enginecost ) ){ |
| | | periodtime := psdip.StartDate().StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // info( '-------------------------', periodname, periodtime ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | // info( '-------------------------', column.Name() ); |
| | | cost := ceil( ceil( [Number]psdip.Quantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice(); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCShorTransCost( cell.CCShorTransCost() + cost ); |
| | | } |
| | | } |
| | | } |
| | | and exists( product.GetAllParent(), Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){ |
| | | row := table.GetRow( ccproduct ) |
| | | products.Add( product ); |
| | | traverse( table, Column, column ){ |
| | | allpsdips := selectset( ccforecasts, Elements.PlanningSalesDemandInPeriod, psdip, psdip.ProductID() = ccproduct and psdip.Quantity() > 0 and psdip.StartDate() < column.StartDate().StartOfNextMonth() and psdip.StartDate() >= column.StartDate() ); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= column.StartDate() and engine.EndDate() >= column.StartDate() ); |
| | | transcost := selectobject( transcosts, Elements, trans, trans.StartDate() <= column.StartDate() and trans.EndDate() >= column.StartDate() ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | quantity := sum( allpsdips, Elements, psdip, psdip.Quantity() ); |
| | | cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice(); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCShorTransCost( cell.CCShorTransCost() + cost ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //info( '***********1********', dlforecasts.Size() ); |
| | | traverse( dlproducts, Elements, ccproduct){ |
| | | |
| | | row := table.GetRow( ccproduct ) |
| | | product := selectobject( owner, Product_MP, product, product.ID() = ccproduct ); |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB()and engine.Factory() = dlfactory ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | traverse( table, Column, column ){ |
| | | allpsdips := selectset( dlforecasts, Elements.PlanningSalesDemandInPeriod, psdip, psdip.ProductID() = ccproduct and psdip.Quantity() > 0 and psdip.StartDate() < column.StartDate().StartOfNextMonth() and psdip.StartDate() >= column.StartDate() ); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= column.StartDate() and engine.EndDate() >= column.StartDate() ); |
| | | if( not isnull( enginecost ) ){ |
| | | products.Add( product ); |
| | | quantity := sum( allpsdips, Elements, psdip, psdip.Quantity() ); |
| | | |
| | | cost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.OutboundPrice(); |
| | | // info( '******************', quantity, cost ); |
| | | // cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | row.SetDLRentOutCost( column, cost ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | Method SetDLRentEnterCost ( |
| | | DLEngineLogisticsCostColumn column, |
| | | LogisticsCostEngine enginecost, |
| | | FinancialProductionCell fpcell |
| | | Real quantity |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, Cell, cell, cell.Column() = column ); |
| | | quantity := fpcell.Quantity() - cell.CCRentQty(); |
| | | //å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºé¿æ¥äº§é |
| | | cost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | othercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.OtherPrice(); |
| | |
| | | #parent: #root |
| | | Method SetDLRentOutCost ( |
| | | DLEngineLogisticsCostColumn column, |
| | | LogisticsCostEngine enginecost, |
| | | FinancialSalesCell fscell |
| | | Real quantity |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, Cell, cell, cell.Column() = column ); |
| | | quantity := [Number]fscell.Value() - cell.CCRentQty(); |
| | | //å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºé¿æ¥äº§é |
| | | cost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | |
| | | value := cell.DLRentOutOfCost() + cost; |
| | | value := cell.DLRentOutOfCost() + quantity; |
| | | cell.DLRentOutOfCost( value ); |
| | | *] |
| | | } |
| | |
| | | }else if( timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | for( start := starttime; start <= endtime; start := start.StartOfNextMonth() ){ |
| | | monthend := ( start.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | |
| | | this.InventorySummaryColumn( relnew, Name := monthend.Format( "M2/D2/Y" ).Concat( ' ' ).Concat( monthend.Format( "MM" ).Concat( '/').Concat( [String]monthend.Month() ).Concat( 'æ' ) ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | us_locale := Locale::Construct( 'en_us' ); |
| | | this.InventorySummaryColumn( relnew, Name := monthend.Format( "M2/D2/Y" ).Concat( ' ' ).Concat( monthend.Format( "MM", us_locale ).Concat( '/').Concat( [String]monthend.Month() ).Concat( 'æ' ) ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | } |
| | | } |
| | | } |
| | |
| | | [ |
| | | Checked: true |
| | | Label: 'æ¯å¦æ¿æ´»çæ¬' |
| | | Taborder: 8 |
| | | ] |
| | | } |
| | | Component ddlOriginMacroPlan |
| | | { |
| | | #keys: '[415136.0.1043064647]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'ScenarioMP' |
| | | Children: |
| | | [ |
| | | Component deMacroPlan id:deMacroPlan_640 |
| | | { |
| | | #keys: '[415136.0.1043064648]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'ScenarioManager' |
| | | Source: 'ScenarioManager' |
| | | Taborder: 0 |
| | | Transformation: 'ScenarioMP' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | DisplayField: 'Name' |
| | | Label: 'ä»çæ¬' |
| | | Taborder: 4 |
| | | Visible: false |
| | | ] |
| | | } |
| | | Component ddlDestinationMacroPlan |
| | | { |
| | | #keys: '[415136.0.1043064790]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'ScenarioMP' |
| | | Children: |
| | | [ |
| | | Component deMacroPlan950 |
| | | { |
| | | #keys: '[415136.0.1043064791]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'ScenarioManager' |
| | | Source: 'ScenarioManager' |
| | | Taborder: 0 |
| | | Transformation: 'ScenarioMP' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | DisplayField: 'Name' |
| | | Label: 'å°çæ¬' |
| | | Taborder: 6 |
| | | Visible: false |
| | | ] |
| | | } |
| | | Component efVersionFrom |
| | |
| | | Properties: |
| | | [ |
| | | Label: 'ä»çæ¬' |
| | | Taborder: 5 |
| | | Taborder: 4 |
| | | ] |
| | | } |
| | | Component efVersionTo |
| | |
| | | Properties: |
| | | [ |
| | | Label: 'å°çæ¬' |
| | | Taborder: 7 |
| | | Taborder: 5 |
| | | ] |
| | | } |
| | | Component ddslFactory |
| | |
| | | BaseType: 'WebDropDownStringList' |
| | | Properties: |
| | | [ |
| | | InitialValue: 'all;8200;8201' |
| | | Label: 'å·¥å代ç ' |
| | | Strings: 'All;DL;CC' |
| | | Taborder: 1 |
| | |
| | | Taborder: 4 |
| | | ] |
| | | } |
| | | Component ddlMacroPlan |
| | | { |
| | | #keys: '[415136.0.1043063334]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'ScenarioMP' |
| | | Children: |
| | | [ |
| | | Component deMacroPlan |
| | | { |
| | | #keys: '[415136.0.1043063336]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'ScenarioManager' |
| | | Source: 'ScenarioManager' |
| | | Taborder: 0 |
| | | Transformation: 'ScenarioMP' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | DisplayField: 'Name' |
| | | Label: 'çæ¬' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component ddslFactory id:ddslFactory_424 |
| | | { |
| | | #keys: '[415136.0.1047641312]' |
| | | BaseType: 'WebDropDownStringList' |
| | | Properties: |
| | | [ |
| | | InitialValue: 'all;8200;8201' |
| | | Label: 'å·¥å代ç ' |
| | | Strings: 'All;DL;CC' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component efVersion |
| | | { |
| | | #keys: '[415136.0.1184400599]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | Label: 'çæ¬' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | |
| | | Body: |
| | | [* |
| | | Form.ApplyChanges(); |
| | | componentmds := ApplicationScope.ComponentMDS(); |
| | | mdsinstance := select( componentmds, ComponentMDSKinds.ComponentMDSInstances, m, m.MDSID().MDSKey() = ddlMacroPlan.Data().DatasetMDSID() ); |
| | | handle := mdsinstance.GetMDSHandle() |
| | | macroplan := handle.AsMacroPlan(); |
| | | AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, ddslFactory.Text(), macroplan, dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName() ); |
| | | AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, ddslFactory.Text(), efVersion.Text(), dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName() ); |
| | | WebMessageBox::Success( "æ¨éæåï¼" ); |
| | | Form.Close(); |
| | | *] |