generated from wenjy/SlnMesnac
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.
72 lines
2.0 KiB
C#
72 lines
2.0 KiB
C#
using Microsoft.Extensions.Logging;
|
|
using SlnMesnac.Model.domain;
|
|
using SlnMesnac.Repository.service.@base;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq.Expressions;
|
|
using System.Text;
|
|
|
|
namespace SlnMesnac.Repository.service.Impl
|
|
{
|
|
public class VisionSettingServiceImpl : BaseServiceImpl<VisionSetting>, IVisionSettingService
|
|
{
|
|
private ILogger<VisionSettingServiceImpl> _logger;
|
|
public VisionSettingServiceImpl(Repository<VisionSetting> repository, ILogger<VisionSettingServiceImpl> logger) : base(repository)
|
|
{
|
|
_logger = logger;
|
|
}
|
|
|
|
public List<VisionSetting> GetList()
|
|
{
|
|
try
|
|
{
|
|
return _rep.GetList();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_logger.LogError($"获取视觉配置列表错误");
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public List<VisionSetting> GetList(Expression<Func<VisionSetting, bool>> expression)
|
|
{
|
|
try
|
|
{
|
|
return _rep.GetList(expression);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_logger.LogError($"获取视觉配置列表错误");
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public VisionSetting GetVisionSettingByAMRGUID(string guid)
|
|
{
|
|
try
|
|
{
|
|
return _rep.GetSingle(x => x.AMRGUID == guid);
|
|
}
|
|
catch(Exception ex)
|
|
{
|
|
_logger.LogError($"根据AMRGUID获取视觉配置错误");
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public VisionSetting GetVisionSettingByID(string id)
|
|
{
|
|
try
|
|
{
|
|
return _rep.GetSingle(x => x.VisionID == id);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_logger.LogError($"根据VisionID获取视觉配置错误");
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|