bug
This commit is contained in:
@@ -78,7 +78,7 @@ namespace Tnb.WarehouseMgr
|
||||
//判断目标库位是否自动签收
|
||||
var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == input.data[nameof(WmsPointH.location_id)].ToString());
|
||||
//出库取起点,获取所有符合输入的载具规格的载具
|
||||
var setQty = await _db.Queryable<WmsEmptyOutstockH>().FirstAsync(it => it.bill_code == input.data[nameof(WmsEmptyOutstockH.bill_code)].ToString());
|
||||
|
||||
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())
|
||||
@@ -95,6 +95,7 @@ namespace Tnb.WarehouseMgr
|
||||
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_WMSEMPTYOUTSTK_ID, true);
|
||||
await _runService.Create(templateEntity, input);
|
||||
|
||||
var 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)))
|
||||
|
||||
@@ -134,7 +134,8 @@ namespace Tnb.WarehouseMgr
|
||||
pretaskCodes.AddRange(curPreTaskCodes);
|
||||
}
|
||||
await _warehouseService.GenPreTask(preTasks, pretaskCodes);
|
||||
await _db.Updateable(kittingout).UpdateColumns(it => it.status == WmsWareHouseConst.BILLSTATUS_ON_ID).ExecuteCommandAsync();
|
||||
kittingout.status = WmsWareHouseConst.BILLSTATUS_ON_ID;
|
||||
await _db.Updateable(kittingout).UpdateColumns(it => it.status).ExecuteCommandAsync();
|
||||
GenPreTaskUpInput genPreTaskAfterUpInput = new();
|
||||
genPreTaskAfterUpInput.CarryIds = preTasks.Select(x => x.carry_id).ToList();
|
||||
genPreTaskAfterUpInput.LocationIds = new List<string> { carry.location_id! };
|
||||
|
||||
@@ -304,12 +304,14 @@ namespace Tnb.WarehouseMgr
|
||||
carrys.Add(carry);
|
||||
if (carrys?.Count > 0)
|
||||
{
|
||||
await _db.Ado.BeginTranAsync();
|
||||
var tasks = new List<Task<int>>();
|
||||
foreach (var carryIt in carrys)
|
||||
{
|
||||
tasks.Add(_carryService.UpdateNullCarry(carryIt));
|
||||
}
|
||||
var all = await Task.WhenAll(tasks);
|
||||
await _db.Ado.CommitTranAsync();
|
||||
if (all.All(x => x > 0))
|
||||
isOk = all?.Length > 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user