renhao
2023-09-22 54cd79510ab97a5fa5694adfbdd344f2eb8424d2
Merge branch 'dev_release'

Conflicts:
_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl
已修改4个文件
33 ■■■■■ 文件已修改
LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd#969.qbl 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd#969.qbl
@@ -16,10 +16,14 @@
      //get period of start 
      ddstartperiod := select( gp.MacroPlan(), PlanningPeriod, pp, pp.Start() <= start and pp.End() > start );
      
      // if not start from middle and leadtime < period task period duration, make sure dependent demand end before period start
      periodstart :=  ifexpr( not gp.IsOperationLeadTimeLogicFromMiddle() and period.Duration() < process.LeadTime(), period.Start(), DateTime::MaxDateTime() );
      value := minvalue( start + process.LeadTime(), start + ddstartperiod.Duration(), periodstart );
      // Tianma fix 20230920
      if( not isnull( ddstartperiod ) )
      {
        // if not start from middle and leadtime < period task period duration, make sure dependent demand end before period start
        periodstart :=  ifexpr( not gp.IsOperationLeadTimeLogicFromMiddle() and period.Duration() < process.LeadTime(), period.Start(), DateTime::MaxDateTime() );
        value := minvalue( start + process.LeadTime(), start + ddstartperiod.Duration(), periodstart );
      }
    }
    
    return value;
_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl
@@ -22,7 +22,7 @@
      if( count - [Number](count/1000) * 1000 = 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(),true);
      product := select( globalOTDTable,Global_MappingProduct_MP,product,product.ID() = externalSupply.ProductID(),true);
      
      
      if( not isnull( product)){
_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl
@@ -33,6 +33,13 @@
    // 销售部门-2
    SalesSegment_MP::DoSync( macroPlan, businessTypes,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);
    // 库存点-3
    info( "Sales Segment Finished, Start Get StockingPoint From Api" )
    bodynumber := "2";
@@ -72,13 +79,6 @@
    
    //单位转换-7
    BaseConversionFactor::DoSync( macroPlan ,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);
    
    // 工艺路线 + BOM-9
    info( "Unit Finished, Start Operation Mapping" );
_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl
@@ -13,6 +13,11 @@
    unitid := datarow.Get( "unitid" ).GetString();
    name := datarow.Get( "name" ).GetString();
    
    unit := Unit::FindUnitTypeIndex( unitid);
    if( isnull( unit)){
      unitid := "生产";
    }
    result := StockingPoint_MP::CreateStockingpoint( mp, id, unitid, name );
    
    return result;