Compare commits
3 Commits
402d320958
...
d0ef3710c5
| Author | SHA1 | Date |
|---|---|---|
|
|
d0ef3710c5 | |
|
|
0da536dd6d | |
|
|
d9e7dc83e0 |
|
|
@ -1,5 +1,6 @@
|
|||
using System.Net.WebSockets;
|
||||
using System.Text;
|
||||
using DocumentFormat.OpenXml.EMMA;
|
||||
using Hopetry.App.SugarModel.CommonModel;
|
||||
using Infrastructure;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
|
@ -332,7 +333,6 @@ namespace OpenAuth.App.ServiceApp.FireManagement
|
|||
return new Response<FmFireclueInfo> { Result = info };
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<Response<dynamic>> LoadClueWithInfoById(long id)
|
||||
{
|
||||
using (var db = base.UnitWork.CreateContext())
|
||||
|
|
@ -362,7 +362,33 @@ namespace OpenAuth.App.ServiceApp.FireManagement
|
|||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace OpenAuth.Repository.Domain.FireManagement
|
|||
/// <summary>
|
||||
/// 上报人id
|
||||
/// </summary>
|
||||
public string CreateId { get; set; }
|
||||
public long CreateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地区名称
|
||||
|
|
@ -73,7 +73,7 @@ namespace OpenAuth.Repository.Domain.FireManagement
|
|||
/// <summary>
|
||||
/// 修改人id
|
||||
/// </summary>
|
||||
public string ModifyId { get; set; }
|
||||
public long ModifyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改时间
|
||||
|
|
|
|||
|
|
@ -258,5 +258,6 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers.FireManagement
|
|||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers.FireManagement
|
|||
Response<bool> response = new Response<bool>();
|
||||
try
|
||||
{
|
||||
return _app.FireUserUnitUpload(formFiles);
|
||||
return _app.FireUserUnitUpload(formFiles);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -290,6 +290,27 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers.FireManagement
|
|||
return response;
|
||||
}
|
||||
/// <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>
|
||||
/// <param name="type">1-月,2-年</param>
|
||||
|
|
@ -370,8 +391,8 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers.FireManagement
|
|||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加人员坐标点
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue