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.
62 lines
1.7 KiB
C#
62 lines
1.7 KiB
C#
using Microsoft.Extensions.Logging;
|
|
using SlnMesnac.Model.domain;
|
|
using SlnMesnac.Repository.service.@base;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace SlnMesnac.Repository.service.Impl
|
|
{
|
|
public class AGVJobServiceImpl : BaseServiceImpl<AGVJob>, IAGVJobService
|
|
{
|
|
private ILogger<AGVJobServiceImpl> _logger;
|
|
public AGVJobServiceImpl(Repository<AGVJob> repository, ILogger<AGVJobServiceImpl> logger) : base(repository)
|
|
{
|
|
_logger = logger;
|
|
}
|
|
|
|
public List<AGVJob> GetAGVJobList()
|
|
{
|
|
try
|
|
{
|
|
var list = _rep.GetList();
|
|
return list;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_logger.LogError($"获取列表发生错误: {ex.Message}");
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public List<AGVJob> GetAGVJobListByJobType(string jobType)
|
|
{
|
|
try
|
|
{
|
|
var list = _rep.GetList(x => x.JobType == jobType).ToList();
|
|
return list;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_logger.LogError($"获取列表发生错误: {ex.Message}");
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public AGVJob GetAGVJobListByTypeAndConveyorNo(string jobType, string conveyorno)
|
|
{
|
|
try
|
|
{
|
|
AGVJob record = _rep.GetList(x => x.ConveyorNo == conveyorno && x.JobType == jobType).First();
|
|
return record;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_logger.LogError($"获取列表发生错误: {ex.Message}");
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|