Merge remote-tracking branch 'origin/dev' into dev
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CustomerDemandIDSCell_Row_CustomerDemandIDSRow_Cell |
| | | { |
| | | #keys: '1[415136.0.1109674731]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide Row |
| | | { |
| | | #keys: '3[415136.0.1109674733][415136.0.1109674732][415136.0.1109674734]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CustomerDemandIDSCell |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide Cell |
| | | { |
| | | #keys: '3[415136.0.1109674736][415136.0.1109674735][415136.0.1109674737]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: CustomerDemandIDSRow |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CustomerDemandIDSColumn_Cell_CustomerDemandIDSCell_Column |
| | | { |
| | | #keys: '1[415136.0.1109674700]' |
| | | ProceduralSequenceRelationStrategy |
| | | { |
| | | #keys: '13[0.0.0][415136.0.1109674719][415136.0.1109674713][415136.0.1109674720][415136.0.1109674714][415136.0.1109674721][415136.0.1109674715][415136.0.1109674722][415136.0.1109674716][415136.0.1109674723][415136.0.1109674717][415136.0.1109674724][415136.0.1109674718]' |
| | | SequenceElementSuffix: 'CellInColumn' |
| | | SequenceSuffix: 'CellInColumn' |
| | | } |
| | | RelationSide.LeftSide Cell |
| | | { |
| | | #keys: '3[415136.0.1109674702][415136.0.1109674701][415136.0.1109674703]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: CustomerDemandIDSColumn |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide Column |
| | | { |
| | | #keys: '3[415136.0.1109674705][415136.0.1109674704][415136.0.1109674706]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CustomerDemandIDSCell |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CustomerDemandIDS_Column_CustomerDemandIDSColumn_CustomerDemandIDS |
| | | { |
| | | #keys: '1[415136.0.1109674656]' |
| | | ProceduralSequenceRelationStrategy |
| | | { |
| | | #keys: '13[0.0.0][415136.0.1109674675][415136.0.1109674669][415136.0.1109674676][415136.0.1109674670][415136.0.1109674677][415136.0.1109674671][415136.0.1109674678][415136.0.1109674672][415136.0.1109674679][415136.0.1109674673][415136.0.1109674680][415136.0.1109674674]' |
| | | SequenceElementSuffix: 'Column' |
| | | SequenceSuffix: 'Column' |
| | | } |
| | | RelationSide.LeftSide Column |
| | | { |
| | | #keys: '3[415136.0.1109674658][415136.0.1109674657][415136.0.1109674659]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: CustomerDemandIDS |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide CustomerDemandIDS |
| | | { |
| | | #keys: '3[415136.0.1109674661][415136.0.1109674660][415136.0.1109674662]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CustomerDemandIDSColumn |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CustomerDemandIDS_InterfaceDataset_InterfaceDataset_CustomerDemandIDS |
| | | { |
| | | #keys: '1[415136.0.1109686108]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide InterfaceDataset |
| | | { |
| | | #keys: '3[415136.0.1109686110][415136.0.1109686109][415136.0.1109686111]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CustomerDemandIDS |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide CustomerDemandIDS |
| | | { |
| | | #keys: '3[415136.0.1109686113][415136.0.1109686112][415136.0.1109686114]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: InterfaceDataset |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CustomerDemandIDS_Row_CustomerDemandIDSRow_CustomerDemandIDS |
| | | { |
| | | #keys: '1[415136.0.1109674643]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide Row |
| | | { |
| | | #keys: '3[415136.0.1109674645][415136.0.1109674644][415136.0.1109674646]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: CustomerDemandIDS |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide CustomerDemandIDS |
| | | { |
| | | #keys: '3[415136.0.1109674648][415136.0.1109674647][415136.0.1109674649]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CustomerDemandIDSRow |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ID |
| | | { |
| | | #keys: '3[415136.0.1109686029][415136.0.1109686028][415136.0.1109686030]' |
| | | IsReadOnly: true |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Name |
| | | { |
| | | #keys: '3[415136.0.1109686038][415136.0.1109686037][415136.0.1109686039]' |
| | | 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 SyncRows |
| | | { |
| | | TextBody: |
| | | [* |
| | | totalRows := 0; |
| | | totalColumns := this.Column( relsize ); |
| | | |
| | | if ( totalColumns > 0 ) { |
| | | randomCol := select( this, Column, tempFPC, true ); |
| | | totalRows := randomCol.Cell( relsize ); |
| | | |
| | | this.Row( relflush ); |
| | | |
| | | cells := construct( CustomerDemandIDSCells ); |
| | | traverse ( this, Column, fpc ) { |
| | | cells.Add( fpc.FirstCellInColumn() ); |
| | | } |
| | | |
| | | for ( i := 0; i < totalRows; i++ ) { |
| | | assert( selectvalues( cells, Elements, c, true, c.Column().Index() ).ToString( "" ) = |
| | | selectvalues( selectsortedset( cells, Elements, c, true, c.Column().Index() ), Elements, c, true, c.Column().Index() ).ToString( "" ), |
| | | "Assertion error in FrockDataTable::syncRows: Cells not sorted by column index" ); |
| | | row := this.Row( relnew, RowNr := i ); |
| | | |
| | | newCells := construct( CustomerDemandIDSCells ); |
| | | |
| | | traverse ( cells, Elements, c ) { |
| | | row.Cell( relinsert, c ); |
| | | |
| | | newCells.Add( c.NextCellInColumn() ); |
| | | } |
| | | |
| | | cells := &newCells; |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod ReadStructure ( |
| | | BinaryValue binaryvalue, |
| | | InterfaceDataset owner |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Sep-3-2024 (created) |
| | | tableGroupHandle := TableGroupHandle::Create( 'IDSå
¨è¡¨' ); |
| | | tableGroupHandle := XLS::LoadTableGroupFromBinaryData( binaryvalue.AsBinaryData(), tableGroupHandle, true, true ); |
| | | sheets := tableGroupHandle.TableNames(); |
| | | |
| | | traverse ( sheets, Elements, sheetName ) { |
| | | tableHandle := tableGroupHandle.Table( sheetName ); |
| | | tableXML := TableHandle::ExportXML( tableHandle ); |
| | | |
| | | // info( tableXML.AsQUILL() ); |
| | | |
| | | CustomerDemandIDS::XMLFileImportCustomerDemandIDSXMLHeaders( tableXML ); |
| | | xlstable := CustomerDemandIDS::XMLImportCustomerDemandIDSXML( tableXML ); |
| | | |
| | | xlstable.SyncRows(); |
| | | |
| | | xlstable.Name( sheetName ); |
| | | owner.CustomerDemandIDS( relinsert, &xlstable ); |
| | | |
| | | Transaction::Transaction().Propagate( attribute( CustomerDemandIDSColumn, Index ) ); |
| | | |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLElementId |
| | | { |
| | | XMLAddressType { } |
| | | XMLID Key { } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLElementId |
| | | { |
| | | XMLID QuintiqType { } |
| | | XMLQualifierType { } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLObjectBase.ObjectDefinitions |
| | | { |
| | | IdField: Key |
| | | ObjectTypeField: QuintiqType |
| | | TargetType: CustomerDemandIDSCell |
| | | XMLID cell { } |
| | | Attributes: |
| | | [ |
| | | XMLAttribute |
| | | { |
| | | Attribute: Value |
| | | XMLID value { } |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLObjectBase.ObjectDefinitions |
| | | { |
| | | IdField: Key |
| | | ObjectTypeField: QuintiqType |
| | | TargetType: CustomerDemandIDSColumn |
| | | XMLID column { } |
| | | Aggregates: |
| | | [ |
| | | XMLAggregate |
| | | { |
| | | ElementDefinition: cell |
| | | GenerateOutput: false |
| | | Relation: Cell |
| | | XMLID Cell { } |
| | | } |
| | | ] |
| | | Attributes: |
| | | [ |
| | | XMLAttribute |
| | | { |
| | | Attribute: Name |
| | | XMLID name { } |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLObjectBase.ObjectDefinitions |
| | | { |
| | | IdField: Key |
| | | ObjectTypeField: QuintiqType |
| | | TargetType: CustomerDemandIDS |
| | | XMLID table { } |
| | | Aggregates: |
| | | [ |
| | | XMLAggregate |
| | | { |
| | | ElementDefinition: column |
| | | GenerateOutput: false |
| | | Relation: Column |
| | | XMLID Column { } |
| | | } |
| | | ] |
| | | Attributes: |
| | | [ |
| | | XMLAttribute |
| | | { |
| | | Attribute: Name |
| | | XMLID name { } |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #root |
| | | XML CustomerDemandIDSXML |
| | | { |
| | | Direction: 'ImportExport' |
| | | Root: table |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLElementId |
| | | { |
| | | XMLAddressType { } |
| | | XMLID Key { } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLElementId |
| | | { |
| | | XMLID QuintiqType { } |
| | | XMLQualifierType { } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLObjectBase.ObjectDefinitions |
| | | { |
| | | IdField: Key |
| | | ObjectTypeField: QuintiqType |
| | | TargetType: CustomerDemandIDSColumn |
| | | XMLID column { } |
| | | Attributes: |
| | | [ |
| | | XMLAttribute |
| | | { |
| | | Attribute: Name |
| | | XMLID name { } |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLObjectBase.ObjectDefinitions |
| | | { |
| | | IdField: Key |
| | | ObjectTypeField: QuintiqType |
| | | TargetType: CustomerDemandIDS |
| | | XMLID table { } |
| | | Aggregates: |
| | | [ |
| | | XMLAggregate |
| | | { |
| | | ElementDefinition: column |
| | | GenerateOutput: false |
| | | Relation: Column |
| | | XMLID Column { } |
| | | } |
| | | ] |
| | | Attributes: |
| | | [ |
| | | XMLAttribute |
| | | { |
| | | Attribute: Name |
| | | XMLID name { } |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #root |
| | | XML CustomerDemandIDSXMLHeaders |
| | | { |
| | | Direction: 'ImportExport' |
| | | Root: table |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type CustomerDemandIDS |
| | | { |
| | | #keys: '5[415136.0.1109686026][415136.0.1109686024][0.0.0][415136.0.1109686025][415136.0.1109686027]' |
| | | BaseType: Object |
| | | Description: '客æ·éæ±çIDSå
¨è¡¨æ°æ®' |
| | | StructuredName: 'CustomerDemandIDSs' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Value |
| | | { |
| | | #keys: '3[415136.0.1109686090][415136.0.1109686089][415136.0.1109686091]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Value |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type CustomerDemandIDSCell |
| | | { |
| | | #keys: '5[415136.0.1109686084][415136.0.1109686082][0.0.0][415136.0.1109686083][415136.0.1109686085]' |
| | | BaseType: Object |
| | | Description: '客æ·éæ±çIDSå
¨è¡¨æ°æ®' |
| | | StructuredName: 'CustomerDemandIDSCells' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Index |
| | | { |
| | | #keys: '3[415136.0.1109686070][415136.0.1109686069][415136.0.1109686071]' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Name |
| | | { |
| | | #keys: '3[415136.0.1109686073][415136.0.1109686072][415136.0.1109686074]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Period |
| | | { |
| | | #keys: '3[415136.0.1109686076][415136.0.1109686075][415136.0.1109686077]' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Name |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcIndex |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-22-2024 (created) |
| | | |
| | | value := ifexpr( isnull( this.PreviousColumn() ), 0, this.PreviousColumn().Index() + 1 ); |
| | | |
| | | this.Index( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type CustomerDemandIDSColumn |
| | | { |
| | | #keys: '5[415136.0.1109686067][415136.0.1109686065][0.0.0][415136.0.1109686066][415136.0.1109686068]' |
| | | BaseType: Object |
| | | Description: '客æ·éæ±çIDSå
¨è¡¨æ°æ®' |
| | | StructuredName: 'CustomerDemandIDSColumns' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute DuplicateValueMarker |
| | | { |
| | | #keys: '3[415136.0.1109686049][415136.0.1109686048][415136.0.1109686050]' |
| | | Description: '夿æ¯å¦åå¨éå¤å¼' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Name |
| | | { |
| | | #keys: '3[415136.0.1109686052][415136.0.1109686051][415136.0.1109686053]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute RowNr |
| | | { |
| | | #keys: '3[415136.0.1109686055][415136.0.1109686054][415136.0.1109686056]' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: DuplicateValueMarker |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Name |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type CustomerDemandIDSRow |
| | | { |
| | | #keys: '5[415136.0.1109686046][415136.0.1109686044][0.0.0][415136.0.1109686045][415136.0.1109686047]' |
| | | BaseType: Object |
| | | Description: '客æ·éæ±çIDSå
¨è¡¨æ°æ®' |
| | | StructuredName: 'CustomerDemandIDSRows' |
| | | } |
| | |
| | | #parent: #root |
| | | StaticMethod GenerateData ( |
| | | const MacroPlan macroplan, |
| | | const Archive archive, |
| | | InterfaceDataset interfaceDataset, |
| | | String executor, |
| | | Boolean versionflag |
| | |
| | | , ReturnMsg := 'Success' |
| | | , Success := true |
| | | ); |
| | | traverse( macroplan, SalesDemand.astype( Forecast ), forecast ){ |
| | | traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){ |
| | | cd :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product := forecast.ProductID() |
| | | , DemandDate := forecast.StartDate() |
| | | , DemandQty := [Number]forecast.Quantity() |
| | |
| | | ); |
| | | loginfo.CustomerDemandPPAIDS( relinsert, cd ); |
| | | } |
| | | binaryValue := TemplateManager::GetIDSFullTable( archive, Date::ActualDate().Year() ); |
| | | CustomerDemandIDS::ReadStructure( binaryValue, interfaceDataset ); |
| | | productcolumn := select( interfaceDataset, CustomerDemandIDS.Column, column, column.Index() = 1 ); |
| | | cnv2 := StringToDate::StandardConverter(); |
| | | cnv2.SetCustomConversion(); |
| | | cnv2.CustomFormatString( "dd/MM/yyyy" ); |
| | | traverse( interfaceDataset, CustomerDemandIDS.Row, row ){ |
| | | product := selectobject( row, Cell, cell, cell.Column() = productcolumn ); |
| | | traverse( row, Cell, cell, cell.Column().Index() > 3 ){ |
| | | period := cnv2.Convert( cell.Column().Name() ); |
| | | cd :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product := product.Value() |
| | | , DemandDate := period |
| | | , DemandQty := [Number]cell.Value() |
| | | , VersionName := macroplan.ScenarioName() |
| | | , InterfaceTime := nowdate |
| | | , VersionFlag := versionflag |
| | | ); |
| | | loginfo.CustomerDemandPPAIDS( relinsert, cd ); |
| | | } |
| | | } |
| | | loginfo.TotalRow( loginfo.CustomerDemandPPAIDS( relsize ) ); |
| | | *] |
| | | } |