public async Task <Result> Clock(string address) { var context = HttpContext; string account = await _jwtUtil.GetMessageByToken(context); int companyId = _commonAppService.GetUserCompId(account); return(_attendanceAppService.Clock(address, account, companyId)); }
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> GetCompanyInfo() { var context = HttpContext; string account = await _jwtUtil.GetMessageByToken(context); int compId = _commonAppService.GetUserCompId(account); return(_dangAnAppService.GetCompanyById(compId)); }
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); }
public async Task <object> AddSingleWorker([FromBody] SingleWorkerDto singleWorkerDto) { var context = HttpContext; string account = await _jwtUtil.GetMessageByToken(context); singleWorkerDto.CompanyId = _commonAppService.GetUserCompId(account); return(_userAppService.AddSingleWorker(singleWorkerDto)); }
public async Task <object> GetNoticeList() { var context = HttpContext; string account = await _jwtUtil.GetMessageByToken(context); int companyId = _commonAppService.GetUserCompId(account); return(_noticeAppService.GetNoticeList(account, companyId)); }