用户增加工作语言,系统文档增加文档适用语言用户
This commit is contained in:
@@ -139,6 +139,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public class SiteSurveyUserImportDto
|
||||
{
|
||||
public string Country { get; set; }
|
||||
public string TrialSiteCode { get; set; } = string.Empty;
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
if (inDto.TrialId != null)
|
||||
{
|
||||
isVirtual = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => x.TrialType != TrialType.OfficialTrial).FirstNotNullAsync();
|
||||
|
||||
|
||||
await _doctorRepository.BatchUpdateNoTrackingAsync(x => x.Id == dockerInfo.Id, y => new Doctor()
|
||||
{
|
||||
IsVirtual = isVirtual,
|
||||
@@ -183,16 +183,16 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
EMail = inDto.EmailOrPhone,
|
||||
IsVirtual = isVirtual,
|
||||
AcceptingNewTrial = inDto.TrialId == null? false:true,
|
||||
AcceptingNewTrial = inDto.TrialId == null ? false : true,
|
||||
ActivelyReading = false,
|
||||
ResumeStatus = ResumeStatusEnum.Pass,
|
||||
CooperateStatus = inDto.TrialId==null? ContractorStatusEnum.Noncooperation: ContractorStatusEnum.Cooperation,
|
||||
CooperateStatus = inDto.TrialId == null ? ContractorStatusEnum.Noncooperation : ContractorStatusEnum.Cooperation,
|
||||
|
||||
ReviewStatus = ReviewerInformationConfirmStatus.ConfirmRefuse
|
||||
};
|
||||
|
||||
doctor.Code = await _doctorRepository.Select(t => t.Code).DefaultIfEmpty().MaxAsync() + 1;
|
||||
doctor.ReviewerCode= AppSettings.GetCodeStr(doctor.Code, nameof(Doctor));
|
||||
doctor.ReviewerCode = AppSettings.GetCodeStr(doctor.Code, nameof(Doctor));
|
||||
|
||||
var info = await _doctorRepository.AddAsync(doctor, true);
|
||||
|
||||
@@ -246,7 +246,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
result.DoctorId = dockerInfo.Id;
|
||||
result.ReviewStatus = dockerInfo.ReviewStatus;
|
||||
|
||||
if(inDto.TrialId != null)
|
||||
if (inDto.TrialId != null)
|
||||
{
|
||||
var isVirtual = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => x.TrialType != TrialType.OfficialTrial).FirstNotNullAsync();
|
||||
await _doctorRepository.BatchUpdateNoTrackingAsync(x => x.Id == dockerInfo.Id, y => new Doctor()
|
||||
@@ -995,6 +995,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
generateUser.IsTestUser = true;
|
||||
}
|
||||
|
||||
//通过中心国家,设置工作语言
|
||||
var trialSiteCountry = _trialSiteRepository.Where(t => t.Id == trialSiteId).Select(t => t.Country).FirstOrDefault();
|
||||
generateUser.UserWorkLanguage = trialSiteCountry == StaticData.SiteCountry.CN ? UserWorkLanguage.CN : UserWorkLanguage.US;
|
||||
|
||||
generateUser.Id = NewId.NextSequentialGuid();
|
||||
// 外部人员生成账号 都是外部的
|
||||
generateUser.IsZhiZhun = false;
|
||||
@@ -1187,7 +1191,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
var addUserRoleList = item.ToList();
|
||||
|
||||
var first = addUserRoleList.FirstOrDefault();
|
||||
var first = addUserRoleList.First();
|
||||
|
||||
var userEmail = item.Key;
|
||||
|
||||
@@ -1238,6 +1242,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
generateUser.IsTestUser = true;
|
||||
}
|
||||
|
||||
//通过中心国家,设置工作语言
|
||||
|
||||
generateUser.UserWorkLanguage = first.Country == StaticData.SiteCountry.CN ? UserWorkLanguage.CN : UserWorkLanguage.US;
|
||||
|
||||
generateUser.Id = NewId.NextSequentialGuid();
|
||||
|
||||
// 外部人员生成账号 都是外部的
|
||||
|
||||
Reference in New Issue
Block a user