Exemplo n.º 1
0
        /// <summary>
        /// 根据员工获取提交了但是没有经过审核就取消中的年假天数
        /// </summary>
        /// <param name="employeeID"></param>
        /// <returns></returns>
        public decimal GetAdjustRestCostTimeByEmployeeWhenCancelAfterSubmit(int employeeID)
        {
            decimal costTime = 0;
            List <LeaveRequestItem> LeaveRequestItems  = new List <LeaveRequestItem>();
            List <LeaveRequestItem> LeaveRequestItems1 =
                _DalLeaveRequest.GetLeaveRequestItemByAccountIDAndRequestStatus(employeeID,
                                                                                LeaveRequestTypeEnum.AdjustRest,
                                                                                RequestStatus.Cancelled);

            List <LeaveRequestItem> LeaveRequestItems2 =
                _DalLeaveRequest.GetLeaveRequestItemByAccountIDAndRequestStatus(employeeID,
                                                                                LeaveRequestTypeEnum.AdjustRest,
                                                                                RequestStatus.CancelApproving);

            LeaveRequestItems.AddRange(LeaveRequestItems1);
            LeaveRequestItems.AddRange(LeaveRequestItems2);

            List <LeaveRequestItem> iRet = AdjustIfApprovePass(LeaveRequestItems);

            foreach (LeaveRequestItem item in iRet)
            {
                costTime += item.CostTime;
            }
            return(costTime);
        }