From 0764eaf0e5c9603fa5f7643c9eadf5091138a50c Mon Sep 17 00:00:00 2001 From: hongji.li <hongji.a.li@capgemini.com> Date: 星期二, 17 十月 2023 12:25:40 +0800 Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lhj --- _Main/BL/Type_Global_MappingLaneLeg/StaticMethod_SynchronizeMacroPlanData.qbl | 60 +++ _Main/BL/Type_PRHistoryData/StaticMethod_Export#527.qbl | 199 ++++++++++++ _Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonExportPR_OnClick.def | 3 _Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl | 38 - _Main/BL/Type_PRData/StaticMethod_Export#346.qbl | 209 +++++++++++++ _Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonExportPRHistory_OnClick.def | 3 _Main/BL/Type_MacroPlan/StaticMethod_DoSync#618.qbl | 4 _Main/BL/Type_Global_MappingCurrency_MP/StaticMethod_SynchronizeMacroPlanData.qbl | 45 ++ _Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick#549.def | 3 _Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl | 5 _Main/BL/Type_Global_MappingCurrencyRate_MP/StaticMethod_SynchronizeMacroPlanData.qbl | 45 ++ /dev/null | 72 ---- _Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl | 2 _Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan#127.qbl | 52 +- _Main/BL/Type_Global_MappingStockingPoint_MP/StaticMethod_SynchronizeMacroPlanData.qbl | 45 ++ _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Response_TIANMA_JITUAN_PanelGeneral_549_checkboxEnableSync_OnChanged.def | 2 _Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick#545.def | 3 _Main/BL/Type_PRData/StaticMethod_Export.qbl | 13 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_CopyScenario.def | 2 _Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick.def | 3 _Main/BL/Type_Global_MappingLane/StaticMethod_SynchronizeMacroPlanData.qbl | 77 ++++ _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Component_PanelGeneral#549.def | 41 + _Main/BL/Type_PRHistoryData/StaticMethod_Export.qbl | 13 _Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick.def | 3 24 files changed, 786 insertions(+), 156 deletions(-) diff --git "a/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan\043127.qbl" "b/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan\043127.qbl" index 6d84c07..12a5633 100644 --- "a/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan\043127.qbl" +++ "b/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan\043127.qbl" @@ -47,6 +47,8 @@ organcodelist := selectvalues( this, Global_MappingOperationBOM, bom,true, bom.OrganCode() ); } + macroPlan.InitialUnitAndStockingPoint(); + if ( isUnitOfMeasure_MP ) { Global_MappingUnitOfMeasure_MP::SynchronizeMacroPlanData( this, macroPlan ); } @@ -106,35 +108,25 @@ //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 ); + } *] } diff --git a/_Main/BL/Type_Global_MappingCurrencyRate_MP/StaticMethod_SynchronizeMacroPlanData.qbl b/_Main/BL/Type_Global_MappingCurrencyRate_MP/StaticMethod_SynchronizeMacroPlanData.qbl new file mode 100644 index 0000000..5913ebe --- /dev/null +++ b/_Main/BL/Type_Global_MappingCurrencyRate_MP/StaticMethod_SynchronizeMacroPlanData.qbl @@ -0,0 +1,45 @@ +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" ); + } + *] +} diff --git a/_Main/BL/Type_Global_MappingCurrency_MP/StaticMethod_SynchronizeMacroPlanData.qbl b/_Main/BL/Type_Global_MappingCurrency_MP/StaticMethod_SynchronizeMacroPlanData.qbl new file mode 100644 index 0000000..38ac6bb --- /dev/null +++ b/_Main/BL/Type_Global_MappingCurrency_MP/StaticMethod_SynchronizeMacroPlanData.qbl @@ -0,0 +1,45 @@ +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" ); + } + *] +} diff --git a/_Main/BL/Type_Global_MappingLane/StaticMethod_SynchronizeMacroPlanData.qbl b/_Main/BL/Type_Global_MappingLane/StaticMethod_SynchronizeMacroPlanData.qbl new file mode 100644 index 0000000..60224b2 --- /dev/null +++ b/_Main/BL/Type_Global_MappingLane/StaticMethod_SynchronizeMacroPlanData.qbl @@ -0,0 +1,77 @@ +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" ); + } + *] +} diff --git a/_Main/BL/Type_Global_MappingLaneLeg/StaticMethod_SynchronizeMacroPlanData.qbl b/_Main/BL/Type_Global_MappingLaneLeg/StaticMethod_SynchronizeMacroPlanData.qbl new file mode 100644 index 0000000..d1743ec --- /dev/null +++ b/_Main/BL/Type_Global_MappingLaneLeg/StaticMethod_SynchronizeMacroPlanData.qbl @@ -0,0 +1,60 @@ +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" ); + } + *] +} diff --git a/_Main/BL/Type_Global_MappingStockingPoint_MP/StaticMethod_SynchronizeMacroPlanData.qbl b/_Main/BL/Type_Global_MappingStockingPoint_MP/StaticMethod_SynchronizeMacroPlanData.qbl new file mode 100644 index 0000000..7db4814 --- /dev/null +++ b/_Main/BL/Type_Global_MappingStockingPoint_MP/StaticMethod_SynchronizeMacroPlanData.qbl @@ -0,0 +1,45 @@ +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" ); + } + *] +} diff --git "a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl" "b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl" index 9d29f63..d7a38f2 100644 --- "a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl" +++ "b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl" @@ -12,9 +12,9 @@ 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); *] diff --git a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl index 49fac75..2b1d5ae 100644 --- a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl +++ b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl @@ -11,7 +11,7 @@ TextBody: [* // yypsybs Aug-17-2023 (created) - businessTypes := construct( Strings ); + businessTypes := construct( BusinessType ); MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial ,globalOTDTable); *] } diff --git a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl index 5178d37..8cb5656 100644 --- a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl +++ b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl @@ -2,7 +2,7 @@ #parent: #root StaticMethod DoSync ( MacroPlan macroPlan, - Strings businessTypes, + BusinessType businessType, Boolean isKeyProduct, Boolean createPurchaseSupplyMaterial, GlobalOTDTable globalOTDTable @@ -16,20 +16,8 @@ //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() ); @@ -46,14 +34,14 @@ UnitOfMeasure_MP::DoSync( globalOTDTable,macroPlan ); // 閿�鍞儴闂�-2 - SalesSegment_MP::DoSync( macroPlan, businessTypes,globalOTDTable ); + SalesSegment_MP::DoSync( macroPlan, businessTypeName, globalOTDTable ); // Unit-9 // 涓嶰peration涓�鍚屽鐞� //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" ) @@ -90,18 +78,18 @@ //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" ); @@ -133,26 +121,26 @@ //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(); diff --git "a/_Main/BL/Type_PRData/StaticMethod_Export\043346.qbl" "b/_Main/BL/Type_PRData/StaticMethod_Export\043346.qbl" new file mode 100644 index 0000000..e699b8c --- /dev/null +++ "b/_Main/BL/Type_PRData/StaticMethod_Export\043346.qbl" @@ -0,0 +1,209 @@ +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(); + *] +} diff --git a/_Main/BL/Type_PRData/StaticMethod_Export.qbl b/_Main/BL/Type_PRData/StaticMethod_Export.qbl new file mode 100644 index 0000000..46ff06e --- /dev/null +++ b/_Main/BL/Type_PRData/StaticMethod_Export.qbl @@ -0,0 +1,13 @@ +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 ); + *] +} diff --git "a/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream\043595.qbl" "b/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream\043595.qbl" deleted file mode 100644 index 540295e..0000000 --- "a/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream\043595.qbl" +++ /dev/null @@ -1,12 +0,0 @@ -Quintiq file version 2.0 -#parent: #root -StaticMethod ExportTheFileStream ( - MacroPlan parent -) as BinaryValue -{ - TextBody: - [* - // yypsybs Sep-20-2023 (created) - return PRData::ExportTheFileStream( selectset( parent, PRData, item, true ) ); - *] -} diff --git a/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream.qbl b/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream.qbl deleted file mode 100644 index 1b706e0..0000000 --- a/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream.qbl +++ /dev/null @@ -1,78 +0,0 @@ -Quintiq file version 2.0 -#parent: #root -StaticMethod ExportTheFileStream ( - PRDatas toExportList -) as BinaryValue -{ - TextBody: - [* - // generate by generate_export.py - dateTimeToString := DateTimeToString::StandardConverter(); - dateTimeToString.SetCustomConversion(); - dateTimeToString.CustomFormatString( "yyyy/MM/dd H:mm:ss" ); - - dateToString := DateToString::StandardConverter(); - dateToString.SetCustomConversion(); - dateToString.CustomFormatString( "yyyy/MM/dd" ); - - text:= '<?xml version="1.0" encoding="utf-8" standalone="yes"?><table><name>PR</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>PR寤鸿鏃ユ湡</name><type>String</type></column> - <column><name>浜よ揣鏁伴噺</name><type>Number</type></column> - <column><name>MRP璁$畻鐗堟湰鍙�</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>String</type></column> - <column><name>鐗╂枡璁″垝绛栫暐</name><type>String</type></column> - <column><name>鎻愬墠鏈�</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>PR鏁版嵁鍙戦�佺姸鎬�</name><type>String</type></column> - <column><name>鍙戦�佹椂闂�</name><type>String</type></column> - <column><name>鍙戦�佷汉</name><type>String</type></column> - </table>'; - xmlDOMImplementation := XMLDOMImplementation::Create(); - xmlDOMDocument := xmlDOMImplementation.CreateDocumentFromString( text ); - - tableElement:= xmlDOMDocument.GetElementByTagName( "table", 0 ); - - traverse ( toExportList, Elements, toExport ) { - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProductID(), "鐗╂枡缂栫爜" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProductName(), "鐗╂枡鍚嶇О" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.IsPanelMaterial(), "闈㈡澘鐗╂枡鏍囪瘑" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, ifexpr( toExport.DeliveryDate() = Date::MinDate(), "", dateToString.Convert( toExport.DeliveryDate() ) ), "浜よ揣鏃ユ湡" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, ifexpr( toExport.PRSuggestionDate() = Date::MinDate(), "", dateToString.Convert( toExport.PRSuggestionDate() ) ), "PR寤鸿鏃ユ湡" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.Quantity(), "浜よ揣鏁伴噺" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.MRPCalverNo(), "MRP璁$畻鐗堟湰鍙�" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.BusinessType(), "涓氬姟绫诲瀷" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.OrganCode(), "缁勭粐缂栫爜" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.IsLongLeadItem(), "鏄惁闀垮懆鏈�" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.IsGenericMaterial(), "鏄惁涓撶敤鏂�" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.MaterialMRPType(), "鐗╂枡璁″垝绛栫暐" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.LeadTime(), "鎻愬墠鏈�" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProviderCode(), "渚涘簲鍟嗕唬鐮�" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProviderName(), "渚涘簲鍟嗗悕绉�" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.StockingPointID(), "鏀惰揣搴撳瓨鐐�" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.UnitOfMeasure(), "璁¢噺鍗曚綅" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.PRReleaseStatus(), "PR鏁版嵁鍙戦�佺姸鎬�" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.CreateTimeString(), "鍙戦�佹椂闂�" ); - PRData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.CreateBy(), "鍙戦�佷汉" ); - } - - xmlDOMSerializer := xmlDOMImplementation.CreateSerializer(); - xmlTableString := xmlDOMSerializer.WriteToString( xmlDOMDocument ); - - tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTableString ) ); - tableGroupHandle := TableGroupHandle::Create( "PR" ); - tableGroupHandle.Add( tableHandle ); - tableBinaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true ); - - return tableBinaryData.AsBinaryValue(); - *] -} diff --git a/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl b/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl index 7c5d308..dff5567 100644 --- a/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl +++ b/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl @@ -14,10 +14,15 @@ // 鎸塎RPCalverNo鏌ワ紝宸叉湁鏃ц褰曟椂涓嶅鐞� 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 ); + } } } *] diff --git "a/_Main/BL/Type_PRHistoryData/StaticMethod_Export\043527.qbl" "b/_Main/BL/Type_PRHistoryData/StaticMethod_Export\043527.qbl" new file mode 100644 index 0000000..55d80be --- /dev/null +++ "b/_Main/BL/Type_PRHistoryData/StaticMethod_Export\043527.qbl" @@ -0,0 +1,199 @@ +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(); + *] +} diff --git a/_Main/BL/Type_PRHistoryData/StaticMethod_Export.qbl b/_Main/BL/Type_PRHistoryData/StaticMethod_Export.qbl new file mode 100644 index 0000000..132c301 --- /dev/null +++ b/_Main/BL/Type_PRHistoryData/StaticMethod_Export.qbl @@ -0,0 +1,13 @@ +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 ); + *] +} diff --git "a/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream\04345.qbl" "b/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream\04345.qbl" deleted file mode 100644 index a04fd41..0000000 --- "a/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream\04345.qbl" +++ /dev/null @@ -1,12 +0,0 @@ -Quintiq file version 2.0 -#parent: #root -StaticMethod ExportTheFileStream ( - GlobalOTDTable parent -) as BinaryValue -{ - TextBody: - [* - // yypsybs Sep-20-2023 (created) - return PRHistoryData::ExportTheFileStream( selectset( parent, PRHistoryData, item, true ) ); - *] -} diff --git a/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream.qbl b/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream.qbl deleted file mode 100644 index edd753d..0000000 --- a/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream.qbl +++ /dev/null @@ -1,72 +0,0 @@ -Quintiq file version 2.0 -#parent: #root -StaticMethod ExportTheFileStream ( - PRHistoryDatas toExportList -) as BinaryValue -{ - TextBody: - [* - // generate by generate_export.py - dateTimeToString := DateTimeToString::StandardConverter(); - dateTimeToString.SetCustomConversion(); - dateTimeToString.CustomFormatString( "yyyy/MM/dd H:mm:ss" ); - - dateToString := DateToString::StandardConverter(); - dateToString.SetCustomConversion(); - dateToString.CustomFormatString( "yyyy/MM/dd" ); - - text:= '<?xml version="1.0" encoding="utf-8" standalone="yes"?><table><name>PR</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>Number</type></column> - <column><name>MRP璁$畻鐗堟湰鍙�</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>String</type></column> - <column><name>鏀惰揣搴撳瓨鐐�</name><type>String</type></column> - <column><name>璁¢噺鍗曚綅</name><type>String</type></column> - <column><name>PR鏁版嵁鍙戦�佺姸鎬�</name><type>String</type></column> - <column><name>鍙戦�佹椂闂�</name><type>String</type></column> - <column><name>鍙戦�佷汉</name><type>String</type></column> - <column><name>ERP鎺ユ敹鏃堕棿</name><type>String</type></column> - <column><name>ERP鎺ユ敹鐘舵��</name><type>String</type></column> - <column><name>閿欒淇℃伅鎻忚堪</name><type>String</type></column> - </table>'; - xmlDOMImplementation := XMLDOMImplementation::Create(); - xmlDOMDocument := xmlDOMImplementation.CreateDocumentFromString( text ); - - tableElement:= xmlDOMDocument.GetElementByTagName( "table", 0 ); - - traverse ( toExportList, Elements, toExport ) { - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProductID(), "闆朵欢鍙�" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProductName(), "闆朵欢鍚嶇О" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, ifexpr( toExport.DeliveryDate() = Date::MinDate(), "", dateToString.Convert( toExport.DeliveryDate() ) ), "浜よ揣鏃ユ湡" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.Quantity(), "闇�姹傛暟閲�" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.MRPCalverNo(), "MRP璁$畻鐗堟湰鍙�" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.BusinessType(), "浜嬩笟閮�" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.OrganCode(), "缁勭粐缂栫爜" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProviderCode(), "渚涘簲鍟嗕唬鐮�" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProviderName(), "渚涘簲鍟嗗悕绉�" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.StockingPointID(), "鏀惰揣搴撳瓨鐐�" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.UnitOfMeasure(), "璁¢噺鍗曚綅" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.SendStatus(), "PR鏁版嵁鍙戦�佺姸鎬�" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.SendTimeString(), "鍙戦�佹椂闂�" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ReleaseBy(), "鍙戦�佷汉" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ReceiveTimeString(), "ERP鎺ユ敹鏃堕棿" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ReceiveStatus(), "ERP鎺ユ敹鐘舵��" ); - PRHistoryData::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ReceiveError(), "閿欒淇℃伅鎻忚堪" ); - } - - xmlDOMSerializer := xmlDOMImplementation.CreateSerializer(); - xmlTableString := xmlDOMSerializer.WriteToString( xmlDOMDocument ); - - tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTableString ) ); - tableGroupHandle := TableGroupHandle::Create( "PR" ); - tableGroupHandle.Add( tableHandle ); - tableBinaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true ); - - return tableBinaryData.AsBinaryValue(); - *] -} diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Component_PanelGeneral\043549.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Component_PanelGeneral\043549.def" index 158887f..687eea6 100644 --- "a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Component_PanelGeneral\043549.def" +++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Component_PanelGeneral\043549.def" @@ -39,18 +39,6 @@ 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]' @@ -62,5 +50,34 @@ 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 + ] + } ] } diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_CopyScenario.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_CopyScenario.def index c0a6fa5..40534a1 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_CopyScenario.def +++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_CopyScenario.def @@ -20,7 +20,7 @@ // do not distribute DataHolderDialogData.Data().EnableSync( false ); checkboxEnableSync.Visible( false ); - dropDownStringListGeneral.Visible( false ); + DropDownListGeneral.Visible( false ); checkboxIsKeyProduct.Visible( false ); checkboxCreatePurchaseSupplyProduct.Visible( false ); diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Response_TIANMA_JITUAN_PanelGeneral_549_checkboxEnableSync_OnChanged.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Response_TIANMA_JITUAN_PanelGeneral_549_checkboxEnableSync_OnChanged.def index 82006b6..1221c3a 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Response_TIANMA_JITUAN_PanelGeneral_549_checkboxEnableSync_OnChanged.def +++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Response_TIANMA_JITUAN_PanelGeneral_549_checkboxEnableSync_OnChanged.def @@ -10,7 +10,7 @@ { Body: [* - dropDownStringListGeneral.Visible(checkboxEnableSync.Checked()); + DropDownListGeneral.Visible(checkboxEnableSync.Checked()); checkboxIsKeyProduct.Visible(checkboxEnableSync.Checked()); checkboxCreatePurchaseSupplyProduct.Visible(checkboxEnableSync.Checked()); *] diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonExportPR_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonExportPR_OnClick.def index 69a46cd..b9d8b6e 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonExportPR_OnClick.def +++ b/_Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonExportPR_OnClick.def @@ -13,8 +13,7 @@ { Body: [* - tableBinaryData := PRData::ExportTheFileStream( MacroPlan ).AsBinaryData(); - Application.Download( "PRData.xlsx", tableBinaryData ); + Application.Download( "PRData.xlsx", PRData::Export( MacroPlan ) ); *] GroupServerCalls: false } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonExportPRHistory_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonExportPRHistory_OnClick.def index 9a9f95e..e83383e 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonExportPRHistory_OnClick.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonExportPRHistory_OnClick.def @@ -13,8 +13,7 @@ { Body: [* - tableBinaryData := PRHistoryData::ExportTheFileStream( GlobalOTDTable ).AsBinaryData(); - Application.Download( "PRData.xlsx", tableBinaryData ); + Application.Download( "PRHistoryData.xlsx", PRHistoryData::Export( GlobalOTDTable ) ); *] GroupServerCalls: false } diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick\043545.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick\043545.def" index 8e69dc4..2a7180e 100644 --- "a/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick\043545.def" +++ "b/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick\043545.def" @@ -15,8 +15,7 @@ // 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 ); diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick.def index 4c3b7f0..f62e89a 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick.def @@ -16,8 +16,7 @@ // 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(); diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick\043549.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick\043549.def" index 607ae7d..88499fe 100644 --- "a/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick\043549.def" +++ "b/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick\043549.def" @@ -16,8 +16,7 @@ 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 ); diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick.def index 55945ed..cec0c83 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick.def @@ -17,8 +17,7 @@ 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(); -- Gitblit v1.9.3