Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lhj
| | |
| | | organcodelist := selectvalues( this, Global_MappingOperationBOM, bom,true, bom.OrganCode() ); |
| | | } |
| | | |
| | | macroPlan.InitialUnitAndStockingPoint(); |
| | | |
| | | if ( isUnitOfMeasure_MP ) { |
| | | Global_MappingUnitOfMeasure_MP::SynchronizeMacroPlanData( this, macroPlan ); |
| | | } |
| | |
| | | //if ( isCustomerGrade ) { |
| | | // Global_MappingCustomerGrade::SynchronizeInterfaceData( this, executionUser, "GlobalOTDTable_CustomerGrade" ); |
| | | //} |
| | | // |
| | | //if ( isStockingPoint_MP ) { |
| | | // this.Global_MappingStockingPoint_MP( relflush ); |
| | | // Global_BrokerExecuteLog::CreateInOperation( this, "StockingPoint_MP", executionUser ); |
| | | //// this -> Global_MappingStockingPoint_MP::CreateByAPI() -> Exception() -> Global_MappingStockingPoint_MP::OnException( this ); |
| | | //} |
| | | // |
| | | //if ( isCurrency_MP ) { |
| | | // this.Global_MappingCurrency_MP( relflush ); |
| | | // Global_BrokerExecuteLog::CreateInOperation( this, "Currency_MP", executionUser ); |
| | | //// this -> Global_MappingCurrency_MP::CreateByAPI() -> Exception() -> Global_MappingCurrency_MP::OnException( this ); |
| | | //} |
| | | // |
| | | //if ( isCurrencyRate_MP ) { |
| | | // this.Global_MappingCurrencyRate_MP( relflush ); |
| | | // Global_BrokerExecuteLog::CreateInOperation( this, "CurrencyRate_MP", executionUser ); |
| | | //// this -> Global_MappingCurrencyRate_MP::CreateByAPI() -> Exception() -> Global_MappingCurrencyRate_MP::OnException( this ); |
| | | //} |
| | | // |
| | | //if ( isLane ) { |
| | | // this.Global_MappingLane( relflush ); |
| | | // Global_BrokerExecuteLog::CreateInOperation( this, "Lane", executionUser ); |
| | | //// this -> Global_MappingLane::CreateByAPI() -> Exception() -> Global_MappingLane::OnException( this ); |
| | | //} |
| | | // |
| | | //if ( isLaneLeg ) { |
| | | // this.Global_MappingLaneLeg( relflush ); |
| | | // Global_BrokerExecuteLog::CreateInOperation( this, "LaneLeg", executionUser ); |
| | | //// this -> Global_MappingLaneLeg::CreateByAPI() -> Exception() -> Global_MappingLaneLeg::OnException( this ); |
| | | //} |
| | | |
| | | 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 ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SynchronizeMacroPlanData ( |
| | | GlobalOTDTable globalOTDTable, |
| | | MacroPlan macroPlan, |
| | | String executionUser |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "åæ¥è´§å¸æ±çæ°æ®", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | | |
| | | |
| | | try { |
| | | updates := construct( CurrencyRate_MPs ); |
| | | traverse( globalOTDTable, Global_MappingCurrencyRate_MP, gcr, true ) |
| | | { |
| | | a := CurrencyRate_MP::CreateCurrencyRate( gcr.CurrencyID(), gcr.Start(), gcr.Rate() ); |
| | | updates.Add( a ); |
| | | } |
| | | origindataset := selectset( macroPlan, Currency_MP.CurrencyRate_MP, cr, true ); |
| | | obsoletes := origindataset.Difference( updates ); |
| | | // delete obsoleted |
| | | difflength := obsoletes.Size(); |
| | | for( j:=0; j<difflength; j++ ) |
| | | { |
| | | obsolete := obsoletes.Element( j ); |
| | | obsolete.Delete(); |
| | | } |
| | | |
| | | 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" ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SynchronizeMacroPlanData ( |
| | | GlobalOTDTable globalOTDTable, |
| | | MacroPlan macroPlan, |
| | | String executionUser |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "åæ¥è´§å¸æ°æ®", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | | |
| | | |
| | | try { |
| | | updates := construct( Currency_MPs ); |
| | | traverse( globalOTDTable, Global_MappingCurrency_MP, gc, true ) |
| | | { |
| | | a := Currency_MP::CreateCurrency( macroPlan, gc.ID(), gc.Name(), " ", gc.IsBase() ); |
| | | updates.Add( a ); |
| | | } |
| | | origindataset := selectset( macroPlan, Currency_MP, c, true ); |
| | | obsoletes := origindataset.Difference( updates ); |
| | | // delete obsoleted |
| | | difflength := obsoletes.Size(); |
| | | for( j:=0; j<difflength; j++ ) |
| | | { |
| | | obsolete := obsoletes.Element( j ); |
| | | obsolete.Delete(); |
| | | } |
| | | |
| | | 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" ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SynchronizeMacroPlanData ( |
| | | GlobalOTDTable globalOTDTable, |
| | | MacroPlan macroPlan, |
| | | String executionUser |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "åæ¥è½¦éæ°æ®", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | | |
| | | |
| | | try { |
| | | updates := construct( Lanes ); |
| | | traverse( globalOTDTable, Global_MappingLane, gl, true ) |
| | | { |
| | | id := gl.ID(); |
| | | unitid := gl.UnitID(); |
| | | name := gl.Name(); |
| | | userleadtime := gl.UserLeadTime(); |
| | | processingtime := Duration::Zero(); |
| | | |
| | | unitofmeasurename := "PCS"; |
| | | currencyid := "CNY"; |
| | | startdate := Date::Date( 1900, 1, 1 ); |
| | | enddate := Date::Date( 9999, 12, 31 ); |
| | | capacitytype := "Transport quantity"; |
| | | if( userleadtime.Length() = 0 ) |
| | | { |
| | | processingtime := Duration::Zero(); |
| | | } |
| | | else |
| | | { |
| | | processingtime := Duration::Hours( [Number]userleadtime ); |
| | | }; |
| | | |
| | | unit := Unit::FindUnitTypeIndex( unitid ); |
| | | if( isnull( unit)){ |
| | | unit :=macroPlan.Unit( relnew, |
| | | ID := unitid, |
| | | Name := unitid, |
| | | UnitOfMeasureName := unitofmeasurename, |
| | | CurrencyID := currencyid, |
| | | StartDate := startdate, |
| | | EndDate := enddate, |
| | | CapacityType := capacitytype ); |
| | | } |
| | | |
| | | a := Lane::CreateLane( unit, id, name, processingtime); |
| | | updates.Add( a ); |
| | | } |
| | | origindataset := selectset( macroPlan, Unit.Lane, l, true ); |
| | | obsoletes := origindataset.Difference( updates ); |
| | | // delete obsoleted |
| | | difflength := obsoletes.Size(); |
| | | for( j:=0; j<difflength; j++ ) |
| | | { |
| | | obsolete := obsoletes.Element( j ); |
| | | obsolete.Delete(); |
| | | } |
| | | |
| | | 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" ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SynchronizeMacroPlanData ( |
| | | GlobalOTDTable globalOTDTable, |
| | | MacroPlan macroPlan, |
| | | String executionUser |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "åæ¥è½¦éè·¯çº¿æ°æ®", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | | |
| | | |
| | | try { |
| | | updates := construct( LaneLegs ); |
| | | traverse( globalOTDTable, Global_MappingLaneLeg, gll, true ) |
| | | { |
| | | processingtime := Duration::Zero(); |
| | | hasprocessingtime := true; |
| | | userleadtime := gll.UserLeadTime(); |
| | | if( userleadtime.Length() = 0 ) |
| | | { |
| | | hasprocessingtime := false; |
| | | processingtime := Duration::Zero(); |
| | | } |
| | | else |
| | | { |
| | | hasprocessingtime := true; |
| | | processingtime := Duration::Hours( [Number]userleadtime ); |
| | | }; |
| | | |
| | | lane := Lane::FindLaneTypeIndex( gll.LaneID() ); |
| | | a := LaneLeg::CreateLaneleg(lane, gll.LaneID(), gll.OriginStockingPointID(), gll.DestinationStockingPointID(), gll.Name(), hasprocessingtime, processingtime); |
| | | updates.Add( a ); |
| | | } |
| | | origindataset := selectset( macroPlan, Unit.Lane.LaneLeg, ll, true ); |
| | | obsoletes := origindataset.Difference( updates ); |
| | | // delete obsoleted |
| | | difflength := obsoletes.Size(); |
| | | for( j:=0; j<difflength; j++ ) |
| | | { |
| | | obsolete := obsoletes.Element( j ); |
| | | obsolete.Delete(); |
| | | } |
| | | |
| | | 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" ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SynchronizeMacroPlanData ( |
| | | GlobalOTDTable globalOTDTable, |
| | | MacroPlan macroPlan, |
| | | String executionUser |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "忥åºåç¹æ°æ®", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | | |
| | | |
| | | try { |
| | | updates := construct( StockingPoint_MPs ); |
| | | traverse( globalOTDTable, Global_MappingStockingPoint_MP, sp, true ) |
| | | { |
| | | a := StockingPoint_MP::CreateStockingpoint( macroPlan, sp.ID(), sp.UnitID(), sp.Name() ); |
| | | updates.Add( a ); |
| | | } |
| | | origindataset := selectset( macroPlan, StockingPoint_MP, sp, true ); |
| | | obsoletes := origindataset.Difference( updates ); |
| | | // delete obsoleted |
| | | difflength := obsoletes.Size(); |
| | | for( j:=0; j<difflength; j++ ) |
| | | { |
| | | obsolete := obsoletes.Element( j ); |
| | | obsolete.Delete(); |
| | | } |
| | | |
| | | 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" ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // yypsybs Aug-17-2023 (created) |
| | | businessTypes := construct( Strings ); |
| | | businessTypes := construct( BusinessType ); |
| | | if( businessTypeStr.Length() > 0 ) { |
| | | businessTypes := businessTypeStr.Tokenize( ',' ); |
| | | // businessTypes := businessTypeStr.Tokenize( ',' ); |
| | | } |
| | | MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial ,globalOTDTable); |
| | | *] |
| | |
| | | TextBody: |
| | | [* |
| | | // yypsybs Aug-17-2023 (created) |
| | | businessTypes := construct( Strings ); |
| | | businessTypes := construct( BusinessType ); |
| | | MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial ,globalOTDTable); |
| | | *] |
| | | } |
| | |
| | | #parent: #root |
| | | StaticMethod DoSync ( |
| | | MacroPlan macroPlan, |
| | | Strings businessTypes, |
| | | BusinessType businessType, |
| | | Boolean isKeyProduct, |
| | | Boolean createPurchaseSupplyMaterial, |
| | | GlobalOTDTable globalOTDTable |
| | |
| | | //Currency_MP::CreateCurrencyFromJson( macroPlan, jsonDataRow ); |
| | | info( "Prepare to do sync" ) |
| | | info( "Get organ code list" ) |
| | | organcodelist := selectvalues( globalOTDTable, Global_MappingOperationBOM, bom,true, bom.OrganCode() ); |
| | | if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) { |
| | | traverse( businessTypes, Elements, item ) { |
| | | info( "Business type : " + item ) |
| | | } |
| | | organcodelist := selectvalues( globalOTDTable, BusinessType.OrganCode, organ, businessTypes.Find( organ.BusinessType().BusinessTypeName() ) <> -1, organ.OrganCodeName() ); |
| | | } |
| | | else{ |
| | | if( businessTypes.Size() = 0 ){ |
| | | if( not isnull( selectset( globalOTDTable, BusinessType, b, b.BusinessTypeName() = "" ) ) ){ |
| | | organcodelist := selectvalues( globalOTDTable, BusinessType.OrganCode, organ, organ.BusinessType().BusinessTypeName() = "", organ.OrganCodeName() ); |
| | | } |
| | | } |
| | | } |
| | | businessTypeName := businessType.BusinessTypeName().Tokenize( "," ); |
| | | organcodelist := selectvalues( businessType, OrganCode, organ, true, organ.OrganCodeName() ); |
| | | |
| | | if( organcodelist.Size() = 0 ){ |
| | | organcodelist := selectvalues( globalOTDTable, Global_MappingOperationBOM, bom,true, bom.OrganCode() ); |
| | |
| | | UnitOfMeasure_MP::DoSync( globalOTDTable,macroPlan ); |
| | | |
| | | // éå®é¨é¨-2 |
| | | SalesSegment_MP::DoSync( macroPlan, businessTypes,globalOTDTable ); |
| | | SalesSegment_MP::DoSync( macroPlan, businessTypeName, globalOTDTable ); |
| | | |
| | | // Unit-9 |
| | | // ä¸Operationä¸åå¤ç |
| | | //info( "BaseConversionFactor Finished, Start Operation Data Broker" ); |
| | | //macroPlan.Broker_OTD_Operation().Execute(); |
| | | info( "Operation Data Broker Finished, Start Unit Mapping" ); |
| | | macroPlan.MappingUnitData( businessTypes ,globalOTDTable, organcodelist); |
| | | macroPlan.MappingUnitData( businessTypeName ,globalOTDTable, organcodelist); |
| | | |
| | | // åºåç¹-3 |
| | | info( "Sales Segment Finished, Start Get StockingPoint From Api" ) |
| | |
| | | //macroPlan.Broker_OTD_Product().Execute(); |
| | | info( "Product Data Broker Finished, Start Product Mapping" ); |
| | | //testproduct := construct( Strings ); |
| | | macroPlan.MappingProductData( businessTypes, globalOTDTable,isKeyProduct ); |
| | | macroPlan.MappingProductData( businessTypeName, globalOTDTable,isKeyProduct ); |
| | | |
| | | //åä½è½¬æ¢-7 |
| | | BaseConversionFactor::DoSync( macroPlan ,globalOTDTable); |
| | | |
| | | // å·¥èºè·¯çº¿ + BOM-9 |
| | | info( "Unit Finished, Start Operation Mapping" ); |
| | | macroPlan.MappingOperationData( businessTypes ,globalOTDTable, organcodelist ); |
| | | macroPlan.MappingOperationData( businessTypeName ,globalOTDTable, organcodelist ); |
| | | //info( "Operation Finished, Start BOM Data Broker" ); |
| | | //macroPlan.Broker_OTD_BOM().Execute(); |
| | | info( "BOM Data Broker Finished, Start BOM Mapping" ); |
| | | macroPlan.MappingOperationBOMData( businessTypes, isKeyProduct, createPurchaseSupplyMaterial,globalOTDTable, organcodelist ); |
| | | macroPlan.MappingOperationBOMData( businessTypeName, isKeyProduct, createPurchaseSupplyMaterial,globalOTDTable, organcodelist ); |
| | | |
| | | //车éä¿¡æ¯-10 |
| | | info( "BOM Finished, Start Get Lanes From Api" ); |
| | |
| | | //info( "ProductInLane Finished, Start ActualPISPIP Data Broker" ); |
| | | //macroPlan.Broker_OTD_ActualPISPIP().Execute(); |
| | | info( "ActualPISPIP Data Broker Finished, Start ActualPISPIP Mapping" ); |
| | | macroPlan.MappingActualPISPIPData( businessTypes, globalOTDTable,isKeyProduct, organcodelist ); |
| | | macroPlan.MappingActualPISPIPData( businessTypeName, globalOTDTable,isKeyProduct, organcodelist ); |
| | | |
| | | // å¨éåºå-14 |
| | | //info( "ActualPISPIP Finished, Start ExternalSupply Data Broker" ); |
| | | //macroPlan.Broker_OTD_ExternalSupply().Execute(); |
| | | info( "ExternalSupply Data Broker Finished, Start ExternalSupply Mapping" ); |
| | | macroPlan.MappingExternalSupplyData( businessTypes, isKeyProduct ,globalOTDTable, organcodelist ); |
| | | macroPlan.MappingExternalSupplyData( businessTypeName, isKeyProduct ,globalOTDTable, organcodelist ); |
| | | |
| | | // åºåææ¬-15 |
| | | InventoryValueAndCost::DoSync( macroPlan,globalOTDTable ); |
| | | |
| | | // todo å¶é ææ¬-16 |
| | | info( "InventoryCost Finished, Start OperationCost Mapping" ); |
| | | macroPlan.MappingOperationCostData( globalOTDTable, businessTypes, organcodelist ); |
| | | macroPlan.MappingOperationCostData( globalOTDTable, businessTypeName, organcodelist ); |
| | | |
| | | // 订å颿µ-17 |
| | | Forecast::DoSync( macroPlan, businessTypes, globalOTDTable, organcodelist ); |
| | | Forecast::DoSync( macroPlan, businessTypeName, globalOTDTable, organcodelist ); |
| | | |
| | | // 订åéæ±-18 |
| | | CustomerOrder::DoSync( macroPlan, businessTypes, globalOTDTable, organcodelist ); |
| | | CustomerOrder::DoSync( macroPlan, businessTypeName, globalOTDTable, organcodelist ); |
| | | |
| | | //å é¤å¤ä½æ¥éæ°æ®-19 |
| | | macroPlan.DeleteSnaityCheck(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Export ( |
| | | PRDatas toExportList |
| | | ) as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // generate by generate_export_method.py |
| | | xmlTemplate := '<?xml version="1.0" encoding="UTF-16"?> |
| | | <table> |
| | | <name>PRData</name> |
| | | '; |
| | | convDateToString := DateToString::StandardConverter(); |
| | | convDateToString.SetCustomConversion(); |
| | | convDateToString.CustomFormatString( 'yyyy-MM-dd' ); |
| | | |
| | | debuginfo( "export start" ); |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ç©æç¼ç </name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | productID := toExportItem.ProductID(); |
| | | cellStr := '<cell value="' + productID + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ç©æåç§°</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | productName := toExportItem.ProductName(); |
| | | cellStr := '<cell value="' + productName + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>颿¿ç©ææ è¯</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | isPanelMaterial := toExportItem.IsPanelMaterial(); |
| | | cellStr := '<cell value="' + isPanelMaterial + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>äº¤è´§æ¥æ</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | deliveryDate := toExportItem.DeliveryDate(); |
| | | cellStr := '<cell value="' + ifexpr( deliveryDate = Date::MinDate(), "", convDateToString.Convert( deliveryDate )) + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>PRå»ºè®®æ¥æ</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | pRSuggestionDate := toExportItem.PRSuggestionDate(); |
| | | cellStr := '<cell value="' + ifexpr( pRSuggestionDate = Date::MinDate(), "", convDateToString.Convert( pRSuggestionDate )) + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>交货æ°é</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | quantity := toExportItem.Quantity(); |
| | | cellStr := '<cell value="' + [String]quantity + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>MRP计ç®çæ¬å·</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | mRPCalverNo := toExportItem.MRPCalverNo(); |
| | | cellStr := '<cell value="' + mRPCalverNo + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ä¸å¡ç±»å</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | businessType := toExportItem.BusinessType(); |
| | | cellStr := '<cell value="' + businessType + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ç»ç»ç¼ç </name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | organCode := toExportItem.OrganCode(); |
| | | cellStr := '<cell value="' + organCode + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>æ¯å¦é¿å¨æ</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | isLongLeadItem := toExportItem.IsLongLeadItem(); |
| | | cellStr := '<cell value="' + isLongLeadItem + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>æ¯å¦ä¸ç¨æ</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | isGenericMaterial := toExportItem.IsGenericMaterial(); |
| | | cellStr := '<cell value="' + isGenericMaterial + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ç©æè®¡åçç¥</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | materialMRPType := toExportItem.MaterialMRPType(); |
| | | cellStr := '<cell value="' + materialMRPType + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>æåæ</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | leadTime := toExportItem.LeadTime(); |
| | | cellStr := '<cell value="' + [String]leadTime + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ä¾åºå代ç </name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | providerCode := toExportItem.ProviderCode(); |
| | | cellStr := '<cell value="' + providerCode + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ä¾åºååç§°</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | providerName := toExportItem.ProviderName(); |
| | | cellStr := '<cell value="' + providerName + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>æ¶è´§åºåç¹</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | stockingPointID := toExportItem.StockingPointID(); |
| | | cellStr := '<cell value="' + stockingPointID + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>计éåä½</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | unitOfMeasure := toExportItem.UnitOfMeasure(); |
| | | cellStr := '<cell value="' + unitOfMeasure + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>PRæ°æ®åéç¶æ</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | pRReleaseStatus := toExportItem.PRReleaseStatus(); |
| | | cellStr := '<cell value="' + pRReleaseStatus + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>åéæ¶é´</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | createTimeString := toExportItem.CreateTimeString(); |
| | | cellStr := '<cell value="' + createTimeString + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>åé人</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | createBy := toExportItem.CreateBy(); |
| | | cellStr := '<cell value="' + createBy + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | xmlTemplate := xmlTemplate + "</table>"; |
| | | tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTemplate ) ); |
| | | XLS::SaveTable( tableHandle, OS::TempPath() + "PRData.xlsx" ); |
| | | file := OSFile::Construct(); |
| | | file.Open( OS::TempPath() + "PRData.xlsx", "Read", true ); |
| | | data := file.ReadBinary() |
| | | debuginfo( "export end" ); |
| | | return data.AsBase64EncodedString(); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Export ( |
| | | MacroPlan parent |
| | | ) as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // generate by generate_export_method.py |
| | | toExportList := selectset( parent, PRData, item, true ); |
| | | return PRData::Export( toExportList ); |
| | | *] |
| | | } |
| | |
| | | // æMRPCalverNoæ¥ï¼å·²ææ§è®°å½æ¶ä¸å¤ç |
| | | oldRecords := selectset( macroPlan, PRData, item, |
| | | item.MRPCalverNo() = mrpCalverNo ); |
| | | nowNo := 1; |
| | | if( isnull( oldRecords ) or oldRecords.Size() = 0 ) { |
| | | pispips := ProductInStockingPointInPeriod::GetByMRPCalverNo( macroPlan, mrpCalverNo ); |
| | | traverse( pispips, Elements, item, item.NewSupplyQuantity() > 0 ) { |
| | | PRData::FromSupplyPlanning( otdTable, macroPlan, item, userId ); |
| | | nowNo := nowNo + 1; |
| | | if( nowNo mod 1000 = 0 ) { |
| | | info( "SupplyPlanning to prData : " + [String]nowNo ); |
| | | } |
| | | } |
| | | } |
| | | *] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Export ( |
| | | PRHistoryDatas toExportList |
| | | ) as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // generate by generate_export_method.py |
| | | xmlTemplate := '<?xml version="1.0" encoding="UTF-16"?> |
| | | <table> |
| | | <name>PRHistoryData</name> |
| | | '; |
| | | convDateToString := DateToString::StandardConverter(); |
| | | convDateToString.SetCustomConversion(); |
| | | convDateToString.CustomFormatString( 'yyyy-MM-dd' ); |
| | | |
| | | debuginfo( "export start" ); |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ç©æç¼ç </name><type>String</type>"; |
| | | debuginfo( "export column ProductID" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | productID := toExportItem.ProductID(); |
| | | cellStr := '<cell value="' + productID + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ç©æåç§°</name><type>String</type>"; |
| | | debuginfo( "export column ProductName" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | productName := toExportItem.ProductName(); |
| | | cellStr := '<cell value="' + productName + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>äº¤è´§æ¥æ</name><type>String</type>"; |
| | | debuginfo( "export column DeliveryDate" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | deliveryDate := toExportItem.DeliveryDate(); |
| | | cellStr := '<cell value="' + ifexpr( deliveryDate = Date::MinDate(), "", convDateToString.Convert( deliveryDate )) + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>交货æ°é</name><type>String</type>"; |
| | | debuginfo( "export column Quantity" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | quantity := toExportItem.Quantity(); |
| | | cellStr := '<cell value="' + [String]quantity + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>MRP计ç®çæ¬å·</name><type>String</type>"; |
| | | debuginfo( "export column MRPCalverNo" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | mRPCalverNo := toExportItem.MRPCalverNo(); |
| | | cellStr := '<cell value="' + mRPCalverNo + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ä¸å¡ç±»å</name><type>String</type>"; |
| | | debuginfo( "export column BusinessType" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | businessType := toExportItem.BusinessType(); |
| | | cellStr := '<cell value="' + businessType + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ç»ç»ç¼ç </name><type>String</type>"; |
| | | debuginfo( "export column OrganCode" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | organCode := toExportItem.OrganCode(); |
| | | cellStr := '<cell value="' + organCode + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ä¾åºå代ç </name><type>String</type>"; |
| | | debuginfo( "export column ProviderCode" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | providerCode := toExportItem.ProviderCode(); |
| | | cellStr := '<cell value="' + providerCode + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ä¾åºååç§°</name><type>String</type>"; |
| | | debuginfo( "export column ProviderName" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | providerName := toExportItem.ProviderName(); |
| | | cellStr := '<cell value="' + providerName + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>æ¶è´§åºåç¹</name><type>String</type>"; |
| | | debuginfo( "export column StockingPointID" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | stockingPointID := toExportItem.StockingPointID(); |
| | | cellStr := '<cell value="' + stockingPointID + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>计éåä½</name><type>String</type>"; |
| | | debuginfo( "export column UnitOfMeasure" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | unitOfMeasure := toExportItem.UnitOfMeasure(); |
| | | cellStr := '<cell value="' + unitOfMeasure + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>PRæ°æ®åéç¶æ</name><type>String</type>"; |
| | | debuginfo( "export column SendStatus" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | sendStatus := toExportItem.SendStatus(); |
| | | cellStr := '<cell value="' + sendStatus + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>åéæ¶é´</name><type>String</type>"; |
| | | debuginfo( "export column SendTimeString" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | sendTimeString := toExportItem.SendTimeString(); |
| | | cellStr := '<cell value="' + sendTimeString + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>åé人</name><type>String</type>"; |
| | | debuginfo( "export column ReleaseBy" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | releaseBy := toExportItem.ReleaseBy(); |
| | | cellStr := '<cell value="' + releaseBy + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ERPæ¥æ¶æ¶é´</name><type>String</type>"; |
| | | debuginfo( "export column ReceiveTimeString" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | receiveTimeString := toExportItem.ReceiveTimeString(); |
| | | cellStr := '<cell value="' + receiveTimeString + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>ERPæ¥æ¶ç¶æ</name><type>String</type>"; |
| | | debuginfo( "export column ReceiveStatus" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | receiveStatus := toExportItem.ReceiveStatus(); |
| | | cellStr := '<cell value="' + receiveStatus + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>éè¯¯ä¿¡æ¯æè¿°</name><type>String</type>"; |
| | | debuginfo( "export column ReceiveError" ); |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | receiveError := toExportItem.ReceiveError(); |
| | | cellStr := '<cell value="' + receiveError.ReplaceAll( '"', "'" ) + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | xmlTemplate := xmlTemplate + "</table>"; |
| | | tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTemplate ) ); |
| | | XLS::SaveTable( tableHandle, OS::TempPath() + "PRHistoryData.xlsx" ); |
| | | file := OSFile::Construct(); |
| | | file.Open( OS::TempPath() + "PRHistoryData.xlsx", "Read", true ); |
| | | data := file.ReadBinary() |
| | | debuginfo( "export end" ); |
| | | return data.AsBase64EncodedString(); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Export ( |
| | | GlobalOTDTable parent |
| | | ) as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // generate by generate_export_method.py |
| | | toExportList := selectset( parent, PRHistoryData, item, true ); |
| | | return PRHistoryData::Export( toExportList ); |
| | | *] |
| | | } |
| | |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | Component dropDownStringListGeneral |
| | | { |
| | | #keys: '[414384.0.692930324]' |
| | | BaseType: 'WebDropDownStringList' |
| | | Properties: |
| | | [ |
| | | AllowEmpty: true |
| | | DataBinding: 'DataHolderDialogData.Data.ScenarioName' |
| | | Label: 'Scenario Name' |
| | | Taborder: 4 |
| | | ] |
| | | } |
| | | Component CheckboxIsCreateNewVersion |
| | | { |
| | | #keys: '[412960.0.157150313]' |
| | |
| | | Taborder: 7 |
| | | ] |
| | | } |
| | | Component DropDownListGeneral |
| | | { |
| | | #keys: '[412960.0.324971441]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'BusinessType' |
| | | Children: |
| | | [ |
| | | Component DataExtractorGeneral |
| | | { |
| | | #keys: '[412960.0.324971443]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'GlobalOTDTable' |
| | | Description: 'ä¼ å
¥Business Typeç±»è¿Dosync' |
| | | Source: 'GlobalOTDTable' |
| | | Taborder: 0 |
| | | Transformation: 'BusinessType' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | AllowEmpty: true |
| | | DisplayField: 'ScenarioName' |
| | | Label: 'Scenario Name' |
| | | Taborder: 4 |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | |
| | | // do not distribute |
| | | DataHolderDialogData.Data().EnableSync( false ); |
| | | checkboxEnableSync.Visible( false ); |
| | | dropDownStringListGeneral.Visible( false ); |
| | | DropDownListGeneral.Visible( false ); |
| | | checkboxIsKeyProduct.Visible( false ); |
| | | checkboxCreatePurchaseSupplyProduct.Visible( false ); |
| | | |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | dropDownStringListGeneral.Visible(checkboxEnableSync.Checked()); |
| | | DropDownListGeneral.Visible(checkboxEnableSync.Checked()); |
| | | checkboxIsKeyProduct.Visible(checkboxEnableSync.Checked()); |
| | | checkboxCreatePurchaseSupplyProduct.Visible(checkboxEnableSync.Checked()); |
| | | *] |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | tableBinaryData := PRData::ExportTheFileStream( MacroPlan ).AsBinaryData(); |
| | | Application.Download( "PRData.xlsx", tableBinaryData ); |
| | | Application.Download( "PRData.xlsx", PRData::Export( MacroPlan ) ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | tableBinaryData := PRHistoryData::ExportTheFileStream( GlobalOTDTable ).AsBinaryData(); |
| | | Application.Download( "PRData.xlsx", tableBinaryData ); |
| | | Application.Download( "PRHistoryData.xlsx", PRHistoryData::Export( GlobalOTDTable ) ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | // Create a new scenario |
| | | dlg := construct( DialogCreateEditScenario ); |
| | | dlg.checkboxEnableSync().Visible( true ); |
| | | dlg.dropDownStringListGeneral().Visible( true ); |
| | | dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableScenarioNames( GlobalOTDTable ) ); |
| | | dlg.DropDownListGeneral().Visible( true ); |
| | | dlg.checkboxIsKeyProduct().Visible( true ); |
| | | dlg.checkboxCreatePurchaseSupplyProduct().Visible( true ); |
| | | dlg.NewScenario( ScenarioManager, selection, true ); |
| | |
| | | // Create a new Scenario |
| | | dlg := construct( DialogCreateEditScenario ); |
| | | dlg.checkboxEnableSync().Visible( true ); |
| | | dlg.dropDownStringListGeneral().Visible( true ); |
| | | dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableScenarioNames( GlobalOTDTable ) ); |
| | | dlg.DropDownListGeneral().Visible( true ); |
| | | dlg.checkboxIsKeyProduct().Visible( true ); |
| | | dlg.checkboxCreatePurchaseSupplyProduct().Visible( true ); |
| | | parent := selection.Element( 0 ).Parent(); |
| | |
| | | dlg := construct( DialogCreateEditScenario ); |
| | | dlg.checkboxEnableSync().Checked( false ); |
| | | dlg.checkboxEnableSync().Visible( false ); |
| | | dlg.dropDownStringListGeneral().Visible( false ); |
| | | dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableScenarioNames( GlobalOTDTable ) ); |
| | | dlg.DropDownListGeneral().Visible( false ); |
| | | dlg.checkboxIsKeyProduct().Visible( false ); |
| | | dlg.checkboxCreatePurchaseSupplyProduct().Visible( false ); |
| | | dlg.NewScenario( ScenarioManager, selection ); |
| | |
| | | dlg := construct( DialogCreateEditScenario ); |
| | | dlg.checkboxEnableSync().Checked( false ); |
| | | dlg.checkboxEnableSync().Visible( false ); |
| | | dlg.dropDownStringListGeneral().Visible( false ); |
| | | dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableScenarioNames( GlobalOTDTable ) ); |
| | | dlg.DropDownListGeneral().Visible( false ); |
| | | dlg.checkboxIsKeyProduct().Visible( false ); |
| | | dlg.checkboxCreatePurchaseSupplyProduct().Visible( false ); |
| | | parent := selection.Element( 0 ).Parent(); |