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.
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using SlnMesnac.Common;
|
|
|
|
|
using SlnMesnac.Model.domain;
|
|
|
|
|
using SlnMesnac.Repository.service.@base;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq.Expressions;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace SlnMesnac.Repository.service.Impl
|
|
|
|
|
{
|
|
|
|
|
public class AGVStateServiceImpl : BaseServiceImpl<AGVState>, IAGVStateService
|
|
|
|
|
{
|
|
|
|
|
private ILogger<AGVStateServiceImpl> _logger;
|
|
|
|
|
public AGVStateServiceImpl(Repository<AGVState> repository, ILogger<AGVStateServiceImpl> logger) :base(repository)
|
|
|
|
|
{
|
|
|
|
|
_logger = logger;
|
|
|
|
|
}
|
|
|
|
|
public List<AGVState> GetAgvState()
|
|
|
|
|
{
|
|
|
|
|
List<AGVState> agvStateInfoList = null;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Expression<Func<AGVState, bool>> exp = x => true;
|
|
|
|
|
exp = exp.And(x => x.agvno != "" && (x.taskno == null || x.taskno == "") && x.agvworkstate == "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
|
|
|
|
|
agvStateInfoList = base._rep.GetList(exp);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogError($"ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>쳣:{ex.Message}");
|
|
|
|
|
}
|
|
|
|
|
return agvStateInfoList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<bool> UpdateAsync(AGVState record)
|
|
|
|
|
{
|
|
|
|
|
bool result = await _rep.UpdateAsync(record);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|