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));
        }
示例#2
0
        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));
        }
示例#4
0
        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);
        }
示例#5
0
        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));
        }
示例#6
0
        public async Task <object> GetNoticeList()
        {
            var    context = HttpContext;
            string account = await _jwtUtil.GetMessageByToken(context);

            int companyId = _commonAppService.GetUserCompId(account);

            return(_noticeAppService.GetNoticeList(account, companyId));
        }