Esempio n. 1
0
        public EmployeeDetails GetEmployeeDetails(EmployeeBasicDetails basicDetails)
        {
            var actions = _basicDetailsService.GetEmployeeActionsOnDay
                              (basicDetails.EmployeeId);
            var performedMinutes   = CountPerformedMinutes(actions);
            var efficiency         = CalculateEfficiency(performedMinutes);
            var countedTypes       = CountPerformedTypes(actions);
            var mostPerformedType  = GetMostPerformedTypes(countedTypes);
            var leastPerformedType = GetLeastPerformedTypes(countedTypes);

            var result = EmployeeDetails.EmployeeDetailsFromBasicDetails(basicDetails);

            result.PerformedMinutes   = performedMinutes;
            result.Efficiency         = efficiency;
            result.MostPerformedType  = mostPerformedType;
            result.LeastPerformedType = leastPerformedType;

            return(result);
        }