添加报警窗口
出库流程调试、优化
This commit is contained in:
51
WCS.BLL/Services/Service/WarningService.cs
Normal file
51
WCS.BLL/Services/Service/WarningService.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using TouchSocket.Core;
|
||||
using WCS.BLL.Manager;
|
||||
using WCS.BLL.Services.IService;
|
||||
using WCS.DAL;
|
||||
using WCS.DAL.Db.AuthDb;
|
||||
using WCS.Model;
|
||||
using WCS.Model.ApiModel;
|
||||
using WCS.Model.ApiModel.User;
|
||||
using WCS.Model.WebSocketModel;
|
||||
|
||||
namespace WCS.BLL.Services.Service
|
||||
{
|
||||
public class WarningService : IWarningService
|
||||
{
|
||||
public async Task<ResponseCommon<object>> SolveWarning(SolveWarningRequest request)
|
||||
{
|
||||
//获取对应的报警
|
||||
var warning = WarningManager.Warnings
|
||||
.Where(t => t.Guid == request.Guid)
|
||||
.FirstOrDefault();
|
||||
if (warning != null)
|
||||
{
|
||||
WarningManager.ClearWarning(warning, request.SolveType);
|
||||
}
|
||||
//判断一下是否还存在对应报警
|
||||
warning = WarningManager.Warnings
|
||||
.Where(t => t.Guid == request.Guid)
|
||||
.FirstOrDefault();
|
||||
if (warning == null)
|
||||
return new ResponseCommon<object>()
|
||||
{
|
||||
Code = 200,
|
||||
Message = "报警解除成功!"
|
||||
};
|
||||
else
|
||||
{
|
||||
return new ResponseCommon<object>()
|
||||
{
|
||||
Code = 201,
|
||||
Message = "报警解除失败!请重试!"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user