forked from ddrilling/AsbCloudServer
Merge branch 'feature/well-contacts' of http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer into feature/well-contacts
This commit is contained in:
commit
464dd57eef
@ -22,7 +22,6 @@ namespace AsbCloudInfrastructure.Services
|
||||
|
||||
public async Task<IEnumerable<CompanyWithUsersDto>> GetAsync(int wellId, int contactTypeId, CancellationToken token)
|
||||
{
|
||||
|
||||
var query = db.Companies
|
||||
.Where(c => c.IdCompanyType == contactTypeId)
|
||||
.Where(c => c.RelationCompaniesWells.Any(rc => rc.IdWell == wellId))
|
||||
@ -81,21 +80,5 @@ namespace AsbCloudInfrastructure.Services
|
||||
return await db.SaveChangesAsync(token)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private static UserContactDto Convert(User u, int wellId)
|
||||
{
|
||||
return new UserContactDto()
|
||||
{
|
||||
Id = u.Id,
|
||||
Name = u.Name,
|
||||
Patronymic = u.Patronymic,
|
||||
Surname = u.Surname,
|
||||
Company = u.Company.Adapt<CompanyDto>(),
|
||||
Email = u.Email,
|
||||
Phone = u.Phone,
|
||||
Position = u.Position,
|
||||
IsContact = u.RelationContactsWells.Any(rel => rel.IdWell == wellId)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user