| | |
| | | , Name := Translations::InterfaceDataset_AOnlineAndMOfflinePlanMS64_Name() |
| | | , InterfaceDateTime := nowdate |
| | | , Message := 'è£
é
ä¸çº¿è®¡å + æºå ä¸çº¿è®¡å - MS64' |
| | | , IsShow := false |
| | | // , IsShow := false |
| | | , Last := true |
| | | , ReturnSuccess := true |
| | | , ReturnMsg := 'Success' |
| | |
| | | , Name := Translations::InterfaceDataset_AOnlineAndMOfflinePlanPIR_Name() |
| | | , InterfaceDateTime := nowdate |
| | | , Message := 'è£
é
ä¸çº¿è®¡å + æºå ä¸çº¿è®¡å - PIR' |
| | | , IsShow := false |
| | | // , IsShow := false |
| | | , Last := true |
| | | , ReturnSuccess := true |
| | | , ReturnMsg := 'Success' |
| | |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | 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() ); |
| | | |
| | | weekend := ( weekstart + Duration::Days( 6 ) ).Date(); |
| | | if( ( weekend.Year() <> periodtime.Year() and weekend.Month() > 1 ) or ( abs( weekstart.Week() - periodtime.Week() ) > 1 and weekend.Year() = periodtime.Year() ) ){ |
| | | weekstart := periodtime; |
| | | } |
| | | 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(); |
| | | this.Column( relnew, Name := weekperiodname, StartDate := weekstart, EndDate := ( weekstart.StartOfNextWeek() - Duration::Days( 1 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | |
| | | } |
| | | if( ( monthstart.Year() <> periodtime.Year() and abs( monthstart.Month() - periodtime.Month() ) <> 11 ) or ( abs( monthstart.Month() - periodtime.Month() ) > 1 and monthstart.Year() = periodtime.Year() ) ){ |
| | | monthstart := periodtime; |
| | | } |
| | | 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(); |
| | | |
| | | } |
| | | weekstart := periodtime.StartOfNextWeek(); |
| | | monthstart := periodtime.StartOfNextMonth(); |
| | | } |
| | | *] |
| | | } |
| | |
| | | #parent: #root |
| | | StaticMethod GenerateData ( |
| | | InterfaceDataset interface, |
| | | const MacroPlan macroplan, |
| | | RecycleBin recycle, |
| | | const Archive archive |
| | | ) |
| | |
| | | [* |
| | | // çå
°é¸½ Aug-20-2024 (created) |
| | | interface.CustomerDemandIDS( relflush ); |
| | | interface.CustomerDemandIDSSearch( relflush ); |
| | | //interface.CustomerDemandIDSSearch( relflush ); |
| | | info( '-------------------------Start---------------------'); |
| | | 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 := '客æ·éæ±' ); |
| | | if( isnull( interface.CustomerDemandIDSSearch() ) ){ |
| | | interface.CustomerDemandIDSSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit ); |
| | | } |
| | | idstable := selectobject( interface, CustomerDemandIDS, idstable, idstable.ID() = '客æ·éæ±' ); |
| | | if( isnull( idstable ) ){ |
| | | idstable := interface.CustomerDemandIDS( relnew, ID := '客æ·éæ±', Name := '客æ·éæ±' ); |
| | | } |
| | | binaryValue := TemplateManager::GetIDSFullTable( archive, Date::ActualDate().Year() ); |
| | | source := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" ); |
| | | source.ReadStructure(); |
| | |
| | | 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() ) ); |
| | | //} |
| | | ppadates := selectuniquevalues( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA', forecast.StartDate() ); |
| | | periods := idsdates.Union( ppadates ); |
| | | periods := selectuniquevalues( periods, Elements, e, e ); |
| | | idstable.GenerateColumn( periods.Sort() ); |
| | | periods := selectuniquevalues( periods, Elements, e, not exists( idstable, Column, column, column.StartDate() = e ), e ); |
| | | if( periods.Size() > 0 ){ |
| | | idstable.GenerateColumn( periods.Sort() ); |
| | | } |
| | | traverse( recycle, GeneralExcelImportAndExportDataSource.GeneralExcelImportAndExportDataTable, table ){ |
| | | traverse( table, GeneralExcelImportAndExportDataRow, row ){ |
| | | productcell := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 ); |
| | |
| | | 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() ); |
| | | 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() ); |
| | | traverse ( macroplan, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.Product_MP() ) and forecast.Origin() = 'PPA' ){ |
| | | traverse( forecast, PlanningSalesDemandInPeriod, sdip ){ |
| | | idsrow := idstable.GetRowByUnit( forecast.ProductID(), forecast.SalesSegmentName() ); |
| | | daycolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), sdip.StartDate() ); |
| | | weekcolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Week(), sdip.StartDate() ); |
| | | monthcolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Month(), sdip.StartDate() ); |
| | | info( '-----------------', isnull( idsrow ), isnull( daycolumn ), isnull( weekcolumn ), isnull( monthcolumn ), sdip.StartDate() ); |
| | | idsrow.SetCellValue( daycolumn, [Number]sdip.Quantity() ); |
| | | idsrow.SetCellValue( weekcolumn, [Number]sdip.Quantity() ); |
| | | idsrow.SetCellValue( monthcolumn, [Number]sdip.Quantity() ); |
| | | } |
| | | } |
| | | |
| | | source.Delete(); |
| | | info( '-------------------------End---------------------'); |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Oct-30-2024 (created) |
| | | if( iscustomdemand ){//å
¨å¹´æ¥åº¦éæ±/客æ·éæ± |
| | | CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |
| | | if( iscustomdemand ){//å
¨å¹´æ¥åº¦éæ±/客æ·éæ± |
| | | CustomerDemandIDS::GenerateData( this, macroplan, recyclebin, archive ); |
| | | } |
| | | if( isofflineplan ){//å产线ä¸çº¿è®¡å |
| | | OfflinePlanArchiveVersion::RefreshData( this, macroplan, archive ); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: pnlLeft_88/ddslFactory |
| | | Response OnCreated () id:Response_pnlLeft_88_ddslFactory_OnCreated |
| | | { |
| | | #keys: '[415136.0.1271601330]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebComponent_OnCreated' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | valueString := "All"; |
| | | |
| | | this.Strings( valueString.Concat( ";" ).Concat( FinancialProductionReport::GetDefaultCCUnit().Concat( ";" ) ).Concat( FinancialProductionReport::GetDefaultDLUnit() ) ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | //åå§å |
| | | CustomerDemandIDS::GenerateData( InterfaceDataset, RecycleBin, Archive ); |
| | | //CustomerDemandIDS::GenerateData( InterfaceDataset, RecycleBin, Archive ); |
| | | |
| | | dhSearch.Data( InterfaceDataset.CustomerDemandIDSSearch() ); |
| | | *] |
| | |
| | | Body: |
| | | [* |
| | | FinancialProductionSource::Initialize( MacroPlan ); |
| | | excelsource := selectobject( MacroPlan, FinancialProductionSource, excelsource, excelsource.IsImport() ); |
| | | excelsource := maxobject( MacroPlan, FinancialProductionSource, excelsource, excelsource.IsImport(), excelsource.UploadDateTime() ); |
| | | if( not isnull( excelsource ) ){ |
| | | excelsource.AfterImport(); |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | FinancialSalesSource::InitializeNew( MacroPlan ); |
| | | excelsource := selectobject( MacroPlan, FinancialSalesSource, excelsource, excelsource.IsImport() ); |
| | | excelsource := maxobject( MacroPlan, FinancialSalesSource, excelsource, excelsource.IsImport(), excelsource.UploadDateTime() ); |
| | | if( not isnull( excelsource ) ){ |
| | | excelsource.AfterImport(); |
| | | } |