首次提交:添加src文件夹代码
This commit is contained in:
48
Cowain.Bake.BLL/MemoryDataProvider.cs
Normal file
48
Cowain.Bake.BLL/MemoryDataProvider.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using Cowain.Bake.Common.Core;
|
||||
using Cowain.Bake.Common.Interface;
|
||||
using Cowain.Bake.Model;
|
||||
using Cowain.Bake.Model.Entity;
|
||||
using Cowain.Bake.Model.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Unity;
|
||||
|
||||
namespace Cowain.Bake.BLL
|
||||
{
|
||||
public class MemoryDataProvider
|
||||
{
|
||||
protected static IUnityContainer _unityContainer =null;
|
||||
public int DispMode { get; set; } //调度模试
|
||||
public UserEntity CurrentUser { get; set; } = new UserEntity();
|
||||
|
||||
public List<TCavityInfo> CavityInfo { get; set; }
|
||||
public List<TStation> AllStation { get; set; }
|
||||
public List<TTaskType> TaskType { get; set; }
|
||||
|
||||
public MemoryDataProvider(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
CavityInfo = unityContainer.Resolve<CavityInfoService>().GetAll();
|
||||
AllStation = unityContainer.Resolve<StationService>().GetAll();
|
||||
TaskType = unityContainer.Resolve<TaskTypeService>().GetAll();
|
||||
}
|
||||
|
||||
public TProcessParameter GetProcessParam(int id)
|
||||
{
|
||||
return _unityContainer.Resolve<ProcessParamService>().Get(id);
|
||||
}
|
||||
|
||||
public TPalletInfo GetPalletInfoByVirtualId(int virtualId)
|
||||
{
|
||||
return _unityContainer.Resolve<PalletInfoService>().GetPalletInfoByVirtualId(virtualId);
|
||||
}
|
||||
|
||||
public TPalletInfo GetPalletInfoById(int palletId)
|
||||
{
|
||||
return _unityContainer.Resolve<PalletInfoService>().GetPalletInfo(palletId);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user