78 lines
2.6 KiB
C#
78 lines
2.6 KiB
C#
// Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
|
//
|
|
// SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
|
// 1.请不要删除和修改根目录下的LICENSE文件。
|
|
// 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
|
// 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
|
// 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
|
// 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为。
|
|
// 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关。
|
|
|
|
namespace SimpleAdmin.Web.Core;
|
|
|
|
/// <summary>
|
|
/// 药材管理
|
|
/// </summary>
|
|
[ApiDescriptionSettings("Application", Tag = "处方管理")]
|
|
[Route("biz/weibingju/prescription")]
|
|
[RolePermission]
|
|
public class PrescriptionController : IDynamicApiController
|
|
{
|
|
private readonly IPrescriptionService _service;
|
|
|
|
public PrescriptionController(IPrescriptionService service)
|
|
{
|
|
_service = service;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取处方列表
|
|
/// </summary>
|
|
[HttpGet("list")]
|
|
[DisplayName("获取处方列表")]
|
|
public async Task<dynamic> GetList([FromQuery] PrescriptionQueryInput input)
|
|
{
|
|
return await _service.GetPrescriptionList(input);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取处方详情
|
|
/// </summary>
|
|
[HttpGet("getprescriptiondetile")]
|
|
[DisplayName("获取处方详情")]
|
|
public async Task<dynamic> GetDetail(long id)
|
|
{
|
|
return await _service.GetPrescriptionDetail(id);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 保存处方(新增或编辑)
|
|
/// </summary>
|
|
[HttpPost("add")]
|
|
[DisplayName("保存处方(新增或编辑)")]
|
|
public async Task<dynamic> SavePrescription([FromBody] SavePrescriptionInput input)
|
|
{
|
|
return await _service.SavePrescription(input);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取人员列表
|
|
/// </summary>
|
|
[HttpGet("persons")]
|
|
[DisplayName("获取人员列表")]
|
|
public async Task<dynamic> GetPersonList([FromQuery] PersonType? type, [FromQuery] long? employeeId)
|
|
{
|
|
return await _service.GetPersonList(type, employeeId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取关系类型
|
|
/// </summary>
|
|
[HttpGet("relation-types")]
|
|
[DisplayName("获取关系类型")]
|
|
public async Task<dynamic> GetRelationTypes()
|
|
{
|
|
return await _service.GetRelationTypes();
|
|
}
|
|
}
|