修改业务回更方法
This commit is contained in:
@@ -22,6 +22,7 @@ using Tnb.WarehouseMgr.Entities;
|
||||
using Tnb.WarehouseMgr.Entities.Attributes;
|
||||
using Tnb.WarehouseMgr.Entities.Consts;
|
||||
using Tnb.WarehouseMgr.Entities.Dto;
|
||||
using Tnb.WarehouseMgr.Entities.Enums;
|
||||
using Tnb.WarehouseMgr.Interfaces;
|
||||
namespace Tnb.WarehouseMgr
|
||||
{
|
||||
@@ -115,16 +116,22 @@ namespace Tnb.WarehouseMgr
|
||||
var isOk = await _wareHouseService.GenPreTask(preTasks,null);
|
||||
if (isOk)
|
||||
{
|
||||
//不需要插入操作表
|
||||
/* var preTaskUpInput = new GenPreTaskUpInput();
|
||||
preTaskUpInput.PreTaskId = input.data["ReturnIdentity"].ToString();
|
||||
preTaskUpInput.CarryId = input.data[nameof(WmsCarryD.carry_id)]?.ToString()!;
|
||||
preTaskUpInput.CarryStartLocationId = points.FirstOrDefault().location_id;
|
||||
preTaskUpInput.CarryStartLocationCode = points.FirstOrDefault().location_code;
|
||||
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList();
|
||||
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
|
||||
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
|
||||
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);*/
|
||||
//查询库位表
|
||||
var location = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == input.data[nameof(WmsTransfer.startlocation_id)].ToString());
|
||||
{
|
||||
//载具加锁,增加库位信息
|
||||
await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH
|
||||
{
|
||||
carry_status = ((int)EnumCarryStatus.占用).ToString(),
|
||||
is_lock = 1,
|
||||
location_id = input.data[nameof(WmsTransfer.startlocation_id)].ToString(),
|
||||
location_code = location.location_code
|
||||
}).Where(it => it.id == input.data[nameof(WmsTransfer.carry_id)].ToString()).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
//所有库位加锁
|
||||
var ids = new[] { input.data[nameof(WmsTransfer.startlocation_id)].ToString(), input.data[nameof(WmsTransfer.endlocation_id)].ToString() };
|
||||
await _db.Updateable<BasLocation>().SetColumns(it => new BasLocation { is_lock = 1 }).Where(it => ids.Contains(it.id)).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user