金蝶组织使用
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using WMS.Web.Core.Dto.Erp;
|
||||
using WMS.Web.Core.Dto.Erp.Org;
|
||||
using WMS.Web.Domain.Infrastructure;
|
||||
using WMS.Web.Domain.IService.Public;
|
||||
|
||||
@@ -62,5 +63,29 @@ namespace WMS.Web.Domain.Services.Public
|
||||
var mat = erpMaterials.Where(x => x.MaterialId == materialId).FirstOrDefault();
|
||||
return mat == null ? "" : mat.Specifications;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取物料基本单位名称
|
||||
/// </summary>
|
||||
/// <param name="erpMaterials"></param>
|
||||
/// <param name="materialId"></param>
|
||||
/// <returns></returns>
|
||||
public string GetMaterialUnitName(List<ErpMaterialDto> erpMaterials, int materialId)
|
||||
{
|
||||
var mat = erpMaterials.Where(x => x.MaterialId == materialId).FirstOrDefault();
|
||||
return mat == null ? "" : mat.BaseUnitName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取组织名称
|
||||
/// </summary>
|
||||
/// <param name="erpOrgs"></param>
|
||||
/// <param name="orgId"></param>
|
||||
/// <returns></returns>
|
||||
public string GetOrgName(List<ErpOrgDto> erpOrgs, int orgId)
|
||||
{
|
||||
var org = erpOrgs.Where(x => x.Id == orgId).FirstOrDefault();
|
||||
return org == null ? "" : org.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user