zhangbin 2025-10-30 16:19:44 +08:00
commit 6bcd9dc606
4 changed files with 2691 additions and 5 deletions

View File

@ -15,6 +15,7 @@
<PackageReference Include="DocXCore.Standard" Version="1.0.1" />
<PackageReference Include="EnyimMemcachedCore" Version="2.6.4" />
<PackageReference Include="ExifLib" Version="1.7.0" />
<PackageReference Include="HidSharp" Version="2.6.4" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="MetadataExtractor" Version="2.8.1" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.8" />

View File

@ -1,4 +1,5 @@
using SqlSugar;
using NetTopologySuite.Geometries;
using SqlSugar;
namespace OpenAuth.Repository.Domain
{
@ -29,7 +30,7 @@ namespace OpenAuth.Repository.Domain
public string WorkSpaceId { get; set; }
public string GateWay { get; set; }
//
public string WorkArea { get; set; }
public Geometry WorkArea { get; set; }
public int? Status { get; set; }
[Navigate(NavigateType.OneToMany, nameof(LasaUav.PId))]

View File

@ -1,9 +1,53 @@
using Autofac.Extensions.DependencyInjection;
using Autofac;
using Autofac;
using Autofac.Extensions.DependencyInjection;
using HidSharp;
using OpenAuth.WebApi;
using SoftKey;
var builder = WebApplication.CreateBuilder(args);
/*
var list = DeviceList.Local;
var ytsoftkey = new F2K();
list.Changed += (sender, args) =>
{
if (ytsoftkey.CheckKeyByFindort_2() != 0)
{
Console.WriteLine(" 加密锁被拨出。");
throw new Exception("加密锁被拨出。");
}
};
String DevicePath = null;
short verex = 0;
short ver = 0;
//这个用于判断系统中是否存在着加密锁。不需要是指定的加密锁,
int ret = ytsoftkey.FindPort(0, ref DevicePath);
if (ret != 0)
{
throw new Exception("未找到加密锁,请插入加密锁后,再进行操作。");
}
// 从加密狗中读取密钥
String str = "";
byte[] length = new byte[1];
ret = ytsoftkey.YRead(length, 0, 1, "E1930089", "C7326137", DevicePath);
if (ret != 0)
{
throw new Exception("读取加密狗数据失败1");
}
ret = ytsoftkey.YReadString(ref str, 1, length[0], "E1930089", "C7326137", DevicePath);
if (ret != 0)
{
throw new Exception("读取加密狗数据失败2");
}
Console.WriteLine("读取数据:" + str);
*/
var startup = new Startup(builder.Configuration);
startup.ConfigureServices(builder.Services);
builder.Host.UseServiceProviderFactory(new AutofacServiceProviderFactory());
@ -14,4 +58,4 @@ startup.Configure(app, app.Environment);
//var url = app.Configuration.GetValue<string>("AppSetting:HttpHost");
//app.Urls.Add(url);
app.Run();
app.Run();

2640
OpenAuth.WebApi/SoftKey.cs Normal file

File diff suppressed because it is too large Load Diff