Compare commits
2 Commits
11f3b2b439
...
0f559b3fb7
| Author | SHA1 | Date |
|---|---|---|
|
|
0f559b3fb7 | |
|
|
6a9595f127 |
|
|
@ -123,7 +123,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();
|
||||
|
|
@ -139,7 +139,8 @@ namespace OpenAuth.App.ServiceApp.Algo
|
|||
Lng = (double?)item.longitude ?? 0.0,
|
||||
Lat = (double?)item.latitude ?? 0.0,
|
||||
CompareIndex = index,
|
||||
GroupId = compareGroupId
|
||||
GroupId = compareGroupId,
|
||||
CompareCount = regionArray.Length
|
||||
|
||||
};
|
||||
// 如果是第二张图片 -> 画区域 + 上传
|
||||
|
|
@ -178,7 +179,8 @@ namespace OpenAuth.App.ServiceApp.Algo
|
|||
Lng = (double?)item.longitude ?? 0.0,
|
||||
Lat = (double?)item.latitude ?? 0.0,
|
||||
CompareIndex = index,
|
||||
GroupId = compareGroupId
|
||||
GroupId = compareGroupId,
|
||||
CompareCount = regionArray.Length
|
||||
};
|
||||
// 如果是第二张图片 -> 画区域 + 上传
|
||||
if (index == 1)
|
||||
|
|
|
|||
|
|
@ -1,17 +1,18 @@
|
|||
using OpenAuth.App.BaseApp.Base;
|
||||
using OpenAuth.Repository.Domain;
|
||||
using DocumentFormat.OpenXml.EMMA;
|
||||
using Infrastructure;
|
||||
using Infrastructure.CloudSdk.minio;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using OpenAuth.App.BaseApp.Base;
|
||||
using OpenAuth.App.Interface;
|
||||
using OpenAuth.App.ServiceApp.Response;
|
||||
using OpenAuth.Repository;
|
||||
using OpenAuth.Repository.Domain;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Infrastructure.CloudSdk.minio;
|
||||
using OpenAuth.App.Interface;
|
||||
using SqlSugar;
|
||||
using Infrastructure;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using DocumentFormat.OpenXml.EMMA;
|
||||
|
||||
namespace OpenAuth.App.ServiceApp
|
||||
{
|
||||
|
|
@ -220,6 +221,24 @@ namespace OpenAuth.App.ServiceApp
|
|||
};
|
||||
}
|
||||
}
|
||||
public async Task<Response<ChangeDetectionResp>> GetChangeDetectionById(string id)
|
||||
{
|
||||
using (var db = UnitWork.CreateContext())
|
||||
{
|
||||
ChangeDetectionResp changeDetectionResp = new ChangeDetectionResp();
|
||||
var info = await db.Lasa_ChangeDetection.GetByIdAsync(id);
|
||||
if (info != null)
|
||||
{
|
||||
changeDetectionResp = info.MapTo<ChangeDetectionResp>();
|
||||
changeDetectionResp.AiAchievementDetailList = await db.LasaAiAchievementDetail.AsQueryable().Where(r => r.AiAchievementId == info.AiAchievementId).ToListAsync();
|
||||
}
|
||||
return new Response<ChangeDetectionResp>
|
||||
{
|
||||
Result = changeDetectionResp,
|
||||
Message = "获取数据成功"
|
||||
};
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
using OpenAuth.Repository.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenAuth.App.ServiceApp.Response
|
||||
{
|
||||
public class ChangeDetectionResp
|
||||
{
|
||||
public string Id { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
public string FirstId { get; set; }
|
||||
|
||||
public string FirstName { get; set; }
|
||||
|
||||
public string SecondId { get; set; }
|
||||
public string SecondName { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public long CreateId { get; set; }
|
||||
public string AiAchievementId { get; set; }
|
||||
public bool IsFinish { get; set; }
|
||||
public List<LasaAiAchievementDetail> AiAchievementDetailList { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -7,16 +7,13 @@ public class LasaAiAchievementDetail
|
|||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public string Id { get; set; }
|
||||
public string Image { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Image")] public string Image { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "AiAchievementId")]
|
||||
public string AiAchievementId { get; set; }
|
||||
[SugarColumn(ColumnName = "Lng")]
|
||||
public double Lng { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Lat")]
|
||||
public double Lat { get; set; }
|
||||
public string GroupId { get; set; }
|
||||
public int CompareIndex { get; set; }
|
||||
public int CompareIndex { get; set; }
|
||||
public int CompareCount { get; set; }
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ using Infrastructure.CloudSdk.minio;
|
|||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using OpenAuth.App.ServiceApp;
|
||||
using OpenAuth.App.ServiceApp.Response;
|
||||
using OpenAuth.Repository.Domain;
|
||||
using System.Net.Http;
|
||||
|
||||
|
|
@ -27,7 +28,6 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
/// <param name="info"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public async Task<Response<bool>> AddAlgorithmsRepository(LasaAlgorithmsRepository info)
|
||||
{
|
||||
var result = new Response<bool>();
|
||||
|
|
@ -48,7 +48,6 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
/// <param name="info"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public async Task<Response<bool>> UpdateAlgorithmsRepository(LasaAlgorithmsRepository info)
|
||||
{
|
||||
var result = new Response<bool>();
|
||||
|
|
@ -69,7 +68,6 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public async Task<Response<bool>> DeleteAlgorithmsRepository(string id)
|
||||
{
|
||||
var result = new Response<bool>();
|
||||
|
|
@ -91,7 +89,6 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
/// <param name="limit"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public async Task<Response<PageInfo<List<LasaAlgorithmsRepository>>>> GetAlgorithmsRepositoryList(int page, int limit, string key)
|
||||
{
|
||||
var result = new Response<PageInfo<List<LasaAlgorithmsRepository>>>();
|
||||
|
|
@ -116,7 +113,6 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public async Task<Response<PageInfo<List<Lasa_ChangeDetection>>>> GetChangeDetectionPageList(int page, int limit, string key)
|
||||
{
|
||||
var result = new Response<PageInfo<List<Lasa_ChangeDetection>>>();
|
||||
|
|
@ -137,7 +133,6 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
/// <param name="info"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public async Task<Response<string>> AddChangeDetection(Lasa_ChangeDetection info)
|
||||
{
|
||||
var result = new Response<string>();
|
||||
|
|
@ -158,7 +153,6 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public async Task<Response<bool>> DeleteChangeDetection(string id)
|
||||
{
|
||||
var result = new Response<bool>();
|
||||
|
|
@ -173,6 +167,26 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
}
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 检测详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<Response<ChangeDetectionResp>> GetChangeDetectionById(string id)
|
||||
{
|
||||
var result = new Response<ChangeDetectionResp>();
|
||||
try
|
||||
{
|
||||
result = await _app.GetChangeDetectionById(id);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.Code = 500;
|
||||
result.Message = ex.Message;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,6 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
/// <param name="secondId"></param>
|
||||
/// <param name="cdId"></param>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public async Task<Response<string>> BehaviorAlarm(string firstId, string secondId, string cdId)
|
||||
{
|
||||
var mq = await RabbitMqSender.CreateAsync("123.132.248.154", 9103, "DHCloudg1", "Cloud0#4fCraQrm");
|
||||
|
|
|
|||
Loading…
Reference in New Issue