Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
# _Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning#662.qbl
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation MatAttrSettingAndPlanStrategyInputSource_GlobalOTDSOP_GlobalOTDSOP_MatAttrSettingAndPlanStrategyInputSource |
| | | { |
| | | #keys: '1[414702.1.128364612]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDSOP |
| | | { |
| | | #keys: '3[414702.1.128364614][414702.1.128364613][414702.1.128364615]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategyInputSource |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide MatAttrSettingAndPlanStrategyInputSource |
| | | { |
| | | #keys: '3[414702.1.128364617][414702.1.128364616][414702.1.128364618]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDSOP |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation MatAttrSettingAndPlanStrategy_GlobalOTDSOP_GlobalOTDSOP_MatAttrSettingAndPlanStrategy |
| | | { |
| | | #keys: '1[414702.1.130145519]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDSOP |
| | | { |
| | | #keys: '3[414702.1.130145521][414702.1.130145520][414702.1.130145522]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MatAttrSettingAndPlanStrategy |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide MatAttrSettingAndPlanStrategy |
| | | { |
| | | #keys: '3[414702.1.130145524][414702.1.130145523][414702.1.130145525]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDSOP |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation WorkOrderType_GlobalOTDSOP_GlobalOTDSOP_WorkOrderType |
| | | { |
| | | #keys: '1[414702.1.128394598]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDSOP |
| | | { |
| | | #keys: '3[414702.1.128394600][414702.1.128394599][414702.1.128394601]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: WorkOrderType |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide WorkOrderType |
| | | { |
| | | #keys: '3[414702.1.128394603][414702.1.128394602][414702.1.128394604]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDSOP |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
| | |
| | | { |
| | | #keys: '5[414702.0.83354588][414702.0.83354586][0.0.0][414702.0.83354587][414702.0.83354589]' |
| | | BaseType: Object |
| | | OnCreate: |
| | | [* |
| | | this.BusinessType( relnew, BusinessTypeName := "ææºäºä¸é¨OLED" ); |
| | | this.BusinessType( relnew, BusinessTypeName := "ä¸ä¸æ¾ç¤ºäºä¸é¨" ); |
| | | this.BusinessType( relnew, BusinessTypeName := "å¤åCELLOLED" ); |
| | | this.BusinessType( relnew, BusinessTypeName := "ææºäºä¸é¨" ); |
| | | this.BusinessType( relnew, BusinessTypeName := "汽车çµåäºä¸é¨" ); |
| | | this.BusinessType( relnew, BusinessTypeName := "ç¹ç§æ¾ç¤º" ); |
| | | this.BusinessType( relnew, BusinessTypeName := "è¿å¨å¥åº·äºä¸é¨" ); |
| | | this.BusinessType( relnew, BusinessTypeName := "车载æ¾ç¤ºäºä¸é¨" ); |
| | | this.BusinessType( relnew, BusinessTypeName := "ITäºä¸é¨" ); |
| | | *] |
| | | StructuredName: 'GlobalOTDTables' |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method CheckThePrecedingColumn ( |
| | | GlobalOTDTable globalOTDTable |
| | | GlobalOTDSOP globalOTDSOP |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | traverse ( this, MatAttrSettingAndPlanStrategyDataRow, masapsdr ) { |
| | | itemCode := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æç¼ç " ); |
| | | targetMatAttrSettingAndPlanStrategy := select( globalOTDTable, MatAttrSettingAndPlanStrategy, tempMASAPS, tempMASAPS.MatCode() = itemCode.value() ); |
| | | targetMatAttrSettingAndPlanStrategy := select( globalOTDSOP, 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(); |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method CreateOrUpdateData ( |
| | | GlobalOTDTable globalOTDTable |
| | | GlobalOTDSOP globalOTDSOP |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | traverse ( this, MatAttrSettingAndPlanStrategyDataRow, masapsdr ) { |
| | | itemCode := select( masapsdr, MatAttrSettingAndPlanStrategyDataCell, tempMASAPSDC, tempMASAPSDC.MatAttrSettingAndPlanStrategyDataColumn().name() = "ç©æç¼ç " ); |
| | | targetMatAttrSettingAndPlanStrategy := select( globalOTDTable, MatAttrSettingAndPlanStrategy, tempMASAPS, tempMASAPS.MatCode() = itemCode.value() ); |
| | | targetMatAttrSettingAndPlanStrategy := select( globalOTDSOP, 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 { |
| | | 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 := globalOTDSOP.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 ); |
| | | matAttrSettingAndPlanStrategy.SerialNumber( maxselect( globalOTDSOP, MatAttrSettingAndPlanStrategy, tempMASAPS, tempMASAPS.SerialNumber() ).SerialNumber() + 1 ); |
| | | } onerror { |
| | | error( "åºåæå°å¤©æ°æåºåæå¤§å¤©æ°å¿
é¡»ä¸ºæ´æ°ï¼", targetMatAttrSettingAndPlanStrategy.MatCode() ); |
| | | } |
| | |
| | | [* |
| | | this.VerifyThatTheItemCodeIsNotDuplicated(); |
| | | |
| | | globalOTDTable := this.MatAttrSettingAndPlanStrategyInputSource().GlobalOTDTable(); |
| | | globalOTDSOP := this.MatAttrSettingAndPlanStrategyInputSource().GlobalOTDSOP(); |
| | | |
| | | this.CheckThePrecedingColumn( globalOTDTable ); |
| | | this.CheckThePrecedingColumn( globalOTDSOP ); |
| | | |
| | | this.CreateOrUpdateData( globalOTDTable ); |
| | | this.CreateOrUpdateData( globalOTDSOP ); |
| | | |
| | | this.VerificationData( globalOTDTable ); |
| | | this.VerificationData( globalOTDSOP ); |
| | | *] |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method VerificationData ( |
| | | GlobalOTDTable globalOTDTable |
| | | GlobalOTDSOP globalOTDSOP |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | info( "çç¥ä¸ªæ°ï¼", globalOTDTable.MatAttrSettingAndPlanStrategy( relsize ) ); |
| | | traverse ( globalOTDTable, MatAttrSettingAndPlanStrategy, masaps ) { |
| | | info( "çç¥ä¸ªæ°ï¼", globalOTDSOP.MatAttrSettingAndPlanStrategy( relsize ) ); |
| | | traverse ( globalOTDSOP, MatAttrSettingAndPlanStrategy, masaps ) { |
| | | if ( masaps.PlanningStrategyCustom() <> "å®å
¨åºå" and masaps.PlanningStrategyCustom() <> "JIT" and masaps.PlanningStrategyCustom() <> "M/A" and |
| | | masaps.PlanningStrategyCustom() <> "POææ" and masaps.PlanningStrategyCustom() <> "VMI" ) { |
| | | error( "æå¨è®¾ç½®çç¥é误ï¼", masaps.MatCode() ); |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Export ( |
| | | GlobalOTDTable parent |
| | | GlobalOTDSOP parent |
| | | ) as String |
| | | { |
| | | TextBody: |
| | |
| | | if( this.MatAttrSettingAndPlanStrategyDataTable( relsize ) > 0 ) { |
| | | traverse( this, MatAttrSettingAndPlanStrategyDataTable, table ) { |
| | | traverse( table, MatAttrSettingAndPlanStrategyDataRow, row ) { |
| | | MatAttrSettingAndPlanStrategy::Update( this.GlobalOTDTable(), row, this.UserName() ); |
| | | MatAttrSettingAndPlanStrategy::Update( this.GlobalOTDSOP(), row, this.UserName() ); |
| | | } |
| | | } |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Upload ( |
| | | GlobalOTDTable globalOTDTable, |
| | | GlobalOTDSOP globalOTDSOP, |
| | | String filePath, |
| | | String base64Str, |
| | | String userName |
| | |
| | | { |
| | | TextBody: |
| | | [* |
| | | globalOTDTable.MatAttrSettingAndPlanStrategyInputSource( relflush ); |
| | | globalOTDSOP.MatAttrSettingAndPlanStrategyInputSource( relflush ); |
| | | |
| | | fileName := filePath.Tokenize( "\" ).Element( filePath.Tokenize( "\" ).Size() - 1 ); |
| | | |
| | | inputSource := globalOTDTable.MatAttrSettingAndPlanStrategyInputSource( relnew, |
| | | FileName := fileName, |
| | | Base64Str := base64Str, |
| | | IsXlsx := fileName.EndsWith( "xlsx" ), |
| | | UserName := userName ); |
| | | inputSource := globalOTDSOP.MatAttrSettingAndPlanStrategyInputSource( relnew, |
| | | FileName := fileName, |
| | | Base64Str := base64Str, |
| | | IsXlsx := fileName.EndsWith( "xlsx" ), |
| | | UserName := userName ); |
| | | |
| | | return inputSource; |
| | | *] |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateIfNotExist ( |
| | | GlobalOTDTable parent, |
| | | GlobalOTDSOP parent, |
| | | Number serialNumber, |
| | | String businessType, |
| | | String matCode, |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod DeleteIfExistByMatCode ( |
| | | GlobalOTDTable parent, |
| | | GlobalOTDSOP parent, |
| | | Strings matCode |
| | | ) |
| | | { |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SynchronizeInventoryTargets ( |
| | | GlobalOTDTable globalOTDTable, |
| | | GlobalOTDSOP globalOTDSOP, |
| | | MacroPlan macroPlan |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | traverse ( globalOTDTable, MatAttrSettingAndPlanStrategy, masaps ) { |
| | | traverse ( globalOTDSOP, MatAttrSettingAndPlanStrategy, masaps ) { |
| | | hasMaxLevel := masaps.MaximumNumberOfDaysInInventory() <> 0; |
| | | product_MP := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = masaps.MatCode() ); |
| | | if ( not isnull( product_MP ) ) { |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod DeleteIfExistByMatCode ( |
| | | GlobalOTDTable parent, |
| | | GlobalOTDSOP parent, |
| | | String matCode |
| | | ) |
| | | { |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetExistByMatCode ( |
| | | GlobalOTDTable parent, |
| | | GlobalOTDSOP parent, |
| | | String matCode |
| | | ) as MatAttrSettingAndPlanStrategy |
| | | { |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Update ( |
| | | GlobalOTDTable parent, |
| | | GlobalOTDSOP parent, |
| | | MatAttrSettingAndPlanStrategyDataRow excelRow, |
| | | String userName |
| | | ) as MatAttrSettingAndPlanStrategy |
| | |
| | | mappingOperation := Global_MappingOperation::GetByProductId( otdTable, product.ID() ); |
| | | // QID15 |
| | | mappingProviderCapacity := Global_MappingProviderCapacity::GetByProductId( otdTable, product.ID() ); |
| | | |
| | | // ç©ææ ç¾è®¾ç½® |
| | | matAttrSetting := MatAttrSettingAndPlanStrategy::GetByMatCode( otdTable, product.ID() ); |
| | | matAttrSetting := null( MatAttrSettingAndPlanStrategy )/*MatAttrSettingAndPlanStrategy::GetExistByMatCode( otdTable, product.ID() )*/; |
| | | |
| | | // æ ¹æ®pispip |
| | | result.MRPCalverNo( ifexpr( pispip.MRPCalverNo() = "", "ææ ", pispip.MRPCalverNo() ) ); |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | DataType: 'GlobalOTDSOP' |
| | | Source: 'GlobalOTDSOP' |
| | | Taborder: 0 |
| | | Transformation: 'WorkOrderType' |
| | | ] |
| | |
| | | Body: |
| | | [* |
| | | if ( not isnull( DataHolderDialogData.Data() ) ) { |
| | | targetWorkOrderType := select( GlobalOTDTable, WorkOrderType, tempWOT, tempWOT.TypeName() = DataHolderDialogData.Data().WorkOrderType() ); |
| | | targetWorkOrderType := select( GlobalOTDSOP, WorkOrderType, tempWOT, tempWOT.TypeName() = DataHolderDialogData.Data().WorkOrderType() ); |
| | | if ( not isnull( targetWorkOrderType ) ) { |
| | | this.Data( targetWorkOrderType ); |
| | | } else { |
| | | this.Data( select( GlobalOTDTable, WorkOrderType, tempWOT, true ) ); |
| | | this.Data( select( GlobalOTDSOP, WorkOrderType, tempWOT, true ) ); |
| | | } |
| | | } |
| | | *] |
| | |
| | | #keys: '[414702.0.145493830]' |
| | | Body: |
| | | [* |
| | | workOrderType := GlobalOTDTable.WorkOrderType( relshadow ); |
| | | workOrderType := GlobalOTDSOP.WorkOrderType( relshadow ); |
| | | |
| | | DataHolderForm.Data( formWorkOrderType ); |
| | | |
| | |
| | | id := efID.Text(); |
| | | typeName := efTypeName.Text(); |
| | | |
| | | idExists := exists( GlobalOTDTable, WorkOrderType, tempWOT, tempWOT.ID() = id and tempWOT.ID() <> data.ID() ); |
| | | typeNameExists := exists( GlobalOTDTable, WorkOrderType, tempWOT, tempWOT.TypeName() = typeName and tempWOT.TypeName() <> data.TypeName() ); |
| | | idExists := exists( GlobalOTDSOP, WorkOrderType, tempWOT, tempWOT.ID() = id and tempWOT.ID() <> data.ID() ); |
| | | typeNameExists := exists( GlobalOTDSOP, WorkOrderType, tempWOT, tempWOT.TypeName() = typeName and tempWOT.TypeName() <> data.TypeName() ); |
| | | |
| | | if ( idExists or typeNameExists ) { |
| | | feedback := "IDæç±»ååç§°éå¤"; |
| | |
| | | data := DataHolderDialogData.Data(); |
| | | workOrderType := data.WrappedInstance(); |
| | | if ( isnull( workOrderType ) ) { |
| | | GlobalOTDTable.WorkOrderType( relnew, ID := data.ID(), TypeName := data.TypeName() ); |
| | | GlobalOTDSOP.WorkOrderType( relnew, ID := data.ID(), TypeName := data.TypeName() ); |
| | | } else { |
| | | workOrderType.ID( data.ID() ); |
| | | workOrderType.TypeName( data.TypeName() ); |
| | |
| | | [ |
| | | Image: 'VIEW' |
| | | Taborder: 3 |
| | | Title: 'æ¾ç¤ºæ°æ®' |
| | | Title: 'æµè¯' |
| | | ] |
| | | } |
| | | Component MenuDelete |
| | |
| | | //GlobalOTDTable.Global_ShowCell( relflush ); |
| | | // |
| | | //Global_ShowCell::ShowData( GlobalOTDTable, selection ); |
| | | WebMessageBox::Information( "æ¤æé®ç¨äºæµè¯", true ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | DataType: 'GlobalOTDSOP' |
| | | Source: 'GlobalOTDSOP' |
| | | Taborder: 0 |
| | | Transformation: 'MatAttrSettingAndPlanStrategy' |
| | | ] |
| | |
| | | |
| | | fileName := uploadJson.Get( "name" ).GetString(); |
| | | base64String := uploadJson.Get( "data" ).GetString(); |
| | | matAttrSettingAndPlanStrategyInputSource := MatAttrSettingAndPlanStrategyInputSource::Upload( GlobalOTDTable, fileName, base64String, ApplicationMacroPlanner.GetUserName() ); |
| | | matAttrSettingAndPlanStrategyInputSource := MatAttrSettingAndPlanStrategyInputSource::Upload( GlobalOTDSOP, fileName, base64String, ApplicationMacroPlanner.GetUserName() ); |
| | | |
| | | matAttrSettingAndPlanStrategyInputSource.ParseTable(); |
| | | |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | MatAttrSettingAndPlanStrategy::SynchronizeInventoryTargets( GlobalOTDTable, MacroPlan ); |
| | | MatAttrSettingAndPlanStrategy::SynchronizeInventoryTargets( GlobalOTDSOP, MacroPlan ); |
| | | |
| | | WebMessageBox::Success( "åºåç®æ 忥æå", true ); |
| | | *] |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | DataType: 'GlobalOTDSOP' |
| | | Source: 'GlobalOTDSOP' |
| | | Taborder: 0 |
| | | Transformation: 'WorkOrderType' |
| | | ] |