电梯控制bug处理 包材出库逻辑变更
This commit is contained in:
@@ -232,6 +232,38 @@ namespace Tnb.WarehouseMgr
|
||||
return items.Take(input.Size).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 包材库2楼入库策略
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<List<BasLocation>> BCKF2InStockStrategy([FromQuery] InStockStrategyQuery input)
|
||||
{
|
||||
List<BasLocation> items = new();
|
||||
try
|
||||
{
|
||||
WmsInstockPolicies policy = await _db.CopyNew().Queryable<WmsInstockPolicies>().Where(it => it.status == 1).FirstAsync();
|
||||
if (policy == null)
|
||||
{
|
||||
throw new AppFriendlyException("没有可用的策略", 500);
|
||||
}
|
||||
|
||||
Expression<Func<BasLocation, bool>> whereExp = Expressionable.Create<BasLocation>()
|
||||
.And(it => it.wh_id == input.warehouse_id)
|
||||
.And(it => it.is_lock == 0)
|
||||
.And(it => it.is_type == ((int)EnumLocationType.出入库位).ToString())
|
||||
.And(it => it.is_use == ((int)EnumCarryStatus.空闲).ToString())
|
||||
.ToExpression();
|
||||
items = await _db.CopyNew().Queryable<BasLocation>().Where(whereExp).OrderBy(policy.policy).ToListAsync();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return items.Take(input.Size).ToList();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否为一楼出库工位
|
||||
/// </summary>
|
||||
@@ -424,7 +456,6 @@ namespace Tnb.WarehouseMgr
|
||||
return input.Size > 0 ? items.Take(input.Size).ToList() : items;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 缓存仓出库策略
|
||||
/// </summary>
|
||||
@@ -1816,8 +1847,10 @@ namespace Tnb.WarehouseMgr
|
||||
create_time = DateTime.Now
|
||||
};
|
||||
List<WmsElevatorUnexecute> elevatorQueue = await _db.Queryable<WmsElevatorUnexecute>().Where(it => it.distask_id == disTaskId && it.task_status == "执行中").ToListAsync();
|
||||
|
||||
if ((elevatorQueue.IsNull() || elevatorQueue.Count < 1) && floorN != eleStatusMulti.curFloorNo)
|
||||
|
||||
Logger.Information($"【CallingLanding】 电梯{devName}状态为{s_eleUseStatusDic[devId]}");
|
||||
Logger.Information($"【CallingLanding】 电梯{devName} 任务id{disTaskId} 执行中的队列数量为{elevatorQueue.Count}");
|
||||
if ((elevatorQueue.IsNull() || elevatorQueue.Count < 1) && floorN != eleStatusMulti.curFloorNo && s_eleUseStatusDic[devId] == (int)EnumElevatorUseStatus.空闲)
|
||||
{
|
||||
Logger.Information($"【CallingLanding】 判断当前电梯{devName.Match(@"\d+")}#梯 无任务在做执行呼梯");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user