Merge branch 'dev_yx' into dev_lhj
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | InfoMessages id:#InfoMessages #extension |
| | | { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 MatAttrSettingAndPlanStrategyDetail_MatAttrSettingAndPlanStrategy_MatAttrSettingAndPlanStrategy_MatAttrSettingAndPlanStrategyDetail |
| | | { |
| | | #keys: '1[414384.0.766881387]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide MatAttrSettingAndPlanStrategy |
| | | { |
| | | #keys: '3[414384.0.766881389][414384.0.766881388][414384.0.766881390]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyDetail |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide MatAttrSettingAndPlanStrategyDetail |
| | | { |
| | | #keys: '3[414384.0.766881392][414384.0.766881391][414384.0.766881393]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategy |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 |
| | | Method InitTestData |
| | | { |
| | | TextBody: |
| | | [* |
| | | //this.MatAttrSettingAndPlanStrategy( relflush ); |
| | | |
| | | // yypsybs Sep-8-2023 (created) |
| | | mat1 := MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, 1, "ææºäºä¸é¨", "MAT_1", "MAT_1", "TYPE_1", 233.0, "éç¨", "é¿å¨æ" ); |
| | | MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat1, "PROD_1", 666.0, "PROD_1_DESC" ); |
| | | MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat1, "PROD_2", 777.0, "PROD_2_DESC" ); |
| | | mat2 := MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, 2, "ææºäºä¸é¨", "MAT_2", "MAT_2", "TYPE_2", 233.0, "ä¸ç¨", "é¿å¨æ" ); |
| | | MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat2, "PROD_1", 1666.0, "PROD_1_DESC" ); |
| | | MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat2, "PROD_2", 1777.0, "PROD_2_DESC" ); |
| | | MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, 3, "ææºäºä¸é¨", "MAT_3", "MAT_3", "TYPE_1", 233.0, "éç¨", "ç卿" ); |
| | | MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, 4, "ææºäºä¸é¨", "MAT_4", "MAT_4", "TYPE_2", 233.0, "ä¸ç¨", "ç卿" ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 CheckThePrecedingColumn ( |
| | | GlobalOTDTable globalOTDTable |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | traverse ( this, MatAttrSettingAndPlanStrategyDataRow, masapsdr ) { |
| | | itemCode := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æç¼ç " ); |
| | | targetMatAttrSettingAndPlanStrategy := select( globalOTDTable, MatAttrSettingAndPlanStrategy, tempMASAPS, tempMASAPS.MatCode() = itemCode.value() ); |
| | | if ( not isnull( targetMatAttrSettingAndPlanStrategy ) ) { |
| | | businessType := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ä¸å¡ç±»å" ).value(); |
| | | nameOfMaterial := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æåç§°" ).value(); |
| | | itemClassification := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æåç±»" ).value(); |
| | | LTTimeDays := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "LTæ¶é´ï¼å¤©ï¼" ).value(); |
| | | numberOfFinishedSKUs := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "æåSKUæ°é" ).value(); |
| | | finishedProductDeliveryMinLTDays := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "æå交ä»Min-LTï¼å¤©ï¼" ).value(); |
| | | longAndShortCycleLabels := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "é¿ç卿æ ç¾" ).value(); |
| | | genericSpecialLabels := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "éç¨ä¸ç¨æ ç¾" ).value(); |
| | | automaticMaterialPlanningPolicies := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "èªå¨ç©æè®¡åçç¥" ).value(); |
| | | if ( businessType <> targetMatAttrSettingAndPlanStrategy.BusinessType() or |
| | | nameOfMaterial <> targetMatAttrSettingAndPlanStrategy.MatName() or |
| | | itemClassification <> targetMatAttrSettingAndPlanStrategy.MatType() or |
| | | [Real]LTTimeDays <> targetMatAttrSettingAndPlanStrategy.MatArrivalLT() or |
| | | [Real]numberOfFinishedSKUs <> targetMatAttrSettingAndPlanStrategy.ProductCount() or |
| | | [Real]finishedProductDeliveryMinLTDays <> targetMatAttrSettingAndPlanStrategy.MinProdDeliverLT() or |
| | | longAndShortCycleLabels <> targetMatAttrSettingAndPlanStrategy.FlagLongTerm() or |
| | | genericSpecialLabels <> targetMatAttrSettingAndPlanStrategy.FlagGeneric() or |
| | | automaticMaterialPlanningPolicies <> targetMatAttrSettingAndPlanStrategy.PlanningStrategyAuto() ) |
| | | { |
| | | error( "导å
¥å¤±è´¥ï¼ä¸å½åç³»ç»å段ä¸ä¸è´ï¼", targetMatAttrSettingAndPlanStrategy.MatCode() ); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method CreateOrUpdateData ( |
| | | GlobalOTDTable globalOTDTable |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | traverse ( this, MatAttrSettingAndPlanStrategyDataRow, masapsdr ) { |
| | | itemCode := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æç¼ç " ); |
| | | targetMatAttrSettingAndPlanStrategy := select( globalOTDTable, MatAttrSettingAndPlanStrategy, tempMASAPS, tempMASAPS.MatCode() = itemCode.value() ); |
| | | if ( not isnull( targetMatAttrSettingAndPlanStrategy ) ) { |
| | | minimumNumberOfDaysInStock := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "åºåæå°å¤©æ°" ).value(); |
| | | maximumNumberOfDaysInInventory := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "åºåæå¤§å¤©æ°" ).value(); |
| | | try { |
| | | targetMatAttrSettingAndPlanStrategy.MinimumNumberOfDaysInStock( [Number]minimumNumberOfDaysInStock ); |
| | | targetMatAttrSettingAndPlanStrategy.MaximumNumberOfDaysInInventory( [Number]maximumNumberOfDaysInInventory ); |
| | | targetMatAttrSettingAndPlanStrategy.UpdateBy( QuintiqUser::CurrentUser().Username() ); |
| | | targetMatAttrSettingAndPlanStrategy.UpdateTime( DateTime::ActualTime() ); |
| | | } onerror { |
| | | error( "åºåæå°å¤©æ°æåºåæå¤§å¤©æ°å¿
é¡»ä¸ºæ´æ°ï¼", targetMatAttrSettingAndPlanStrategy.MatCode() ); |
| | | } |
| | | } else { |
| | | businessType := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ä¸å¡ç±»å" ).value(); |
| | | createItemCode := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æç¼ç " ).value(); |
| | | nameOfMaterial := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æåç§°" ).value(); |
| | | itemClassification := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æåç±»" ).value(); |
| | | LTTimeDays := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "LTæ¶é´ï¼å¤©ï¼" ).value(); |
| | | // numberOfFinishedSKUs := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "æåSKUæ°é" ).value(); |
| | | // finishedProductDeliveryMinLTDays := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "æå交ä»Min-LTï¼å¤©ï¼" ).value(); |
| | | longAndShortCycleLabels := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "é¿ç卿æ ç¾" ).value(); |
| | | genericSpecialLabels := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "éç¨ä¸ç¨æ ç¾" ).value(); |
| | | // automaticMaterialPlanningPolicies := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "èªå¨ç©æè®¡åçç¥" ).value(); |
| | | usersManuallySchedulePolicies := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç¨æ·æå¨è®¡åçç¥" ).value(); |
| | | minimumNumberOfDaysInStock := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "åºåæå°å¤©æ°" ).value(); |
| | | maximumNumberOfDaysInInventory := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "åºåæå¤§å¤©æ°" ).value(); |
| | | try { |
| | | matAttrSettingAndPlanStrategy := globalOTDTable.MatAttrSettingAndPlanStrategy( relnew, |
| | | BusinessType := businessType, |
| | | MatCode := createItemCode, |
| | | MatName := nameOfMaterial, |
| | | MatType := itemClassification, |
| | | MatArrivalLT := [Number]LTTimeDays, |
| | | // ProductCount := [Number]numberOfFinishedSKUs, |
| | | // MinProdDeliverLT := [Number]finishedProductDeliveryMinLTDays, |
| | | FlagLongTerm := longAndShortCycleLabels, |
| | | FlagGeneric := genericSpecialLabels, |
| | | // PlanningStrategyAuto := automaticMaterialPlanningPolicies, |
| | | PlanningStrategyCustom := usersManuallySchedulePolicies, |
| | | MinimumNumberOfDaysInStock := [Number]minimumNumberOfDaysInStock, |
| | | MaximumNumberOfDaysInInventory := [Number]maximumNumberOfDaysInInventory |
| | | ); |
| | | matAttrSettingAndPlanStrategy.UpdateBy( QuintiqUser::CurrentUser().Username() ); |
| | | matAttrSettingAndPlanStrategy.UpdateTime( DateTime::ActualTime() ); |
| | | matAttrSettingAndPlanStrategy.SerialNumber( maxselect( globalOTDTable, MatAttrSettingAndPlanStrategy, tempMASAPS, tempMASAPS.SerialNumber() ).SerialNumber() + 1 ); |
| | | } onerror { |
| | | error( "åºåæå°å¤©æ°æåºåæå¤§å¤©æ°å¿
é¡»ä¸ºæ´æ°ï¼", targetMatAttrSettingAndPlanStrategy.MatCode() ); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method SynchronizeData |
| | | { |
| | | TextBody: |
| | | [* |
| | | this.VerifyThatTheItemCodeIsNotDuplicated(); |
| | | |
| | | globalOTDTable := this.MatAttrSettingAndPlanStrategyInputSource().GlobalOTDTable(); |
| | | |
| | | this.CheckThePrecedingColumn( globalOTDTable ); |
| | | |
| | | this.CreateOrUpdateData( globalOTDTable ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method VerifyThatTheItemCodeIsNotDuplicated |
| | | { |
| | | TextBody: |
| | | [* |
| | | itemCodes := selectuniquevalues( this, |
| | | MatAttrSettingAndPlanStrategyDataColumn.MatAttrSettingAndPlanStrategyDataCell, |
| | | tempMASAPSDC, |
| | | tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æç¼ç ", |
| | | tempMASAPSDC.value() ); |
| | | |
| | | traverse ( itemCodes, Elements, ic ) { |
| | | icTotal := selectset( this, |
| | | MatAttrSettingAndPlanStrategyDataColumn.MatAttrSettingAndPlanStrategyDataCell, |
| | | tempMASAPSDC, |
| | | tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æç¼ç " and tempMASAPSDC.value() = ic ); |
| | | if ( icTotal.Size() > 1 ) { |
| | | error( "åå¨éå¤ç©æç¼ç ï¼", ic ); |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method VerifyTheTemplate |
| | | { |
| | | TextBody: |
| | | [* |
| | | if ( select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 0 ).name() <> "ä¸å¡ç±»å" or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 1 ).name() <> "ç©æç¼ç " or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 2 ).name() <> "ç©æåç§°" or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 3 ).name() <> "ç©æåç±»" or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 4 ).name() <> "LTæ¶é´ï¼å¤©ï¼" or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 5 ).name() <> "æåSKUæ°é" or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 6 ).name() <> "æå交ä»Min-LTï¼å¤©ï¼" or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 7 ).name() <> "é¿ç卿æ ç¾" or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 8 ).name() <> "éç¨ä¸ç¨æ ç¾" or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 9 ).name() <> "èªå¨ç©æè®¡åçç¥" or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 10 ).name() <> "ç¨æ·æå¨è®¡åçç¥" or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 11 ).name() <> "åºåæå°å¤©æ°" or |
| | | select( this, MatAttrSettingAndPlanStrategyDataColumn, tempMASAPSDC, tempMASAPSDC.columnIndex() = 12 ).name() <> "åºåæå¤§å¤©æ°" |
| | | ) { |
| | | error( "模æ¿è§£æé误" ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 |
| | | ) as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-1-2023 (created) |
| | | xmlTemplate := '<?xml version="1.0" encoding="UTF-16"?> |
| | | <table> |
| | | <name>MatAttrSettingAndPlanStrategy</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( "MatAttrSettingAndPlanStrategy", 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 MatAttrSettingAndPlanStrategy"); |
| | | } |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | } |
| | | //--------------------------------------------------------------------------------------------- |
| | | xmlTemplate := xmlTemplate + "</table>"; |
| | | info( xmlTemplate ); |
| | | tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTemplate ) ); |
| | | XLS::SaveTable( tableHandle, OS::TempPath() + "MatAttrSettingAndPlanStrategy.xlsx" ); |
| | | file := OSFile::Construct(); |
| | | file.Open( OS::TempPath() + "MatAttrSettingAndPlanStrategy.xlsx", "Read", true ); |
| | | data := file.ReadBinary() |
| | | return data.AsBase64EncodedString(); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 Comment |
| | | { |
| | | #keys: '3[414384.0.766881447][414384.0.766881446][414384.0.766881448]' |
| | | Description: '夿³¨' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MatCode |
| | | { |
| | | #keys: '3[414384.0.766881404][414384.0.766881403][414384.0.766881405]' |
| | | Description: 'ç©æç¼ç ' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ProductCode |
| | | { |
| | | #keys: '3[414384.0.766881414][414384.0.766881413][414384.0.766881415]' |
| | | Description: 'æåç¼ç ' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ProductDesc |
| | | { |
| | | #keys: '3[414384.0.766881437][414384.0.766881436][414384.0.766881438]' |
| | | Description: 'æåæè¿°' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute StandardLT |
| | | { |
| | | #keys: '3[414384.0.766881424][414384.0.766881423][414384.0.766881425]' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMatCode |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Sep-8-2023 (created) |
| | | |
| | | value := this.MatAttrSettingAndPlanStrategy().MatCode(); |
| | | |
| | | this.MatCode( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateIfNotExist ( |
| | | MatAttrSettingAndPlanStrategy parent, |
| | | String productCode, |
| | | Real standardLT, |
| | | String productDesc |
| | | ) as MatAttrSettingAndPlanStrategyDetail |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Sep-8-2023 (created) |
| | | value := select( parent, MatAttrSettingAndPlanStrategyDetail, item, item.ProductCode() = productCode ); |
| | | if( isnull( value ) ) { |
| | | value := parent.MatAttrSettingAndPlanStrategyDetail( relnew, |
| | | ProductCode := productCode, |
| | | StandardLT := standardLT, |
| | | ProductDesc := productDesc ); |
| | | } |
| | | return value; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type MatAttrSettingAndPlanStrategyDetail |
| | | { |
| | | #keys: '5[414384.0.766881384][414384.0.766881382][0.0.0][414384.0.766881383][414384.0.766881385]' |
| | | BaseType: Object |
| | | Description: 'ç©æå±æ§æ ç¾è®¾å®&ç©æè®¡åçç¥æç»' |
| | | StructuredName: 'MatAttrSettingAndPlanStrategyDetails' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Base64Str |
| | | { |
| | | #keys: '3[414384.0.763764696][414384.0.763764695][414384.0.763764697]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 |
| | | Attribute UserName |
| | | { |
| | | #keys: '3[414384.0.775080571][414384.0.775080570][414384.0.775080572]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method CreateTable ( |
| | | 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: |
| | | [* |
| | | tableGroupHandle := TableGroupHandle::Create( this.FileName() ); |
| | | tableGroupHandle := XLS::LoadTableGroupFromBinaryData( BinaryData::FromBase64EncodedString( this.Base64Str() ), tableGroupHandle, true, this.IsXlsx() ); |
| | | |
| | | sheets := tableGroupHandle.TableNames(); |
| | | |
| | | traverse ( sheets, Elements, sheetName, sheetName = "ç©ææ ç¾" ) { |
| | | tableHandle := tableGroupHandle.Table( sheetName ); |
| | | tableXML := TableHandle::ExportXML( tableHandle ); |
| | | |
| | | MatAttrSettingAndPlanStrategyDataTable::XMLImportMatAttrSettingAndPlanStrategyDataTableXMLHeaders( tableXML ); |
| | | matAttrSettingAndPlanStrategyDataTable := MatAttrSettingAndPlanStrategyDataTable::XMLImportMatAttrSettingAndPlanStrategyDataTableXML( tableXML ); |
| | | |
| | | matAttrSettingAndPlanStrategyDataTable.ParseRows(); |
| | | |
| | | matAttrSettingAndPlanStrategyDataTable.name( sheetName ); |
| | | this.MatAttrSettingAndPlanStrategyDataTable( relinsert, &matAttrSettingAndPlanStrategyDataTable ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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, this.UserName() ); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod VerifyTheFileName ( |
| | | JSON uploadJson |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | fileNames := uploadJson.Get( "name" ).GetString().Tokenize( "." ); |
| | | fileNameSuffix := fileNames.Element( fileNames.Size() - 1 ); |
| | | if ( fileNameSuffix <> "xlsx" and fileNameSuffix <> "xls" ) { |
| | | error( "请ä¸ä¼ Excelæä»¶" ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Upload ( |
| | | GlobalOTDTable globalOTDTable, |
| | | String filePath, |
| | | String base64Str, |
| | | String userName |
| | | ) as MatAttrSettingAndPlanStrategyInputSource |
| | | { |
| | | TextBody: |
| | | [* |
| | | globalOTDTable.MatAttrSettingAndPlanStrategyInputSource( relflush ); |
| | | |
| | | fileName := filePath.Tokenize( "\" ).Element( filePath.Tokenize( "\" ).Size() - 1 ); |
| | | |
| | | inputSource := globalOTDTable.MatAttrSettingAndPlanStrategyInputSource( relnew, |
| | | FileName := fileName, |
| | | Base64Str := base64Str, |
| | | IsXlsx := fileName.EndsWith( "xlsx" ), |
| | | UserName := userName ); |
| | | |
| | | 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 BusinessType |
| | | { |
| | | #keys: '3[414702.0.129575801][414702.0.129575800][414702.0.129575802]' |
| | | Description: 'ä¸å¡ç±»å' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 MaximumNumberOfDaysInInventory |
| | | { |
| | | #keys: '3[414702.0.129559419][414702.0.129559418][414702.0.129559420]' |
| | | Description: 'åºåæå¤§å¤©æ°' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 MinimumNumberOfDaysInStock |
| | | { |
| | | #keys: '3[414702.0.129559409][414702.0.129559408][414702.0.129559410]' |
| | | Description: 'åºåæå°å¤©æ°' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute PlanningStrategyAuto |
| | | { |
| | | #keys: '3[414384.0.759444687][414384.0.759444686][414384.0.759444688]' |
| | | Description: |
| | | [* |
| | | èªå¨è®¡åçç¥ |
| | | JIT & å®å
¨åºå & VMI |
| | | *] |
| | | 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 SerialNumber |
| | | { |
| | | #keys: '3[414702.0.129544801][414702.0.129544800][414702.0.129544802]' |
| | | Description: 'åºå·' |
| | | 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 |
| | | Function CalcMinProdDeliverLT |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Sep-8-2023 (created) |
| | | |
| | | value := 0.0; |
| | | |
| | | if( this.MatAttrSettingAndPlanStrategyDetail( relsize ) <> 0 ) { |
| | | value := guard( min( this, MatAttrSettingAndPlanStrategyDetail, detail, detail.StandardLT() ) , 0.0 ); |
| | | } |
| | | |
| | | this.MinProdDeliverLT( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcPlanningStrategyAuto |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Sep-8-2023 (created) |
| | | |
| | | value := ""; |
| | | |
| | | if( this.FlagLongTerm() = "é¿å¨æ" and this.FlagGeneric() = "ä¸ç¨" ) { |
| | | value := "JIT"; |
| | | } else if ( this.FlagLongTerm() = "é¿å¨æ" and this.FlagGeneric() = "éç¨" ) { |
| | | value := "å®å
¨åºå"; |
| | | } else if ( this.FlagLongTerm() = "ç卿" and this.FlagGeneric() = "ä¸ç¨" ) { |
| | | value := "JIT"; |
| | | } else if ( this.FlagLongTerm() = "ç卿" and this.FlagGeneric() = "éç¨" ) { |
| | | value := "VMI"; |
| | | } |
| | | |
| | | this.PlanningStrategyAuto( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcProductCount |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Sep-8-2023 (created) |
| | | |
| | | value := counter( this, MatAttrSettingAndPlanStrategyDetail, item, true ); |
| | | |
| | | this.ProductCount( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateIfNotExist ( |
| | | GlobalOTDTable parent, |
| | | Number serialNumber, |
| | | String businessType, |
| | | String matCode, |
| | | String matName, |
| | | String matType, |
| | | Real matArrivalLT, |
| | | String flagGeneric, |
| | | String flagLongTerm |
| | | ) as MatAttrSettingAndPlanStrategy |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Sep-8-2023 (created) |
| | | value := MatAttrSettingAndPlanStrategy::GetExistByMatCode( parent, matCode ); |
| | | if( isnull( value ) ) { |
| | | value := parent.MatAttrSettingAndPlanStrategy( relnew, |
| | | SerialNumber := serialNumber, |
| | | BusinessType := businessType, |
| | | MatCode := matCode, |
| | | MatName := matName, |
| | | MatType := matType, |
| | | MatArrivalLT := matArrivalLT, |
| | | FlagGeneric := flagGeneric, |
| | | FlagLongTerm := flagLongTerm, |
| | | PlanningStrategyCustom := "", |
| | | UpdateBy := "", |
| | | UpdateTime := DateTime::MinDateTime() ); |
| | | } |
| | | return value; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod DeleteIfExistByMatCode ( |
| | | GlobalOTDTable parent, |
| | | Strings matCode |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-2-2023 (created) |
| | | toDels := selectset( parent, MatAttrSettingAndPlanStrategy, item, true, matCode.Find( item.MatCode() ) >= 0 ); |
| | | if( toDels.Size() > 0 ) { |
| | | traverse( toDels, Elements, toDel ) { |
| | | toDel.Delete(); |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod ExportTheFileStream ( |
| | | MatAttrSettingAndPlanStrategys masapss |
| | | ) as BinaryValue |
| | | { |
| | | TextBody: |
| | | [* |
| | | text:= '<?xml version="1.0" encoding="utf-8" standalone="yes"?><table><name>ç©ææ ç¾</name><column><name>ä¸å¡ç±»å</name><type>String</type></column><column><name>ç©æç¼ç </name><type>String</type></column><column><name>ç©æåç§°</name><type>String</type></column><column><name>ç©æåç±»</name><type>String</type></column><column><name>LTæ¶é´ï¼å¤©ï¼</name><type>Number</type></column><column><name>æåSKUæ°é</name><type>Number</type></column><column><name>æå交ä»Min-LTï¼å¤©ï¼</name><type>Number</type></column><column><name>é¿ç卿æ ç¾</name><type>String</type></column><column><name>éç¨ä¸ç¨æ ç¾</name><type>String</type></column><column><name>èªå¨ç©æè®¡åçç¥</name><type>String</type></column><column><name>ç¨æ·æå¨è®¡åçç¥</name><type>String</type></column><column><name>åºåæå°å¤©æ°</name><type>Number</type></column><column><name>åºåæå¤§å¤©æ°</name><type>Number</type></column></table>'; |
| | | xmlDOMImplementation := XMLDOMImplementation::Create(); |
| | | xmlDOMDocument := xmlDOMImplementation.CreateDocumentFromString( text ); |
| | | |
| | | masapss := selectsortedset( masapss, Elements, tempMASAPS, true, tempMASAPS.MatCode() ); |
| | | tableElement:= xmlDOMDocument.GetElementByTagName( "table", 0 ); |
| | | |
| | | traverse ( masapss, Elements, masaps ) { |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, masaps.BusinessType(), "ä¸å¡ç±»å" ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, masaps.MatCode(), "ç©æç¼ç " ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, masaps.MatName(), "ç©æåç§°" ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, masaps.MatType(), "ç©æåç±»" ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]masaps.MatArrivalLT(), "LTæ¶é´ï¼å¤©ï¼" ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]masaps.ProductCount(), "æåSKUæ°é" ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]masaps.MinProdDeliverLT(), "æå交ä»Min-LTï¼å¤©ï¼" ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, masaps.FlagLongTerm(), "é¿ç卿æ ç¾" ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, masaps.FlagGeneric(), "éç¨ä¸ç¨æ ç¾" ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, masaps.PlanningStrategyAuto(), "èªå¨ç©æè®¡åçç¥" ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, masaps.PlanningStrategyCustom(), "ç¨æ·æå¨è®¡åçç¥" ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]masaps.MinimumNumberOfDaysInStock(), "åºåæå°å¤©æ°" ); |
| | | MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]masaps.MaximumNumberOfDaysInInventory(), "åºåæå¤§å¤©æ°" ); |
| | | } |
| | | |
| | | xmlDOMSerializer := xmlDOMImplementation.CreateSerializer(); |
| | | xmlTableString := xmlDOMSerializer.WriteToString( xmlDOMDocument ); |
| | | |
| | | tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTableString ) ); |
| | | tableGroupHandle := TableGroupHandle::Create( "ç©ææ ç¾" ); |
| | | tableGroupHandle.Add( tableHandle ); |
| | | tableBinaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true ); |
| | | |
| | | return tableBinaryData.AsBinaryValue(); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GeneratesTheSpecifiedXMLColumn ( |
| | | XMLDOMDocument xmlDOMDocument, |
| | | XMLDOMElement tableElement, |
| | | String value, |
| | | String columnName |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | columnElements := tableElement.GetElementsByTagName( "column" ); |
| | | |
| | | traverse ( columnElements, Elements, ce ) { |
| | | nameElement := ce.GetElementByTagName( "name", 0 ); |
| | | if ( nameElement.TextContent() = columnName ) { |
| | | cell := xmlDOMDocument.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", value ); |
| | | ce.AppendChild( cell ); |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Delete ( |
| | | 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, |
| | | 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, |
| | | String userName |
| | | ) as MatAttrSettingAndPlanStrategy |
| | | { |
| | | TextBody: |
| | | [* |
| | | fields := MatAttrSettingAndPlanStrategyDataTable::ExportFields(); |
| | | headers := MatAttrSettingAndPlanStrategyDataTable::ExpectedHeaders(); |
| | | //info( "--------SaveData--------" ); |
| | | // æ¾å¾
æ´æ°è®°å½ |
| | | 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 ) { |
| | | FeedbackObject::LocalFeedback().AddHard( "the column with index " + [String]i + " should be " + header + ", but found " + cell.MatAttrSettingAndPlanStrategyDataColumn().name() ); |
| | | 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( isnull( toUpdate ) ) { |
| | | FeedbackObject::LocalFeedback().AddHard( "get MatAttrSettingAndPlanStrategy by matCode [" + matCode + "] failed" ); |
| | | error( "get MatAttrSettingAndPlanStrategy by matCode [" + matCode + "] failed" ); |
| | | } |
| | | } |
| | | } |
| | | 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( "MatAttrSettingAndPlanStrategy", fieldName); |
| | | if( isnull( field ) ) { |
| | | FeedbackObject::LocalFeedback().AddHard( "MatAttrSettingAndPlanStrategy does not have field " + fieldName ); |
| | | error( "MatAttrSettingAndPlanStrategy does not have field " + fieldName ); |
| | | } |
| | | // info( "========header:" + header + "========" ) |
| | | // info( "========fieldName:" + fieldName + "========" ) |
| | | // info( "========cell:" + cell.value() + "========" ) |
| | | if( fieldName = "MatName" or fieldName = "MatType" or fieldName = "FlagLongTerm" or fieldName = "FlagGeneric" or fieldName = "PlanningStrategyAuto" ) { |
| | | // do nothing |
| | | } else if( fieldName = "MatArrivalLT" or fieldName = "ProductCount" or fieldName = "MinProdDeliverLT" ) { |
| | | // do nothing |
| | | } else if( fieldName = "PlanningStrategyCustom" ) { |
| | | if( cell.value() <> "VMI" and cell.value() <> "å®å
¨åºå" and cell.value() <> "VIT" ) { |
| | | FeedbackObject::LocalFeedback().AddHard( "unsupported PlanningStrategyCustom : " + cell.value() ); |
| | | error( "unsupported PlanningStrategyCustom : " + cell.value() ); |
| | | } else if( cell.value() <> toUpdate.PlanningStrategyCustom() ) { |
| | | toUpdate.PlanningStrategyCustom( cell.value() ); |
| | | toUpdate.UpdateBy( userName ); |
| | | toUpdate.UpdateTime( DateTime::Now() ); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | FeedbackObject::LocalFeedback().AddHard( "no record with matCode : " + matCode ); |
| | | 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' |
| | | } |
| | |
| | | ] |
| | | } |
| | | Component MenuDoSync { #keys: '[414384.0.605664172]' BaseType: 'Menu' Properties: [ Image: 'CLOUD_DOWNLOAD' Text: 'DoSync' ] } |
| | | Component menuSeparator506 { #keys: '[414702.0.137524309]' BaseType: 'Menu' Properties: [ Separator: true ] } |
| | | Component ComponentMenuAnalysisGlobalOTDTable { #keys: '[414702.0.137524953]' BaseType: 'ComponentMenu' Properties: [ ComponentType: 'frmStandardAnalysisGlobalOTDTable' Text: '' ] } |
| | | ] |
| | | Properties: |
| | | [ |
| | |
| | | c: Menu8 |
| | | c: MenuSelectDemoDataset |
| | | c: MenuDoSync |
| | | c: menuSeparator506 |
| | | c: ComponentMenuAnalysisGlobalOTDTable |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component swTop |
| | | { |
| | | #keys: '[530.0.3531806]' |
| | | BaseType: 'swTop' |
| | | IsDerived: true |
| | | Children: |
| | | [ |
| | | Component spTopLeft |
| | | { |
| | | #keys: '[530.0.3531807]' |
| | | BaseType: 'spTopLeft' |
| | | IsDerived: true |
| | | Children: |
| | | [ |
| | | Component Analysis |
| | | { |
| | | #keys: '[530.0.3532065]' |
| | | BaseType: 'Analysis' |
| | | IsDerived: true |
| | | Properties: |
| | | [ |
| | | GlobalInstance: 'GlobalOTDTable' |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component swTopMost |
| | | { |
| | | #keys: '[530.0.3531801]' |
| | | BaseType: 'swTopMost' |
| | | IsDerived: true |
| | | Children: |
| | | [ |
| | | Component SplitterPane1 |
| | | { |
| | | #keys: '[530.0.3531802]' |
| | | BaseType: 'SplitterPane1' |
| | | IsDerived: true |
| | | Children: |
| | | [ |
| | | #child: swTop |
| | | ] |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: MacroPlanner |
| | | OrphanComponent frmStandardAnalysisGlobalOTDTable |
| | | { |
| | | #keys: '[414702.0.137524322]' |
| | | BaseType: 'frmStandardAnalysis' |
| | | Children: |
| | | [ |
| | | #child: swTopMost |
| | | ] |
| | | Properties: |
| | | [ |
| | | Height: 601 |
| | | Image: 'BIRD' |
| | | Title: 'Analysis GlobalOTDTable' |
| | | Width: 783 |
| | | ] |
| | | } |
| | |
| | | #parent: LibSOPImpExp_ContextMenuImport/MenuImportFromCommonInformationModel |
| | | Response OnClick () id:Response_TIANMA_JITUAN_LibSOPImpExp_ContextMenuImport_MenuImportFromCommonInformationModel_OnClick |
| | | { |
| | | #warning 103647: "Identifier 'Response_MacroPlanner_LibSOPImpExp_ContextMenuImport_MenuImportFromCommonInformationModel_OnClick' is not unique in the scope of 'LibSOPImpExp_ContextMenuImport' component on 'ApplicationMacroPlanner'. The reason can be a recently added ModeledResponse. A unique identifier was generated automatically." |
| | | #keys: '[146140.2.683371355]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebMenu_OnClick' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component pnlActions |
| | | { |
| | | #keys: '[414702.0.131771244]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component btnOk |
| | | { |
| | | #keys: '[414702.0.131771248]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Label: 'OK' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component btnCancel |
| | | { |
| | | #keys: '[414702.0.131771250]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Label: 'Cancel' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Alignment: 'trailing' |
| | | Border: true |
| | | ExcludeFromActiveComponent: true |
| | | FixedSize: true |
| | | Orientation: 'horizontal' |
| | | Padding: 'true' |
| | | Style: 'footer' |
| | | Taborder: 2 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component pnlContent |
| | | { |
| | | #keys: '[414702.0.131771242]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: pnlGeneral |
| | | ] |
| | | Properties: |
| | | [ |
| | | Padding: 'true' |
| | | Taborder: 1 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component pnlGeneral |
| | | { |
| | | #keys: '[414702.0.139154801]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component efBusinessType |
| | | { |
| | | #keys: '[414702.0.139035752]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'DataHolderDialogData.Data.BusinessType' |
| | | Enabled: false |
| | | Label: 'ä¸å¡ç±»å' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component efItemCode |
| | | { |
| | | #keys: '[414702.0.139035772]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'DataHolderDialogData.Data.MatCode' |
| | | Enabled: false |
| | | Label: 'ç©æç¼ç ' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component efNameOfMaterial |
| | | { |
| | | #keys: '[414702.0.139035784]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'DataHolderDialogData.Data.MatName' |
| | | Enabled: false |
| | | Label: 'ç©æåç§°' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component efMaterialArrivalLTDays |
| | | { |
| | | #keys: '[414702.0.139035796]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'DataHolderDialogData.Data.MatArrivalLT' |
| | | Description: 'Finished product minimum delivery LT (days)' |
| | | Enabled: false |
| | | Label: 'ç©æå°è´§LTï¼å¤©ï¼' |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | Component efFinishedProductMinimumDeliveryLTDays |
| | | { |
| | | #keys: '[414702.0.139035809]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'DataHolderDialogData.Data.MinProdDeliverLT' |
| | | Enabled: false |
| | | Label: 'æåæå°äº¤ä»LTï¼å¤©ï¼' |
| | | Taborder: 4 |
| | | ] |
| | | } |
| | | Component efFinishedSKUType |
| | | { |
| | | #keys: '[414702.0.139035821]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'DataHolderDialogData.Data.ProductCount' |
| | | Enabled: false |
| | | Label: 'æåSKUç§ç±»' |
| | | Taborder: 5 |
| | | ] |
| | | } |
| | | Component efTheSystemAutomaticallySchedulesPolicies |
| | | { |
| | | #keys: '[414702.0.139035834]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'DataHolderDialogData.Data.PlanningStrategyAuto' |
| | | Enabled: false |
| | | Label: 'ç³»ç»èªå¨è®¡åçç¥' |
| | | Taborder: 6 |
| | | ] |
| | | } |
| | | Component ddslMaterialPlanningPolicyChanges |
| | | { |
| | | #keys: '[414702.0.139877037]' |
| | | BaseType: 'WebDropDownStringList' |
| | | Properties: |
| | | [ |
| | | AllowEmpty: true |
| | | DataBinding: 'DataHolderDialogData.Data.PlanningStrategyCustom' |
| | | Label: 'ç©æè®¡åçç¥åæ´' |
| | | Strings: 'JIT;VMI;M/A;å®å
¨åºå;POææ' |
| | | Taborder: 7 |
| | | ] |
| | | } |
| | | Component efTheMinimumNumberOfDaysForAnItemToBeInventoried |
| | | { |
| | | #keys: '[414702.0.139969846]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'DataHolderDialogData.Data.MinimumNumberOfDaysInStock' |
| | | Label: 'ç©æåºåæå°å¤©æ°' |
| | | Taborder: 8 |
| | | ] |
| | | } |
| | | Component efTheMaximumNumberOfDaysThatTheItemIsInStock |
| | | { |
| | | #keys: '[414702.0.139969907]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'DataHolderDialogData.Data.MaximumNumberOfDaysInInventory' |
| | | Label: 'ç©æåºåæå¤§å¤©æ°' |
| | | Taborder: 9 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Edit ( |
| | | MatAttrSettingAndPlanStrategy selection |
| | | ) id:Method_DialogCreateEditMaterialLabelingAndPlanningStrategy_Edit |
| | | { |
| | | #keys: '[414702.0.137732159]' |
| | | Body: |
| | | [* |
| | | //data := shadow( selection ); |
| | | DataHolderDialogData.Data( selection ); |
| | | |
| | | selection.UpdateBy( QuintiqUser::CurrentUser().Username() ); |
| | | selection.UpdateTime( DateTime::ActualTime() ); |
| | | |
| | | ApplicationMacroPlanner.ShowFormModal( this ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: pnlActions/btnCancel |
| | | Response OnClick () id:Response_pnlActions_btnCancel_OnClick |
| | | { |
| | | #keys: '[414702.0.131771254]' |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | GroupServerCalls: true |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | Form.Close(); |
| | | *] |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: pnlActions/btnOk |
| | | Response OnClick () id:Response_pnlActions_btnOk_OnClick |
| | | { |
| | | #keys: '[414702.0.131771253]' |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | GroupServerCalls: true |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | Form.ApplyChanges(); |
| | | Form.Close(); |
| | | *] |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: MacroPlannerWebApp |
| | | OrphanComponent DialogCreateEditMaterialLabelingAndPlanningStrategy |
| | | { |
| | | #keys: '[414702.0.131771240]' |
| | | BaseType: 'WebForm' |
| | | Children: |
| | | [ |
| | | #child: pnlContent |
| | | #child: pnlActions |
| | | Component DataHolderDialogData |
| | | { |
| | | #keys: '[414702.0.139153395]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'MatAttrSettingAndPlanStrategy' |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Alignment: 'trailing' |
| | | EnterButton: 'btnOk' |
| | | EscapeButton: 'btnCancel' |
| | | ExcludeFromActiveComponent: true |
| | | Padding: 'false' |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component ListChildMaterial |
| | | { |
| | | #keys: '[414702.0.122536770]' |
| | | BaseType: 'WebList' |
| | | Children: |
| | | [ |
| | | Component DataExtractorChildMaterial |
| | | { |
| | | #keys: '[414702.0.122536771]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'MatAttrSettingAndPlanStrategy' |
| | | ExtractionMode: 'Selected' |
| | | Source: 'PanelMaterial.ListMaterialMaterialLabelingAndPlanningStrategy' |
| | | Taborder: 0 |
| | | Transformation: 'MatAttrSettingAndPlanStrategyDetail' |
| | | ] |
| | | } |
| | | #child: listActionBarPageChildMaterial |
| | | Component DataSetLevelChildMaterial |
| | | { |
| | | #keys: '[414702.0.122536776]' |
| | | BaseType: 'WebDataSetLevel' |
| | | Children: |
| | | [ |
| | | #child: listContextMenuChildMaterial |
| | | ] |
| | | Properties: |
| | | [ |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MatCode","title":"MatCode","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"MatCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductCode","title":"ProductCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StandardLT","title":"StandardLT","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StandardLT"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductDesc","title":"ProductDesc","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductDesc"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Comment","title":"Comment","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Comment"}}]' |
| | | ContextMenu: 'listContextMenuChildMaterial' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component ListMaterialMaterialLabelingAndPlanningStrategy id:ListMaterialMaterialLabelingAndPlanningStrategy_880 |
| | | { |
| | | #keys: '[414702.0.122174685]' |
| | | BaseType: 'WebList' |
| | | Children: |
| | | [ |
| | | Component DataExtractorMaterial367 |
| | | { |
| | | #keys: '[414702.0.122174686]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | Taborder: 0 |
| | | Transformation: 'MatAttrSettingAndPlanStrategy' |
| | | ] |
| | | } |
| | | #child: listActionBarPageMaterial790_1 |
| | | Component DataSetLevelMaterial679 |
| | | { |
| | | #keys: '[414702.0.122174688]' |
| | | BaseType: 'WebDataSetLevel' |
| | | Children: |
| | | [ |
| | | #child: listContextMenuMaterial455_1 |
| | | ] |
| | | Properties: |
| | | [ |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SerialNumber","title":"SerialNumber","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SerialNumber"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"BusinessType","title":"BusinessType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"BusinessType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MatCode","title":"MatCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MatCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MatName","title":"MatName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MatName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MatType","title":"MatType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MatType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MatArrivalLT","title":"MatArrivalLT","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MatArrivalLT"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductCount","title":"ProductCount","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductCount"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MinProdDeliverLT","title":"MinProdDeliverLT","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"MinProdDeliverLT"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FlagLongTerm","title":"FlagLongTerm","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"FlagLongTerm"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FlagGeneric","title":"FlagGeneric","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"FlagGeneric"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlanningStrategyAuto","title":"PlanningStrategyAuto","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"PlanningStrategyAuto"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlanningStrategyCustom","title":"PlanningStrategyCustom","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PlanningStrategyCustom"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UpdateBy","title":"UpdateBy","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UpdateBy"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UpdateTime","title":"UpdateTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UpdateTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MinimumNumberOfDaysInStock","title":"MinimumNumberOfDaysInStock","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MinimumNumberOfDaysInStock"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaximumNumberOfDaysInInventory","title":"MaximumNumberOfDaysInInventory","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaximumNumberOfDaysInInventory"}},{"attribute":{"classtype":"WebApiDefinitionAttributeExpression","columnid":"1","title":"1","subtotals":"","tooltip":"","width":-1,"display":"shown","expressionbody":"VALUE( object.UpdateTime() )"}}]' |
| | | ContextMenu: 'listContextMenuMaterial455' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | SelectionCheckboxes: true |
| | | Taborder: 1 |
| | | ] |
| | | ResponseDefinitions: |
| | | [ |
| | | DelegatedResponseDefinition OnClick id:Responsedef_ListMaterialMaterialLabelingAndPlanningStrategy_880_WebMenu_OnClick |
| | | { |
| | | #keys: '[414702.0.132706551]' |
| | | Initiator: 'WebMenu' |
| | | IsInherited: false |
| | | ResponseType: 'OnClick' |
| | | Arguments: |
| | | [ |
| | | ResponseDefinitionArgument selection |
| | | { |
| | | #keys: '[319.0.80354936]' |
| | | Binding: 'this.Selection()' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelChildMaterial |
| | | { |
| | | #keys: '[414702.0.121452333]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: ListChildMaterial |
| | | ] |
| | | Properties: |
| | | [ |
| | | Border: true |
| | | Taborder: 1 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelMaterial |
| | | { |
| | | #keys: '[414702.0.121452322]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: ListMaterialMaterialLabelingAndPlanningStrategy_880 |
| | | #child: PanelMaterialOperationButton |
| | | Component DataHolderCheckedMaterials |
| | | { |
| | | #keys: '[414702.0.136936641]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'structured[MatAttrSettingAndPlanStrategy]*' |
| | | Properties: |
| | | [ |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Border: true |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelMaterialExportAndImport id:PanelMaterialExportAndImport_136 |
| | | { |
| | | #keys: '[414702.0.130101487]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component ButtonMaterialExportAndExport |
| | | { |
| | | #keys: '[414702.0.130101488]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'EXPORT1' |
| | | Label: 'æ°æ®å¯¼åº' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component ButtonMaterialExportAndImport |
| | | { |
| | | #keys: '[414702.0.130101489]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'IMPORT1' |
| | | Label: 'æ°æ®å¯¼å
¥' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component ButtonSynchronizeInventoryTargets |
| | | { |
| | | #keys: '[414702.0.142124169]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'CLOUD_REFRESH' |
| | | Label: '忥åºåç®æ ' |
| | | Taborder: 0 |
| | | Visible: false |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Alignment: 'trailing' |
| | | FixedSize: true |
| | | MinimumColumns: 25 |
| | | Orientation: 'horizontal' |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelMaterialLabelingAndPlanningStrategy |
| | | { |
| | | #keys: '[414702.0.121452301]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: PanelChildMaterial |
| | | #child: PanelMaterial |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelMaterialOperationButton |
| | | { |
| | | #keys: '[414702.0.130161515]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: PanelMaterialExportAndImport_136 |
| | | ] |
| | | Properties: |
| | | [ |
| | | FixedSize: true |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component listActionBarPageChildMaterial |
| | | { |
| | | #keys: '[414702.0.122536773]' |
| | | BaseType: 'listActionBarPage' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component listActionBarPageMaterial790 id:listActionBarPageMaterial790_1 |
| | | { |
| | | #keys: '[414702.0.122174687]' |
| | | BaseType: 'listActionBarPage' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component listContextMenuChildMaterial |
| | | { |
| | | #keys: '[414702.0.122536778]' |
| | | BaseType: 'listContextMenu' |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component listContextMenuMaterial455 id:listContextMenuMaterial455_1 |
| | | { |
| | | #keys: '[414702.0.122174689]' |
| | | BaseType: 'listContextMenu' |
| | | Children: |
| | | [ |
| | | Component MenuSeparator |
| | | { |
| | | #keys: '[121142.1.1147171519]' |
| | | BaseType: 'MenuSeparator' |
| | | IsDerived: true |
| | | Properties: |
| | | [ |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component MenuDeleteAll |
| | | { |
| | | #keys: '[414702.0.141671580]' |
| | | BaseType: 'WebMenu' |
| | | Properties: |
| | | [ |
| | | Image: 'DELETE' |
| | | Taborder: 3 |
| | | Title: 'å é¤' |
| | | ] |
| | | } |
| | | Component MenuSelectAll |
| | | { |
| | | #keys: '[414702.0.141943188]' |
| | | BaseType: 'WebMenu' |
| | | Properties: |
| | | [ |
| | | Image: 'PIG' |
| | | Shortcut: 'Ctrl+A' |
| | | Taborder: 4 |
| | | Title: 'å
¨é' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ListMaterialMaterialLabelingAndPlanningStrategy_880 |
| | | Response OnClick ( |
| | | structured[MatAttrSettingAndPlanStrategy] selection |
| | | ) id:Response_ListMaterialMaterialLabelingAndPlanningStrategy_880_MenuDeleteAll_OnClick |
| | | { |
| | | #keys: '[414702.0.141854066]' |
| | | CanBindMultiple: false |
| | | DefinitionID => /ListMaterialMaterialLabelingAndPlanningStrategy_880/Responsedef_ListMaterialMaterialLabelingAndPlanningStrategy_880_WebMenu_OnClick |
| | | Initiator: 'MenuDeleteAll' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | traverse ( selection, Elements, s ) { |
| | | s.Delete(); |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ListMaterialMaterialLabelingAndPlanningStrategy_880 |
| | | Response OnClick () id:Response_ListMaterialMaterialLabelingAndPlanningStrategy_880_MenuSelectAll_OnClick |
| | | { |
| | | #keys: '[414702.0.141794738]' |
| | | CanBindMultiple: false |
| | | DefinitionID => /ListMaterialMaterialLabelingAndPlanningStrategy_880/Responsedef_ListMaterialMaterialLabelingAndPlanningStrategy_880_WebMenu_OnClick |
| | | Initiator: 'MenuSelectAll' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | this.SelectAll(); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ListMaterialMaterialLabelingAndPlanningStrategy_880 |
| | | Response OnDoubleClick ( |
| | | MatAttrSettingAndPlanStrategy selection |
| | | ) id:Response_ListMaterialMaterialLabelingAndPlanningStrategy_880_OnDoubleClick |
| | | { |
| | | #keys: '[414702.0.137732025]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebList_OnDoubleClick' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | dlg := construct( DialogCreateEditMaterialLabelingAndPlanningStrategy ); |
| | | dlg.Edit( selection ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ListMaterialMaterialLabelingAndPlanningStrategy_880 |
| | | Response OnUserCheckedChanged () id:Response_ListMaterialMaterialLabelingAndPlanningStrategy_880_OnUserCheckedChanged_591 |
| | | { |
| | | #keys: '[414702.0.136206065]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebList_OnUserCheckedChanged' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | DataHolderCheckedMaterials.Data().Flush(); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ListMaterialMaterialLabelingAndPlanningStrategy_880 |
| | | Response OnUserCheckedChanged ( |
| | | structured[MatAttrSettingAndPlanStrategy] checkeditems |
| | | ) id:Response_ListMaterialMaterialLabelingAndPlanningStrategy_880_OnUserCheckedChanged |
| | | { |
| | | #keys: '[414702.0.136757090]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebList_OnUserCheckedChanged' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | DataHolderCheckedMaterials.Data( checkeditems.Copy() ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelMaterialExportAndImport_136/ButtonMaterialExportAndExport |
| | | Response OnClick () id:Response_PanelMaterialExportAndImport_136_ButtonMaterialExportAndExport_OnClick |
| | | { |
| | | #keys: '[414702.0.133071932]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | return not isnull( GlobalOTDTable ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | tableBinaryData := MatAttrSettingAndPlanStrategy::ExportTheFileStream( DataHolderCheckedMaterials.Data() ).AsBinaryData(); |
| | | Application.Download( "MaterialLabelingAndPlanningStrategy.xlsx", tableBinaryData ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelMaterialExportAndImport_136/ButtonMaterialExportAndImport |
| | | Response OnClick () id:Response_PanelMaterialExportAndImport_136_ButtonMaterialExportAndImport_OnClick |
| | | { |
| | | #keys: '[414702.0.134451163]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | return not isnull( GlobalOTDTable ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | try { |
| | | uploadJsonString := Application.GetFile(); |
| | | if ( uploadJsonString <> "" ) { |
| | | uploadJson := JSON::Parse( uploadJsonString ); |
| | | |
| | | MatAttrSettingAndPlanStrategyInputSource::VerifyTheFileName( uploadJson ); |
| | | |
| | | fileName := uploadJson.Get( "name" ).GetString(); |
| | | base64String := uploadJson.Get( "data" ).GetString(); |
| | | matAttrSettingAndPlanStrategyInputSource := MatAttrSettingAndPlanStrategyInputSource::Upload( GlobalOTDTable, fileName, base64String, ApplicationMacroPlanner.GetUserName() ); |
| | | |
| | | matAttrSettingAndPlanStrategyInputSource.ParseTable(); |
| | | |
| | | matAttrSettingAndPlanStrategyDataTable := select( matAttrSettingAndPlanStrategyInputSource, MatAttrSettingAndPlanStrategyDataTable, tempMASAPSDT, tempMASAPSDT.name() = "ç©ææ ç¾" ); |
| | | matAttrSettingAndPlanStrategyDataTable.VerifyTheTemplate(); |
| | | |
| | | matAttrSettingAndPlanStrategyDataTable.SynchronizeData(); |
| | | |
| | | WebMessageBox::Success( "ä¸ä¼ æå", true ); |
| | | } |
| | | } onerror { |
| | | WebMessageBox::Error( e.GeneralInformation(), true ); |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelMaterialExportAndImport_136/ButtonSynchronizeInventoryTargets |
| | | Response OnClick () id:Response_PanelMaterialExportAndImport_136_ButtonSynchronizeInventoryTargets_OnClick |
| | | { |
| | | #keys: '[414702.0.141615322]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | WebMessageBox::Success( "忥æå", true ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelMaterial/DataHolderCheckedMaterials |
| | | Response OnDataChanged () id:Response_PanelMaterial_DataHolderCheckedMaterials_OnDataChanged |
| | | { |
| | | #keys: '[414702.0.136147695]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebComponent_OnDataChanged' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | //traverse ( this.Data(), Elements, e ) { |
| | | // info( "éä¸çç©æå·ï¼", e.MatCode() ); |
| | | //} |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: MacroPlannerWebApp |
| | | OrphanComponent FormMaterialLabelingAndPlanningStrategy |
| | | { |
| | | #keys: '[414702.0.120950329]' |
| | | BaseType: 'WebForm' |
| | | Children: |
| | | [ |
| | | #child: PanelMaterialLabelingAndPlanningStrategy |
| | | ] |
| | | Properties: |
| | | [ |
| | | Description: 'ç©ææ ç¾&计åçç¥è¡¨å' |
| | | Image: 'PAPER_ROLL' |
| | | Title: 'Material labeling&planning strategy' |
| | | ] |
| | | } |