You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.4 KiB
81 lines
2.4 KiB
using Tiobon.Core.Model.ViewModels.Extend;
|
|
|
|
namespace Tiobon.Core.Api.Controllers;
|
|
|
|
/// <summary>
|
|
/// 问卷调查(Controller)
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[ApiController, GlobalActionFilter]
|
|
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)]
|
|
public class Ghre_SurveyController : BaseController<IGhre_SurveyServices, Ghre_Survey, Ghre_SurveyDto, InsertGhre_SurveyInput, EditGhre_SurveyInput>
|
|
{
|
|
public Ghre_SurveyController(IGhre_SurveyServices service) : base(service)
|
|
{
|
|
}
|
|
|
|
#region 查询
|
|
/// <summary>
|
|
/// 根据条件查询数据
|
|
/// </summary>
|
|
/// <param name="body">条件</param>
|
|
/// <param name="status">status</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("QueryList/{status}")]
|
|
public async Task<ServicePageResult<Ghre_SurveyDto>> QueryByStatus([FromBody] QueryBody body, string status)
|
|
{
|
|
return await _service.QueryFilterPage(body, $"Status ='{status}'");
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 状态修改
|
|
[HttpPost("UpdateStatus/{status}")]
|
|
public async Task<ServiceResult> UpdateStatus(string status, [FromBody] InsertGhre_SurveyInput input)
|
|
{
|
|
return await _service.UpdateStatus(input, status);
|
|
}
|
|
#endregion
|
|
|
|
#region 新增
|
|
[HttpPost("Insert/{status}")]
|
|
public async Task<ServiceResult<long>> InsertByStatus([FromBody] InsertGhre_SurveyInput insertModel, string status)
|
|
{
|
|
return await _service.InsertByStatus(insertModel, status);
|
|
}
|
|
#endregion
|
|
|
|
#region 插入
|
|
/// <summary>
|
|
/// 插入
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("InsertData/{id}")]
|
|
public async Task<ServiceResult<long>> InsertData(long id, [FromBody] InsertGhre_SurveyExtend input) => await _service.InsertData(id, input);
|
|
|
|
#endregion
|
|
|
|
#region 查询
|
|
/// <summary>
|
|
/// 查询
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("QueryData/{id}")]
|
|
public async Task<ServiceResult<InsertGhre_SurveyExtend>> QueryData(long id) => await _service.QueryData(id);
|
|
|
|
#endregion
|
|
|
|
#region 查询
|
|
/// <summary>
|
|
/// 查询
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("QueryESSData/{id}")]
|
|
public async Task<ServiceResult<Ghre_SurveyExtend>> QueryESSData(long id) => await _service.QueryESSData(id);
|
|
|
|
#endregion
|
|
}
|
|
|