增加空货架、非空货架 状态更新 并且呼叫空货架接口增加空货架限制

This commit is contained in:
hehaibing-1996
2025-03-05 17:59:33 +08:00
parent 2381624be4
commit cc62a28ee7
7 changed files with 36 additions and 21 deletions

View File

@ -16,6 +16,8 @@ namespace WCS.BLL.Manager
{
public static object flag = new object();
public static void UpdateShelfStatus()
{
Task.Run(() =>
{
lock (flag)
{
@ -42,6 +44,8 @@ namespace WCS.BLL.Manager
.UpdateColumns(t => new { t.ShelfStatus })
.ExecuteCommand();
}
});
}
}
}

View File

@ -166,6 +166,7 @@ namespace WCS.BLL.Services.Service
else
{
DbHelp.db.CommitTran();
DataProcessManager.UpdateShelfStatus();
return new ResponseCommon<Object>
{
Code = 200,
@ -226,6 +227,7 @@ namespace WCS.BLL.Services.Service
var deleteRows = await DbHelp.db.Deleteable(matDetailCurrentInfos).ExecuteCommandAsync();
DbHelp.db.CommitTran();
DataProcessManager.UpdateShelfStatus();
return new ResponseCommon<Object>
{
Code = 200,
@ -467,6 +469,7 @@ namespace WCS.BLL.Services.Service
}
await DbHelp.db.CommitTranAsync();
DataProcessManager.UpdateShelfStatus();
return new ResponseCommon<List<string>>()
{
Code = 200,

View File

@ -232,6 +232,7 @@ namespace WCS.BLL.Services.Service
else
{
DbHelp.db.CommitTran();
DataProcessManager.UpdateShelfStatus();
return new ResponseCommon<Object>
{
Code = 200,
@ -294,6 +295,7 @@ namespace WCS.BLL.Services.Service
var deleteRows = await DbHelp.db.Deleteable(matDetailCurrentInfos).ExecuteCommandAsync();
DbHelp.db.CommitTran();
DataProcessManager.UpdateShelfStatus();
return new ResponseCommon<Object>
{
Code = 200,

View File

@ -82,6 +82,7 @@ namespace WCS.BLL.Services.Service
//获取空货架进行呼叫
shelf = await DbHelp.db.Queryable<ShelfInfo>()
.Where(t => t.TransStatus == TransStatusEnum. && t.CurrentLocationId != 0)
.Where(t => t.ShelfStatus == ShelfStatusEnum.)
.Where(t => t.ShelfTypeId == request.NeedShelfTypeId)
.Where(t => t.IsEnable == true)
.FirstAsync();

View File

@ -1541,6 +1541,7 @@ namespace WCS.BLL.Services.Service
DbHelp.db.Updateable(stocktakingInfo).ExecuteCommand();
}
DbHelp.db.CommitTran();
DataProcessManager.UpdateShelfStatus();
return new ResponseCommon<object>()
{
Code = 200,

View File

@ -405,6 +405,7 @@ namespace WCS.WebApi.Controllers
DbHelp.db.Insertable(historyInfo).ExecuteCommand();
DbHelp.db.CommitTran();
DataProcessManager.UpdateShelfStatus();
return new ResponseCommon()
{
Code = 200,

View File

@ -203,6 +203,7 @@ namespace WCS.WebApi.Controllers
else
{
DbHelp.db.CommitTran();
DataProcessManager.UpdateShelfStatus();
return new ResponseCommon<Object>
{
Code = 200,
@ -347,6 +348,7 @@ namespace WCS.WebApi.Controllers
}
DbHelp.db.Deleteable(matCurrentInfos).ExecuteCommand();
DbHelp.db.CommitTran();
DataProcessManager.UpdateShelfStatus();
}
catch (Exception ex)
{
@ -369,6 +371,7 @@ namespace WCS.WebApi.Controllers
//库存更新记录
//全部删除 删除数量为0的
DbHelp.db.Deleteable(matCurrentInfos).ExecuteCommand();
DataProcessManager.UpdateShelfStatus();
}
#endregion