1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- using YBEE.EQM.Core;
- namespace YBEE.EQM.Application;
- /// <summary>
- /// 机构信息服务
- /// </summary>
- [ApiDescriptionSettings(Name = "sys-org")]
- [Route("sys/org")]
- public class SysOrgAppService : IDynamicApiController
- {
- private readonly ISysOrgService _sysOrgService;
- public SysOrgAppService(ISysOrgService sysOrgService)
- {
- _sysOrgService = sysOrgService;
- }
- /// <summary>
- /// 添加机构
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task Add(AddSysOrgInput input)
- {
- await _sysOrgService.Add(input);
- }
- /// <summary>
- /// 更新机构
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task Update(UpdateSysOrgInput input)
- {
- await _sysOrgService.Update(input);
- }
- /// <summary>
- /// 删除机构
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task Del(BaseId<short> input)
- {
- await _sysOrgService.Del(input);
- }
- /// <summary>
- /// 启用禁用机构
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task ChangeStatus(BaseId<short> input)
- {
- await _sysOrgService.ChangeStatus(input);
- }
- /// <summary>
- /// 根据ID获取机构
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public async Task<SysOrgOutput> GetById([FromQuery][Required] short id)
- {
- return await _sysOrgService.GetById(id);
- }
- /// <summary>
- /// 查询机构列表
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task<List<SysOrgLiteOutput>> QueryList(QuerySysOrgInput input)
- {
- return await _sysOrgService.QueryList(input);
- }
- /// <summary>
- /// 分页查询机构列表
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task<PageResult<SysOrgOutput>> QueryPageList(SysOrgPageInput input)
- {
- return await _sysOrgService.QueryPageList(input);
- }
- /// <summary>
- /// 获取全部机构列表
- /// </summary>
- /// <returns></returns>
- public async Task<List<SysOrgLiteOutput>> GetAllList()
- {
- return await _sysOrgService.GetAllList();
- }
- /// <summary>
- /// 根据学校ID获取校区列表
- /// </summary>
- /// <param name="orgId"></param>
- /// <returns></returns>
- public async Task<List<SysOrgLiteOutput>> GetOrgBranchByOrgId([FromQuery][Required] short orgId)
- {
- return await _sysOrgService.GetOrgBranchByOrgId(orgId);
- }
- }
|