You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
881 B
29 lines
881 B
using Monitor.Models;
|
|
using Monitor.Repositories;
|
|
|
|
namespace DataBase.MySql.Tool
|
|
{
|
|
/// <summary>
|
|
/// 每天能耗统计操作类
|
|
/// </summary>
|
|
public class SEgElecDayStatistics
|
|
{
|
|
private TEgElecDayStatisticRepository _dalEgElecDayStatisticRepository;
|
|
|
|
public SEgElecDayStatistics()
|
|
{
|
|
_dalEgElecDayStatisticRepository = new TEgElecDayStatisticRepository(DBTool.Instance.MyDbContext());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加每天能耗统计值
|
|
/// </summary>
|
|
/// <param name="val"></param>
|
|
/// <returns></returns>
|
|
public async Task<int> AddElecDayStatistic(TEgElecDayStatistic val)
|
|
{
|
|
await _dalEgElecDayStatisticRepository.DelBy(a => a.FStartTime == val.FStartTime);
|
|
return await _dalEgElecDayStatisticRepository.Insert(val);
|
|
}
|
|
}
|
|
} |