增加空货架、非空货架 状态更新 并且呼叫空货架接口增加空货架限制
This commit is contained in:
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
|
@ -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,
|
||||
|
@ -405,6 +405,7 @@ namespace WCS.WebApi.Controllers
|
||||
DbHelp.db.Insertable(historyInfo).ExecuteCommand();
|
||||
|
||||
DbHelp.db.CommitTran();
|
||||
DataProcessManager.UpdateShelfStatus();
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 200,
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user