public static List <AdjustRestEntity> GetAdjustRestByCondition(string employeeName, int departmentID, int positionID, EmployeeTypeEnum employeeTypeEnum, bool recursionDepartment, Account loginUser, int employeeStatus) { var departmentids = new List <int>(); if (departmentID > 0) { departmentids.Add(departmentID); if (recursionDepartment) { departmentids.AddRange(DepartmentLogic.GetChildDepartment(departmentID).Select(x => x.PKID)); } } DateTime dt = DateTime.Now; //判断是不是12月21号以后 if (dt.Month == AdjustRestUtility.StartTime.Month && dt.Day >= AdjustRestUtility.StartTime.Day) { dt = dt.AddYears(1); } var list = AdjustRestDA.GetAdjustRestByCondition(employeeName, departmentids, positionID, (int)employeeTypeEnum, AccountAuthDA.GetAccountAuthDepartment( loginUser.Id, HrmisPowers.A405), employeeStatus, dt.Year - 1); return(list); }
public static List <AccountAuthEntity> GetAccountAuthByAccountId(int accountId) { var key = "GetAccountAuthByAccountId_" + accountId; var allAccountAuth = MemoryCacheUtils.Get(key) as List <AccountAuthEntity>; if (allAccountAuth == null) { allAccountAuth = AccountAuthDA.GetAccountAuthByAccountId(accountId); MemoryCacheUtils.Set(key, allAccountAuth); } return(allAccountAuth); }
public static List <VacationEntity> GetVacationByCondition(string employeeName, decimal vacationDayNumStart, decimal vacationDayNumEnd, DateTime vacationEndDateStart, DateTime vacationEndDateEnd, decimal surplusDayNumStart, decimal surplusDayNumEnd, Account Operator, int employeeStatus) { return(VacationDA.GetVacationByCondition(employeeName, vacationDayNumStart, vacationDayNumEnd, vacationEndDateStart, vacationEndDateEnd, surplusDayNumStart, surplusDayNumEnd , employeeStatus, AccountAuthDA.GetAccountAuthDepartment(Operator.Id, HrmisPowers.A403))); }
public static List <EmployeeAccountSetEntity> GetEmployeeAccountSetByCondition(string employeeName, int departmentID, int positionID, EmployeeTypeEnum employeeTypeEnum, bool recursionDepartment, Account loginUser, int employeeStatus) { var departmentids = new List <int>(); if (departmentID > 0) { departmentids.Add(departmentID); if (recursionDepartment) { departmentids.AddRange(DepartmentLogic.GetChildDepartment(departmentID).Select(x => x.PKID)); } } var list = EmployeeAccountSetDA.GetEmployeeAccountSetByCondition(employeeName, departmentids, positionID, (int)employeeTypeEnum, AccountAuthDA.GetAccountAuthDepartment( loginUser.Id, HrmisPowers.A604), employeeStatus); return(list); }
public static List <Employee> GetEmployeeBasicInfoByBasicConditionRetModel(string employeeName, EmployeeTypeEnum employeeType, int positionID, int?gradesID, int departmentID, int?companyID, bool recursionDepartment, int?powerID, int?accountID, int employeeStatus, List <int> notInEmployeeType, bool?hasPlanDuty = null) { List <EmployeeEntity> list = EmployeeDA.GetEmployeeBasicInfoByBasicCondition(employeeName, (int)employeeType, positionID, gradesID, companyID, DepartmentLogic.GetDepartmentids(departmentID, recursionDepartment), powerID == null ? null : AccountAuthDA.GetAccountAuthDepartment(accountID.Value, powerID.Value), employeeStatus, notInEmployeeType, hasPlanDuty); var employeeList = new List <Employee>(); foreach (EmployeeEntity employeeEntity in list) { employeeList.Add(EmployeeEntity.Convert(employeeEntity)); } return(employeeList); }
public static List <EmployeeEntity> GetEmployeeBasicInfoByBasicCondition(string employeeName, EmployeeTypeEnum employeeType, int positionID, int?gradesID, int departmentID, bool recursionDepartment, int?powerID, int?accountID, int employeeStatus, List <int> notInEmployeeType) { return(EmployeeDA.GetEmployeeBasicInfoByBasicCondition(employeeName, (int)employeeType, positionID, gradesID, null, DepartmentLogic.GetDepartmentids(departmentID, recursionDepartment), powerID == null ? null : AccountAuthDA.GetAccountAuthDepartment(accountID.Value, powerID.Value), employeeStatus, notInEmployeeType, null)); }
public static List <EmployeeContractEntity> GetEmployeeContractByCondition(string employeeName, DateTime stratTimeFrom, DateTime stratTimeTo, DateTime endTimeFrom, DateTime endTimeTo, int contractTypeId, Account operatorAccount, int employeeStatus) { return(EmployeeContractDA.GetEmployeeContractByCondition(employeeName, stratTimeFrom, stratTimeTo, endTimeFrom, endTimeTo, AccountAuthDA.GetAccountAuthDepartment(operatorAccount.Id, HrmisPowers.A402), contractTypeId, employeeStatus)); }