using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using SlnMesnac.Model.domain; namespace SlnMesnac.Repository.service.Impl { public class McsBinToMaterServiceImpl:IMcsBinToMaterService { private readonly Repository _rep; public McsBinToMaterServiceImpl(Repository rep) { _rep = rep; } /// /// 获取大料料罐物料对应信息 /// /// /// public List GetMcsBinToMaterList() { try { return _rep.GetList();; } catch (Exception e) { throw new ArgumentException($"获取料仓物料对应信息异常:{e.Message}"); } } /// /// 通过机台编号、料罐编号获取料罐物料对应信息 /// /// /// /// /// public McsBinToMater GetMcsBinToMaterByBinNo(int EquipId, int BinNo) { try { return _rep.GetFirst(x=>x.EquipId == EquipId && x.BinNo == BinNo);; } catch (Exception e) { throw new ArgumentException($"根据设备编号、料罐编号获取料仓物料对应信息异常:{e.Message}"); } } } }