From 53384c7be52b67f33ca49a285750d98d244d8b4d Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Sat, 13 Jul 2024 23:10:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=B7=A5=E5=85=A5=E7=A9=BA=E6=89=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entity/WmsEmptycarryInstockLog.cs | 10 ++++++++++ .../Tnb.WarehouseMgr/WmsEmptycarryInstockLogService.cs | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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();