|
|
|
@ -5,13 +5,18 @@ using Microsoft.Extensions.Configuration;
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
using NeoSmart.Caching.Sqlite;
|
|
|
|
using NeoSmart.Caching.Sqlite;
|
|
|
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using Sln.Wcs.HikRoBotAdapter.Domain.Dto.GbTaskSubmit;
|
|
|
|
using Sln.Wcs.HikRoBotAdapter.Domain.Dto.GbTaskSubmit;
|
|
|
|
using Sln.Wcs.HikRoBotAdapter.Domain.Dto.GenAgvSchedulingTask;
|
|
|
|
using Sln.Wcs.HikRoBotAdapter.Domain.Dto.GenAgvSchedulingTask;
|
|
|
|
using Sln.Wcs.HikRoBotAdapter.Service;
|
|
|
|
using Sln.Wcs.HikRoBotAdapter.Service;
|
|
|
|
using Sln.Wcs.HikRoBotAdapter.Service.Impl;
|
|
|
|
using Sln.Wcs.HikRoBotAdapter.Service.Impl;
|
|
|
|
|
|
|
|
using Sln.Wcs.HoistSdk;
|
|
|
|
|
|
|
|
using Sln.Wcs.HoistSdk.Dto.GetHoistStatus;
|
|
|
|
|
|
|
|
using Sln.Wcs.Model.Domain;
|
|
|
|
using Sln.Wcs.Repository;
|
|
|
|
using Sln.Wcs.Repository;
|
|
|
|
using Sln.Wcs.Serilog;
|
|
|
|
using Sln.Wcs.Serilog;
|
|
|
|
using Sln.Wcs.Plc;
|
|
|
|
using Sln.Wcs.Plc;
|
|
|
|
|
|
|
|
using Sln.Wcs.Repository.service;
|
|
|
|
using Sln.Wcs.Strategy;
|
|
|
|
using Sln.Wcs.Strategy;
|
|
|
|
using ZiggyCreatures.Caching.Fusion;
|
|
|
|
using ZiggyCreatures.Caching.Fusion;
|
|
|
|
using ZiggyCreatures.Caching.Fusion.Serialization.NewtonsoftJson;
|
|
|
|
using ZiggyCreatures.Caching.Fusion.Serialization.NewtonsoftJson;
|
|
|
|
@ -43,16 +48,19 @@ namespace Sln.Wcs
|
|
|
|
handler.ServerCertificateCustomValidationCallback = (_, _, _, _) => true;
|
|
|
|
handler.ServerCertificateCustomValidationCallback = (_, _, _, _) => true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var service = serviceProvider.GetService<HikRoBotService>();
|
|
|
|
// var service = serviceProvider.GetService<HikRoBotService>();
|
|
|
|
var res = service.GbTaskSubmit(new GbTaskSubmitDto()
|
|
|
|
// var res = service.GbTaskSubmit(new GbTaskSubmitDto()
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
TaskType = "PF-FMR-COMMON",
|
|
|
|
// TaskType = "PF-FMR-COMMON",
|
|
|
|
TargetRoute = new List<TargetRoute>()
|
|
|
|
// TargetRoute = new List<TargetRoute>()
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
new TargetRoute(){Type = "STORAGE",Code = "R5001A02011"},
|
|
|
|
// new TargetRoute(){Type = "STORAGE",Code = "R5001A02011"},
|
|
|
|
new TargetRoute(){Type = "STORAGE",Code = "R5001A01011"}
|
|
|
|
// new TargetRoute(){Type = "STORAGE",Code = "R5001A01011"}
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var service = serviceProvider.GetService<IHoistSdk>();
|
|
|
|
|
|
|
|
service.GetHoistStatus(new GetHoistStatusDto());
|
|
|
|
|
|
|
|
|
|
|
|
Task.Delay(-1).Wait();
|
|
|
|
Task.Delay(-1).Wait();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -98,6 +106,7 @@ namespace Sln.Wcs
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CachePath = apolloConfiguration["cachePath"]
|
|
|
|
CachePath = apolloConfiguration["cachePath"]
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
@ -108,8 +117,6 @@ namespace Sln.Wcs
|
|
|
|
/// <param name="apolloConfiguration"></param>
|
|
|
|
/// <param name="apolloConfiguration"></param>
|
|
|
|
private static void ApolloConfigureServices(IServiceCollection services, ref string basePath, out IConfiguration apolloConfiguration)
|
|
|
|
private static void ApolloConfigureServices(IServiceCollection services, ref string basePath, out IConfiguration apolloConfiguration)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var localConfiguration = new ConfigurationBuilder()
|
|
|
|
var localConfiguration = new ConfigurationBuilder()
|
|
|
|
.SetBasePath(basePath)
|
|
|
|
.SetBasePath(basePath)
|
|
|
|
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
|
|
|
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
|
|
|
@ -128,8 +135,8 @@ namespace Sln.Wcs
|
|
|
|
apolloConfiguration = configurationBuilder.Build();
|
|
|
|
apolloConfiguration = configurationBuilder.Build();
|
|
|
|
|
|
|
|
|
|
|
|
services.Remove(new ServiceDescriptor(typeof(IConfiguration), localConfiguration));
|
|
|
|
services.Remove(new ServiceDescriptor(typeof(IConfiguration), localConfiguration));
|
|
|
|
|
|
|
|
|
|
|
|
services.AddSingleton<IConfiguration>(apolloConfiguration);
|
|
|
|
services.AddSingleton<IConfiguration>(apolloConfiguration);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|