1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using Microsoft.AspNetCore.Mvc;
- using Newtonsoft.Json.Serialization;
- using OASystem.Domain.Dtos.Groups;
- using OASystem.Domain.ViewModels.Groups;
- using OASystem.Infrastructure.Repositories.Groups;
- namespace OASystem.API.Controllers
- {
- /// <summary>
- /// 团组
- /// </summary>
- //[Authorize]
- [Route("api/[controller]/[action]")]
- public class GroupsController : ControllerBase
- {
- private readonly GrpScheduleRepository _grpScheduleRep;
- private readonly IMapper _mapper;
- public GroupsController(IMapper mapper, GrpScheduleRepository grpScheduleRep)
- {
- _mapper = mapper;
- _grpScheduleRep = grpScheduleRep;
- }
- #region 流程管控
- /// <summary>
- /// 获取团组流程管控信息
- /// </summary>
- /// <param name="paras">参数Json字符串</param>
- /// <returns></returns>
- [HttpPost]
- [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
- public async Task<IActionResult> PostGrpSchedule(string paras)
- {
- if (string.IsNullOrEmpty(paras))
- {
- return Ok(JsonView(false, "参数为空"));
- }
- Grp_ScheduleDto _ScheduleDto = JsonConvert.DeserializeObject<Grp_ScheduleDto>(paras);
- if (_ScheduleDto != null)
- {
- if (_ScheduleDto.SearchType == 2)//获取列表
- {
- }
- else//获取对象
- {
- Grp_ScheduleView _grpScheduleView = await _grpScheduleRep.GetView_GrpSchedule(_ScheduleDto);
- if (_grpScheduleView != null)
- {
- return Ok(JsonView(0, "获取成功", _grpScheduleView));
- }
- }
- }
- else
- {
- return Ok(JsonView(false, "参数反序列化失败"));
- }
- return Ok(JsonView(false, "暂无数据!"));
- }
- #endregion
- }
- }
|