public async Task <PlanAwardDto> CreateCompletePlan(CreatePlanCompleteDto input) { var user = await GetCurrentUserAsync(); var plan = _planWeekRepository.Get(input.PlanId); var entity = Mapper.Map <PlanComplete>(plan); entity.User = user; entity.CompleteTime = DateTimeOffset.Now; entity.Time = DateTimeOffset.Now.Date; _planCompleteRepository.InsertAndGetId(entity); var award = _planAwardRepository.CompletePlan(entity); return(Mapper.Map <PlanAwardDto>(award)); }