¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation MatAttrSettingAndPlanStrategyDataColumn_MatAttrSettingAndPlanStrategyDataCell_MatAttrSettingAndPlanStrategyDataCell_MatAttrSettingAndPlanStrategyDataColumn |
| | | { |
| | | #keys: '1[414384.0.763764789]' |
| | | ProceduralSequenceRelationStrategy |
| | | { |
| | | #keys: '13[0.0.0][414384.0.763764811][414384.0.763764805][414384.0.763764812][414384.0.763764806][414384.0.763764813][414384.0.763764807][414384.0.763764814][414384.0.763764808][414384.0.763764815][414384.0.763764809][414384.0.763764816][414384.0.763764810]' |
| | | SequenceElementSuffix: 'CellInColumn' |
| | | SequenceSuffix: 'CellInColumn' |
| | | } |
| | | RelationSide.LeftSide MatAttrSettingAndPlanStrategyDataCell |
| | | { |
| | | #keys: '3[414384.0.763764791][414384.0.763764790][414384.0.763764792]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyDataColumn |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide MatAttrSettingAndPlanStrategyDataColumn |
| | | { |
| | | #keys: '3[414384.0.763764794][414384.0.763764793][414384.0.763764795]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyDataCell |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation MatAttrSettingAndPlanStrategyDataRow_MatAttrSettingAndPlanStrategyDataCell_MatAttrSettingAndPlanStrategyDataCell_MatAttrSettingAndPlanStrategyDataRow |
| | | { |
| | | #keys: '1[414384.0.763764825]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide MatAttrSettingAndPlanStrategyDataCell |
| | | { |
| | | #keys: '3[414384.0.763764827][414384.0.763764826][414384.0.763764828]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyDataRow |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide MatAttrSettingAndPlanStrategyDataRow |
| | | { |
| | | #keys: '3[414384.0.763764830][414384.0.763764829][414384.0.763764831]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyDataCell |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation MatAttrSettingAndPlanStrategyDataTable_MatAttrSettingAndPlanStrategyDataRow_MatAttrSettingAndPlanStrategyDataRow_MatAttrSettingAndPlanStrategyDataTable |
| | | { |
| | | #keys: '1[414384.0.763764737]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide MatAttrSettingAndPlanStrategyDataRow |
| | | { |
| | | #keys: '3[414384.0.763764739][414384.0.763764738][414384.0.763764740]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyDataTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide MatAttrSettingAndPlanStrategyDataTable |
| | | { |
| | | #keys: '3[414384.0.763764742][414384.0.763764741][414384.0.763764743]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyDataRow |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation MatAttrSettingAndPlanStrategyDataTable_MatAttrSettingAndPlanStrategyDataColumn_MatAttrSettingAndPlanStrategyDataColumn_MatAttrSettingAndPlanStrategyDataTable |
| | | { |
| | | #keys: '1[414384.0.763764753]' |
| | | ProceduralSequenceRelationStrategy |
| | | { |
| | | #keys: '13[0.0.0][414384.0.763764775][414384.0.763764769][414384.0.763764776][414384.0.763764770][414384.0.763764777][414384.0.763764771][414384.0.763764778][414384.0.763764772][414384.0.763764779][414384.0.763764773][414384.0.763764780][414384.0.763764774]' |
| | | SequenceElementSuffix: 'ColumnInTable' |
| | | SequenceSuffix: 'ColumnInTable' |
| | | } |
| | | RelationSide.LeftSide MatAttrSettingAndPlanStrategyDataColumn |
| | | { |
| | | #keys: '3[414384.0.763764755][414384.0.763764754][414384.0.763764756]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyDataTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide MatAttrSettingAndPlanStrategyDataTable |
| | | { |
| | | #keys: '3[414384.0.763764758][414384.0.763764757][414384.0.763764759]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyDataColumn |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation MatAttrSettingAndPlanStrategyInputSource_GlobalOTDTable_GlobalOTDTable_MatAttrSettingAndPlanStrategyInputSource |
| | | { |
| | | #keys: '1[414384.0.763764705]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDTable |
| | | { |
| | | #keys: '3[414384.0.763764707][414384.0.763764706][414384.0.763764708]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyInputSource |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide MatAttrSettingAndPlanStrategyInputSource |
| | | { |
| | | #keys: '3[414384.0.763764710][414384.0.763764709][414384.0.763764711]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation MatAttrSettingAndPlanStrategyInputSource_MatAttrSettingAndPlanStrategyDataTable_MatAttrSettingAndPlanStrategyDataTable_MatAttrSettingAndPlanStrategyInputSource |
| | | { |
| | | #keys: '1[414384.0.763764721]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide MatAttrSettingAndPlanStrategyDataTable |
| | | { |
| | | #keys: '3[414384.0.763764723][414384.0.763764722][414384.0.763764724]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyInputSource |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide MatAttrSettingAndPlanStrategyInputSource |
| | | { |
| | | #keys: '3[414384.0.763764726][414384.0.763764725][414384.0.763764727]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyDataTable |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation MatAttrSettingAndPlanStrategy_GlobalOTDTable_GlobalOTDTable_MatAttrSettingAndPlanStrategy |
| | | { |
| | | #keys: '1[414384.0.763764622]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDTable |
| | | { |
| | | #keys: '3[414384.0.763764624][414384.0.763764623][414384.0.763764625]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategy |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide MatAttrSettingAndPlanStrategy |
| | | { |
| | | #keys: '3[414384.0.763764627][414384.0.763764626][414384.0.763764628]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute name |
| | | { |
| | | #keys: '3[414384.0.763764688][414384.0.763764687][414384.0.763764689]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: name |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method parseRows |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-1-2023 (created) |
| | | totalRows := 0; |
| | | totalColumns := this.MatAttrSettingAndPlanStrategyDataColumn( relsize ); |
| | | |
| | | if ( totalColumns > 0 ) { |
| | | columnLongestList := maxset( this, MatAttrSettingAndPlanStrategyDataColumn, column, true, column.MatAttrSettingAndPlanStrategyDataCell( relsize ) ); |
| | | columnLongest := columnLongestList.First(); |
| | | totalRows := columnLongest.MatAttrSettingAndPlanStrategyDataCell( relsize ); |
| | | |
| | | this.MatAttrSettingAndPlanStrategyDataRow( relflush ); |
| | | |
| | | cells := construct( structured[MatAttrSettingAndPlanStrategyDataCell] ); |
| | | traverse ( this, MatAttrSettingAndPlanStrategyDataColumn, column ) { |
| | | cells.Add( column.FirstCellInColumn() ); |
| | | } |
| | | |
| | | for ( i := 0; i < totalRows; i++ ) { |
| | | assert( selectvalues( cells, Elements, c, true, c.MatAttrSettingAndPlanStrategyDataColumn().columnIndex() ).ToString( "" ) = |
| | | selectvalues( selectsortedset( cells, Elements, c, true, c.MatAttrSettingAndPlanStrategyDataColumn().columnIndex() ), Elements, c, true, c.MatAttrSettingAndPlanStrategyDataColumn().columnIndex() ).ToString( "" ), |
| | | "Assertion error in MatAttrSettingAndPlanningStrategyDataTable::parseRows: Cells not sorted by column index" ); |
| | | row := this.MatAttrSettingAndPlanStrategyDataRow( relnew, rowNo := i ); |
| | | |
| | | newCells := construct( structured[MatAttrSettingAndPlanStrategyDataCell] ); |
| | | |
| | | traverse ( cells, Elements, c ) { |
| | | row.MatAttrSettingAndPlanStrategyDataCell( relinsert, c ); |
| | | |
| | | newCells.Add( c.NextCellInColumn() ); |
| | | } |
| | | |
| | | cells := &newCells; |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod doVerify ( |
| | | MatAttrSettingAndPlanStrategyDataTable toVerify |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jun-30-2023 (created) |
| | | |
| | | // for test |
| | | columns := selectsortedset( toVerify, MatAttrSettingAndPlanStrategyDataColumn, column, true, column.columnIndex() ); |
| | | //traverse( columns, Elements, column ) { |
| | | // info( "column header of " + [String]( column.columnIndex() + 1 ) + " is " + column.name() ); |
| | | //} |
| | | //rows := toVerify.MatAttrSettingAndPlanningStrategyDataRow( relget ); |
| | | //traverse( rows, Elements.MatAttrSettingAndPlanningStrategyDataCell, cell ) { |
| | | // info( cell.MatAttrSettingAndPlanningStrategyDataColumn().name() + " of row " + [String]cell.MatAttrSettingAndPlanningStrategyDataRow().rowNo() + " is " + cell.value() ); |
| | | //} |
| | | // for test end |
| | | |
| | | expectedHeaders := MatAttrSettingAndPlanStrategyDataTable::expectedHeaders(); |
| | | traverse( columns, Elements, column ) { |
| | | columnActualName := column.name(); |
| | | if( column.columnIndex() > expectedHeaders.Size() ) { |
| | | error( "unexpected head " + columnActualName + " of column " + [String]column.columnIndex() + "." ); |
| | | } |
| | | expectedHeader := expectedHeaders.Element( column.columnIndex() ); |
| | | if( expectedHeader <> columnActualName ) { |
| | | error( "expected head is " + expectedHeader + " of column " + [String]column.columnIndex() + ", but found " + columnActualName + "." ); |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod expectedHeaders () as owning Strings |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jun-30-2023 (created) |
| | | value := construct( structured[String] ); |
| | | value.Add( "ç©æç¼ç " ); |
| | | value.Add( "ç©æåç§°" ); |
| | | value.Add( "ç©æåç±»" ); |
| | | value.Add( "LTæ¶é´ï¼å¤©ï¼" ); |
| | | value.Add( "æåSKUæ°é" ); |
| | | value.Add( "æå交ä»MinLTï¼å¤©ï¼" ); |
| | | value.Add( "é¿ç卿æ ç¾" ); |
| | | value.Add( "éç¨ä¸ç¨æ ç¾" ); |
| | | value.Add( "æºè½ç©æè®¡åçç¥" ); |
| | | value.Add( "ç¨æ·å³ç计åçç¥" ); |
| | | value.Add( "ä¿®æ¹äºº" ); |
| | | value.Add( "ä¿®æ¹æ¶é´" ); |
| | | return &value; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod export ( |
| | | GlobalOTDTable parent, |
| | | GlobalOTDTable parent, |
| | | GlobalOTDTable parent, |
| | | GlobalOTDTable parent |
| | | ) as BinaryValue |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-1-2023 (created) |
| | | xmlTemplate := '<?xml version="1.0" encoding="UTF-16"?> |
| | | <table> |
| | | <name>MatAttrSettingAndPlanningStrategy</name> |
| | | '; |
| | | //--------------------------------------------------------------------------------------------- |
| | | exportFields := MatAttrSettingAndPlanStrategyDataTable::exportFields(); |
| | | exportHeaders := MatAttrSettingAndPlanStrategyDataTable::expectedHeaders(); |
| | | if( exportFields.Size() <> exportHeaders.Size() ) { |
| | | error( "fields and headers not match" ); |
| | | } |
| | | for( i := 0; i < exportFields.Size() ; i++ ) { |
| | | header := exportHeaders.Element( i ); |
| | | columnStr := "<column><name>" + header + "</name><type>String</type>"; |
| | | traverse( parent, MatAttrSettingAndPlanStrategy, oldRecord ) { |
| | | fieldName := exportFields.Element( i ); |
| | | field := Reflection::FindAttribute( "MatAttrSettingAndPlanningStrategy", fieldName); |
| | | if( not isnull( field ) ) { |
| | | fieldValue := ""; |
| | | if( fieldValue = "" ) { |
| | | fieldValue := guard( field.GetString( oldRecord ), "" ); |
| | | } |
| | | if( fieldValue = "" ) { |
| | | fieldValue := guard( [String]field.GetNumber( oldRecord ), "" ); |
| | | } |
| | | if( fieldValue = "" ) { |
| | | fieldValue := guard( [String]field.GetReal( oldRecord ), "" ); |
| | | } |
| | | if( fieldValue = "" ) { |
| | | fileDateValue := guard( field.GetDate( oldRecord ), Date::MinDate() ); |
| | | if( fileDateValue <> Date::MinDate() ) { |
| | | conv := DateTimeToString::StandardConverter(); |
| | | conv.SetCustomConversion(); |
| | | conv.CustomFormatString( 'yyyyMMdd' ); |
| | | fieldValue := conv.Convert( fileDateValue.DateTime() ); |
| | | } |
| | | } |
| | | cellStr := '<cell value="' + fieldValue + '"/>'; |
| | | |
| | | columnStr := columnStr + cellStr; |
| | | } else { |
| | | error( "no field " + fieldName + " in type MatAttrSettingAndPlanningStrategy"); |
| | | } |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | } |
| | | //--------------------------------------------------------------------------------------------- |
| | | xmlTemplate := xmlTemplate + "</table>"; |
| | | tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTemplate ) ); |
| | | XLS::SaveTable( tableHandle, OS::TempPath() + "MatAttrSettingAndPlanningStrategy.xlsx" ); |
| | | file := OSFile::Construct(); |
| | | file.Open( OS::TempPath() + "MatAttrSettingAndPlanningStrategy.xlsx", "Read", true ); |
| | | data := file.ReadBinary() |
| | | return data; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod exportFields () as owning Strings |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jun-30-2023 (created) |
| | | value := construct( structured[String] ); |
| | | value.Add( "MatCode" ); |
| | | value.Add( "MatName" ); |
| | | value.Add( "MatType" ); |
| | | value.Add( "MatArrivalLT" ); |
| | | value.Add( "ProductCount" ); |
| | | value.Add( "MinProdDeliverLT" ); |
| | | value.Add( "FlagLongTerm" ); |
| | | value.Add( "FlagGeneric" ); |
| | | value.Add( "PlanningStrategyAuto" ); |
| | | value.Add( "PlanningStrategyCustom" ); |
| | | value.Add( "UpdateBy" ); |
| | | value.Add( "UpdateTime" ); |
| | | return &value; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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: MatAttrSettingAndPlanStrategyDataCell |
| | | XMLID cell { } |
| | | Attributes: |
| | | [ |
| | | XMLAttribute |
| | | { |
| | | Attribute: value |
| | | XMLID value { } |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLObjectBase.ObjectDefinitions |
| | | { |
| | | IdField: Key |
| | | ObjectTypeField: QuintiqType |
| | | TargetType: MatAttrSettingAndPlanStrategyDataColumn |
| | | XMLID column { } |
| | | Aggregates: |
| | | [ |
| | | XMLAggregate |
| | | { |
| | | ElementDefinition: cell |
| | | GenerateOutput: false |
| | | Relation: MatAttrSettingAndPlanStrategyDataCell |
| | | XMLID MatAttrSettingAndPlanningStrategyDataCell { } |
| | | } |
| | | ] |
| | | Attributes: |
| | | [ |
| | | XMLAttribute |
| | | { |
| | | Attribute: name |
| | | XMLID name { } |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLObjectBase.ObjectDefinitions |
| | | { |
| | | IdField: Key |
| | | ObjectTypeField: QuintiqType |
| | | TargetType: MatAttrSettingAndPlanStrategyDataTable |
| | | XMLID table { } |
| | | Aggregates: |
| | | [ |
| | | XMLAggregate |
| | | { |
| | | ElementDefinition: column |
| | | GenerateOutput: false |
| | | Relation: MatAttrSettingAndPlanStrategyDataColumn |
| | | XMLID MatAttrSettingAndPlanningStrategyDataColumn { } |
| | | } |
| | | ] |
| | | Attributes: |
| | | [ |
| | | XMLAttribute |
| | | { |
| | | Attribute: name |
| | | XMLID name { } |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #root |
| | | XML MatAttrSettingAndPlanStrategyDataTableXML |
| | | { |
| | | 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: MatAttrSettingAndPlanStrategyDataColumn |
| | | XMLID column { } |
| | | Attributes: |
| | | [ |
| | | XMLAttribute |
| | | { |
| | | Attribute: name |
| | | XMLID name { } |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | XMLObjectBase.ObjectDefinitions |
| | | { |
| | | IdField: Key |
| | | ObjectTypeField: QuintiqType |
| | | TargetType: MatAttrSettingAndPlanStrategyDataTable |
| | | XMLID table { } |
| | | Aggregates: |
| | | [ |
| | | XMLAggregate |
| | | { |
| | | ElementDefinition: column |
| | | GenerateOutput: false |
| | | Relation: MatAttrSettingAndPlanStrategyDataColumn |
| | | XMLID MatAttrSettingAndPlanningStrategyDataColumn { } |
| | | } |
| | | ] |
| | | Attributes: |
| | | [ |
| | | XMLAttribute |
| | | { |
| | | Attribute: name |
| | | XMLID name { } |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #root |
| | | XML MatAttrSettingAndPlanStrategyDataTableXMLHeaders |
| | | { |
| | | Direction: 'ImportExport' |
| | | Root: table |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type MatAttrSettingAndPlanStrategyDataTable |
| | | { |
| | | #keys: '5[414384.0.763764685][414384.0.763764683][0.0.0][414384.0.763764684][414384.0.763764686]' |
| | | BaseType: Object |
| | | StructuredName: 'MatAttrSettingAndPlanStrategyDataTables' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute bytes |
| | | { |
| | | #keys: '3[414384.0.763764696][414384.0.763764695][414384.0.763764697]' |
| | | ValueType: BinaryValue |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute fileName |
| | | { |
| | | #keys: '3[414384.0.763764699][414384.0.763764698][414384.0.763764700]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute isXlsx |
| | | { |
| | | #keys: '3[414384.0.763764702][414384.0.763764701][414384.0.763764703]' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: fileName |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method createTable ( |
| | | String sheetName, |
| | | String sheetName, |
| | | String sheetName, |
| | | String sheetName |
| | | ) as MatAttrSettingAndPlanStrategyDataTable |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-1-2023 (created) |
| | | sheet := select( this, MatAttrSettingAndPlanStrategyDataTable, table, table.name() = sheetName ); |
| | | |
| | | if ( isnull( sheet ) ) { |
| | | sheet := this.MatAttrSettingAndPlanStrategyDataTable( relnew, name := sheetName ); |
| | | } |
| | | |
| | | return sheet; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method parseTable |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-1-2023 (created) |
| | | tableGroupHandle := TableGroupHandle::Create( this.fileName() ); |
| | | tableGroupHandle := XLS::LoadTableGroupFromBinaryData( this.bytes().AsBinaryData(), tableGroupHandle, true, this.isXlsx() ); |
| | | sheets := tableGroupHandle.TableNames(); |
| | | |
| | | traverse ( sheets, Elements, sheetName, sheetName = "MatAttrSettingAndPlanningStrategy" ) { |
| | | tableHandle := tableGroupHandle.Table( sheetName ); |
| | | tableXML := TableHandle::ExportXML( tableHandle ); |
| | | MatAttrSettingAndPlanStrategyDataTable::XMLImportMatAttrSettingAndPlanStrategyDataTableXMLHeaders( tableXML ); |
| | | parsedTable := MatAttrSettingAndPlanStrategyDataTable::XMLImportMatAttrSettingAndPlanStrategyDataTableXML( tableXML ); |
| | | parsedTable.parseRows(); |
| | | parsedTable.name( sheetName ); |
| | | this.MatAttrSettingAndPlanStrategyDataTable( relinsert, &parsedTable ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method saveData |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-1-2023 (created) |
| | | if( this.MatAttrSettingAndPlanStrategyDataTable( relsize ) > 0 ) { |
| | | traverse( this, MatAttrSettingAndPlanStrategyDataTable, table ) { |
| | | traverse( table, MatAttrSettingAndPlanStrategyDataRow, row ) { |
| | | MatAttrSettingAndPlanStrategy::update( this.GlobalOTDTable(), row ); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod upload ( |
| | | GlobalOTDTable parent, |
| | | String filePath, |
| | | BinaryValue bytes, |
| | | GlobalOTDTable parent, |
| | | String filePath, |
| | | BinaryValue bytes, |
| | | GlobalOTDTable parent, |
| | | String filePath, |
| | | BinaryValue bytes, |
| | | GlobalOTDTable parent, |
| | | String filePath, |
| | | BinaryValue bytes |
| | | ) as MatAttrSettingAndPlanStrategyInputSource |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-1-2023 (created) |
| | | parent.MatAttrSettingAndPlanStrategyInputSource( relflush ); |
| | | info( "filePath : " + filePath ); |
| | | fileName := filePath.Tokenize( "\" ).Element( filePath.Tokenize( "\" ).Size() - 1 ); |
| | | info( "fileName : " + fileName ); |
| | | inputSource := parent.MatAttrSettingAndPlanStrategyInputSource( relnew, |
| | | fileName := fileName, |
| | | bytes := bytes, |
| | | isXlsx := fileName.EndsWith( "xlsx" )); |
| | | |
| | | return inputSource; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type MatAttrSettingAndPlanStrategyInputSource |
| | | { |
| | | #keys: '5[414384.0.763764693][414384.0.763764691][0.0.0][414384.0.763764692][414384.0.763764694]' |
| | | BaseType: Object |
| | | StructuredName: 'MatAttrSettingAndPlanStrategyInputSources' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute FlagGeneric |
| | | { |
| | | #keys: '3[414384.0.763764895][414384.0.763764894][414384.0.763764896]' |
| | | Description: 'æ¯å¦éç¨' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute FlagLongTerm |
| | | { |
| | | #keys: '3[414384.0.763764885][414384.0.763764884][414384.0.763764886]' |
| | | Description: 'æ¯å¦é¿æ' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MatArrivalLT |
| | | { |
| | | #keys: '3[414384.0.759444630][414384.0.759444629][414384.0.759444631]' |
| | | Description: 'ç©æå°è´§LTï¼å¤©ï¼' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MatCode |
| | | { |
| | | #keys: '3[414384.0.759431251][414384.0.759431250][414384.0.759431252]' |
| | | Description: 'ç©æç¼ç ' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MatName |
| | | { |
| | | #keys: '3[414384.0.759431286][414384.0.759431285][414384.0.759431287]' |
| | | Description: 'ç©æåç§°' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MatType |
| | | { |
| | | #keys: '3[414384.0.759444677][414384.0.759444676][414384.0.759444678]' |
| | | Description: 'æåSKUç±»å' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MinProdDeliverLT |
| | | { |
| | | #keys: '3[414384.0.759444667][414384.0.759444666][414384.0.759444668]' |
| | | Description: 'æåæå°äº¤ä»LTï¼å¤©ï¼' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute PlanningStrategyAuto |
| | | { |
| | | #keys: '3[414384.0.759444687][414384.0.759444686][414384.0.759444688]' |
| | | Description: 'èªå¨è®¡åçç¥' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute PlanningStrategyCustom |
| | | { |
| | | #keys: '3[414384.0.759444697][414384.0.759444696][414384.0.759444698]' |
| | | Description: 'æå¨é
ç½®ç计åçç¥' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ProductCount |
| | | { |
| | | #keys: '3[414384.0.763750063][414384.0.763750062][414384.0.763750064]' |
| | | Description: 'æåSKUæ°é' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute UpdateBy |
| | | { |
| | | #keys: '3[414384.0.763764908][414384.0.763764907][414384.0.763764909]' |
| | | Description: 'ä¿®æ¹äºº' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute UpdateTime |
| | | { |
| | | #keys: '3[414384.0.763764921][414384.0.763764920][414384.0.763764922]' |
| | | Description: 'ä¿®æ¹æ¶é´' |
| | | ValueType: DateTime |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod delete ( |
| | | MatAttrSettingAndPlanningStrategys toDels, |
| | | MatAttrSettingAndPlanStrategys toDels, |
| | | MatAttrSettingAndPlanStrategys toDels, |
| | | MatAttrSettingAndPlanStrategys toDels |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jun-30-2023 (created) |
| | | traverse( toDels, Elements, toDel ){ |
| | | toDel.Delete(); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod deleteIfExistByMatCode ( |
| | | GlobalOTDTable parent, |
| | | Strings matCodes |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-2-2023 (created) |
| | | toDels := selectset( parent, MatAttrSettingAndPlanStrategy, item, true, matCodes.Find( item.MatCode() ) <> -1 ); |
| | | if( toDels.Size() > 0 ) { |
| | | traverse( toDels, Elements, toDel ) { |
| | | toDel.Delete(); |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod deleteIfExistByMatCode ( |
| | | GlobalOTDTable parent, |
| | | String matCode, |
| | | GlobalOTDTable parent, |
| | | String matCode, |
| | | GlobalOTDTable parent, |
| | | String matCode, |
| | | GlobalOTDTable parent, |
| | | String matCode |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-2-2023 (created) |
| | | toDels := selectset( parent, MatAttrSettingAndPlanStrategy, item, true, matCode = item.MatCode() ); |
| | | if( toDels.Size() > 0 ) { |
| | | traverse( toDels, Elements, toDel ) { |
| | | toDel.Delete(); |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod getExistByMatCode ( |
| | | GlobalOTDTable parent, |
| | | String matCode |
| | | ) as MatAttrSettingAndPlanStrategy |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-3-2023 (created) |
| | | value := select( parent, MatAttrSettingAndPlanStrategy, item, true, matCode = item.MatCode() ); |
| | | return value; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod update ( |
| | | GlobalOTDTable parent, |
| | | MatAttrSettingAndPlanStrategyDataRow excelRow |
| | | ) as MatAttrSettingAndPlanStrategy |
| | | { |
| | | TextBody: |
| | | [* |
| | | fields := MatAttrSettingAndPlanStrategyDataTable::exportFields(); |
| | | headers := MatAttrSettingAndPlanStrategyDataTable::expectedHeaders(); |
| | | // æ¾å¾
æ´æ°è®°å½ |
| | | toUpdate := null( MatAttrSettingAndPlanStrategy ); |
| | | matCode := ""; |
| | | for( i := 0; i < fields.Size(); i++ ) { |
| | | header := headers.Element( i ); |
| | | cell := excelRow.MatAttrSettingAndPlanStrategyDataCell( relget ).Element( i ); |
| | | if( cell.MatAttrSettingAndPlanStrategyDataColumn().name() <> header ) { |
| | | error( "the column with index " + [String]i + " should be " + header + ", but found " + cell.MatAttrSettingAndPlanStrategyDataColumn().name() ); |
| | | } |
| | | if( cell.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æç¼ç " and cell.value() <> "") { |
| | | matCode := cell.value(); |
| | | toUpdate := MatAttrSettingAndPlanStrategy::getExistByMatCode( parent, matCode ); |
| | | } |
| | | } |
| | | if( not isnull( toUpdate ) ) { |
| | | // 对æ¯å·®å¼ |
| | | for( i := 0; i < fields.Size(); i++ ) { |
| | | header := headers.Element( i ); |
| | | cell := excelRow.MatAttrSettingAndPlanStrategyDataCell( relget ).Element( i ); |
| | | fieldName := fields.Element( i ); |
| | | field := Reflection::FindAttribute( "MatAttrSettingAndPlanningStrategy", fieldName); |
| | | if( fieldName = "MatName" or fieldName = "MatType" or fieldName = "FlagLongTerm" or fieldName = "FlagGeneric" or fieldName = "PlanningStrategyAuto" ) { |
| | | fieldValue := guard( field.GetString( toUpdate ), "" ); |
| | | if( fieldValue <> cell.value() ) { |
| | | error( "column " + header + " does not support to be changed" ); |
| | | } |
| | | } else if( fieldName = "MatArrivalLT" or fieldName = "ProductCount" or fieldName = "MinProdDeliverLT" ) { |
| | | fieldRealValue := guard( field.GetReal( toUpdate ), 0.0 ); |
| | | if( fieldRealValue <> [Real]cell.value() ) { |
| | | error( "column " + header + " does not support to be changed" ); |
| | | } |
| | | } else if( fieldName = "PlanningStrategyCustom" ) { |
| | | fieldValue := guard( field.GetString( toUpdate ), "" ); |
| | | toUpdate.PlanningStrategyCustom( fieldValue ); |
| | | } |
| | | } |
| | | } else { |
| | | error( "no record with matCode : " + matCode ) |
| | | } |
| | | |
| | | return toUpdate; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type MatAttrSettingAndPlanStrategy |
| | | { |
| | | #keys: '5[414384.0.759431201][414384.0.759431199][0.0.0][414384.0.759431200][414384.0.759431202]' |
| | | BaseType: Object |
| | | Description: 'ç©æå±æ§æ ç¾è®¾å®&ç©æè®¡åçç¥' |
| | | StructuredName: 'MatAttrSettingAndPlanStrategys' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute value |
| | | { |
| | | #keys: '3[414384.0.763764661][414384.0.763764660][414384.0.763764662]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: value |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type MatAttrSettingAndPlanStrategyDataCell |
| | | { |
| | | #keys: '5[414384.0.763764658][414384.0.763764656][0.0.0][414384.0.763764657][414384.0.763764659]' |
| | | BaseType: Object |
| | | StructuredName: 'MatAttrSettingAndPlanStrategyDataCells' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute columnIndex |
| | | { |
| | | #keys: '3[414384.0.763764669][414384.0.763764668][414384.0.763764670]' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute name |
| | | { |
| | | #keys: '3[414384.0.763764672][414384.0.763764671][414384.0.763764673]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | ISOValue: '0' |
| | | TargetAttribute: columnIndex |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: name |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalccolumnIndex |
| | | { |
| | | TextBody: |
| | | [* |
| | | value := ifexpr( isnull( this.PreviousColumnInTable() ), 0, this.PreviousColumnInTable().columnIndex() + 1 ); |
| | | |
| | | this.columnIndex( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type MatAttrSettingAndPlanStrategyDataColumn |
| | | { |
| | | #keys: '5[414384.0.763764666][414384.0.763764664][0.0.0][414384.0.763764665][414384.0.763764667]' |
| | | BaseType: Object |
| | | StructuredName: 'MatAttrSettingAndPlanStrategyDataColumns' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute rowNo |
| | | { |
| | | #keys: '3[414384.0.763764680][414384.0.763764679][414384.0.763764681]' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | ISOValue: '0' |
| | | TargetAttribute: rowNo |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type MatAttrSettingAndPlanStrategyDataRow |
| | | { |
| | | #keys: '5[414384.0.763764677][414384.0.763764675][0.0.0][414384.0.763764676][414384.0.763764678]' |
| | | BaseType: Object |
| | | StructuredName: 'MatAttrSettingAndPlanStrategyDataRows' |
| | | } |