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 Admin.Core.IService;
|
|
|
|
|
using Admin.Core.Model;
|
|
|
|
|
using Admin.Core.Service;
|
|
|
|
|
using Aucma.Scada.UI.Common;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Aucma.Scada.UI.PlanBusiness
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 任务业务逻辑
|
|
|
|
|
/// </summary>
|
|
|
|
|
public sealed class TaskInfoBusiness
|
|
|
|
|
{
|
|
|
|
|
#region 单例实现
|
|
|
|
|
private static readonly Lazy<TaskInfoBusiness> lazy = new Lazy<TaskInfoBusiness>(() => new TaskInfoBusiness());
|
|
|
|
|
public static TaskInfoBusiness Instance
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return lazy.Value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 对象引用
|
|
|
|
|
|
|
|
|
|
private AppConfig appConfig = AppConfig.Instance;
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 接口引用
|
|
|
|
|
private IRealTaskInfoServices _taskInfoService;
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
private TaskInfoBusiness()
|
|
|
|
|
{
|
|
|
|
|
_taskInfoService = App.ServiceProvider.GetService<IRealTaskInfoServices>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取计划列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="taskType"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task<List<RealTaskInfo>> GetTaskInfos(int taskType)
|
|
|
|
|
{
|
|
|
|
|
return await _taskInfoService.GetTaskInfosByTaskStatus(new string[] { appConfig.shellStoreCode, appConfig.linerStoreCode }, taskType, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|