public async Task <object> AddApplication([FromBody] AddApplicationDto addApplicationDto) { var context = HttpContext; string account = await _jwtUtil.GetMessageByToken(context); addApplicationDto.CompId = _commonAppService.GetUserCompId(account); addApplicationDto.DeparmentId = _commonAppService.GetUserDepId(account); return(_approvalAppService.AddApplication(addApplicationDto)); }
public async Task <object> AddApplication([FromBody] AddApplicationDto addApplicationDto) { var context = HttpContext; string account = await _jwtUtil.GetMessageByToken(context); addApplicationDto.CompId = _commonAppService.GetUserCompId(account); addApplicationDto.DeparmentId = _commonAppService.GetUserDepId(account); Result result = _approvalAppService.AddApplication(addApplicationDto); if (result.Id != 0) { await _signalrHubs.Send(result.Id.ToString(), "您有新的消息"); } return(result); }