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.
Aucma.Scada/HighWayIot.Repository/service/Impl/BaseMaterialInfoServiceImpl.cs

52 lines
1.4 KiB
C#

using Aucma.Scada.Model.domain;
using HighWayIot.Log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HighWayIot.Repository.service.Impl
{
public class BaseMaterialInfoServiceImpl : IBaseMaterialInfoService
{
Repository<BaseMaterialInfo> _baseMaterialInfo => new Repository<BaseMaterialInfo>("mes");
private LogHelper logHelper = LogHelper.Instance;
public List<BaseMaterialInfo> getAllInfos()
{
try
{
var info = _baseMaterialInfo.GetList(x => x.MaterialSubclass == "200");
return info;
}
catch (Exception ex)
{
logHelper.Error("获取集合异常", ex);
return null;
}
}
/// <summary>
/// 获取箱壳和内胆部件
/// </summary>
/// <returns></returns>
public List<BaseMaterialInfo> getShellAndLiner()
{
try
{
var info = _baseMaterialInfo.GetList(x => x.MaterialSubclass == "400" || x.MaterialSubclass == "500");
return info;
}
catch (Exception ex)
{
logHelper.Error("获取集合异常", ex);
return null;
}
}
}
}