You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.0 KiB
C#

using Admin.Core.IRepository;
using Admin.Core.IService;
using Admin.Core.IService.IService_New;
using Admin.Core.Model;
1 month ago
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<Hw_Barrel>, IHw_BarrelServices
{
private readonly IBaseRepository<Hw_Barrel> _dal;
public Hw_BarrelServices(IBaseRepository<Hw_Barrel> 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;
}
1 month ago
catch(Exception ex)
{
1 month ago
Log.Error($"获取计划ID错误{ex}");
return "-1";
}
}
}
}