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 HighWayIot.Log4net;
|
|
|
|
|
using HighWayIot.Repository.domain;
|
|
|
|
|
using Models;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Linq.Expressions;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace HighWayIot.Repository.service
|
|
|
|
|
{
|
|
|
|
|
public class ZxRecipeParaService
|
|
|
|
|
{
|
|
|
|
|
private static readonly Lazy<ZxRecipeParaService> lazy = new Lazy<ZxRecipeParaService>(() => new ZxRecipeParaService());
|
|
|
|
|
|
|
|
|
|
public static ZxRecipeParaService Instance
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return lazy.Value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private LogHelper log = LogHelper.Instance;
|
|
|
|
|
Repository<ZxRecipeParaEntity> _repository => new Repository<ZxRecipeParaEntity>("sqlserver");
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 条件查询所有用户列表 用户名为模糊查询
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public List<ZxRecipeParaEntity> GetShiftInfos()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
List<ZxRecipeParaEntity> deviceInfo = _repository.GetList();
|
|
|
|
|
return deviceInfo;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
log.Error("用户信息获取异常", ex);
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 修改班次信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sysUserEntity"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public bool UpdateShiftInfo(ZxRecipeParaEntity sysUserEntity)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
return _repository.Update(sysUserEntity);
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
log.Error("用户信息修改异常", ex);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|