添加项目文件。

This commit is contained in:
liming 蔡
2026-07-14 13:55:17 +08:00
parent 63759495f2
commit 8bbdf78731
335 changed files with 81415 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
using JY.DAL.Repository;
using JY.Model;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
namespace JY.DAL.Service
{
public interface IAlarmDataService : IService<AlarmData>
{
List<AlarmData> GetAlarmDataByTime(string startTime, string endTime);
List<AlarmData> GetAlarmCacheData();
int DeleteAlarmCacheData();
}
public class AlarmDataService : Service<AlarmData>, IAlarmDataService
{
public AlarmDataService(IRepository<AlarmData> repository) : base(repository)
{
}
public List<AlarmData> GetAlarmDataByTime(string startTime, string endTime)
{
return _repository.GetList(x => x.StartTime >= Convert.ToDateTime(startTime) && x.StartTime <= Convert.ToDateTime(endTime));
}
public List<AlarmData> GetAlarmCacheData()
{
return _repository.GetList(x => x.Flag == 0);
}
public int DeleteAlarmCacheData()
{
return _repository.Delete(x => x.Flag == 0);
}
}
}