From ace324bc5fb0ee46faeb9b1619a517bd3fbf77e4 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 11 Jul 2023 16:51:59 +0800 Subject: [PATCH] 1 --- WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs index 01c2911f..908e159a 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs @@ -297,16 +297,16 @@ namespace Tnb.WarehouseMgr //出库申请明细表 List outstockDs = input.outstockDs.Adapt>(); - var loc = await _db.Queryable().SingleAsync(it => it.location_code == input.outstock.location_code); + var location = await _db.Queryable().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().SingleAsync(it => it.id == outstock.location_id.ToString()); + //var loc = await _db.Queryable().SingleAsync(it => it.id == outstock.location_id.ToString()); var carryIds = new List(); //tablefield120 出库物料明细 var outStockDList = outstockDs.ToObject>(); @@ -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; // 修改最后一个元素的是否签收值 }