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.
95 lines
3.2 KiB
95 lines
3.2 KiB
namespace Tiobon.Core.Api.Controllers;
|
|
|
|
/// <summary>
|
|
/// 开班管理(Controller)
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[ApiController, GlobalActionFilter]
|
|
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)]
|
|
public class Ghre_OpenClassController : BaseController<IGhre_OpenClassServices, Ghre_OpenClass, Ghre_OpenClassDto, InsertGhre_OpenClassInput, EditGhre_OpenClassInput>
|
|
{
|
|
public Ghre_OpenClassController(IGhre_OpenClassServices 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_OpenClassDto>> QueryByStatus([FromBody] QueryBody body, string status)
|
|
{
|
|
return await _service.QueryFilterPage(body, $"Status ='{status}'");
|
|
}
|
|
#endregion
|
|
|
|
#region 学员
|
|
/// <summary>
|
|
/// 学员查询
|
|
/// </summary>
|
|
/// <param name="Id">开班ID</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("QueryStaff/{Id}")]
|
|
public async Task<ServiceResult<List<Ghre_OpenClassStaffDto>>> QueryStaff(long Id) => await _service.QueryStaff(Id);
|
|
|
|
|
|
/// <summary>
|
|
/// 学员新增
|
|
/// </summary>
|
|
/// <param name="Id">开班ID</param>
|
|
/// <param name="staffIds">员工ID列表</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("InsertStaff/{Id}")]
|
|
public async Task<ServiceResult> InsertStaff(long Id, [FromBody] List<int> staffIds) => await _service.InsertStaff(Id, staffIds);
|
|
|
|
|
|
/// <summary>
|
|
/// 学员删除
|
|
/// </summary>
|
|
/// <param name="Id">开班ID</param>
|
|
/// <param name="staffIds">员工ID列表</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("DeleteStaff/{Id}")]
|
|
public async Task<ServiceResult> DeleteStaff(long Id, [FromBody] List<int> staffIds) => await _service.DeleteStaff(Id, staffIds);
|
|
#endregion
|
|
|
|
#region 费用
|
|
/// <summary>
|
|
/// 查询团体费用
|
|
/// </summary>
|
|
/// <param name="Id">开班ID</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("QueryGroupFee/{Id}")]
|
|
public async Task<ServiceResult<List<Ghre_OpenClassFeeDto>>> QueryGroupFee(long Id) => await _service.QueryGroupFee(Id);
|
|
|
|
/// <summary>
|
|
/// 查询个人费用
|
|
/// </summary>
|
|
/// <param name="Id">开班ID</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("QueryPersonalFee/{Id}")]
|
|
public async Task<ServiceResult<List<Ghre_OpenClassFeeDto>>> QueryPersonalFee(long Id) => await _service.QueryPersonalFee(Id);
|
|
|
|
|
|
/// <summary>
|
|
/// 学员费用
|
|
/// </summary>
|
|
/// <param name="Id">开班ID</param>
|
|
/// <param name="fee">费用信心</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("InsertFee/{Id}")]
|
|
public async Task<ServiceResult> InsertFee(long Id, [FromBody] InsertGhre_OpenClassFeeInput fee) => await _service.InsertFee(Id, fee);
|
|
|
|
|
|
/// <summary>
|
|
/// 费用删除
|
|
/// </summary>
|
|
/// <param name="ids">费用数据ID列表</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("DeleteFee")]
|
|
public async Task<ServiceResult> DeleteFee([FromBody] List<long> ids) => await _service.DeleteFee(ids);
|
|
#endregion
|
|
} |