hongji.li
2023-10-25 ae5ce946294a27532534b52bd21d37567d4a6887
Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lhj
已修改1个文件
10 ■■■■■ 文件已修改
_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl
@@ -76,14 +76,22 @@
    }
    if( createPurchaseSupplyMaterial ) {
      toCreateBomList := construct( Strings );
      alterCodes := construct( Strings );
      if( isKeyProduct){
          toCreateBomList := selectuniquevalues( bomList, Elements, item, 
                                               item.ComponentType() = "P" and keyProductList.Find( item.ComponentCode())>=0, item.OrganCode() + item.ComponentCode());
          alterCodes := selectuniquevalues( bomList, Elements, item,
                                               not item.AlternativeMaterialCode() = "" and item.AlternativeMaterialType() = "P" and keyProductList.Find( item.ComponentCode())>=0, item.OrganCode() + item.AlternativeMaterialCode());
        }else{
          toCreateBomList := selectuniquevalues( bomList, Elements, item, 
                                               item.ComponentType() = "P" , item.OrganCode() + item.ComponentCode());
        
          }
          alterCodes := selectuniquevalues( bomList, Elements, item,
                                               not item.AlternativeMaterialCode() = "" and item.AlternativeMaterialType() = "P", item.OrganCode() + item.AlternativeMaterialCode());
        }
        toCreateBomList := toCreateBomList.Union( alterCodes);
        traverse( toCreateBomList, Elements, key ) {
            boms := selectset( bomList, Elements, item, item.ComponentType() = "P" and item.OrganCode() + item.ComponentCode() = key );
            bom := boms.First();