Merge remote-tracking branch 'origin/main'
commit
c11ede3fc1
|
|
@ -1,6 +1,7 @@
|
|||
using Infrastructure;
|
||||
using Infrastructure.CloudSdk.minio;
|
||||
using Infrastructure.Extensions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Minio;
|
||||
using Newtonsoft.Json;
|
||||
using OpenAuth.App.BaseApp.Base;
|
||||
|
|
@ -27,10 +28,12 @@ namespace OpenAuth.App.ServiceApp.Algo
|
|||
public class DaHuaAiApp : SqlSugarBaseApp<LasaAlgorithmsRepository, SugarDbContext>
|
||||
{
|
||||
public MinioService _minioService;
|
||||
public DaHuaAiApp(ISugarUnitOfWork<SugarDbContext> unitWork, MinioService minioService,
|
||||
private readonly ILogger<DaHuaAiApp> _logger;
|
||||
public DaHuaAiApp(ISugarUnitOfWork<SugarDbContext> unitWork, MinioService minioService, ILogger<DaHuaAiApp> logger,
|
||||
ISimpleClient<LasaAlgorithmsRepository> repository, IAuth auth) : base(unitWork, repository, auth)
|
||||
{
|
||||
_minioService = minioService;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
#region 大华算法
|
||||
|
|
@ -46,6 +49,9 @@ namespace OpenAuth.App.ServiceApp.Algo
|
|||
List<dynamic> dataList = new List<dynamic>();
|
||||
if (imageList1.Count() != imageList2.Count())
|
||||
{
|
||||
//删除检测记录
|
||||
await db.Lasa_ChangeDetection.DeleteByIdAsync(cdid);
|
||||
db.Commit();
|
||||
throw new Exception("任务照片数量不对应,请重新选择任务");
|
||||
}
|
||||
for (int i = 0; i < imageList1.Count; i++)
|
||||
|
|
@ -114,6 +120,7 @@ namespace OpenAuth.App.ServiceApp.Algo
|
|||
public async Task<Response<bool>> AddDaHuaImg(string info)
|
||||
{
|
||||
Console.WriteLine(info);
|
||||
_logger.LogError("耕地破坏报警数据;" + info);
|
||||
using (var db = UnitWork.CreateContext())
|
||||
{
|
||||
var data = JsonConvert.DeserializeObject<dynamic>(info);
|
||||
|
|
@ -123,7 +130,7 @@ namespace OpenAuth.App.ServiceApp.Algo
|
|||
string detectRegionJson = JsonConvert.SerializeObject(data.info.detectRegion);
|
||||
//string detectRegionJson = "[[0, 0],[8063, 647],[8017, 7774],[552, 8033]]";
|
||||
//string url = "http://123.132.248.154:6015/DroneEnforcement/2025/20250514/lQLPJyIVimQWGKnNA4PNA6Gw1D3q5gbxUvQIiumcIx4vAA_929_899.png";
|
||||
var regionArray = JsonConvert.DeserializeObject<int[][]>(detectRegionJson);
|
||||
var regionArray = JsonConvert.DeserializeObject<int[][]>(detectRegionJson);
|
||||
if (oldinfo != null)
|
||||
{
|
||||
string compareGroupId = Guid.NewGuid().ToString();
|
||||
|
|
|
|||
Loading…
Reference in New Issue