diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsDeliveryService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsDeliveryService.cs index 54691b4b..328d83d4 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsDeliveryService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsDeliveryService.cs @@ -37,7 +37,7 @@ namespace Tnb.WarehouseMgr [Route("api/[area]/[controller]/[action]")] [OverideVisualDev(ModuleConsts.MODULE_WMSDELIVERY_ID)] [ServiceModule(BizTypeId)] - public class WmsDeliveryService : BaseWareHouseService,IOverideVisualDevService, IWmsDeliveryService, IDynamicApiController, ITransient + public class WmsDeliveryService : BaseWareHouseService, IOverideVisualDevService, IWmsDeliveryService, IDynamicApiController, ITransient { private const string BizTypeId = "26125644258853"; private readonly ISqlSugarClient _db; @@ -157,7 +157,7 @@ namespace Tnb.WarehouseMgr preTask.create_time = DateTime.Now; return preTask; }).ToList(); - var isOk = await _wareHouseService.GenPreTask(preTasks,null); + var isOk = await _wareHouseService.GenPreTask(preTasks, null); if (isOk) { if (input.data.ContainsKey(nameof(WmsDelivery.startlocation_id)) && input.data.ContainsKey(nameof(WmsDelivery.endlocation_id)) && input.data[nameof(WmsDelivery.endlocation_id)] != null && input.data[nameof(WmsDelivery.endlocation_id)] != null) @@ -165,11 +165,16 @@ namespace Tnb.WarehouseMgr //查询库位表 var location = await _db.Queryable().SingleAsync(it => it.id == input.data[nameof(WmsDelivery.startlocation_id)].ToString()); { - //载具加锁,增加库位信息 - await _db.Updateable().SetColumns(it => new WmsCarryH { carry_status = ((int)EnumCarryStatus.占用).ToString(), - is_lock = 1, location_id = input.data[nameof(WmsDelivery.startlocation_id)].ToString(), location_code = location.location_code}).Where(it => it.id == input.data[nameof(WmsDelivery.carry_id)].ToString()).ExecuteCommandAsync(); + //载具加锁,增加库位信息 + await _db.Updateable().SetColumns(it => new WmsCarryH + { + carry_status = ((int)EnumCarryStatus.占用).ToString(), + is_lock = 1, + location_id = input.data[nameof(WmsDelivery.startlocation_id)].ToString(), + location_code = location.location_code + }).Where(it => it.id == input.data[nameof(WmsDelivery.carry_id)].ToString()).ExecuteCommandAsync(); } - + //所有库位加锁 var ids = new[] { input.data[nameof(WmsDelivery.startlocation_id)].ToString(), input.data[nameof(WmsDelivery.endlocation_id)].ToString() }; await _db.Updateable().SetColumns(it => new BasLocation { is_lock = 1 }).Where(it => ids.Contains(it.id)).ExecuteCommandAsync();