1、删除无用类

2、调整定时逻辑,将定时改为框架的事件总线
3、电梯业务逻辑代码调整
This commit is contained in:
yang.lee
2023-10-31 17:37:54 +08:00
parent eddb6edf45
commit 74118cccf4
40 changed files with 542 additions and 548 deletions

View File

@@ -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 =>
{