feat(camera): 新增摄像头设备信息查询接口
- 在 CameraController 中添加 LoadCameraInfo 接口用于获取设备信息 - 实现 FireManagementApp 中的 LoadCameraInfo 方法,连接数据库查询监控设备数据 - 引入 ztk_jcjk_jkdw 实体类映射数据库表结构 - 移除项目中冗余的 DaHuaCamera 文件夹引用 - 优化命名空间引入顺序并清理无用 using 语句DataMaintenance
parent
510890b0e1
commit
b2d362b7fe
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using System.Globalization;
|
||||
using InvalidOperationException = System.InvalidOperationException;
|
||||
|
||||
namespace Infrastructure.Helpers
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ using SqlSugar;
|
|||
using System.Net.WebSockets;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Hopetry.App.SugarModel.FeiXianModel.YingJingJu;
|
||||
using Infrastructure.Helpers;
|
||||
using Yitter.IdGenerator;
|
||||
using static Org.BouncyCastle.Math.EC.ECCurve;
|
||||
|
|
@ -1547,5 +1548,42 @@ ORDER BY
|
|||
Message = y.errMsg
|
||||
};
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取设备信息
|
||||
/// </summary>
|
||||
/// <param name="county"></param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
public TableData LoadCameraInfo(string county, int pageIndex, int pageSize)
|
||||
{
|
||||
TableData data = new TableData();
|
||||
ConnectionConfig connectionConfig = new ConnectionConfig
|
||||
{
|
||||
ConnectionString = "server=10.176.126.121;Port=33066;Database=inspur_ztk;Uid=lyyj;Pwd=Lyyj1024",
|
||||
DbType = DbType.MySql,
|
||||
IsAutoCloseConnection = true,
|
||||
MoreSettings = new ConnMoreSettings()
|
||||
{
|
||||
PgSqlIsAutoToLower = false,//增删查改支持驼峰表
|
||||
}
|
||||
};
|
||||
using (SqlSugarClient db = new SqlSugarClient(connectionConfig))
|
||||
{
|
||||
int totalCount = 0;
|
||||
var list = db.Queryable<ztk_jcjk_jkdw>()
|
||||
.WhereIF(!string.IsNullOrEmpty(county), r => r.qx.Contains(county))
|
||||
.Select(r => new ztk_jcjk_jkdw()
|
||||
{
|
||||
id = r.id.SelectAll(),
|
||||
})
|
||||
.ToPageList(pageIndex, pageSize, ref totalCount);
|
||||
data.data = list;
|
||||
data.count = totalCount;
|
||||
data.code = 200;
|
||||
data.msg = "请求成功";
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Hopetry.App.SugarModel.FeiXianModel.YingJingJu
|
||||
{
|
||||
[SugarTable("ztk_jcjk_jkdw")]
|
||||
public class ztk_jcjk_jkdw
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int id { get; set; } // 主键
|
||||
public string ssfz { get; set; } // 所属分组
|
||||
public string jkdmckjg { get; set; } // 监控点可见光名称
|
||||
public string jkdmcrcx { get; set; } // 监控点热成像名称
|
||||
public string jkdgbidzlkjg { get; set; } // 监控点可见光国标ID(主流)
|
||||
public string jkdgbidzlrcx { get; set; } // 监控点热成像国标ID(主流)
|
||||
public string jkdgbidfl { get; set; } // 监控点国标ID(辅流)
|
||||
public string sssbgbid { get; set; } // 所属设备国标ID
|
||||
public string sbidkjg { get; set; } // 设备可见光ID
|
||||
public string sbidrcx { get; set; } // 设备热成像ID
|
||||
public string sbip { get; set; } // 设备IP
|
||||
public string zxzt { get; set; } // 在线状态
|
||||
public string qdlxzt { get; set; } // 前端录像状态
|
||||
public string ptlxkqzt { get; set; } // 平台录像开启状态
|
||||
public string ptlxzt { get; set; } // 平台录像状态
|
||||
public decimal jd { get; set; } // 经度
|
||||
public decimal wd { get; set; } // 纬度
|
||||
public string tyzt { get; set; } // 停用状态
|
||||
public string qx { get; set; } // 区县
|
||||
public string jklx { get; set; } // 监控类型
|
||||
public int isshow { get; set; }//是否显示
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
using Infrastructure;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using OpenAuth.App.Response;
|
||||
using OpenAuth.App.ServiceApp.FireManagement;
|
||||
|
||||
namespace OpenAuth.WebApi.Controllers.ServiceControllers.FireManagement;
|
||||
|
|
@ -40,4 +41,19 @@ public class CameraController : ControllerBase
|
|||
{
|
||||
return await _app.GetDaHuaRtsp(channelCode, streamType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备信息
|
||||
/// </summary>
|
||||
/// <param name="county">县区</param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public TableData LoadCameraInfo(string county, int pageIndex, int pageSize)
|
||||
{
|
||||
return _app.LoadCameraInfo(county, pageIndex, pageSize);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -82,7 +82,6 @@
|
|||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\BaseControllers\Permission\" />
|
||||
<Folder Include="Controllers\ServiceControllers\DaHuaCamera\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Reference in New Issue