88 lines
2.8 KiB
C#
88 lines
2.8 KiB
C#
using System;
|
|
using IRaCIS.Application.Interfaces;
|
|
using IRaCIS.Application.ViewModels;
|
|
using IRaCIS.Core.Application.Contracts.RequestAndResponse;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace IRaCIS.Api.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 医生教育经历、继续学习经历
|
|
/// </summary>
|
|
[Route("doctor")]
|
|
[ApiController, Authorize, ApiExplorerSettings(GroupName = "Reviewer")]
|
|
public class EducationController : ControllerBase
|
|
{
|
|
private readonly IEducationService _doctorEducationService;
|
|
|
|
public EducationController(IEducationService doctorEducationService)
|
|
{
|
|
_doctorEducationService = doctorEducationService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据医生Id获取医生教育经历和继续学习经历列表
|
|
/// </summary>
|
|
|
|
[HttpGet, Route("getEducation/{doctorId:Guid}")]
|
|
public IResponseOutput<DoctorEducationExperienceDTO> GetDoctorEducationList(Guid doctorId)
|
|
{
|
|
return ResponseOutput.Ok(_doctorEducationService.GetEducation(doctorId)) ;
|
|
|
|
}
|
|
|
|
#region 教育经历
|
|
|
|
/// <summary>
|
|
/// 新增医生教育经历
|
|
/// </summary>
|
|
/// <param name="doctorEducationInfoViewModel"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpPost, Route("addOrUpdateEducationInfo")]
|
|
public IResponseOutput AddEducationInfo(EducationCommand doctorEducationInfoViewModel)
|
|
{
|
|
return _doctorEducationService.AddOrUpdateEducationInfo(doctorEducationInfoViewModel);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除医生教育经历
|
|
/// </summary>
|
|
/// <param name="doctorId">医生Id</param>
|
|
/// <returns></returns>
|
|
|
|
[HttpDelete, Route("deleteEducationInfo/{doctorId:guid}")]
|
|
public IResponseOutput DeleteEducationInfo(Guid doctorId)
|
|
{
|
|
return _doctorEducationService.DeleteEducationInfo(doctorId);
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 继续学习经历
|
|
/// <summary> 添加/更新医生继续学习经历</summary>
|
|
|
|
[HttpPost, Route("addOrUpdatePostgraduateInfo")]
|
|
public IResponseOutput AddPostgraduateInfo(PostgraduateCommand doctorEducationInfoViewModel)
|
|
{
|
|
return _doctorEducationService.AddOrUpdatePostgraduateInfo(doctorEducationInfoViewModel);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除医生继续学习经历
|
|
/// </summary>
|
|
/// <param name="doctorId">医生Id</param>
|
|
/// <returns></returns>
|
|
|
|
[HttpDelete, Route("deletePostgraduateInfo/{doctorId:guid}")]
|
|
public IResponseOutput DeleteContinueLearningInfo(Guid doctorId)
|
|
{
|
|
return _doctorEducationService.DeletePostgraduateInfo(doctorId);
|
|
|
|
}
|
|
#endregion
|
|
}
|
|
}
|