Fix log
修正了从中间表同步到MacroPlan的日志部分内容,但仍需进一步修正,同时修复了ProductInLane中的Find方法
| | |
| | | |
| | | macroPlan.InitialUnitAndStockingPoint(); |
| | | info( organcodelist.Element( 0 ) ); |
| | | // |
| | | //if ( isUnitOfMeasure_MP ) { |
| | | // Global_MappingUnitOfMeasure_MP::SynchronizeMacroPlanData( this, macroPlan ); |
| | | //} |
| | | // |
| | | //if ( isCustomOrder ) { |
| | | // Global_MappingCustomOrder::SynchronizeMacroPlanData( this, macroPlan, businessTypes, organcodelist, executionUser ); |
| | | //} |
| | | // |
| | | //if ( isForeacst ) { |
| | | // Global_MappingForecast::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist ); |
| | | //} |
| | | // |
| | | //if ( isSalesSegment_MP ) { |
| | | // Global_MappingSalesSegment_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes ); |
| | | //} |
| | | // |
| | | //if ( isProduct_MP ) { |
| | | // Global_MappingProduct_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, macroPlan.IsKeyProduct() ); |
| | | //} |
| | | // |
| | | //if ( isConversionFactor ) { |
| | | // Global_MappingConversionFactor::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | //} |
| | | // |
| | | //if ( isOperation ) { |
| | | // Global_MappingOperation::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist ); |
| | | //} |
| | | // |
| | | //if ( isOperationBOM ) { |
| | | // Global_MappingOperationBOM::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist, macroPlan.IsKeyProduct(), macroPlan.CreatePurchaseSupplyMaterial() ); |
| | | //} |
| | | // |
| | | //if ( isProductInLane ) { |
| | | // Global_MappingProductInLane::SynchronizeMacroPlanData( this, macroPlan, businessTypes, executionUser ); |
| | | //} |
| | | // |
| | | //if ( isAIPISPIP ) { |
| | | // Global_MappingActualProductInStockingPointInPeriod::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist, macroPlan.IsKeyProduct() ); |
| | | //} |
| | | // |
| | | //if ( isInventorySupply ) { |
| | | // Global_MappingInventorySupply::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist, macroPlan.IsKeyProduct() ); |
| | | //} |
| | | // |
| | | //if ( isStockingPointCost ) { |
| | | // Global_MappingStockingPointCost::SynchronizeMacroPlanData( this, macroPlan, businessTypes, executionUser ); |
| | | //} |
| | | // |
| | | //if ( isOperationCost ) { |
| | | // Global_MappingOperationCost::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist ); |
| | | //} |
| | | // |
| | | //if ( isStockingPoint_MP ) { |
| | | // Global_MappingStockingPoint_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | //} |
| | | // |
| | | //if ( isCurrency_MP ) { |
| | | // Global_MappingCurrency_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | //} |
| | | // |
| | | //if ( isCurrencyRate_MP ) { |
| | | // Global_MappingCurrencyRate_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | //} |
| | | // |
| | | //if ( isLane ) { |
| | | // Global_MappingLane::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | //} |
| | | // |
| | | //if ( isLaneLeg ) { |
| | | // Global_MappingLaneLeg::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | //} |
| | | |
| | | if ( isUnitOfMeasure_MP ) { |
| | | Global_MappingUnitOfMeasure_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | } |
| | | |
| | | if ( isCustomOrder ) { |
| | | Global_MappingCustomOrder::SynchronizeMacroPlanData( this, macroPlan, businessTypes, organcodelist, executionUser ); |
| | | } |
| | | |
| | | if ( isForeacst ) { |
| | | Global_MappingForecast::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist ); |
| | | } |
| | | |
| | | if ( isSalesSegment_MP ) { |
| | | Global_MappingSalesSegment_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes ); |
| | | } |
| | | |
| | | if ( isProduct_MP ) { |
| | | Global_MappingProduct_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, macroPlan.IsKeyProduct() ); |
| | | } |
| | | |
| | | if ( isConversionFactor ) { |
| | | Global_MappingConversionFactor::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | } |
| | | |
| | | if ( isOperation ) { |
| | | Global_MappingOperation::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist ); |
| | | } |
| | | |
| | | if ( isOperationBOM ) { |
| | | Global_MappingOperationBOM::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist, macroPlan.IsKeyProduct(), macroPlan.CreatePurchaseSupplyMaterial() ); |
| | | } |
| | | |
| | | if ( isProductInLane ) { |
| | | Global_MappingProductInLane::SynchronizeMacroPlanData( this, macroPlan, businessTypes, executionUser ); |
| | | } |
| | | |
| | | if ( isAIPISPIP ) { |
| | | Global_MappingActualProductInStockingPointInPeriod::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist, macroPlan.IsKeyProduct() ); |
| | | } |
| | | |
| | | if ( isInventorySupply ) { |
| | | Global_MappingInventorySupply::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist, macroPlan.IsKeyProduct() ); |
| | | } |
| | | |
| | | if ( isStockingPointCost ) { |
| | | Global_MappingStockingPointCost::SynchronizeMacroPlanData( this, macroPlan, businessTypes, executionUser ); |
| | | } |
| | | |
| | | if ( isOperationCost ) { |
| | | Global_MappingOperationCost::SynchronizeMacroPlanData( this, macroPlan, executionUser, businessTypes, organcodelist ); |
| | | } |
| | | |
| | | if ( isStockingPoint_MP ) { |
| | | Global_MappingStockingPoint_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | } |
| | | |
| | | if ( isCurrency_MP ) { |
| | | Global_MappingCurrency_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | } |
| | | |
| | | if ( isCurrencyRate_MP ) { |
| | | Global_MappingCurrencyRate_MP::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | } |
| | | |
| | | if ( isLane ) { |
| | | Global_MappingLane::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | } |
| | | |
| | | if ( isLaneLeg ) { |
| | | Global_MappingLaneLeg::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥å®é
åºåæ°æ®", |
| | | BrokerName := "忥å®é
åºåæ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥åä½è½¬æ¢æ°æ®", |
| | | BrokerName := "忥åä½è½¬æ¢æ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "åæ¥è´§å¸æ±çæ°æ®", |
| | | BrokerName := "åæ¥è´§å¸æ±çæ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "åæ¥è´§å¸æ°æ®", |
| | | BrokerName := "åæ¥è´§å¸æ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "åæ¥è®¢åæ°æ®", |
| | | BrokerName := "åæ¥è®¢åæ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥颿µæ°æ®", |
| | | BrokerName := "忥颿µæ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥å¨éåºåæ°æ®", |
| | | BrokerName := "忥å¨éåºåæ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "åæ¥è½¦éæ°æ®", |
| | | BrokerName := "åæ¥è½¦éæ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "åæ¥è½¦éè·¯çº¿æ°æ®", |
| | | BrokerName := "åæ¥è½¦éè·¯çº¿æ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥工èºè·¯çº¿æ°æ®", |
| | | BrokerName := "忥工èºè·¯çº¿æ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥BOMæ°æ®", |
| | | BrokerName := "忥BOMæ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥è¿è¾è·¯çº¿äº§åæ°æ®", |
| | | BrokerName := "忥è¿è¾è·¯çº¿äº§åæ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "åæ¥äº§åæ°æ®", |
| | | BrokerName := "åæ¥äº§åæ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥éå®é¨é¨æ°æ®", |
| | | BrokerName := "忥éå®é¨é¨æ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥åºåææ¬æ°æ®", |
| | | BrokerName := "忥åºåææ¬æ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥åºåç¹æ°æ®", |
| | | BrokerName := "忥åºåç¹æ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥å¶é ææ¬æ°æ®", |
| | | BrokerName := "忥å¶é ææ¬æ°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | |
| | | #parent: #root |
| | | StaticMethod SynchronizeMacroPlanData ( |
| | | GlobalOTDTable globalOTDTable, |
| | | MacroPlan macroPlan |
| | | MacroPlan macroPlan, |
| | | String executionUser |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥å使°æ®", |
| | | IsSuccess := true |
| | | BrokerName := "忥å使°æ®", |
| | | ExecutionStatus := "InOperation", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | | |
| | | try { |
| | | macroPlan.DoASyncMappingUnitOfMeasureData(globalOTDTable); |
| | | |
| | | global_BrokerExecuteLog.ExecutionStatus( "Complete" ); |
| | | global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) ); |
| | | } onerror { |
| | | global_BrokerExecuteLog.IsSuccess( false ); |
| | | global_BrokerExecuteLog.ErrorNo( e.ErrorNr() ); |
| | | global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() ); |
| | | global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) ); |
| | | global_BrokerExecuteLog.ExecutionStatus( "Complete" ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | |
| | | // Get product&line |
| | | product := Product_MP::FindById( owner, productid ); |
| | | line := Lane::FindLaneTypeIndex( lineid ); |
| | | line := Lane::FindById( owner, lineid ); |
| | | |
| | | if( not isnull( product) and not isnull( line)){ |
| | | productinline := ProductInLane::FindProductInLaneTypeIndex( lineid, productid ); |
| | | productinline := ProductInLane::FindById( owner, productid, lineid ); |
| | | |
| | | if( isnull( productinline ) ){ |
| | | ProductInLane::Create( product, line, isexcluded, isfromdb ); |
| | | }else{ |
| | | productinline.Update( productid, lineid, isexcluded, isfromdb ); |
| | | productinline.Update( lineid, productid, isexcluded, isfromdb ); |
| | | } |
| | | } |
| | | *] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod FindById ( |
| | | MacroPlan mp, |
| | | String id, |
| | | String laneid |
| | | ) as ProductInLane |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yy 2023-11-01 |
| | | result := select( mp, Product_MP.ProductInLane, pil, true, pil.ProductID() = id and pil.LaneID() = laneid ); |
| | | |
| | | return result; |
| | | *] |
| | | } |