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/Admin.Core.Service/Service_New/TemperatureHistoryServices.cs

48 lines
1.8 KiB
C#

using Admin.Core.IRepository;
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
using Admin.Core.Model.ViewModels;
using log4net;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.IdentityModel.Logging;
using NPOI.XSSF.UserModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Admin.Core.Service
{
public class TemperatureHistoryServices : BaseServices<TemperatureHistory>, ITemperatureHistoryServices
{
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(TemperatureHistoryServices));
private readonly IBaseRepository<TemperatureHistory> _dal;
private readonly ITemperatureHistoryRepository _temperatureHistoryRepository;
public TemperatureHistoryServices(IBaseRepository<TemperatureHistory> dal, ITemperatureHistoryRepository temperatureHistoryRepository)
{
this._dal = dal;
base.BaseDal = dal;
_temperatureHistoryRepository = temperatureHistoryRepository;
}
/// <summary>
/// 传递时间时间 调用存储过程 获取测温历史记录
/// </summary>
/// <param name="startTime">开始时间</param>
/// <returns></returns>
public List<TemperatureHistory> QueryTemperatureHistory(DateTime startTime)
{
return _temperatureHistoryRepository.QueryTemperatureHistory(startTime);
}
/// <summary>
/// 传递条码 调用存储过程 获取测温历史记录
/// </summary>
/// <param name="barCode">条码</param>
/// <returns></returns>
public List<TemperatureHistory> QueryTemperatureHistory(string barCode)
{
return _temperatureHistoryRepository.QueryTemperatureHistory(barCode);
}
}
}