128 lines
3.8 KiB
C#
128 lines
3.8 KiB
C#
using HL_FristAidPlatform_Bussiness;
|
|
using HL_FristAidPlatform_Models;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace HL_FristAidPlatform_Service.Controllers
|
|
{
|
|
|
|
/// <summary>
|
|
/// T_Service_FollowUp
|
|
/// </summary>
|
|
[Route("api/service/[controller]")]
|
|
[ApiController]
|
|
[ApiExplorerSettings(GroupName = "CZ")]
|
|
[HiddenApiFilter.HiddenApi]
|
|
public class T_Service_FollowUpController : Controller
|
|
{
|
|
private T_Service_FollowUpBLL bll = new T_Service_FollowUpBLL();
|
|
|
|
|
|
/// <summary>
|
|
/// 根据病人GUID获取数据
|
|
/// </summary>
|
|
/// <param name="pageIndex"></param>
|
|
/// <param name="pageSize"></param>
|
|
/// <param name="pGuid"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Authorize(Roles = "GET")]
|
|
public JsonResult GetPageList(int pageIndex = 1, int pageSize = 10,string pGuid="")
|
|
{
|
|
return Json(bll.GetPageList(pageIndex, pageSize, pGuid));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据ID获取数据
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("{id}")]
|
|
[Authorize(Roles = "GET")]
|
|
public JsonResult GetByID(string id)
|
|
{
|
|
return Json(bll.Get(id));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 新增
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize(Roles = "ADD")]
|
|
public JsonResult Add(T_Service_FollowUp model = null)
|
|
{
|
|
if (model == null)
|
|
{
|
|
return Json("参数为空");
|
|
}
|
|
return Json(bll.Add(model));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 更新
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("Update")]
|
|
[Authorize(Roles = "UPDATE")]
|
|
public JsonResult Update(T_Service_FollowUp model = null)
|
|
{
|
|
if (model == null)
|
|
{
|
|
return Json("参数为空");
|
|
}
|
|
return Json(bll.Update(model));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除
|
|
/// </summary>
|
|
/// <param name="ids"></param>
|
|
/// <returns></returns>
|
|
[HttpDelete]
|
|
[Authorize(Roles = "DELETE")]
|
|
public JsonResult Delete(int ids = 0)
|
|
{
|
|
if (ids == 0)
|
|
{
|
|
return Json("参数为空");
|
|
}
|
|
return Json(bll.Delete(ids));
|
|
}
|
|
/// <summary>
|
|
/// 关键词和时间查询病人列表
|
|
/// </summary>
|
|
/// <param name="key"></param>
|
|
/// <param name="startTime"></param>
|
|
/// <param name="endTime"></param>
|
|
/// <param name="state"></param>
|
|
/// <param name="pageIndex"></param>
|
|
/// <param name="pageSize"></param>
|
|
/// <param name="SystemModuleID"></param>
|
|
/// <param name="hospitalGuid"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetModelByFollowUp")]
|
|
[Authorize(Roles = "GET")]
|
|
public JsonResult GetModelByFollowUp(string key = "", string startTime = "", string endTime = "", int state = 2, int pageIndex = 1, int pageSize = 100, long SystemModuleID = 1, string hospitalGuid = "")
|
|
{
|
|
return Json(bll.GetModelByFollowUp(key, startTime, endTime, state, pageIndex, pageSize, SystemModuleID, hospitalGuid));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改随访状态
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetModelByFollowUp")]
|
|
[Authorize(Roles = "UPDATE")]
|
|
public JsonResult UpdateFollowUp(int id)
|
|
{
|
|
return Json(bll.UpdateFollowUp(id));
|
|
}
|
|
}
|
|
} |