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))