diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsEmptycarryInstockLog.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsEmptycarryInstockLog.cs index 6ccfd3f6..e9167a6a 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsEmptycarryInstockLog.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsEmptycarryInstockLog.cs @@ -49,4 +49,14 @@ public partial class WmsEmptycarryInstockLog : BaseEntity /// public string? carry_code { get; set; } + /// + /// 仓库id + /// + public string? wh_id { get; set; } + + /// + /// 仓库名称 + /// + public string? wh_name { get; set; } + } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsEmptycarryInstockLogService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsEmptycarryInstockLogService.cs index 96dc1938..793430d9 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsEmptycarryInstockLogService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsEmptycarryInstockLogService.cs @@ -83,6 +83,8 @@ namespace Tnb.WarehouseMgr throw new Exception($"库位{basLocation.location_code}已占用"); } + BasWarehouse basWarehouse = await _db.Queryable().Where(r => r.id == basLocation.wh_id).FirstAsync(); + wmsCarryH.location_id = basLocation.id; wmsCarryH.location_code = basLocation.location_code; @@ -97,8 +99,10 @@ namespace Tnb.WarehouseMgr wmsEmptycarryInstockLog.location_id = basLocation.id; wmsEmptycarryInstockLog.location_code = basLocation.location_code; wmsEmptycarryInstockLog.org_id = input.org_id; - wmsEmptycarryInstockLog.create_id =input.create_id ; + wmsEmptycarryInstockLog.create_id =input.create_id; wmsEmptycarryInstockLog.create_time = DateTime.Now; + wmsEmptycarryInstockLog.wh_id = basWarehouse.id; + wmsEmptycarryInstockLog.wh_name = basWarehouse.whname; await _db.Insertable(wmsEmptycarryInstockLog).ExecuteCommandAsync();