/// <summary> /// 进行查询 /// </summary> /// <returns></returns> public List <Contract> DoAdvanceSearchContract() { //正式开始查询筛选 //加载基本数据 List <Contract> contractList = _dalContract.GetAllEmployeeContract(); if (contractList == null) { return(new List <Contract>()); } //筛选比较ContractBasicInfoPart的数据 contractList = LoadAndCompareAllContractInfo(contractList, _ContractBasicInfoSearchFieldList, false, ContractFieldPara.ContractBasicInfoPart); for (int i = 0; i < contractList.Count; i++) { contractList[i].Employee = _GetEmployee.GetEmployeeByAccountID(contractList[i].EmployeeID); if (contractList[i].Employee == null) { contractList.RemoveAt(i); i--; } if (contractList[i].Employee != null && contractList[i].Employee.EmployeeDetails != null) { contractList[i].Employee.EmployeeDetails.Photo = null; } } contractList = HrmisUtility.RemoteUnAuthContract(contractList, AuthType.HRMIS, _OperationAccount, HrmisPowers.A402); //筛选比较EmployeeBasicInfoPart数据 contractList = LoadAndCompareAllContractInfo(contractList, _EmployeeBasicInfoSearchFieldList, false, ContractFieldPara.EmployeeBasicInfoPart); //加载需要比较的数据 contractList = LoadAndCompareAllContractInfo(contractList, _VacationSearchFieldList, false, ContractFieldPara.VacationPart); contractList = LoadAndCompareAllContractInfo(contractList, _AdjustSearchFieldList, false, ContractFieldPara.AdjustPart); //筛选之后,加载剩余未加载的数据 contractList = LoadAndCompareAllContractInfo(contractList, _VacationSearchFieldList, true, ContractFieldPara.VacationPart); contractList = LoadAndCompareAllContractInfo(contractList, _AdjustSearchFieldList, true, ContractFieldPara.AdjustPart); return(contractList); }