1
This commit is contained in:
@@ -297,16 +297,16 @@ namespace Tnb.WarehouseMgr
|
||||
//出库申请明细表
|
||||
List<WmsOutstockD> outstockDs = input.outstockDs.Adapt<List<WmsOutstockD>>();
|
||||
|
||||
var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.location_code == input.outstock.location_code);
|
||||
var location = await _db.Queryable<BasLocation>().SingleAsync(it => it.location_code == input.outstock.location_code);
|
||||
//如果数据不全,
|
||||
if (loc.IsNull() || outstockDs?.Count < 1)
|
||||
if (location.IsNull() || outstockDs?.Count < 1)
|
||||
{
|
||||
//报错, 提示数据不全。
|
||||
throw new AppFriendlyException("数据不全!", 500);
|
||||
}
|
||||
// 生成入库申请数据,添加其他数据 主表
|
||||
outstock.id = SnowflakeIdHelper.NextId();
|
||||
outstock.location_id = loc.id;
|
||||
outstock.location_id = location.id;
|
||||
outstock.biz_type = WmsWareHouseConst.BIZTYPE_WMSOUTSTOCK_ID;
|
||||
outstock.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_OUTSTOCK_ENCODE).GetAwaiter().GetResult();
|
||||
outstock.generate_type = "1";// 自动
|
||||
@@ -326,7 +326,7 @@ namespace Tnb.WarehouseMgr
|
||||
outstock.create_id = outstock.create_id;
|
||||
}
|
||||
await _db.Insertable(outstockDs).ExecuteCommandAsync();
|
||||
var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == outstock.location_id.ToString());
|
||||
//var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == outstock.location_id.ToString());
|
||||
var carryIds = new List<string>();
|
||||
//tablefield120 出库物料明细
|
||||
var outStockDList = outstockDs.ToObject<List<WmsOutstockD>>();
|
||||
@@ -456,7 +456,7 @@ namespace Tnb.WarehouseMgr
|
||||
preTask.create_time = DateTime.Now;
|
||||
return preTask;
|
||||
}).ToList();
|
||||
if (loc.is_sign == 0)
|
||||
if (location.is_sign == 0)
|
||||
{
|
||||
curPreTasks[^1].is_sign = 0; // 修改最后一个元素的是否签收值
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user