去除日志分割线,看着眼花
This commit is contained in:
@@ -72,14 +72,15 @@ namespace Tnb.WarehouseMgr
|
||||
var endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);*/
|
||||
//判断目标库位是否自动签收
|
||||
BasLocation loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == input.data[nameof(WmsPointH.location_id)].ToString());
|
||||
|
||||
//出库取起点,获取所有符合输入的载具规格的载具
|
||||
OutStockStrategyQuery OutStockStrategyInput = new()
|
||||
{
|
||||
carrystd_id = input.data[nameof(OutStockStrategyQuery.carrystd_id)].ToString(),
|
||||
warehouse_id = input.data[nameof(OutStockStrategyQuery.warehouse_id)].ToString(),
|
||||
|
||||
};
|
||||
List<WmsCarryH>? carrys = await _wareHouseService.OutStockStrategy(OutStockStrategyInput);
|
||||
Logger.Information($"根据出库策略获取的载具数量:{carrys?.Count}");
|
||||
//var carrys = await _db.Queryable<WmsCarryH>().LeftJoin<BasLocation>((a, b) => a.location_id == b.id)
|
||||
// .Where((a, b) => a.carrystd_id == input.data[nameof(WmsEmptyOutstockH.carrystd_id)].ToString()
|
||||
// && a.carry_status == ((int)EnumCarryStatus.空闲).ToString() && a.is_lock == 0 && b.is_lock == 0 && b.is_type == ((int)EnumLocationType.存储库位).ToString())
|
||||
@@ -100,7 +101,6 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
|
||||
|
||||
WmsEmptyOutstockH setQty = await _db.Queryable<WmsEmptyOutstockH>().FirstAsync(it => it.bill_code == input.data[nameof(WmsEmptyOutstockH.bill_code)].ToString());
|
||||
WmsPointH? sPoint = null;
|
||||
WmsPointH? ePoint = null;
|
||||
if (input.data.ContainsKey(nameof(WmsPointH.location_id)))
|
||||
@@ -110,7 +110,11 @@ namespace Tnb.WarehouseMgr
|
||||
//根据每个载具的起始库位做路径运算
|
||||
if (carrys?.Count > 0)
|
||||
{
|
||||
WmsEmptyOutstockH setQty = await _db.Queryable<WmsEmptyOutstockH>().FirstAsync(it => it.bill_code == input.data[nameof(WmsEmptyOutstockH.bill_code)].ToString());
|
||||
|
||||
int min = (carrys.Count > setQty.qty) ? setQty.qty : carrys.Count;
|
||||
Logger.Information($"min={min}");
|
||||
|
||||
for (int i = 0; i < min; i++)
|
||||
{
|
||||
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == carrys[i].location_id);
|
||||
@@ -162,6 +166,7 @@ namespace Tnb.WarehouseMgr
|
||||
}).ToList();
|
||||
//更新页面
|
||||
//赋值签收状态
|
||||
Logger.Information($"空载具出库生成的预任务数量:{preTasks.Count}");
|
||||
if (loc.is_sign == 0)
|
||||
{
|
||||
preTasks[^1].is_sign = 0; // 修改最后一个元素的是否签收值
|
||||
@@ -211,7 +216,7 @@ namespace Tnb.WarehouseMgr
|
||||
else {
|
||||
throw new AppFriendlyException("没有匹配的空载具可以出库", 500);
|
||||
}
|
||||
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
Reference in New Issue
Block a user