| | |
| | | Gender = it.Gender, |
| | | IsReal = it.IsReal, |
| | | Age = it.Age, |
| | | ContactPhoneNumber = it.ContactPhoneNumber, |
| | | Identity = it.Identity, |
| | | RealTime = it.RealTime, |
| | | PersonalIdentityCode = it.PersonalIdentityCode, |
| | | PersonalIdentityContent = it.PersonalIdentity.Content, |
| | | EducationalBackgroundCode = it.EducationalBackgroundCode, |
| | |
| | | public async Task<GetUserResumeQueryResult> Handle(GetUserResumeQuery request, CancellationToken cancellationToken) |
| | | { |
| | | var logier = JwtUtils.GetCurrentLogier(); |
| | | if (logier.Type == EnumUserType.Personal) |
| | | if (logier != null && logier.Type == EnumUserType.Personal) |
| | | { |
| | | request.UserId = logier.Id; |
| | | } |
| | | EnterpriseEmployee? enterpriseEmployee = null; |
| | | if (logier.Type == EnumUserType.Enterprise && request.UserId == null && request.EnterpriseEmployeeId.HasValue) |
| | | if (logier != null && logier.Type == EnumUserType.Enterprise && request.UserId == null && request.EnterpriseEmployeeId.HasValue) |
| | | { |
| | | enterpriseEmployee = await rep.Change<EnterpriseEmployee>().AsQueryable().AsNoTracking() |
| | | .Where(it => it.EnterpriseId == logier.EnterpriseId && it.Id == request.EnterpriseEmployeeId) |
| | |
| | | } |
| | | if (model == null) throw Oops.Oh(EnumErrorCodeType.s404, "信息"); |
| | | |
| | | model.TaskInfoUsers = model.TaskInfoUsers.Where(it => it.SignContractTime.HasValue).ToList(); |
| | | if (model.Id.HasValue) |
| | | { |
| | | model.TaskInfoUsers = repTaskInfoUser.AsQueryable().AsNoTracking() |
| | | .Where(it => it.EnterpriseEmployee.UserId == model.Id && it.EnterpriseEmployee.EnterpriseSignContractTime.HasValue) |
| | | .Where(it => |
| | | it.EnterpriseEmployee.UserId == model.Id |
| | | && it.HireStatus == EnumTaskUserHireStatus.Pass |
| | | && it.HireTime.HasValue) |
| | | .Select(it => new GetUserResumeQueryResultExperience |
| | | { |
| | | SignContractTime = it.EnterpriseEmployee.EnterpriseSignContractTime, |
| | | HireTime = it.HireTime, |
| | | EnterpriseName = it.TaskInfo.Enterprise.EnterpriseName, |
| | | Name = it.TaskInfo.Name |
| | | }) |
| | |
| | | model.TaskCount = await repTaskInfoUser.AsQueryable().AsNoTracking() |
| | | .Where(it => it.EnterpriseEmployee.UserId == model.Id && it.HireStatus == EnumTaskUserHireStatus.Pass) |
| | | .CountAsync(); |
| | | if (logier.Type == EnumUserType.Enterprise) |
| | | if (logier != null && logier.Type == EnumUserType.Enterprise) |
| | | { |
| | | model.IsCollected = await rep.Change<EnterpriseUserCollect>().AsQueryable().AsNoTracking() |
| | | .Where(it => it.EnterpriseId == logier.EnterpriseId && it.UserId == model.Id) |