@ -25,7 +25,7 @@ namespace OpenAuth.App.ServiceApp
private readonly IConfiguration _configuration ;
private readonly ISqlSugarClient _client ;
private readonly MinioService _minioService ;
public AirportMaintenanceApp ( MinioService minioService , ISqlSugarClient client , ISugarUnitOfWork < SugarDbContext > unitWork , IConfiguration configuration , ISimpleClient < LasaDronePort > repository , IAuth auth ) : base ( unitWork , repository , auth )
public AirportMaintenanceApp ( MinioService minioService , ISqlSugarClient client , ISugarUnitOfWork < SugarDbContext > unitWork , IConfiguration configuration , ISimpleClient < LasaDronePort > repository , IAuth auth ) : base ( unitWork , repository , auth )
{
_configuration = configuration ;
_client = client ;
@ -308,7 +308,7 @@ namespace OpenAuth.App.ServiceApp
}
}
//根据时间获取告警信息列表
public async Task < Response < PageInfo < List < LasaManageDeviceHms > > > > GetManageDeviceHmsList ( int level , int model , DateTime startTime , DateTime endTime , int page , int limit , string message )
public async Task < Response < PageInfo < List < LasaManageDeviceHms > > > > GetManageDeviceHmsList ( int level , int model , DateTime startTime , DateTime endTime , int page , int limit , string message , string getway )
{
RefAsync < int > totalCount = 0 ;
using ( var db = UnitWork . CreateContext ( ) )
@ -318,6 +318,7 @@ namespace OpenAuth.App.ServiceApp
. WhereIF ( level ! = 0 , x = > x . Level = = level )
. WhereIF ( model ! = 0 , x = > x . Module = = model )
. WhereIF ( ! string . IsNullOrEmpty ( message ) , x = > x . MessageZh . Contains ( message ) )
. WhereIF ( ! string . IsNullOrEmpty ( getway ) , x = > x . Sn = = getway )
. OrderBy ( x = > x . CreateTime , OrderByType . Desc )
. ToPageListAsync ( page , limit , totalCount ) ;
return new Response < PageInfo < List < LasaManageDeviceHms > > >
@ -397,7 +398,7 @@ namespace OpenAuth.App.ServiceApp
public async Task < Response < string > > UpdatePicStatus ( string id , int showOnMap , int display , string fileTags , string graffitiJson )
{
string sql = "update lasa_mediafile set \"ShowOnMap\"=" + showOnMap + ",display=" + display + ",\"FileTags\"='" + fileTags + "',\"GraffitiJson\"='" + graffitiJson + "' where \"Id\"='" + id + "'" ;
string sql = "update lasa_mediafile set \"ShowOnMap\"=" + showOnMap + ",display=" + display + ",\"FileTags\"='" + fileTags + "',\"GraffitiJson\"='" + graffitiJson + "' where \"Id\"='" + id + "'" ;
await _client . Ado . ExecuteCommandAsync ( sql ) ;
return new Response < string > { Result = "修改成功!" } ;
}
@ -408,9 +409,9 @@ namespace OpenAuth.App.ServiceApp
for ( int i = 0 ; i < idarray . Length ; i + + )
{
string sqlselect = "select \"ObjectKey\" from lasa_mediafile where \"Id\"='" + idarray [ i ] + "'" ;
string sqlselect = "select \"ObjectKey\" from lasa_mediafile where \"Id\"='" + idarray [ i ] + "'" ;
string objectkey = _client . Ado . SqlQuerySingle < string > ( sqlselect ) ;
string sql = "delete from lasa_mediafile where \"Id\"='" + idarray [ i ] + "'" ;
string sql = "delete from lasa_mediafile where \"Id\"='" + idarray [ i ] + "'" ;
await _client . Ado . ExecuteCommandAsync ( sql ) ;
await _minioService . DeleteFile ( objectkey ) ;