Merge remote-tracking branch 'origin/main'
commit
c11ede3fc1
|
|
@ -1,6 +1,7 @@
|
||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
using Infrastructure.CloudSdk.minio;
|
using Infrastructure.CloudSdk.minio;
|
||||||
using Infrastructure.Extensions;
|
using Infrastructure.Extensions;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using Minio;
|
using Minio;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using OpenAuth.App.BaseApp.Base;
|
using OpenAuth.App.BaseApp.Base;
|
||||||
|
|
@ -27,10 +28,12 @@ namespace OpenAuth.App.ServiceApp.Algo
|
||||||
public class DaHuaAiApp : SqlSugarBaseApp<LasaAlgorithmsRepository, SugarDbContext>
|
public class DaHuaAiApp : SqlSugarBaseApp<LasaAlgorithmsRepository, SugarDbContext>
|
||||||
{
|
{
|
||||||
public MinioService _minioService;
|
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)
|
ISimpleClient<LasaAlgorithmsRepository> repository, IAuth auth) : base(unitWork, repository, auth)
|
||||||
{
|
{
|
||||||
_minioService = minioService;
|
_minioService = minioService;
|
||||||
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 大华算法
|
#region 大华算法
|
||||||
|
|
@ -46,6 +49,9 @@ namespace OpenAuth.App.ServiceApp.Algo
|
||||||
List<dynamic> dataList = new List<dynamic>();
|
List<dynamic> dataList = new List<dynamic>();
|
||||||
if (imageList1.Count() != imageList2.Count())
|
if (imageList1.Count() != imageList2.Count())
|
||||||
{
|
{
|
||||||
|
//删除检测记录
|
||||||
|
await db.Lasa_ChangeDetection.DeleteByIdAsync(cdid);
|
||||||
|
db.Commit();
|
||||||
throw new Exception("任务照片数量不对应,请重新选择任务");
|
throw new Exception("任务照片数量不对应,请重新选择任务");
|
||||||
}
|
}
|
||||||
for (int i = 0; i < imageList1.Count; i++)
|
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)
|
public async Task<Response<bool>> AddDaHuaImg(string info)
|
||||||
{
|
{
|
||||||
Console.WriteLine(info);
|
Console.WriteLine(info);
|
||||||
|
_logger.LogError("耕地破坏报警数据;" + info);
|
||||||
using (var db = UnitWork.CreateContext())
|
using (var db = UnitWork.CreateContext())
|
||||||
{
|
{
|
||||||
var data = JsonConvert.DeserializeObject<dynamic>(info);
|
var data = JsonConvert.DeserializeObject<dynamic>(info);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue