电梯控制bug处理 包材出库逻辑变更
This commit is contained in:
@@ -20,7 +20,18 @@ namespace Tnb.WarehouseMgr
|
||||
private static readonly Lazy<Task> initializationTask;
|
||||
private static SqlSugarScope context;
|
||||
private readonly ISqlSugarClient _db;
|
||||
public static Dictionary<string, int> s_eleUseStatusDic = new();
|
||||
public Dictionary<string, int> s_eleUseStatusDic
|
||||
{
|
||||
get
|
||||
{
|
||||
if (context == null)
|
||||
return null;
|
||||
if (_s_eleUseStatusDic == null)
|
||||
_s_eleUseStatusDic = context.Queryable<WmsElevatorH>().ToList().ToDictionary(x => x.elevator_id, x => x.is_use);
|
||||
|
||||
return _s_eleUseStatusDic;
|
||||
}
|
||||
}
|
||||
public static Dictionary<string, int> s_loadedStatusDic = new();
|
||||
|
||||
static DevServBase()
|
||||
@@ -48,9 +59,9 @@ namespace Tnb.WarehouseMgr
|
||||
context = new(cfg);
|
||||
|
||||
s_elevatorMap = await context.Queryable<WmsElevatorH>().ToDictionaryAsync(x => x.elevator_id, x => x.elevator_code);
|
||||
s_eleUseStatusDic = context.Queryable<WmsElevatorH>().ToList().ToDictionary(x => x.elevator_id, x => x.is_use);
|
||||
//s_eleUseStatusDic = context.Queryable<WmsElevatorH>().ToList().ToDictionary(x => x.elevator_id, x => x.is_use);
|
||||
|
||||
if (s_eleUseStatusDic.Count < 1)
|
||||
//if (s_eleUseStatusDic.Count < 1)
|
||||
{
|
||||
foreach (var (k, _) in s_elevatorMap)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user