金蝶组织使用

This commit is contained in:
tongfei
2023-11-08 12:03:32 +08:00
parent 5bbdb83de0
commit d18bd6cefc
6 changed files with 117 additions and 13 deletions

View File

@@ -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;
}
}
}