using HighWayIot.Common; using HighWayIot.Config; using HighWayIot.Log4net; using HighWayIot.Repository.domain; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; namespace HighWayIot.Repository.service.Impl { class BaseSpaceInfoServiceImpl : IBaseSpaceInfoService { private LogHelper log = LogHelper.Instance; Repository _mesRepository => new Repository("mes"); /// /// 根据物料类型获取货道信息 /// /// /// /// public List GetSpaceInfoByMaterialType(string store,string materialType) { List < BaseSpaceInfo > spaceInfos = null; try { Expression> exp = s1 => true; exp = exp.And(x => x.materialType == materialType && x.storeCode == store); spaceInfos = _mesRepository.GetList(exp); }catch(Exception ex) { log.Error("根据物料类型获取货道信息异常", ex); } return spaceInfos; } /// /// 更新货道信息 /// /// /// public bool UpdateSpaceInf(BaseSpaceInfo spaceInfo) { bool result = false; try { result = _mesRepository.Update(spaceInfo); }catch(Exception ex) { log.Error("更新货道信息异常", ex); } return result; } /// /// 入库过滤 /// /// private void InStoreFilter(List spaceInfos) { } /// /// 出库过滤 /// /// private void OutStoreFilter(List spaceInfos) { } } }