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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
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 < 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 ;
}
catch ( Exception ex )
{
Log . Error ( $"获取计划ID错误: {ex}" ) ;
return "-1" ;
}
}
}
}