在异步场景分发数据时
1 createPurchase参数创建判断逻辑
2 SOP场景的Product只取关键物料
3 unit的工艺段默认无限产能
4 运输单元修改层级
已修改4个文件
38 ■■■■■ 文件已修改
_Main/BL/Type_Lane/StaticMethod_CreateLaneFromJson.qbl 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_DoASyncMappingProductData.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_DoASyncMappingUnitData.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Lane/StaticMethod_CreateLaneFromJson.qbl
@@ -16,7 +16,6 @@
    processingtime := Duration::Zero();
    
    unitofmeasurename := "PCS";
    currencyid := "CNY";
    startdate := Date::Date( 1900, 1, 1 );
    enddate := Date::Date( 9999, 12, 31 );
    capacitytype := "Transport quantity";
@@ -31,14 +30,14 @@
    
    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 );
      unit := macroplan.Unit( relnew, ID := unitid,
                   Name := unitid,
                   ParentUnitID := "运输",
                   CapacityType := capacitytype,
                   UnitOfMeasureName := unitofmeasurename,
                   CurrencyID := macroplan.BaseCurrency().ID(),
                   StartDate := startdate,
                   EndDate := enddate );
    }
    
    result := Lane::CreateLane( unit, id, name, processingtime);
_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl
@@ -13,7 +13,7 @@
    // yypsybs Aug-21-2023 (created)
    keyProductList := construct( Strings );
    if( isKeyProduct ) {
        keyProductList := selectuniquevalues( globalOTDTable, Global_MappingProduct_MP, item, item.ProductMajorType()="成品" or item.ProductMajorType()="半成品", item.ID() );
       keyProductList := selectuniquevalues( globalOTDTable, Global_MappingProduct_MP, item, item.ProductMajorType()="成品" or item.ProductMajorType()="半成品", item.ID() );
    }
    bomList := selectsortedset(  globalOTDTable, Global_MappingOperationBOM, item,
                                 ifexpr( isnull( businessTypes ) or businessTypes.Size() = 0, 
@@ -75,8 +75,15 @@
        }
    }
    if( createPurchaseSupplyMaterial ) {
        toCreateBomList := selectuniquevalues( bomList, Elements, item,
      toCreateBomList := construct( Strings );
      if( isKeyProduct){
          toCreateBomList := selectuniquevalues( bomList, Elements, item,
                                               item.ComponentType() = "P" and keyProductList.Find( item.ComponentCode())>=0, item.OrganCode() + item.ComponentCode());
        }else{
          toCreateBomList := selectuniquevalues( bomList, Elements, item,
                                               item.ComponentType() = "P" , item.OrganCode() + item.ComponentCode());
          }
        traverse( toCreateBomList, Elements, key ) {
            boms := selectset( bomList, Elements, item, item.ComponentType() = "P" and item.OrganCode() + item.ComponentCode() = key );
            bom := boms.First();
_Main/BL/Type_MacroPlan/Method_DoASyncMappingProductData.qbl
@@ -16,14 +16,14 @@
    
    if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
        if( iskeyproduct = true ){
          listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, item.KeyProduct() = true );
          listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, item.ProductMajorType()="成品" or item.ProductMajorType()="半成品" );
          }
        else{
          listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, true );
          }
    } else {
        if( iskeyproduct = true ){
          listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, item.KeyProduct() = true and businesstypes.Find( item.BusinessType() ) >= 0 );
          listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, (item.ProductMajorType()="成品" or item.ProductMajorType()="半成品") and businesstypes.Find( item.BusinessType() ) >= 0 );
         }
        else{
          listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, businesstypes.Find( item.BusinessType() ) >= 0 );
_Main/BL/Type_MacroPlan/Method_DoASyncMappingUnitData.qbl
@@ -53,8 +53,8 @@
    supplyunit.IsSupplier(true);
    
    Unit::CreateOrUpdate( this, 
                          "整车运输",
                          "整车运输",
                          "运输",
                          "运输",
                          "天马集团", 
                          capacitytype, 
                          unitofmeasurename );
@@ -88,7 +88,7 @@
                            thirdlevelid, 
                            thirdlevelid, 
                            secondlevelid, 
                            "Time",
                            infinite,
                            item.UnitOfMeasureName() );
                   
      //Get the last level unit