yunchai
2023-10-13 b431be38eae882ed1693573fe495b89f1674bef8
提交MacroPlan 数据改为 Glob数据
已修改2个文件
9 ■■■■■ 文件已修改
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl
@@ -63,7 +63,7 @@
                MaterialType:= ObjProduct.ParentID();
                MaterialName:=ObjProduct.Name();
              }
              ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ComponentCode());
              ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ComponentCode(),GlobData);
              if( not isnull( ObjUnit))
              {
                StockPoint:= ObjUnit.Name();
@@ -83,7 +83,7 @@
      // 没有BOM 添加测试数据
      else
      {
        error( "BOM 数据获取失败,无法扩展原材料信息!");
        //error( "BOM 数据获取失败,无法扩展原材料信息!");
        nCount :=Owner.H_MaterialInfo(relsize );
        Owner.H_MaterialInfo(relnew,ParentSKU := ParentSKU,SKU := "SKU"+ nCount.AsQUILL() ,ForecastID := ForecastId,OrgCode := "ORG_000",VCode := VCode
                                    ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := "原材料",NeedDate := NDate
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl
@@ -2,7 +2,8 @@
#parent: #root
StaticMethod SM_GetUnitBySKU (
  MacroPlan Owner,
  String SKU
  String SKU,
  GlobalOTDTable GlobData
) as Unit
{
  Description: '通过SKU获取库存点信息'
@@ -11,7 +12,7 @@
    Obj :=null( Unit,constcontent );
    if( not isnull( Owner) and SKU.Length()>0)
    {
      OrgCode := select( Owner,MappingBOM,ObjM,ObjM.ProductCode()=SKU);
      OrgCode := select( GlobData,Global_MappingOperationBOM,ObjM,ObjM.ProductCode()=SKU);
      if( not isnull( OrgCode))
      {
        Obj := select( Owner,Unit,ObjU,ObjU.ID()=  OrgCode.OrganCode());