静置仓逻辑编写,返回提示修改 bug,包材出库逻辑变更
This commit is contained in:
@@ -234,6 +234,36 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
return items.Take(input.Size).ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// 入库策略
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<List<BasLocation>> InStockStrategyBCK([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>
|
||||
/// 包材库2楼入库策略
|
||||
|
||||
Reference in New Issue
Block a user