From 70634df84d4d74d98d47f1e72f37a04e66ab7bb3 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 7 Jul 2023 09:03:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93=E7=AD=BE=E6=94=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.WarehouseMgr/WmsSignForDeliveryService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsSignForDeliveryService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsSignForDeliveryService.cs index 566622c5..2fd9e112 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsSignForDeliveryService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsSignForDeliveryService.cs @@ -77,7 +77,15 @@ namespace Tnb.WarehouseMgr carry.location_id = null; carry.location_code = null; await _db.Updateable(carry).UpdateColumns(it => new { it.location_id, it.location_code }).ExecuteCommandAsync(); - WmsDistaskH? disTask = await _db.Queryable().SingleAsync(it => it.id == input.disTaskId); + WmsDistaskH? disTask = null; + if (!input.disTaskId.IsNullOrEmpty()) + { + disTask = await _db.Queryable().SingleAsync(it => it.id == input.disTaskId); + } + else if (!input.carryId.IsNullOrEmpty()) + { + disTask = await _db.Queryable().FirstAsync(it => it.carry_id == input.carryId && it.is_sign == 0); + } if (disTask != null) { if (_dicBizType.ContainsKey(disTask.biz_type))