1、删除无用类
2、调整定时逻辑,将定时改为框架的事件总线 3、电梯业务逻辑代码调整
This commit is contained in:
@@ -6,11 +6,26 @@ using System.Threading.Tasks;
|
||||
using JNPF.Common.Contracts;
|
||||
using JNPF.Logging;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SqlSugar;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
|
||||
namespace Tnb.WarehouseMgr
|
||||
{
|
||||
public class BaseWareHouseService<T> : BaseWareHouseService
|
||||
public class BaseWareHouseService<T> : BaseWareHouseService
|
||||
{
|
||||
protected static Dictionary<string, object> _elevatorMap = new Dictionary<string, object>();
|
||||
|
||||
public BaseWareHouseService(ISqlSugarClient db)
|
||||
{
|
||||
if (_elevatorMap.Count < 1)
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
_elevatorMap = await db.Queryable<WmsElevatorH>().ToDictionaryAsync(x =>x.elevator_id,x=>x.elevator_code);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected ILogger Logger => LoggerFactory.Create(builder => builder.AddFile($"{AppContext.BaseDirectory}/logs/custom{DateTime.Now:yyyyMMdd}.log", cfgOpts =>
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user