diff --git a/SlnMesnac.Repository/service/IBaseMaterialService.cs b/SlnMesnac.Repository/service/IBaseMaterialService.cs index 5e3e59e..f8c65e6 100644 --- a/SlnMesnac.Repository/service/IBaseMaterialService.cs +++ b/SlnMesnac.Repository/service/IBaseMaterialService.cs @@ -31,32 +31,6 @@ namespace SlnMesnac.Repository.service public interface IBaseMaterialService : IBaseService { - /// - /// 获取所有的物料信息 - /// - /// - List GetMaterialInfos(); - - /// - /// 通过物料编码获取物料信息 - /// - /// - /// - BaseMaterialInfo GetMaterialInfoByMaterialCode(string materialCode); - - /// - /// 通过SAP物料编码获取物料信息 - /// - /// - /// - BaseMaterialInfo GetMaterialInfoBySapMaterialCode(string sapMaterialCode); - - /// - /// 通过物料类别获取物料信息 - /// - /// 物料大类 - /// 物料细类 - /// - List GetMaterialInfosByMaterialType(int majorTypeId, string minorTypeId); + } } diff --git a/SlnMesnac.Repository/service/Impl/BaseMaterialServiceImpl.cs b/SlnMesnac.Repository/service/Impl/BaseMaterialServiceImpl.cs index 82c5e2f..9747e12 100644 --- a/SlnMesnac.Repository/service/Impl/BaseMaterialServiceImpl.cs +++ b/SlnMesnac.Repository/service/Impl/BaseMaterialServiceImpl.cs @@ -40,92 +40,6 @@ namespace SlnMesnac.Repository.service.Impl _logger = logger; } - /// - /// 通过物料编码获取物料信息 - /// - /// - /// - public BaseMaterialInfo GetMaterialInfoByMaterialCode(string materialCode) - { - BaseMaterialInfo materialInfo = null; - try - { - materialInfo = base._rep.GetFirst(x => x.MaterialCode == materialCode); - } - catch (Exception ex) - { - _logger.LogError($"根据物料编号获取物料信息异常:{ex.Message}"); - } - return materialInfo; - } - - /// - /// 通过SAP物料编码获取物料信息 - /// - /// - /// - public BaseMaterialInfo GetMaterialInfoBySapMaterialCode(string sapMaterialCode) - { - BaseMaterialInfo materialInfo = null; - try - { - materialInfo = base._rep.GetFirst(x => x.SAPMaterialCode == sapMaterialCode); - } - catch (Exception ex) - { - _logger.LogError($"根据SAP物料编号获取物料信息异常:{ex.Message}"); - } - return materialInfo; - } - - /// - /// 获取所有的物料信息 - /// - /// - public List GetMaterialInfos() - { - List materialInfos = null; - try - { - materialInfos = base._rep.GetList(); - } - catch (Exception ex) - { - _logger.LogError($"获取物料信息异常:{ex.Message}"); - } - return materialInfos; - } - - /// - /// 通过物料类别获取物料信息 - /// - /// 物料大类 - /// 物料细类 - /// - public List GetMaterialInfosByMaterialType(int majorTypeId, string minorTypeId) - { - List materialInfos = null; - try - { - Expression> exp = x => true; - - if (majorTypeId != 0) - { - exp = exp.And(x => x.MajorTypeID == majorTypeId); - } - else if (!string.IsNullOrEmpty(minorTypeId)) - { - exp = exp.And(x => x.MinorTypeID == minorTypeId); - } - - materialInfos = base._rep.GetList(exp); - } - catch (Exception ex) - { - _logger.LogError($"通过物料类型获取物料信息异常:{ex.Message}"); - } - return materialInfos; - } } }