打卡点排序,火情线索查询修改
parent
f09891b466
commit
c983df681d
|
|
@ -824,7 +824,7 @@ namespace OpenAuth.App.ServiceApp.FireManagement
|
|||
}
|
||||
}
|
||||
|
||||
public async Task<Response<List<FireInfoStateForChart>>> GetFireClueStatisticsByState(int type)
|
||||
public async Task<Response<List<FireInfoStateForChart>>> GetFireClueStatisticsByState(int type,List<int> sourcetype)
|
||||
{
|
||||
using (var db = base.UnitWork.CreateContext())
|
||||
{
|
||||
|
|
@ -889,6 +889,7 @@ namespace OpenAuth.App.ServiceApp.FireManagement
|
|||
|
||||
// 查询实际数据
|
||||
var dataQuery = await db.FmFireclueInfo.AsQueryable()
|
||||
.WhereIF(sourcetype.Count>0,r=>sourcetype.Contains(r.SourceType))
|
||||
.Where(r => r.ReportTime >= startDate && r.ReportTime <= endDate)
|
||||
.GroupBy(r => new { r.ReportTime.Date })
|
||||
.Select(r => new FireInfoState
|
||||
|
|
@ -932,6 +933,7 @@ namespace OpenAuth.App.ServiceApp.FireManagement
|
|||
|
||||
// 查询数据
|
||||
var data = await db.FmFireclueInfo.AsQueryable()
|
||||
.WhereIF(sourcetype.Count > 0, r => sourcetype.Contains(r.SourceType))
|
||||
.Where(r => r.ReportTime >= startDate && r.ReportTime <= endDate)
|
||||
.GroupBy(r => new { r.ReportTime.Year, r.ReportTime.Month })
|
||||
.Select(r => new
|
||||
|
|
@ -970,6 +972,7 @@ namespace OpenAuth.App.ServiceApp.FireManagement
|
|||
|
||||
// 查询数据
|
||||
var queryData = await db.FmFireclueInfo.AsQueryable()
|
||||
.WhereIF(sourcetype.Count > 0, r => sourcetype.Contains(r.SourceType))
|
||||
.Where(r => r.ReportTime.Year >= startYear && r.ReportTime.Year <= currentYear)
|
||||
.GroupBy(r => r.ReportTime.Year)
|
||||
.Select(r => new
|
||||
|
|
|
|||
|
|
@ -514,14 +514,15 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers.FireManagement
|
|||
/// 按状态统计火情线索
|
||||
/// </summary>
|
||||
/// <param name="type">1-日,2-月,3-年</param>
|
||||
/// <param name="sourcetype">来源类型APP = 1 高空瞭望 = 2无人机 = 3人工合并 = 4,公众反馈=5 卫星遥感=6,摄像头=7</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<Response<List<FireInfoStateForChart>>> GetFireClueStatisticsByState(int type)
|
||||
public async Task<Response<List<FireInfoStateForChart>>> GetFireClueStatisticsByState(int type,List<int> sourcetype)
|
||||
{
|
||||
Response<List<FireInfoStateForChart>> response = new Response<List<FireInfoStateForChart>>();
|
||||
try
|
||||
{
|
||||
return await _app.GetFireClueStatisticsByState(type);
|
||||
return await _app.GetFireClueStatisticsByState(type,sourcetype);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue