using System; using System.Collections.Generic; using System.Data.SqlClient; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using Txgy.EWS.Client.IBLL; using Txgy.EWS.Client.IDAL; using Txgy.EWS.Client.Models; using Txgy.Microseismic.BaseLib.Common; using Txgy.Microseismic.BaseLib.Entitys; namespace Txgy.EWS.Client.BLL { public class SearchMsEventBLL : ISearchMsEventBLL { private readonly IRemoteMySQLDataAccess remoteMySQLDataAccess; public SearchMsEventBLL(IRemoteMySQLDataAccess remoteMySQLDataAccess) { this.remoteMySQLDataAccess = remoteMySQLDataAccess; } public int PreSelectCount { get => remoteMySQLDataAccess.PreSelectCount; set => remoteMySQLDataAccess.PreSelectCount = value; } public bool DownLoadWavedata(string eventTime, string savePath, string saveName, string tableName) { return remoteMySQLDataAccess.DownLoadWavedata(eventTime, savePath, saveName, tableName); } public List GetEvents(DateTime startTime, DateTime endTime) { return remoteMySQLDataAccess.GetEvents(startTime, endTime); } public List GetEvents(string QueryStr, SortTarget ssm, int sm, Models.FilterCondition energyFC) { return remoteMySQLDataAccess.GetEvents(QueryStr, ssm,sm,energyFC); } public List GetEvents(DateTime startTime, DateTime endTime, double minML, double maxML) { return remoteMySQLDataAccess.GetEvents(startTime, endTime, minML, maxML); } public MmEventEntity GetEvent(string eventTime) { return remoteMySQLDataAccess.GetEvent(eventTime); } public MmEventEntity GetEvent(int eventID) { return remoteMySQLDataAccess.GetEvent(eventID); } public List GetEvents(DateTime startTime, DateTime endTime, int pageIndex, int perPageCount, float minML, float maxML) { List res = remoteMySQLDataAccess.GetEvents(startTime, endTime, pageIndex, perPageCount, minML, maxML); return res; } public List GetTopEvents(int MaxCnt, int PreCnt) { return remoteMySQLDataAccess.GetTopEvents(MaxCnt, PreCnt); } public void SaveBinaryFile(string fn, byte[] datas) { //throw new NotImplementedException(); } public MmEventEntity GetLastEvent() { return remoteMySQLDataAccess.GetLastEvent(); } public MmEventEntity GetLastEvent(DateTime deadline) { return remoteMySQLDataAccess.GetLastEvent(deadline); } public List GetLastNewEvents(int resultCount) { return remoteMySQLDataAccess.GetLastNewEvents(resultCount); } public Task StatEventCountAsync(DateTime startTime, DateTime endTime) { return remoteMySQLDataAccess.StatEventCountAsync(startTime, endTime); } public Task QueryAndDownloadDataAsync(int eventID, string savePath, Action callback) { return remoteMySQLDataAccess.QueryAndDownloadDataAsync(eventID, savePath, callback); } public Task QueryAndDownloadDataAsync(int eventID, DateTime endTime, string savePath, Action callback) { return remoteMySQLDataAccess.QueryAndDownloadDataAsync(eventID, endTime, savePath, callback); } public List GetLastTopEvents(int QueryCount) { return remoteMySQLDataAccess.GetLastTopEvents(QueryCount); } public ValueTask DownloadWaveDataAsync(GridItemEventResult gier, string savePath, Action callback) { return remoteMySQLDataAccess.DownloadWaveDataAsync(gier, savePath, callback); } public List GetGridEvents(DateTime startTime, DateTime endTime, double minML, double maxML) { return remoteMySQLDataAccess.GetGridEvents(startTime, endTime, minML, maxML); } public Task QueryEventByIDAsync(int eventID, string savePath, Action callback) { return remoteMySQLDataAccess.QueryEventByIDAsync(eventID, savePath, callback); } public ValueTask DownloadJsonDataAsync(GridItemEventResult gier, string savePath, Action callback) { return remoteMySQLDataAccess.DownloadJsonDataAsync(gier, savePath, callback); } public List GetLastEvents(int lastEventID) { return remoteMySQLDataAccess.GetLastEvents(lastEventID); } } }