Compare commits
3 Commits
402d320958
...
d0ef3710c5
| Author | SHA1 | Date |
|---|---|---|
|
|
d0ef3710c5 | |
|
|
0da536dd6d | |
|
|
d9e7dc83e0 |
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Net.WebSockets;
|
using System.Net.WebSockets;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using DocumentFormat.OpenXml.EMMA;
|
||||||
using Hopetry.App.SugarModel.CommonModel;
|
using Hopetry.App.SugarModel.CommonModel;
|
||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
|
@ -332,7 +333,6 @@ namespace OpenAuth.App.ServiceApp.FireManagement
|
||||||
return new Response<FmFireclueInfo> { Result = info };
|
return new Response<FmFireclueInfo> { Result = info };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Response<dynamic>> LoadClueWithInfoById(long id)
|
public async Task<Response<dynamic>> LoadClueWithInfoById(long id)
|
||||||
{
|
{
|
||||||
using (var db = base.UnitWork.CreateContext())
|
using (var db = base.UnitWork.CreateContext())
|
||||||
|
|
@ -362,7 +362,33 @@ namespace OpenAuth.App.ServiceApp.FireManagement
|
||||||
return new Response<List<FmFireclueInfo>> { Result = list };
|
return new Response<List<FmFireclueInfo>> { Result = list };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 修改火情线索状态
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="state"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<Response<bool>> UpdatFireState(long id, int state)
|
||||||
|
{
|
||||||
|
using (var db = base.UnitWork.CreateContext())
|
||||||
|
{
|
||||||
|
var userId = _auth.GetCurrentUser().User.Id;
|
||||||
|
await db.FmFireclueInfo.UpdateAsync(r => new FmFireclueInfo
|
||||||
|
{
|
||||||
|
State = state,
|
||||||
|
ModifyTime = DateTime.Now,
|
||||||
|
ModifyId = userId
|
||||||
|
}, r => r.Id == id);
|
||||||
|
if (db.Commit())
|
||||||
|
{
|
||||||
|
return new Response<bool> { Result = true, Message = "操作成功" };
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new Response<bool> { Result = false, Message = "操作失败" };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//按月统计火情线索
|
//按月统计火情线索
|
||||||
public async Task<Response<List<FireInfoForChart>>> GetFireClueStatistics(int type)
|
public async Task<Response<List<FireInfoForChart>>> GetFireClueStatistics(int type)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ namespace OpenAuth.Repository.Domain.FireManagement
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 上报人id
|
/// 上报人id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CreateId { get; set; }
|
public long CreateId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 地区名称
|
/// 地区名称
|
||||||
|
|
@ -73,7 +73,7 @@ namespace OpenAuth.Repository.Domain.FireManagement
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改人id
|
/// 修改人id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ModifyId { get; set; }
|
public long ModifyId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改时间
|
/// 修改时间
|
||||||
|
|
|
||||||
|
|
@ -258,5 +258,6 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers.FireManagement
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -290,6 +290,27 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers.FireManagement
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 修改案件状态
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="state"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<Response<bool>> UpdatFireStateById(long id, int state)
|
||||||
|
{
|
||||||
|
Response<bool> response = new Response<bool>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return await _app.UpdatFireState(id, state);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
response.Code = 500;
|
||||||
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
/// 按日期统计火情线索
|
/// 按日期统计火情线索
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type">1-月,2-年</param>
|
/// <param name="type">1-月,2-年</param>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue