This commit is contained in:
2024-05-21 11:35:04 +08:00
parent 565fa22e45
commit 6449cbdd5b

View File

@@ -102,6 +102,15 @@ namespace Tnb.WarehouseMgr
// VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_WMSEMPTYOUTSTK_ID, true);
// await _runService.Create(templateEntity, input);
input.data["create_time"] = DateTime.Now;
input.data["create_id"] = _userManager!=null ? _userManager.UserId : WmsWareHouseConst.AdministratorUserId;
if (input.data.TryGetValue("bill_code", out Object value))
{
if (value == null || value.ToString().IsEmpty())
{
input.data["bill_code"] = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_EMPTYOUTSTK_ENCODE).GetAwaiter().GetResult();
}
}
wmsEmptyOutstockH = JsonConvert.DeserializeObject<WmsEmptyOutstockH>(JsonConvert.SerializeObject(input.data));
wmsEmptyOutstockH.id = SnowflakeIdHelper.NextId();
await _db.Insertable(wmsEmptyOutstockH).ExecuteCommandAsync();