_Main/BL/Type_MacroPlan/StaticMethod_DoSync#618.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); *] _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); *] } _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 // 与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" ) @@ -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(); _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Component_PanelGeneral#549.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 ] } ] } _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 ); _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()); *] _Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick#545.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 ); _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(); _Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick#549.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 ); _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();