using Infrastructure;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using OpenAuth.App.ServiceApp;
using OpenAuth.App.ServiceApp.DroneCaseInfo;
using OpenAuth.App.ServiceApp.ReSubmitManage.Request;
using OpenAuth.Repository.Domain;
namespace OpenAuth.WebApi.Controllers.ServiceControllers
{
///
/// 案件复提
///
[Route("api/[controller]/[action]")]
[ApiController]
public class ReSubmitController : ControllerBase
{
readonly ReSubmitApp _app;
public ReSubmitController(ReSubmitApp app)
{
_app = app;
}
///
/// 案件复提
///
/// 原始案件编号
///
[HttpPost]
public async Task> SaveReSubmitInfo([FromBody] ReSubmitReq req)
{
Response response = new Response();
try
{
response = await _app.SaveReSubmitInfo(req.originalcaseno, req.remark,req.subjectkey);
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
///
/// 查询复提数据
///
///
[AllowAnonymous]
[HttpGet]
public async Task>> LoadReSubmitDatas()
{
Response> response = new Response>();
try
{
response = await _app.LoadReSubmitDatas();
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
}
}