using Admin.Core.IRepository; using Admin.Core.IService; using Admin.Core.IService.IService_New; using Admin.Core.Model; using Serilog; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Admin.Core.Service.Service_New { public class Hw_BarrelServices : BaseServices, IHw_BarrelServices { private readonly IBaseRepository _dal; public Hw_BarrelServices(IBaseRepository dal) { this._dal = dal; base.BaseDal = dal; } public string GetMaterialNameByBarrelID(string barrelBarcode) { try { string materialName = _dal.Query(x => x.BarCode == barrelBarcode).FirstOrDefault().MaterialName; return materialName; } catch(Exception ex) { Log.Error($"获取计划ID错误:{ex}"); return "-1"; } } } }