¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CCEngineLogisticsCostExcel_MacroPlan_MacroPlan_CCEngineLogisticsCostExcel |
| | | { |
| | | #keys: '1[415136.0.1234200117]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide MacroPlan |
| | | { |
| | | #keys: '3[415136.0.1234200119][415136.0.1234200118][415136.0.1234200120]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CCEngineLogisticsCostExcel |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide CCEngineLogisticsCostExcel |
| | | { |
| | | #keys: '3[415136.0.1234200122][415136.0.1234200121][415136.0.1234200123]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MacroPlan |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation DLEngineLogisticsCostExcel_MacroPlan_MacroPlan_DLEngineLogisticsCostExcel |
| | | { |
| | | #keys: '1[415136.0.1234200080]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide MacroPlan |
| | | { |
| | | #keys: '3[415136.0.1234200082][415136.0.1234200081][415136.0.1234200083]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: DLEngineLogisticsCostExcel |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide DLEngineLogisticsCostExcel |
| | | { |
| | | #keys: '3[415136.0.1234200085][415136.0.1234200084][415136.0.1234200086]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MacroPlan |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute FileBinaryValue |
| | | { |
| | | #keys: '3[415136.0.1234200111][415136.0.1234200110][415136.0.1234200112]' |
| | | ValueType: BinaryValue |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Name |
| | | { |
| | | #keys: '3[415136.0.1234200105][415136.0.1234200104][415136.0.1234200106]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute UploadDateTime |
| | | { |
| | | #keys: '3[415136.0.1234200108][415136.0.1234200107][415136.0.1234200109]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Name |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: UploadDateTime |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type CCEngineLogisticsCostExcel |
| | | { |
| | | #keys: '5[415136.0.1234200102][415136.0.1234200100][0.0.0][415136.0.1234200101][415136.0.1234200103]' |
| | | BaseType: Object |
| | | Description: 'é¿æ¥å卿ºç©æµææ¬æ¥è¡¨å¯¼å
¥excel' |
| | | StructuredName: 'CCEngineLogisticsCostExcels' |
| | | } |
| | |
| | | StaticMethod Import ( |
| | | MacroPlan owner, |
| | | RecycleBin recycle, |
| | | BinaryValue binaryValue, |
| | | String filePath |
| | | BinaryValue binaryValue |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Sep-20-2024 (created) |
| | | //name := CCEngineLogisticsCostReport::GetDefaultName(); |
| | | |
| | | source := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" ); |
| | | source.ReadStructure(); |
| | | Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) ); |
| | |
| | | } |
| | | } |
| | | } |
| | | owner.DLEngineLogisticsCostExcel( relnew, Name := CCEngineLogisticsCostReport::GetDefaultName(), FileBinaryValue := binaryValue, UploadDateTime := DateTime::ActualTime().Format( "Y-M2-D2 H:m:s" ) ); |
| | | *] |
| | | } |
| | |
| | | // i := i + 1; |
| | | //} |
| | | // |
| | | showtable.Generate( search, products ); |
| | | //showtable.Generate( search, products ); |
| | | *] |
| | | } |
| | |
| | | StaticMethod Import ( |
| | | MacroPlan owner, |
| | | RecycleBin recycle, |
| | | BinaryValue binaryValue, |
| | | String filePath |
| | | BinaryValue binaryValue |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Sep-20-2024 (created) |
| | | //name := CCEngineLogisticsCostReport::GetDefaultName(); |
| | | |
| | | source := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" ); |
| | | source.ReadStructure(); |
| | | Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) ); |
| | |
| | | } |
| | | } |
| | | } |
| | | owner.DLEngineLogisticsCostExcel( relnew, Name := DLEngineLogisticsCostReport::GetDefaultName(), FileBinaryValue := binaryValue, UploadDateTime := DateTime::ActualTime().Format( "Y-M2-D2 H:m:s" ) ); |
| | | *] |
| | | } |
| | |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | table := owner.DLEngineLogisticsCostReport( relnew, ID := name, Name := name ); |
| | | showtable := owner.DLEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true ); |
| | | search := owner.DLEngineLogisticsCostSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit ); |
| | | owner.DLEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true ); |
| | | owner.DLEngineLogisticsCostSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit ); |
| | | |
| | | products := construct( Product_MPs ); |
| | | |
| | |
| | | //} |
| | | info( '-------------------------------------end----------------------------------' ); |
| | | // |
| | | showtable.Generate( search, products ); |
| | | //showtable.Generate( search, products ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute FileBinaryValue |
| | | { |
| | | #keys: '3[415136.0.1234200077][415136.0.1234200076][415136.0.1234200078]' |
| | | ValueType: BinaryValue |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Name |
| | | { |
| | | #keys: '3[415136.0.1234200067][415136.0.1234200066][415136.0.1234200068]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute UploadDateTime |
| | | { |
| | | #keys: '3[415136.0.1234200073][415136.0.1234200072][415136.0.1234200074]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Name |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: UploadDateTime |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type DLEngineLogisticsCostExcel |
| | | { |
| | | #keys: '5[415136.0.1234200060][415136.0.1234200058][0.0.0][415136.0.1234200059][415136.0.1234200061]' |
| | | BaseType: Object |
| | | Description: '大è¿å卿ºç©æµææ¬æ¥è¡¨å¯¼å
¥excel' |
| | | StructuredName: 'DLEngineLogisticsCostExcels' |
| | | } |
| | |
| | | |
| | | traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){ |
| | | |
| | | column := selectobject( this, Column, column, column.Name() = cell.Column().Name() and column.TimeUnit() = search.TimeUnit() ); |
| | | column := selectobject( this, Column, column, column.StartDate() = cell.Column().StartDate() and column.TimeUnit() = search.TimeUnit() ); |
| | | |
| | | if( not isnull( column ) ){ |
| | | |
| | |
| | | for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){ |
| | | weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();//Name := weekend.Format( "M2/D2/Y" ) |
| | | |
| | | this.Column( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | this.Column( relnew, Name := weekend.Format( "M2/D2" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | } |
| | | } |
| | | } |
| | |
| | | table := selectobject( this, FinancialProductionSource.FinancialProductionReport, report, not report.IsShow() ); |
| | | //æ¸
空ä¹ååå¨çæ¾ç¤ºæ°æ® |
| | | this.Clear(); |
| | | //å¹´æ±æ» |
| | | yearcolumn := this.FinancialProductionColumn( relnew, Name := 'æ±æ»', Period := this.FinancialProductionSource().MacroPlan().StartOfPlanning().StartOfNextYear().Date() ); |
| | | traverse( factorys, Elements, factory ){ |
| | | this.GenerateShow( table, productids, factory.ID() ); |
| | | this.GenerateShow( table, yearcolumn, productids, factory.ID() ); |
| | | } |
| | | rows := selectsortedset( this, FinancialProductionRow, row, row.Name() ); |
| | | i := 0; |
| | |
| | | #parent: #root |
| | | Method GenerateShow ( |
| | | FinancialProductionReport table, |
| | | FinancialProductionColumn yearcolumn, |
| | | Strings productids, |
| | | String factory |
| | | ) |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Oct-12-2024 (created) |
| | | //å¹´æ±æ» |
| | | yearcolumn := this.FinancialProductionColumn( relnew, Name := 'æ±æ»', Period := this.FinancialProductionSource().MacroPlan().StartOfPlanning().StartOfNextYear().Date() ); |
| | | allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | |
| | | sumrow := this.FinancialProductionRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( 'SUM' ), Factory := factory ); |
| | | sumyearcell := yearcolumn.FinancialProductionCell( relnew, Quantity := 0 ); |
| | | sumrow.FinancialProductionCell( relinsert, sumyearcell ); |
| | | traverse( table, FinancialProductionRow, row, row.Unit() = factory ){ |
| | | traverse( table, FinancialProductionRow, row, factory = allunit or row.Unit() = factory ){ |
| | | productid := construct( Strings ); |
| | | productid.Add( row.Name() ); |
| | | |
| | | if( productids.ContainsAll( productid ) ){ |
| | | showrow := this.FinancialProductionRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit(), Factory := factory ); |
| | | row.Product_MP().FinancialProductionRow( relinsert, showrow ); |
| | | yearcell := yearcolumn.FinancialProductionCell( relnew, Quantity := 0 ); |
| | | showrow.FinancialProductionCell( relinsert, yearcell ); |
| | | isupdate := false; |
| | | showrow := selectobject( this, FinancialProductionRow, fprow, fprow.Name() = factory.Format( 'S(Len(10))' ).Concat( row.Name() ) and fprow.Unit() = factory and factory = factory ); |
| | | if( isnull( showrow ) ){ |
| | | showrow := this.FinancialProductionRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := factory, Factory := factory ); |
| | | row.Product_MP().FinancialProductionRow( relinsert, showrow ); |
| | | } |
| | | yearcell := selectobject( yearcolumn, FinancialProductionCell, fpcell, fpcell.FinancialProductionRow() = showrow ); |
| | | if( isnull( yearcell ) ){ |
| | | yearcell := yearcolumn.FinancialProductionCell( relnew, Quantity := 0 ); |
| | | showrow.FinancialProductionCell( relinsert, yearcell ); |
| | | } |
| | | traverse( row, FinancialProductionCell, cell, not cell.FinancialProductionColumn().IsDay() ){ |
| | | column := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() and not column.IsDay() ); |
| | | if( isnull( column ) ){ |
| | | column := this.FinancialProductionColumn( relnew, Name := cell.FinancialProductionColumn().Name(), Period := cell.FinancialProductionColumn().Period() ); |
| | | } |
| | | |
| | | sumcell := selectobject( column, FinancialProductionCell, c, c.FinancialProductionRow() = sumrow ); |
| | | if( isnull( sumcell ) ){ |
| | |
| | | sumrow.FinancialProductionCell( relinsert, sumcell ); |
| | | } |
| | | |
| | | showcell := column.FinancialProductionCell( relnew, Quantity := cell.Quantity(), IsUpdate := cell.IsUpdate() ); |
| | | showrow.FinancialProductionCell( relinsert, showcell ); |
| | | showcell := selectobject( showrow, FinancialProductionCell, fpcell, fpcell.FinancialProductionColumn() = column ); |
| | | if( isnull( showcell ) ){ |
| | | showcell := column.FinancialProductionCell( relnew, Quantity := 0, IsUpdate := cell.IsUpdate() ); |
| | | showrow.FinancialProductionCell( relinsert, showcell ); |
| | | } |
| | | if( cell.IsUpdate() ){ |
| | | isupdate := true; |
| | | showcell.IsUpdate( cell.IsUpdate() ); |
| | | } |
| | | showcell.Quantity( showcell.Quantity() + cell.Quantity() ); |
| | | yearcell.Quantity( yearcell.Quantity() + cell.Quantity() ); |
| | | sumyearcell.Quantity( sumyearcell.Quantity() + cell.Quantity() ); |
| | | sumcell.Quantity( sumcell.Quantity() + cell.Quantity() ); |
| | | } |
| | | if( isupdate ){ |
| | | yearcell.IsUpdate( isupdate ); |
| | | } |
| | | } |
| | | } |
| | | traverse( this, FinancialProductionColumn, column ){ |
| | | if( exists( column, FinancialProductionCell, cell, cell.IsUpdate() ) ){ |
| | | if( exists( column, FinancialProductionCell, cell, cell.IsUpdate() and cell.FinancialProductionRow().Factory() = factory ) ){ |
| | | sumcell := selectobject( sumrow, FinancialProductionCell, sumcell, sumcell.FinancialProductionColumn() = column ); |
| | | sumcell.IsUpdate( true ); |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | //allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | //æ¥è¯¢éè¦å¯¼å
¥çæ¥è¡¨ |
| | | table := selectobject( this.MacroPlan(), FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() and not table.IsShow() ); |
| | | yearday := this.MacroPlan().StartOfPlanning().StartOfYear(); |
| | |
| | | if( isnull( unitrow ) ){ |
| | | unitrow := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := unit.Value() ); |
| | | } |
| | | allrow := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit ); |
| | | if( isnull( unitrow ) ){ |
| | | allrow := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := allunit ); |
| | | } |
| | | // allrow := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit ); |
| | | // if( isnull( unitrow ) ){ |
| | | // allrow := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := allunit ); |
| | | // } |
| | | |
| | | //è¯»åæ¯ä¸è¡çåå
æ ¼ |
| | | traverse( row, FinancialProductionCell, cell, cell.FinancialProductionColumn() <> productcolumn and cell.FinancialProductionColumn() <> unitcolumn and cnv2.Convert( cell.FinancialProductionColumn().Name() ) <> beforeyearday ){ |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and cell.FinancialProductionColumn() <> productcolumn and cell.FinancialProductionColumn() <> unitcolumn and cnv2.Convert( cell.FinancialProductionColumn().Name() ) <> beforeyearday ){ |
| | | period := cnv2.Convert( cell.FinancialProductionColumn().Name() ) |
| | | periodname := yearday.Format( "M2/D2/Y" ); |
| | | periodname := period.Format( "M2/D2/Y" ); |
| | | quantity := [Real]cell.Value(); |
| | | previouscolumn := cell.FinancialProductionColumn().PreviousColumn(); |
| | | if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){ |
| | | previouscell := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn ); |
| | | quantity := [Real]cell.Value() + [Real]previouscell.Value(); |
| | | } |
| | | // info( '-----------------', period ); |
| | | //è·å被导å
¥æ¥è¡¨çæ¥æå |
| | | tablecolumn := selectobject( table, FinancialProductionColumn, column, not column.IsDay() and column.Name() = periodname ); |
| | | tablecolumn := selectobject( table, FinancialProductionColumn, column, not column.IsDay() and column.Name() = periodname ); |
| | | if( isnull( tablecolumn ) ){ |
| | | tablecolumn := table.FinancialProductionColumn( relnew, Name := periodname, Period := yearday.Date() ); |
| | | tablecolumn := table.FinancialProductionColumn( relnew, Name := periodname, Period := yearday.Date() ); |
| | | } |
| | | //è·å被导å
¥æ¥è¡¨çåå
æ ¼ |
| | | unitcell := selectobject( unitrow, FinancialProductionCell, unitcell, unitcell.FinancialProductionColumn() = tablecolumn ); |
| | | // allcell := selectobject( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = tablecolumn ); |
| | | // if( isnull( allcell ) ){ |
| | | // allcell := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() ); |
| | | // allrow.FinancialProductionCell( relinsert, allcell ); |
| | | // }else{ |
| | | // if( allcell.Quantity() <> quantity ){ |
| | | // allcell.Quantity( quantity ); |
| | | // allcell.IsUpdate( true ); |
| | | // } |
| | | // } |
| | | if( isnull( unitcell ) ){ |
| | | unitcell := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() ); |
| | | unitrow.FinancialProductionCell( relinsert, unitcell ); |
| | | }else{ |
| | | previouscolumn := cell.FinancialProductionColumn().PreviousColumn(); |
| | | if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){ |
| | | previouscell := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn ); |
| | | quantity := [Real]cell.Value() + [Real]previouscell.Value(); |
| | | if( unitcell.Quantity() <> quantity ){ |
| | | unitcell.Quantity( quantity ); |
| | | unitcell.IsUpdate( true ); |
| | | } |
| | | if( unitcell.Quantity() <> quantity ){ |
| | | unitcell.Quantity( quantity ); |
| | | unitcell.IsUpdate( true ); |
| | | } |
| | | } |
| | | allcell := selectobject( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = tablecolumn ); |
| | | if( isnull( unitcell ) ){ |
| | | allcell := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() ); |
| | | allrow.FinancialProductionCell( relinsert, allcell ); |
| | | }else{ |
| | | previouscolumn := cell.FinancialProductionColumn().PreviousColumn(); |
| | | if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){ |
| | | previouscell := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn ); |
| | | quantity := [Real]cell.Value() + [Real]previouscell.Value(); |
| | | if( unitcell.Quantity() <> quantity ){ |
| | | allcell.Quantity( [Real]cell.Value() ); |
| | | allcell.IsUpdate( true ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | owner.FPImportData( relflush ); |
| | | ccunit := FinancialProductionReport::GetDefaultCCUnit(); |
| | | dlunit := FinancialProductionReport::GetDefaultDLUnit(); |
| | | allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | //allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | source := owner.FinancialProductionSource( relnew, IsImport := false, Name := FinancialProductionReport::GetDefaultName() ); |
| | | table := source.FinancialProductionReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false ); |
| | | source.FinancialProductionReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true ); |
| | | startofplanning := owner.StartOfPlanning().Date(); |
| | | //startofyear := startofplanning.StartOfYear(); |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | //search := owner.FinancialProductionSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit ); |
| | | |
| | | productids := construct( Strings ); |
| | | table.GenerateColumn( owner ); |
| | |
| | | //è·åå·¥åè¡ |
| | | factoryrow := table.GetRowByUnit( pisp.Product_MP(), ifexpr( iscc, ccunit, dlunit ) ); |
| | | //è·ååè®¡è¡ |
| | | allrow := table.GetRowByUnit( pisp.Product_MP(), allunit ); |
| | | // allrow := table.GetRowByUnit( pisp.Product_MP(), allunit ); |
| | | productids.Add( pisp.ProductID() ); |
| | | //å½product planningçæ¥æåºé´å¨éè¦çæ¥æåºé´å
|
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ){ |
| | |
| | | column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() ); |
| | | factoryrow.Initialize( daycolumn, pispip.NewSupplyQuantity() ); |
| | | factoryrow.Initialize( column, pispip.NewSupplyQuantity() ); |
| | | allrow.Initialize( column, pispip.NewSupplyQuantity() ); |
| | | // allrow.Initialize( column, pispip.NewSupplyQuantity() ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | excelsource := selectobject( owner, FinancialProductionSource, excelsource, excelsource.IsImport() ); |
| | | if( not isnull( excelsource ) ){ |
| | | excelsource.AfterImport(); |
| | | } |
| | | |
| | | //factorys := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ); |
| | | //showtable.Generate( search, factorys, productids ); |
| | | *] |
| | |
| | | table := selectobject( this, FinancialSalesSource.FinancialSalesReport, report, not report.IsShow() ); |
| | | //æ¸
空ä¹ååå¨çæ¾ç¤ºæ°æ® |
| | | this.Clear(); |
| | | //å¹´æ±æ» |
| | | yearcolumn := this.FinancialSalesColumn( relnew, Name := 'æ±æ»', Period := search.MacroPlan().StartOfPlanning().StartOfNextYear().Date() ); |
| | | traverse( factorys, Elements, factory ){ |
| | | this.GenerateShow( table, productids, factory.ID() ); |
| | | this.GenerateShow( table, yearcolumn, productids, factory.ID() ); |
| | | } |
| | | rows := selectsortedset( this, FinancialSalesRow, row, row.Name() ); |
| | | i := 0; |
| | |
| | | #parent: #root |
| | | Method GenerateShow ( |
| | | FinancialSalesReport table, |
| | | FinancialSalesColumn yearcolumn, |
| | | Strings productids, |
| | | String factory |
| | | ) |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Oct-12-2024 (created) |
| | | //å¹´æ±æ» |
| | | yearcolumn := this.FinancialSalesColumn( relnew, Name := 'æ±æ»', Period := this.FinancialSalesSource().MacroPlan().StartOfPlanning().StartOfNextYear().Date() ); |
| | | sumrow := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( 'SUM' ), Factory := factory ); |
| | | sumyearcell := yearcolumn.FinancialSalesCell( relnew, Value := '0' ); |
| | | allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | |
| | | sumrow := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( 'SUM' ), Factory := factory ); |
| | | sumyearcell := yearcolumn.FinancialSalesCell( relnew, Value := '0' ); |
| | | sumrow.FinancialSalesCell( relinsert, sumyearcell ); |
| | | traverse( table, FinancialSalesRow, row, row.Unit() = factory ){ |
| | | productid := construct( Strings ); |
| | | //error( '-----------------', productids.Size(), selectset( table, FinancialSalesRow, row, factory = allunit or row.Unit() = factory ).Size() ); |
| | | traverse( table, FinancialSalesRow, row, factory = allunit or row.Unit() = factory ){ |
| | | productid := construct( Strings ); |
| | | productid.Add( row.Name() ); |
| | | |
| | | if( productids.ContainsAll( productid ) ){ |
| | | showrow := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit(), Factory := factory ); |
| | | row.Product_MP().FinancialSalesRow( relinsert, showrow ); |
| | | yearcell := yearcolumn.FinancialSalesCell( relnew, Value := '0' ); |
| | | showrow.FinancialSalesCell( relinsert, yearcell ); |
| | | isupdate := false; |
| | | showrow := selectobject( this, FinancialSalesRow, fprow, fprow.Name() = factory.Format( 'S(Len(10))' ).Concat( row.Name() ) and fprow.Unit() = factory and factory = factory ); |
| | | if( isnull( showrow ) ){ |
| | | showrow := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := factory, Factory := factory ); |
| | | row.Product_MP().FinancialSalesRow( relinsert, showrow ); |
| | | } |
| | | yearcell := selectobject( yearcolumn, FinancialSalesCell, fpcell, fpcell.FinancialSalesRow() = showrow ); |
| | | if( isnull( yearcell ) ){ |
| | | yearcell := yearcolumn.FinancialSalesCell( relnew, Value := '0' ); |
| | | showrow.FinancialSalesCell( relinsert, yearcell ); |
| | | } |
| | | |
| | | traverse( row, FinancialSalesCell, cell, not cell.FinancialSalesColumn().IsDay() ){ |
| | | column := selectobject( this, FinancialSalesColumn, column, column.Name() = cell.FinancialSalesColumn().Name() and not column.IsDay()); |
| | | |
| | | if( isnull( column ) ){ |
| | | column := this.FinancialSalesColumn( relnew, Name := cell.FinancialSalesColumn().Name(), Period := cell.FinancialSalesColumn().Period() ); |
| | | } |
| | | sumcell := selectobject( column, FinancialSalesCell, c, c.FinancialSalesRow() = sumrow ); |
| | | if( isnull( sumcell ) ){ |
| | | sumcell := column.FinancialSalesCell( relnew, Value := '0' ); |
| | | sumrow.FinancialSalesCell( relinsert, sumcell ); |
| | | } |
| | | |
| | | showcell := column.FinancialSalesCell( relnew, Value := cell.Value(), IsUpdate := cell.IsUpdate() ); |
| | | showrow.FinancialSalesCell( relinsert, showcell ); |
| | | showcell := selectobject( showrow, FinancialSalesCell, fpcell, fpcell.FinancialSalesColumn() = column ); |
| | | if( isnull( showcell ) ){ |
| | | showcell := column.FinancialSalesCell( relnew, Value := '0', IsUpdate := cell.IsUpdate() ); |
| | | showrow.FinancialSalesCell( relinsert, showcell ); |
| | | } |
| | | if( cell.IsUpdate() ){ |
| | | isupdate := true; |
| | | showcell.IsUpdate( cell.IsUpdate() ); |
| | | } |
| | | showcell.Value( [String]( [Real]showcell.Value() + [Real]cell.Value() ) ); |
| | | yearcell.Value( [String]( [Real]yearcell.Value() + [Real]cell.Value() ) ); |
| | | sumyearcell.Value( [String]( [Real]sumyearcell.Value() + [Real]cell.Value() ) ); |
| | | value := [Real]cell.Value() + [Real]sumcell.Value(); |
| | | sumcell.Value( [String]value ); |
| | | } |
| | | if( isupdate ){ |
| | | yearcell.IsUpdate( isupdate ); |
| | | } |
| | | } |
| | | } |
| | | traverse( this, FinancialSalesColumn, column ){ |
| | | if( exists( column, FinancialSalesCell, cell, cell.IsUpdate() ) ){ |
| | | if( exists( column, FinancialSalesCell, cell, cell.IsUpdate() and cell.FinancialSalesRow().Factory() = factory ) ){ |
| | | sumcell := selectobject( sumrow, FinancialSalesCell, sumcell, sumcell.FinancialSalesColumn() = column ); |
| | | sumcell.IsUpdate( true ); |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | //allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | table := selectobject( this.MacroPlan(), FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and not table.IsShow() ); |
| | | yearday := this.MacroPlan().StartOfPlanning().StartOfYear(); |
| | | beforeyearday := ( yearday - Duration::Days( 1 ) ).Date(); |
| | |
| | | if( isnull( unitrow ) ){ |
| | | unitrow := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := unit.Value() ); |
| | | } |
| | | allrow := selectobject( table, FinancialSalesRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit ); |
| | | if( isnull( unitrow ) ){ |
| | | allrow := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := allunit ); |
| | | } |
| | | // allrow := selectobject( table, FinancialSalesRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit ); |
| | | // if( isnull( unitrow ) ){ |
| | | // allrow := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := allunit ); |
| | | // } |
| | | |
| | | traverse( row, FinancialSalesCell, cell, cell.FinancialSalesColumn() <> productcolumn and cell.FinancialSalesColumn() <> unitcolumn and cnv2.Convert( cell.FinancialSalesColumn().Name() ) <> beforeyearday ){ |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and cell.FinancialSalesColumn() <> productcolumn and cell.FinancialSalesColumn() <> unitcolumn and cnv2.Convert( cell.FinancialSalesColumn().Name() ) <> beforeyearday ){ |
| | | column := cell.FinancialSalesColumn(); |
| | | period := cnv2.Convert( column.Name() ) |
| | | periodname := period.Format( "M2/D2/Y" ) |
| | | |
| | | periodname := period.Format( "M2/D2/Y" ); |
| | | quantity := [Real]cell.Value() |
| | | previouscolumn := cell.FinancialSalesColumn().PreviousColumn(); |
| | | if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){ |
| | | previouscell := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn ); |
| | | quantity := [Real]cell.Value() + [Real]previouscell.Value(); |
| | | } |
| | | tablecolumn := construct( FinancialSalesColumn ); |
| | | //è·å被导å
¥æ¥è¡¨çæ¥æå |
| | | tablecolumn := selectobject( table, FinancialSalesColumn, fscolumn, not fscolumn.IsDay() and fscolumn.Name() = periodname ); |
| | | tablecolumn := selectobject( table, FinancialSalesColumn, fscolumn, not fscolumn.IsDay() and fscolumn.Name() = periodname ); |
| | | if( isnull( tablecolumn ) ){ |
| | | tablecolumn := table.FinancialSalesColumn( relnew, Name := periodname, Period := yearday.Date() ); |
| | | tablecolumn := table.FinancialSalesColumn( relnew, Name := periodname, Period := yearday.Date() ); |
| | | } |
| | | unitcell := selectobject( unitrow, FinancialSalesCell, unitcell, unitcell.FinancialSalesColumn() = tablecolumn ); |
| | | if( isnull( unitcell ) ){ |
| | | unitcell := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() ); |
| | | unitrow.FinancialSalesCell( relinsert, unitcell ); |
| | | }else{ |
| | | previouscolumn := cell.FinancialSalesColumn().PreviousColumn(); |
| | | if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){ |
| | | previouscell := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn ); |
| | | quantity := [Real]cell.Value() + [Real]previouscell.Value(); |
| | | if( [Real]unitcell.Value() <> quantity ){ |
| | | unitcell.Value( [String]( [Number]quantity ) ); |
| | | unitcell.IsUpdate( true ); |
| | | } |
| | | if( [Real]unitcell.Value() <> quantity ){ |
| | | unitcell.Value( [String]( [Number]quantity ) ); |
| | | unitcell.IsUpdate( true ); |
| | | } |
| | | } |
| | | allcell := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn() = tablecolumn ); |
| | | if( isnull( unitcell ) ){ |
| | | allcell := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() ); |
| | | allrow.FinancialSalesCell( relinsert, allcell ); |
| | | }else{ |
| | | previouscolumn := cell.FinancialSalesColumn().PreviousColumn(); |
| | | if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){ |
| | | previouscell := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn ); |
| | | quantity := [Real]cell.Value() + [Real]previouscell.Value(); |
| | | if( [Real]allcell.Value() <> quantity ){ |
| | | allcell.Value( [String]( [Number]quantity ) ); |
| | | allcell.IsUpdate( true ); |
| | | } |
| | | } |
| | | } |
| | | // allcell := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn() = tablecolumn ); |
| | | // if( isnull( allcell ) ){ |
| | | // allcell := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() ); |
| | | // allrow.FinancialSalesCell( relinsert, allcell ); |
| | | // }else{ |
| | | // if( [Real]allcell.Value() <> quantity ){ |
| | | // allcell.Value( [String]( [Number]quantity ) ); |
| | | // allcell.IsUpdate( true ); |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | owner.FSImportData( relflush ); |
| | | productids := construct( Strings ); |
| | | allunit := FinancialSalesReport::GetDefaultAllUnit(); |
| | | //allunit := FinancialSalesReport::GetDefaultAllUnit(); |
| | | ccunit := FinancialSalesReport::GetDefaultCCUnit(); |
| | | dlunit := FinancialSalesReport::GetDefaultDLUnit(); |
| | | ccsalessegment := FinancialSalesReport::GetSalesSegmentCC(); |
| | |
| | | if( ( iscc and product.MQBMLB() = 'MLB' ) or ( isccrent and product.MQBMLB() = 'MQB' ) or isdl ){ |
| | | |
| | | //è·ååè®¡è¡ |
| | | allrow := table.GetRow( allunit, product ); |
| | | // allrow := table.GetRow( allunit, product ); |
| | | //è·åå·¥åè¡ |
| | | factoryrow := table.GetRow( ifexpr( isdl, dlunit, ccunit ), product ); |
| | | |
| | |
| | | |
| | | factoryrow.Initialize( column, quantity ); |
| | | factoryrow.Initialize( daycolumn, quantity ); |
| | | allrow.Initialize( column, quantity ); |
| | | // allrow.Initialize( column, quantity ); |
| | | } |
| | | } |
| | | } |
| | |
| | | and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear |
| | | and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ) ){//产å为MQB |
| | | product := pisp.Product_MP(); |
| | | allrow := table.GetRow( allunit, product ); |
| | | // allrow := table.GetRow( allunit, product ); |
| | | factoryrow := table.GetRow( dlunit, product ); |
| | | productids.Add( pisp.ProductID() ); |
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() |
| | |
| | | |
| | | factoryrow.Initialize( column, quantity );//åTotal Demandåæ®µæææ±æ»éæ±æ°é |
| | | factoryrow.Initialize( daycolumn, quantity ); |
| | | allrow.Initialize( column, quantity ); |
| | | // allrow.Initialize( column, quantity ); |
| | | } |
| | | } |
| | | // } |
| | |
| | | // } |
| | | // } |
| | | //} |
| | | excelsource := selectobject( owner, FinancialSalesSource, excelsource, excelsource.IsImport() ); |
| | | if( not isnull( excelsource ) ){ |
| | | excelsource.AfterImport(); |
| | | } |
| | | |
| | | //factorys := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ); |
| | | //showtable.Generate( search, factorys, productids ); |
| | | *] |
| | |
| | | for( start := starttime; start <= endtime; start := start.StartOfNextWeek() ){ |
| | | weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();//weekend.Format( "M2/D2/Y" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ) |
| | | |
| | | this.InventorySummaryColumn( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | this.InventorySummaryColumn( relnew, Name := weekend.Format( "M2/D2" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | } |
| | | }else if( timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | for( start := starttime; start <= endtime; start := start.StartOfNextMonth() ){ |
| | |
| | | showrow := this.Row( relnew, Name := row.Name(), RowNr := row.RowNr() ); |
| | | |
| | | traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){ |
| | | column := selectobject( this, Column, column, column.Name() = cell.Column().Name() and column.TimeUnit() = search.TimeUnit() ); |
| | | column := selectobject( this, Column, column, column.StartDate() = cell.Column().StartDate() and column.TimeUnit() = search.TimeUnit() ); |
| | | |
| | | if( not isnull( column ) ){ |
| | | sumcell := selectobject( column, Cell, c, c.Row() = sumrow ); |
| | |
| | | for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){ |
| | | weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();// weekend.Format( "M2/D2/Y" ) |
| | | |
| | | this.Column( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | this.Column( relnew, Name := weekend.Format( "M2/D2" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | AttributeKey: '[415136.0.1188511346]' |
| | | Synonym: 'ç³»æ°' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation EstimateTotalCost |
| | | { |
| | | AttributeKey: '[415136.0.1160240036]' |
| | | Synonym: 'é¢è®¡æ»è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation RentInCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164662]' |
| | | Synonym: 'å¤ç§åºå
¥åºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation RentOutOfCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164672]' |
| | | Synonym: 'å¤ç§åºåºåºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation RentStorCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164707]' |
| | | Synonym: 'å¤ç§åºä»å¨è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation WerkToRentTransCost |
| | | { |
| | | AttributeKey: '[415136.0.1160240024]' |
| | | Synonym: 'åå
å°å¤ç§åºè¿è¾è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | RelationRepresentation Column { RelationKey: '[415136.0.986881392]' Visibility: 'Normal' } |
| | | } |
| | |
| | | { |
| | | AttributeKey: '[415136.0.1160164734]' |
| | | Synonym: 'é¿æ¥é¿éè¿è¾è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation CCRentInCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164742]' |
| | | Synonym: 'é¿æ¥å¤ç§åºå
¥åºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation CCRentOutOfCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164750]' |
| | | Synonym: 'é¿æ¥å¤ç§åºåºåºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation CCRentStorCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164771]' |
| | | Synonym: 'é¿æ¥å¤ç§åºä»å¨è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation CCShorTransCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164779]' |
| | | Synonym: 'é¿æ¥çéè¿è¾è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation CoefficientValue |
| | | { |
| | | AttributeKey: '[415136.0.1188511355]' |
| | | Synonym: 'ç³»æ°' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation DLRentInCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164787]' |
| | | Synonym: '大è¿å¤ç§åºå
¥åºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation DLRentOtherCost |
| | | { |
| | | AttributeKey: '[415136.0.1184074681]' |
| | | Synonym: '大è¿å¤ç§åºå
¶ä»è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation DLRentOutOfCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164795]' |
| | | Synonym: '大è¿å¤ç§åºåºåºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation DLRentStorCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164806]' |
| | | Synonym: '大è¿å¤ç§åºä»å¨è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation EstimateTotalCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164814]' |
| | | Synonym: 'é¢è®¡æ»è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation WerkToDLRentTransCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164822]' |
| | | Synonym: 'åå
å°å¤ç§åºè¿è¾è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | RelationRepresentation Column { RelationKey: '[415136.0.992900194]' Visibility: 'Normal' } |
| | | } |
| | |
| | | uploadJson := JSON::Parse( uploadJsonString ); |
| | | Archive::VerifyTheFileName( uploadJson ); |
| | | |
| | | fileName := uploadJson.Get( "name" ).GetString(); |
| | | // fileName := uploadJson.Get( "name" ).GetString(); |
| | | base64String := uploadJson.Get( "data" ).GetString(); |
| | | |
| | | webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue(); |
| | | |
| | | CCEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData, fileName ); |
| | | CCEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData ); |
| | | |
| | | WebMessageBox::Success( Translations::A_VWED_Success() ); |
| | | } |
| | |
| | | [* |
| | | CCEngineLogisticsCostReport::Initialize( MacroPlan ); |
| | | |
| | | if( not isnull( MacroPlan.DLEngineLogisticsCostExcel() ) ){ |
| | | CCEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, MacroPlan.CCEngineLogisticsCostExcel().FileBinaryValue() ); |
| | | }else{ |
| | | CCEngineLogisticsCostReport::InitiateSearch( MacroPlan ); |
| | | } |
| | | |
| | | table := selectobject( MacroPlan, CCEngineLogisticsCostReport, table, table.IsShow() ); |
| | | |
| | | DataHolderTable.Data( table ); |
| | |
| | | uploadJson := JSON::Parse( uploadJsonString ); |
| | | Archive::VerifyTheFileName( uploadJson ); |
| | | |
| | | fileName := uploadJson.Get( "name" ).GetString(); |
| | | // fileName := uploadJson.Get( "name" ).GetString(); |
| | | base64String := uploadJson.Get( "data" ).GetString(); |
| | | |
| | | webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue(); |
| | | |
| | | DLEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData, fileName ); |
| | | DLEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData ); |
| | | |
| | | WebMessageBox::Success( Translations::A_VWED_Success() ); |
| | | } |
| | |
| | | [* |
| | | DLEngineLogisticsCostReport::InitializeNew( MacroPlan ); |
| | | |
| | | if( not isnull( MacroPlan.DLEngineLogisticsCostExcel() ) ){ |
| | | DLEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, MacroPlan.DLEngineLogisticsCostExcel().FileBinaryValue() ); |
| | | }else{ |
| | | DLEngineLogisticsCostReport::InitiateSearch( MacroPlan ); |
| | | } |
| | | table := selectobject( MacroPlan, DLEngineLogisticsCostReport, table, table.IsShow() ); |
| | | |
| | | DataHolderTable.Data( table ); |
| | |
| | | Body: |
| | | [* |
| | | FinancialProductionSource::Initialize( MacroPlan ); |
| | | |
| | | excelsource := selectobject( MacroPlan, FinancialProductionSource, excelsource, excelsource.IsImport() ); |
| | | if( not isnull( excelsource ) ){ |
| | | excelsource.AfterImport(); |
| | | } |
| | | table := FinancialProductionSource::InitiateSearch( MacroPlan ); |
| | | |
| | | DataHolderTable.Data( table ); |
| | |
| | | |
| | | if( not source.IsExistFutureMonthData() or |
| | | ( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){ |
| | | FinancialSalesSource::InitializeNew( MacroPlan ); |
| | | FinancialProductionSource::Initialize( MacroPlan ); |
| | | source.AfterImport(); |
| | | DataHolderTable.Data( FinancialProductionSource::InitiateSearch( MacroPlan ) ); |
| | | productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() ) |
| | | and exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() ) |
| | | and exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ), product.ID() ); |
| | | |
| | | table := selectobject( MacroPlan, FinancialProductionSource.FinancialProductionReport, table, table.IsShow() ); |
| | | table.Generate( dhSearch.Data(), dhFactorys.Data(), productids ); |
| | | DataHolderTable.Data( table ); |
| | | } |
| | | |
| | | WebMessageBox::Success( Translations::A_VWED_Success() ); |
| | |
| | | Properties: |
| | | [ |
| | | FixedSize: true |
| | | MinimumColumns: 20 |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | FinancialSalesSource::InitializeNew( MacroPlan ); |
| | | |
| | | excelsource := selectobject( MacroPlan, FinancialSalesSource, excelsource, excelsource.IsImport() ); |
| | | if( not isnull( excelsource ) ){ |
| | | excelsource.AfterImport(); |
| | | } |
| | | table := FinancialSalesSource::InitiateSearch( MacroPlan );//selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and table.IsShow() ); |
| | | |
| | | DataHolderTable.Data( table ); |
| | |
| | | Body: |
| | | [* |
| | | try { |
| | | uploadJsonString := Application.GetFile(); |
| | | uploadJsonString := Application.GetFile(); |
| | | if ( uploadJsonString <> "" ) { |
| | | uploadJson := JSON::Parse( uploadJsonString ); |
| | | uploadJson := JSON::Parse( uploadJsonString ); |
| | | Archive::VerifyTheFileName( uploadJson ); |
| | | |
| | | fileName := uploadJson.Get( "name" ).GetString(); |
| | | base64String := uploadJson.Get( "data" ).GetString(); |
| | | fileName := uploadJson.Get( "name" ).GetString(); |
| | | base64String := uploadJson.Get( "data" ).GetString(); |
| | | |
| | | webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue(); |
| | | webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue(); |
| | | |
| | | source := FinancialSalesSource::Upload( MacroPlan, webFileBinaryData, fileName ); |
| | | source := FinancialSalesSource::Upload( MacroPlan, webFileBinaryData, fileName ); |
| | | source.ReadStructure(); |
| | | //妿åå¨è®¡åå¼å§åçæ¥ææ°æ®éè¦ç¹å»ç¡®è®¤ |
| | | if( not source.IsExistFutureMonthData() or |
| | | ( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){ |
| | | FinancialSalesSource::InitializeNew( MacroPlan ); |
| | | source.AfterImport(); |
| | | DataHolderTable.Data( FinancialSalesSource::InitiateSearch( MacroPlan ) ); |
| | | productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() ) |
| | | and exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() ) |
| | | and exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ), product.ID() ); |
| | | |
| | | table := selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, table.IsShow() ); |
| | | table.Generate( dhSearch.Data(), dhFactorys.Data(), productids ); |
| | | DataHolderTable.Data( table ); |
| | | // DataHolderTable.Data( FinancialSalesSource::InitiateSearch( MacroPlan ) ); |
| | | } |
| | | |
| | | WebMessageBox::Success( Translations::A_VWED_Success() ); |