添加报警窗口

出库流程调试、优化
This commit is contained in:
hehaibing-1996
2024-05-05 16:57:20 +08:00
parent d283924ae1
commit 311a695498
44 changed files with 2272 additions and 307 deletions

View File

@ -77,7 +77,7 @@ namespace WCS.WebApi.Controllers
{
ShelfId = t.ShelfId,
ShelfCode = t.ShelfCode,
CurentMode = (int)t.CurentMode,
CurentMode = (int)t.CurrentMode,
ModulesStr = t.ModulesStr,
GroupName = t.GroupName
}).ToList(),

View File

@ -178,7 +178,7 @@ namespace WebApi.Controllers
return new ResponseBase()
{
Code = 300,
Message = "<22><>ѯʧ<EFBFBD>ܣ<EFBFBD>" + ex.Message,
Message = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽʧ<EFBFBD>ܣ<EFBFBD>" + ex.Message,
};
}
}

View File

@ -0,0 +1,31 @@
using Microsoft.AspNetCore.Mvc;
using WCS.BLL.Services.IService;
using WCS.Model;
using WCS.Model.ApiModel;
using WCS.Model.ApiModel.User;
using WCS.Model.WebSocketModel;
namespace WCS.WebApi.Controllers
{
/// <summary>
/// 权限/用户界面的接口
/// </summary>
[ApiController]
[Route("[controller]")]
public class WarningController : ControllerBase
{
public IWarningService _warningService { get; set; }
public WarningController(IWarningService warningService)
{
_warningService = warningService;
}
[Route("solveWarning")]
[HttpPost(Name = "solveWarning")]
public async Task<ResponseBase> SolveWarning(SolveWarningRequest request)
{
return await _warningService.SolveWarning(request);
}
}
}

View File

@ -21,34 +21,22 @@ namespace WebApi
{
WebSoceketManager.InitWebSocket();
//LocalStatic.wCSTcpCleint = new WCS.BLL.TCPClient("127.0.0.1:20002");
//LocalStatic.wCSTcpCleint.Send(new byte[] { 0x08, 0x00, 0x00, 0x11, 0x12, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
DbInit.InitDb();
LocalFile.SaveConfig();
ShelfManager.InitShelves();
TCPClientManager.InitTcpClient();
ShelfManager.InitShelves();
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD>ƺͰ<C6BA><CDB0><EFBFBD>
TCPClientManager.InitStatus();
var builder = WebApplication.CreateBuilder(args);
//// <20><><EFBFBD><EFBFBD>Kestrel
//builder.WebHost.ConfigureKestrel((context, options) =>
//{
// // <20><><EFBFBD>ü<EFBFBD><C3BC><EFBFBD><EFBFBD>˿<EFBFBD>
// options.Listen(IPAddress.Any, 8888); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IP<49><50>ַ<EFBFBD><D6B7>5001<30>˿<EFBFBD>
WarningManager.StartWarningMessageThread();
// // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// options.Limits.MaxRequestBodySize = 10 * 1024 * 1024; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>СΪ10MB
// options.Limits.MaxConcurrentConnections = 1000; // <20><><EFBFBD>󲢷<EFBFBD><F3B2A2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// options.Limits.MinRequestBodyDataRate = new MinDataRate(bytesPerSecond: 100, gracePeriod: TimeSpan.FromSeconds(10)); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
var builder = WebApplication.CreateBuilder(args);
// // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>SSL/TLS<4C><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD>
// // <20><><EFBFBD><EFBFBD>: options.Listen(IPAddress.Any, 5000, listenOptions => { listenOptions.UseHttps("path_to_certificate.pfx", "certificate_password"); });
//});
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
@ -65,6 +53,7 @@ namespace WebApi
builder.Services.AddScoped<IStoreInfoService, StoreInfoService>();
builder.Services.AddScoped<IStockTakingService, StockTakingService>();
builder.Services.AddScoped<ISelfCheckService, SelfCheckService>();
builder.Services.AddScoped<IWarningService, WarningService>();
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA1A2><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD>ģʽ
builder.Services.AddSingleton<IGenerateService, GenerateService>();