1.增加盟讯公司业务逻辑相关适配 前后端增加配置参数“ISMX”进行控制
2.前端websocket取消心跳机制(原有心跳和断线重连当服务端网线断开后需要等tcp保活期到期后才能发现重连),自己实现心跳和重连 3.前端关闭后任占用后台线程问题修复
This commit is contained in:
@ -44,7 +44,7 @@ namespace WCS.WebApi.Controllers
|
||||
[HttpGet("getLatestAppName")]
|
||||
public ResponseCommon<string> getLatestAppName()
|
||||
{
|
||||
string directoryPath = Path.Combine(Directory.GetCurrentDirectory(), $"Files");
|
||||
string directoryPath = Path.Combine(AppContext.BaseDirectory, $"Files");
|
||||
|
||||
// 获取目录下的所有文件信息
|
||||
FileInfo[] files = Directory.GetFiles(directoryPath, "*.APK")
|
||||
|
@ -86,5 +86,13 @@ namespace WCS.WebApi.Controllers
|
||||
{
|
||||
return await _matInventoryDetailService.getMatInventorySummary(request);
|
||||
}
|
||||
|
||||
[Route("compareMatInventoryDetail")]
|
||||
[HttpPost(Name = "compareMatInventoryDetail")]
|
||||
public async Task<ResponseBase> compareMatInventoryDetail(CompareMatInventoryDetailRequest request)
|
||||
{
|
||||
return await _matInventoryDetailService.compareMatInventoryDetail(request);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,60 +20,76 @@ namespace WebApi
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
//<2F><>ʼ<EFBFBD><CABC>websocket
|
||||
WebSoceketManager.InitWebSocket();
|
||||
|
||||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
|
||||
DbInit.InitDb();
|
||||
|
||||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
||||
LocalFile.SaveConfig();
|
||||
|
||||
//<2F><>ʼ<EFBFBD><CABC>TCP<43><50><EFBFBD><EFBFBD>
|
||||
TCPClientManager.InitTcpClient();
|
||||
|
||||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ShelfManager.InitShelves();
|
||||
|
||||
|
||||
WarningManager.StartWarningMessageThread();
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
builder.Services.AddScoped<IInstoreService, InstoreService>();
|
||||
builder.Services.AddScoped<IOutstoreService, OutstoreService>();
|
||||
builder.Services.AddScoped<IHomerService, HomerService>();
|
||||
builder.Services.AddScoped<IUserService, UserService>();
|
||||
builder.Services.AddScoped<IInterfaceRecordService, InterfaceRecordService>();
|
||||
builder.Services.AddScoped<IMatBaseInfoService, MatBaseInfoService>();
|
||||
builder.Services.AddScoped<IMatInventoryDetailService, MatInventoryDetailService>();
|
||||
builder.Services.AddScoped<IStoreInfoService, StoreInfoService>();
|
||||
builder.Services.AddScoped<IStockTakingService, StockTakingService>();
|
||||
builder.Services.AddScoped<ISelfCheckService, SelfCheckService>();
|
||||
builder.Services.AddScoped<IWarningService, WarningService>();
|
||||
builder.Services.AddScoped<IInOutRecordService, InOutRecordService>();
|
||||
//<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>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseMiddleware<RequestResponseLoggingMiddleware>();
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
try
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
//<2F><>ʼ<EFBFBD><CABC>websocket
|
||||
WebSoceketManager.InitWebSocket();
|
||||
|
||||
app.UseAuthorization();
|
||||
app.MapControllers();
|
||||
app.Run("http://0.0.0.0:8888");//0.0.0.0<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ipv4
|
||||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
|
||||
DbInit.InitDb();
|
||||
|
||||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
||||
LocalFile.SaveConfig();
|
||||
|
||||
//<2F><>ʼ<EFBFBD><CABC>TCP<43><50><EFBFBD><EFBFBD>
|
||||
TCPClientManager.InitTcpClient();
|
||||
|
||||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ܻ<EFBFBD><DCBB><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
ShelfManager.InitShelves();
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ط<EFBFBD><D8B7>߳<EFBFBD>
|
||||
WarningManager.StartWarningMessageThread();
|
||||
|
||||
//<2F><>Ѷ<EFBFBD><D1B6>˾<EFBFBD><CBBE>̨<EFBFBD>߳<EFBFBD>
|
||||
if (LocalFile.Config.IsMx)
|
||||
{
|
||||
MXBackgroundThread.InitBackgroundThread();
|
||||
var str = string.Empty;
|
||||
//MXBackgroundThread.SendDingDingMsg("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>", new List<string> { "104379" }, ref str);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
builder.Services.AddScoped<IInstoreService, InstoreService>();
|
||||
builder.Services.AddScoped<IOutstoreService, OutstoreService>();
|
||||
builder.Services.AddScoped<IHomerService, HomerService>();
|
||||
builder.Services.AddScoped<IUserService, UserService>();
|
||||
builder.Services.AddScoped<IInterfaceRecordService, InterfaceRecordService>();
|
||||
builder.Services.AddScoped<IMatBaseInfoService, MatBaseInfoService>();
|
||||
builder.Services.AddScoped<IMatInventoryDetailService, MatInventoryDetailService>();
|
||||
builder.Services.AddScoped<IStoreInfoService, StoreInfoService>();
|
||||
builder.Services.AddScoped<IStockTakingService, StockTakingService>();
|
||||
builder.Services.AddScoped<ISelfCheckService, SelfCheckService>();
|
||||
builder.Services.AddScoped<IWarningService, WarningService>();
|
||||
builder.Services.AddScoped<IInOutRecordService, InOutRecordService>();
|
||||
//<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>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseMiddleware<RequestResponseLoggingMiddleware>();
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseAuthorization();
|
||||
app.MapControllers();
|
||||
app.Run("http://0.0.0.0:8888");//0.0.0.0<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ipv4
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<DeleteExistingFiles>false</DeleteExistingFiles>
|
||||
<DeleteExistingFiles>true</DeleteExistingFiles>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
@ -13,5 +13,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<_TargetId>Folder</_TargetId>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
<ProjectGuid>118d453b-1693-4c00-8378-20ecbfcf2700</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Reference in New Issue
Block a user