yanyuan
2023-09-05 c179ab5f3f347b5b6acd6066dadd23c8031a486b
Merge branch 'dev_yy' into dev
已修改18个文件
185 ■■■■ 文件已修改
_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting#576.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Operation/StaticMethod_FindFinalOperationsByRoutingId.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Product_MP/StaticMethod_CreateOrUpdate.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl
@@ -8,9 +8,9 @@
  TextBody:
  [*
    // yypsybs Aug-17-2023 (created)
    info( "Start data broker of base conversion" );
    info( "Product Finished, Start BaseConversionFactor Data Broker" )
    macroPlan.Broker_OTD_BaseConversionFactor().Execute();
    info( "Start data mapping of base conversion" );
    info( "BaseConversionFactor Data Broker Finished, Start BaseConversionFactor Mapping" )
    macroPlan.MappingBaseConversionFactorData();
  *]
}
_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl
@@ -8,7 +8,9 @@
  TextBody:
  [*
    // yypsybs Aug-17-2023 (created)
    info( "Forecast Finished, Start CustomerOrder Data Broker" );
    macroPlan.Broker_OTD_CustomerOrder().Execute();
    info( "CustomerOrder Data Broker Finished, Start CustomerOrder Mapping" );
    macroPlan.MappingCustomerOrderData( businessTypes );
  *]
}
_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl
@@ -8,7 +8,9 @@
  TextBody:
  [*
    // yypsybs Aug-17-2023 (created)
    info( "OperationCost Finished, Start Forecast Data Broker" );
    macroPlan.Broker_OTD_Forecast().Execute();
    info( "Forecast Data Broker Finished, Start Forecast Mapping" );
    macroPlan.MappingForecastData( businessTypes );
  *]
}
_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl
@@ -7,7 +7,9 @@
  TextBody:
  [*
    // yypsybs Aug-17-2023 (created)
    info( "ActualPISPIP Finished, Start InventoryCost Data Broker" );
    macroPlan.Broker_OTD_InventoryCost().Execute();
    info( "InventoryCost Data Broker Finished, Start InventoryCost Mapping" );
    macroPlan.MappingInventoryValueAndCostData();
  *]
}
_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl
@@ -9,9 +9,16 @@
  [*
    // renhao Aug-14-2023 (created)
    date := Date :: Today();
    //listtodeal := selectset( this,MappingActualPISPIP,actual, not isnull( Product_MP::FindById( this, actual.ProductID() ) ) );
    listtodeal := selectset( this,MappingActualPISPIP,actual,true );
    totalcount := listtodeal.Size();
    info( "ActualPISPIP has " + totalcount.AsQUILL() + " rows in total" );
    
    count := 0;
    traverse( this,MappingActualPISPIP,actual){
      count := count + 1;
      if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
        info( "Now is dealing with the " + count.AsQUILL() + "ActualPISPIP " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
        }
      product := select( this,MappingProduct,product,product.ID() = actual.ProductID() and product.KeyProduct() = nuclear,true);
      if( not isnull( product)){
      if( not isnull(businessTypes)){
_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl
@@ -18,16 +18,25 @@
    queryStartDate := guard( min( this, Period_MP, item, true, item.StartDate() ) - Duration::Days( 30 ), DateTime::MinDateTime() ).Date();
    queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() );
    listToDeal := selectset( listToDeal, Elements, item, item.OrderDate() >= queryStartDate and item.OrderDate() <= queryEndDate, not isnull( Product_MP::FindById( this, item.ProductID() ) ) and not isnull( StockingPoint_MP::FindById( this, item.StockPointID() ) ) and not isnull( SalesSegment_MP::FindByName( this, item.SalesSegmentName() ) ) );
    totalcount := listToDeal.Size();
    info( "CustomerOrder has " + totalcount.AsQUILL() + " rows in total" );
    count := 0;
    // 处理
    traverse( listToDeal, Elements, item ) {
      count := count + 1;
      if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
        info( "Now is dealing with the " + count.AsQUILL() + "CustomerOrder " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
        }
    //  if( not isnull( Product_MP::FindById( this, item.ProductID() ) ) ){
        info( item.ProductID().AsQUILL() );
        CustomerOrder::CreateOrUpdate( this, item.CurrencyID(), item.Customer(), item.CustomerID(), item.ID(),
                                       item.OrderDate(), item.OrderID(), item.OrderLineID(), item.Price(),
                                       item.PriorityName(), item.ProductID(),
                                       item.StockPointID(),
                                       item.SalesSegmentName(),
                                       item.Quantity(), item.UnitOfMeasureName(), item.OrderType(), item.IsAvailable());
    //    info( item.ProductID().AsQUILL() );
      CustomerOrder::CreateOrUpdate( this, item.CurrencyID(), item.Customer(), item.CustomerID(), item.ID(),
                                     item.OrderDate(), item.OrderID(), item.OrderLineID(), item.Price(),
                                     item.PriorityName(), item.ProductID(),
                                     item.StockPointID(),
                                     item.SalesSegmentName(),
                                     item.Quantity(), item.UnitOfMeasureName(), item.OrderType(), item.IsAvailable());
    //  }else{
    //    info( "invaild product: " + item.ProductID().AsQUILL() );
    //    }
_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl
@@ -10,8 +10,15 @@
    // renhao Aug-14-2023 (created)
    
    listtodeal := selectset( this,MappingExternalSupply,externalSupply, not isnull( StockingPoint_MP::FindById( this, externalSupply.StockingPointID() ) ) );
    totalcount := listtodeal.Size();
    info( "ExternalSupply has " + totalcount.AsQUILL() + " rows in total" );
    
    count := 0;
    traverse( listtodeal,Elements,externalSupply){
      count := count + 1;
      if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
        info( "Now is dealing with the " + count.AsQUILL() + "ExternalSupply " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
        }
    //  product := select( this,MappingProduct,product,product.ID() = externalSupply.ProductID() and product.KeyProduct() = nuclear,true);
    //  
    //  if( not isnull( product)){
_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl
@@ -18,13 +18,22 @@
    queryStartDate := guard( min( this, Period_MP, item, true, item.StartDate() ) - Duration::Days( 30 ), DateTime::MinDateTime() ).Date();
    queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() );
    listToDeal := selectset( listToDeal, Elements, item, item.StartDate() >= queryStartDate and item.EndDate() <= queryEndDate, not isnull( Product_MP::FindById( this, item.ProductID() ) ) and not isnull( StockingPoint_MP::FindById( this, item.StockingPointID() ) ) and not isnull( SalesSegment_MP::FindByName( this, item.SalesSegmentName() ) ) );
    totalcount := listToDeal.Size();
    info( "Forecast has " + totalcount.AsQUILL() + " rows in total" );
    count := 0;
    // 处理
    traverse( listToDeal, Elements, item ) {
      count := count + 1;
      if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
        info( "Now is dealing with the " + count.AsQUILL() + "Forecast " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
        }
    //  if( not isnull( Product_MP::FindById( this, item.ProductID() ) ) ){
        Forecast::CreateOrUpdate( this,
                                  item.ProductID(), item.SalesSegmentName(), item.StockingPointID(), item.PriorityName(),
                                  item.CurrencyID(), item.UnitOfMeasureName(),
                                  item.ID(), item.StartDate(), item.EndDate(), item.Quantity(), item.Price());
      Forecast::CreateOrUpdate( this,
                                item.ProductID(), item.SalesSegmentName(), item.StockingPointID(), item.PriorityName(),
                                item.CurrencyID(), item.UnitOfMeasureName(),
                                item.ID(), item.StartDate(), item.EndDate(), item.Quantity(), item.Price());
    //  }else{
    //    info( "invaild product" + item.ProductID().AsQUILL() );
    //    }
_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl
@@ -6,8 +6,15 @@
  [*
    // yypsybs Aug-15-2023 (created)
    listtodeal := selectset( this,MappingInventoryValueAndCost,item,not isnull( Product_MP::FindById( this, item.ProductID() ) ), not isnull( StockingPoint_MP::FindById( this, item.StockingPointID() ) ) );
    totalcount := listtodeal.Size();
    info( "InventoryCost has " + totalcount.AsQUILL() + " rows in total" );
    
    count := 0;
    traverse( listtodeal, Elements, item ) {
      count := count + 1;
      if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
        info( "Now is dealing with the " + count.AsQUILL() + "InventoryCost " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
        }
      if( not isnull( Product_MP::FindById( this, item.ProductID() ) ) ){
          InventoryValueAndCost::CreateOrUpdate( this, item.ID(), item.ProductID(), 
                                                 item.StockingPointID(), 
_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting#576.qbl
@@ -79,8 +79,8 @@
                              alterBom := mainInput.Operation().LinkPISP( pispAlter, true, mainInput.OperationLinkGroupID(), trash );
                              alterBom.Quantity( mainBOM.MaxQuantityInGroup() * alterRow.AlternativeRate() );
                              alterBom.MaxQuantityInGroup( mainBOM.MaxQuantityInGroup() );
                              info( "Quantity" + [String]alterBom.Quantity() )
                              info( "MaxQuantityInGroup" + [String]alterBom.MaxQuantityInGroup() )
    //                          info( "Quantity" + [String]alterBom.Quantity() )
    //                          info( "MaxQuantityInGroup" + [String]alterBom.MaxQuantityInGroup() )
                              mainQty := mainQty - alterBom.Quantity();
                          }
                      }
_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl
@@ -31,8 +31,16 @@
        }
      }
    
    totalcount := listtodealwithmaxsn.Size();
    info( "OperationCost has " + totalcount.AsQUILL() + " rows in total" );
    count := 0;
    // Get the operation cost data
    traverse( listtodealwithmaxsn, Elements, item ){
      count := count + 1;
      if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
        info( "Now is dealing with the " + count.AsQUILL() + "OperationCost " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
        }
      id := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection() + "_" + item.Line();
      operation := Operation::FindOperationTypeIndex( id );
      account := Account_MP::FindByName( this, "Operation cost" );
_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl
@@ -28,6 +28,8 @@
        listToDeal := selectset( this, MappingProduct, item, businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 );
        }
    }
    totalcount := listToDeal.Size();
    info( "Product has " + totalcount.AsQUILL() + " rows in total" );
    
    // Get the root data
    Product_MP::CreateOrUpdate( this, 
@@ -38,9 +40,13 @@
                                "全部物料产品",
                                0.0
                                );
    count := 0;
    // Get the ProductMajorType list & ProductSubclassType list
    traverse( listToDeal, Elements, item ){
      count := count + 1;
      if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
        info( "Now is dealing with the " + count.AsQUILL() + "Product " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
        }
      if( not item.ProductMajorType() = "" ){
        Product_MP::CreateOrUpdate( this, 
                                    item.ProductMajorType(), 
_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl
@@ -8,9 +8,16 @@
    // Administrator Aug-17-2023 (created)
    // list to deal
    listtodeal := selectset( this, MappingProductInLane, item, not isnull( Product_MP::FindById( this, item.ProductID() ) ), not isnull( Lane::FindLaneTypeIndex( item.LineID() ) ) );
    totalcount := listtodeal.Size();
    info( "ProductInLane has " + totalcount.AsQUILL() + " rows in total" );
    
    count := 0;
    // Create ProductInLane
    traverse( listtodeal, Elements, item ){
      count := count + 1;
      if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
        info( "Now is dealing with the " + count.AsQUILL() + "ProductInLane " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
        }
      ProductInLane::CreateOrUpdate( this, item.ProductID(), item.LineID() );
      }
  *]
_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl
@@ -21,17 +21,19 @@
    }
    info( "KeyProduct : " + [String]isKeyProduct )
    info( "Create purchase supply material : " + [String]createPurchaseSupplyMaterial )
    // 初始换-0
    info( "Initial" );
    info( "Start Initial" );
    macroPlan.InitialUnitAndStockingPoint();
    // 单位-1
    info( "UnitOfMeasure_MP::DoSync" )
    UnitOfMeasure_MP::DoSync( macroPlan );
    // 销售部门-2
    info( "SalesSegment::DoSync" )
    SalesSegment_MP::DoSync( macroPlan, businessTypes );
    // 库存点-3
    info( "StockingPoint::DoSync" )
    info( "Sales Segment Finished, Start Get StockingPoint From Api" )
    bodynumber := "2";
    postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber );
    address := "api-uat-sgc.tianma.cn";
@@ -39,8 +41,9 @@
    port := 443;
    data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody );
    macroPlan.ApiStockingPointData( data );
    // 货币信息-4
    info( "Currencies::DoSync" )
    info( "Get StockingPoint From Api Finished, Start Get CurrencyInfo From Api" )
    bodynumber := "1";
    postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber );
    address := "api-uat-sgc.tianma.cn";
@@ -48,8 +51,9 @@
    port := 443;
    data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody );
    macroPlan.ApiCurenciesData( data );
    //货币汇率信息-5
    info( "CurrencyRates::DoSync" )
    info( "Get CurrencyInfo From Api Finished, Start Get CurrencyRates From Api" )
    bodynumber := "5";
    postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber );
    address := "api-uat-sgc.tianma.cn";
@@ -59,29 +63,32 @@
    macroPlan.ApiCurencyRatesData( data );
    
    // 产品物料-6
    info( "Product::DoSync" )
    //todo: 数据有重复,先略过
    info( "Get CurrencyRates From Api Finished, Start Product Data Broker" )
    macroPlan.Broker_OTD_Product().Execute();
    info( "Start data mapping of product" );
    info( "Product Data Broker Finished, Start Product Mapping" );
    //testproduct := construct( Strings );
    macroPlan.MappingProductData( businessTypes, false );
    //单位转换-7
    info( "BaseConversionFactor::DoSync" )
    BaseConversionFactor::DoSync( macroPlan );
    // Unit-9 
    // 与Operation一同处理
    info( "Unit::DoSync" )
    info( "Start data broker of operation" );
    info( "BaseConversionFactor Finished, Start Operation Data Broker" );
    macroPlan.Broker_OTD_Operation().Execute();
    info( "Operation Data Broker Finished, Start Unit Mapping" );
    macroPlan.MappingUnitData( businessTypes );
    // 工艺路线 + BOM-9
    info( "Operation&BOM::DoSync" )
    info( "Start data mapping of operation" );
    info( "Unit Finished, Start Operation Mapping" );
    macroPlan.MappingOperationData( businessTypes );  
    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 );
    //车道信息-10
    info( "Lanes::DoSync" )
    info( "BOM Finished, Start Get Lanes From Api" );
    bodynumber := "3";
    postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber );
    address := "api-uat-sgc.tianma.cn";
@@ -89,8 +96,9 @@
    port := 443;
    data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody );
    macroPlan.ApiLanesData( data );
    //车道运输段-11
    info( "LaneLegs::DoSync" )
    info( "Get Lanes From Api Finished, Start Get LaneLegs From Api" );
    bodynumber := "4";
    postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber );
    address := "api-uat-sgc.tianma.cn";
@@ -98,36 +106,43 @@
    port := 443;
    data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody );
    macroPlan.ApiLaneLegsData( data );
    // 供应网络(车道)-12
    info( "ProductInLane::DoSync" )
    macroPlan.Broker_OTD_ProductInLane().Execute();
    macroPlan.MappingProductInLaneData();
    //// 供应网络(车道)-12
    //info( "Get Lanelegs From Api Finished, Start ProductInLane Data Broker" );
    //macroPlan.Broker_OTD_ProductInLane().Execute();
    //info( "ProductInLane Data Broker Finished, Start ProductInLane Mapping" );
    //macroPlan.MappingProductInLaneData();
    // 在库库存数据-13
    info( "ActualPISPIP::DoSync" )
    info( "ProductInLane Finished, Start ActualPISPIP Data Broker" );
    macroPlan.Broker_OTD_ActualPISPIP().Execute();
    info( "ActualPISPIP Data Broker Finished, Start ActualPISPIP Mapping" );
    //macroPlan.MappingActualPISPIPData( businessTypes, true );
    macroPlan.MappingActualPISPIPData( businessTypes, false );
    // 在途库存-14
    info( "ExternalSupply::DoSync" )
    info( "Start data broker of External supply" );
    info( "ActualPISPIP Finished, Start ExternalSupply Data Broker" );
    macroPlan.Broker_OTD_ExternalSupply().Execute();
    //macroPlan.MappingExternalSupplyData( businessTypes, true );
    info( "Start data mapping of External supply" );
    info( "ExternalSupply Data Broker Finished, Start ExternalSupply Mapping" );
    macroPlan.MappingExternalSupplyData( businessTypes, false );
    // 库存成本-15
    info( "InventoryCost::DoSync" );
    InventoryValueAndCost::DoSync( macroPlan );
    // todo 制造成本-16
    info( "OperationCost::DoSync" );
    macroPlan.MappingOperationCostData( businessTypes );
    //// todo 制造成本-16
    //info( "InventoryCost Finished, Start OperationCost Mapping" );
    //macroPlan.MappingOperationCostData( businessTypes );
    // 订单预测-17
    info( "Forecast::DoSync" );
    Forecast::DoSync( macroPlan, businessTypes );
    // 订单需求-18
    info( "CustomerOrder::DoSync" );
    CustomerOrder::DoSync( macroPlan, businessTypes );
    //// todo 供应商能力
    //info( "ProviderCapacity::DoSync" )
    //// todo 供应商回复
    //info( "ProviderReply::DoSync" )
  *]
_Main/BL/Type_Operation/StaticMethod_FindFinalOperationsByRoutingId.qbl
@@ -13,7 +13,7 @@
    result := construct( Operations );
    if( not isnull( routing ) and not isnull( routing.LastStep() ) ) {
        result := selectset( routing.LastStep(), Operation, op, true );
        info( 'routingID: '+routingId+isnull( result).AsQUILL());
    //    info( 'routingID: '+routingId+isnull( result).AsQUILL());
    }
    return &result;
  *]
_Main/BL/Type_Product_MP/StaticMethod_CreateOrUpdate.qbl
@@ -25,7 +25,7 @@
    
    // Find the product
    product := Product_MP::FindById( owner, productid );
    info( productid );
    //info( productid );
    
    if( isnull( product ) ){
      Product_MP::Create( owner, 
_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl
@@ -8,9 +8,9 @@
  TextBody:
  [*
    // yypsybs Aug-17-2023 (created)
    info( "Start data broker of sales segment" );
    info( "UnitOfMeasure_MP Finished, Start Sales Segment Data Broker" )
    macroPlan.Broker_OTD_SalesSegment().Execute();
    info( "Start data mapping of sales segment" );
    info( "Sales Segment Data Broker Finished, Start Sales Segment Mapping" )
    macroPlan.MappingSalesSegmentData( businessTypes );
  *]
}
_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl
@@ -8,7 +8,9 @@
  TextBody:
  [*
    // yypsybs Aug-17-2023 (created)
    info( "Inital Finished, Start UnitOfMeasure_MP Data Broker" )
    macroPlan.Broker_OTD_UnitOfMeasure().Execute();
    info( "UnitOfMeasure_MP Data Broker Finished, Start UnitOfMeasure_MP Mapping" )
    macroPlan.MappingUnitOfMeasureData();
  *]
}