Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
68d320d9cf
|
|
@ -857,7 +857,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_TemplateUploadData"]);
|
||||
}
|
||||
|
||||
var ossRelativePath = await oSSService.UploadToOSSAsync(fileStream, $"{trialId.ToString()}/InspectionUpload/SiteSurvey", realFileName, uploadInfo: new FileUploadRecordAddOrEdit() { TrialId = trialId ,BatchDataType=BatchDataType.SiteUserSurvey});
|
||||
var ossRelativePath = await oSSService.UploadToOSSAsync(fileStream, $"{trialId.ToString()}/InspectionUpload/SiteSurvey", realFileName, uploadInfo: new FileUploadRecordAddOrEdit() { TrialId = trialId, BatchDataType = BatchDataType.SiteUserSurvey });
|
||||
|
||||
await _inspectionFileRepository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId }, true);
|
||||
|
||||
|
|
@ -933,7 +933,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
}
|
||||
//处理好 用户类型 和用户类型枚举
|
||||
var sysUserTypeList = _usertypeRepository.Where(t => t.UserTypeEnum == UserTypeEnum.CRA || t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Select(t => new { UserTypeId = t.Id, t.UserTypeEnum }).ToList();
|
||||
var siteList = _trialSiteRepository.Where(t => t.TrialId == trialId && siteCodeList.Contains(t.TrialSiteCode)).Select(t => new { t.TrialSiteCode, TrialSiteId = t.Id }).ToList();
|
||||
var siteList = _trialSiteRepository.Where(t => t.TrialId == trialId && siteCodeList.Contains(t.TrialSiteCode)).Select(t => new { t.TrialSiteCode, TrialSiteId = t.Id, t.Country }).ToList();
|
||||
|
||||
foreach (var item in excelList)
|
||||
{
|
||||
|
|
@ -955,6 +955,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
}
|
||||
|
||||
item.TrialSiteId = siteList.FirstOrDefault(t => t.TrialSiteCode.Trim().ToUpper() == item.TrialSiteCode.Trim().ToUpper()).TrialSiteId;
|
||||
|
||||
item.Country = siteList.FirstOrDefault(t => t.TrialSiteCode.Trim().ToUpper() == item.TrialSiteCode.Trim().ToUpper()).Country;
|
||||
}
|
||||
|
||||
var list = excelList.Where(t => t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.UserTypeEnum == UserTypeEnum.CRA).ToList();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ namespace IRaCIS.Core.Application.Auth
|
|||
new Claim(JwtIRaCISClaimType.UserTypeShortName,user.UserTypeShortName),
|
||||
new Claim(JwtIRaCISClaimType.PermissionStr,user.PermissionStr),
|
||||
new Claim(JwtIRaCISClaimType.IsZhiZhun,user.IsZhiZhun.ToString()),
|
||||
new Claim(JwtIRaCISClaimType.IsTestUser,user.IsTestUser.ToString())
|
||||
new Claim(JwtIRaCISClaimType.IsTestUser,user.IsTestUser.ToString()),
|
||||
new Claim(JwtIRaCISClaimType.UserWorkLanguage,user.UserWorkLanguage.ToString())
|
||||
};
|
||||
|
||||
////创建令牌
|
||||
|
|
|
|||
|
|
@ -23,5 +23,7 @@ namespace IRaCIS.Core.Application.Auth
|
|||
public bool IsZhiZhun { get; set; }
|
||||
|
||||
public string UserTypeShortName { get; set; } = string.Empty;
|
||||
|
||||
public UserWorkLanguage UserWorkLanguage { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -644,6 +644,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
saveItem.IsTestUser = true;
|
||||
}
|
||||
|
||||
|
||||
//通过医生信息,设置工作语言
|
||||
var nation = _doctorTypeRepository.Where(t => t.Id == doctorId).Select(t => t.Nation).FirstOrDefault();
|
||||
saveItem.UserWorkLanguage = nation == DoctorNation.CN ? UserWorkLanguage.CN : UserWorkLanguage.US;
|
||||
|
||||
|
||||
saveItem.UserCeateSource = UserCeateSource.ReviewerSelect;
|
||||
saveItem.TrialId = trialId;
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public bool? AcceptingNewTrial { get; set; }//是否接受新的项目
|
||||
public bool? ActivelyReading { get; set; }// 是否接受新的读片任务
|
||||
public int? Nation { get; set; }// 0-中国医生,2-美国医生,3-全部
|
||||
public DoctorNation? Nation { get; set; }// 0-中国医生,2-美国医生,3-全部
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public bool? OffLine { get; set; }
|
||||
|
||||
public Guid? SystemDocumentId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -205,7 +206,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public DateTime? EndCreateTime { get; set; }
|
||||
|
||||
|
||||
public DocLanguageType? DocLanguageType { get; set; }
|
||||
}
|
||||
|
||||
public class GetNextUnSignDocumentInDto
|
||||
|
|
@ -362,6 +363,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public bool IsPublish { get; set; } = false;
|
||||
|
||||
public DocLanguageType DocLanguageType { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
.WhereIf(inQuery.OffLine != null, t => t.OffLine == inQuery.OffLine)
|
||||
.WhereIf(inQuery.FileName != null, t => t.FileName == inQuery.FileName)
|
||||
.WhereIf(inQuery.FileFormat != null, t => t.FileFormat == inQuery.FileFormat)
|
||||
|
||||
.ProjectTo<SystemDocumentAttachmentView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await systemDocumentAttachmentQueryable.ToPagedListAsync(inQuery);
|
||||
|
|
@ -95,6 +96,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
.WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime)
|
||||
.WhereIf(inQuery.UserTypeId != null, t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId))
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted)
|
||||
.WhereIf(inQuery.DocLanguageType != null, t => t.DocLanguageType == inQuery.DocLanguageType)
|
||||
.ProjectTo<SystemDocumentView>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us, userId = _userInfo.UserRoleId });
|
||||
|
||||
return await systemDocumentQueryable.ToPagedListAsync(inQuery);
|
||||
|
|
@ -286,8 +288,11 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
|
||||
var isInternal = _userInfo.IsZhiZhun;
|
||||
var workLanguage = _userInfo.UserWorkLanguage;
|
||||
|
||||
var query = from sysDoc in _systemDocumentRepository.Where(t=>t.IsPublish)
|
||||
.WhereIf(workLanguage == UserWorkLanguage.CN, t => t.DocLanguageType == DocLanguageType.CN || t.DocLanguageType == DocLanguageType.CN_US)
|
||||
.WhereIf(workLanguage == UserWorkLanguage.US, t => t.DocLanguageType == DocLanguageType.US || t.DocLanguageType == DocLanguageType.CN_US)
|
||||
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name))
|
||||
//外部人员 只签署 外部需要签署的
|
||||
|
|
|
|||
|
|
@ -351,12 +351,16 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var isInternal = _userInfo.IsZhiZhun;
|
||||
|
||||
var workLanguage = _userInfo.UserWorkLanguage;
|
||||
|
||||
#region 统一用户修改
|
||||
|
||||
var systemDocQuery =
|
||||
from sysDoc in _systemDocumentRepository.Where(t => t.IsPublish).Where(t => t.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
//外部人员 只签署 外部需要签署的
|
||||
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
|
||||
.WhereIf(workLanguage == UserWorkLanguage.CN, t => t.DocLanguageType == DocLanguageType.CN || t.DocLanguageType == DocLanguageType.CN_US)
|
||||
.WhereIf(workLanguage == UserWorkLanguage.US, t => t.DocLanguageType == DocLanguageType.US || t.DocLanguageType == DocLanguageType.CN_US)
|
||||
from trialUser in _trialIdentityUserRepository.AsQueryable(false)
|
||||
.Where(t => t.TrialId == inQuery.TrialId && t.IdentityUserId == _userInfo.IdentityUserId
|
||||
&& t.TrialUserRoleList.Any(t => sysDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId)))
|
||||
|
|
@ -584,6 +588,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
|
||||
var needSignTrialDocCount = await _trialDocumentRepository.AsQueryable(true).Where(t => t.IsPublish)
|
||||
|
||||
.Where(t => t.TrialId == inQuery.TrialId && t.Trial.TrialStatusStr != StaticData.TrialState.TrialStopped)
|
||||
.Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
|
|
@ -591,6 +596,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
|
||||
var needSignSystemDocCount = await _systemDocumentRepository.AsQueryable(true).Where(t => t.IsPublish)
|
||||
.WhereIf(workLanguage == UserWorkLanguage.CN, t => t.DocLanguageType == DocLanguageType.CN || t.DocLanguageType == DocLanguageType.CN_US)
|
||||
.WhereIf(workLanguage == UserWorkLanguage.US, t => t.DocLanguageType == DocLanguageType.US || t.DocLanguageType == DocLanguageType.CN_US)
|
||||
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
|
||||
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.CountAsync();
|
||||
|
|
@ -969,7 +976,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
IsSystemDoc = true,
|
||||
SysDocUserSignType = sysDoc.DocUserSignType,
|
||||
IsConfirmIdentityUserInner = identityUser.IsZhiZhun,
|
||||
IsPublish=sysDoc.IsPublish,
|
||||
IsPublish = sysDoc.IsPublish,
|
||||
Id = sysDoc.Id,
|
||||
CreateTime = sysDoc.CreateTime,
|
||||
IsDeleted = sysDoc.IsDeleted,
|
||||
|
|
@ -1115,7 +1122,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
return ResponseOutput.NotOk(_localizer["TrialD_DuplicateFileInProject"]);
|
||||
}
|
||||
|
||||
var document = (await _trialDocumentRepository.Where(t => t.Id == addOrEditTrialDocument.Id, true,true).Include(t => t.NeedConfirmedUserTypeList).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
var document = (await _trialDocumentRepository.Where(t => t.Id == addOrEditTrialDocument.Id, true, true).Include(t => t.NeedConfirmedUserTypeList).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
bool beforeIsPublish = document.IsPublish;
|
||||
bool beforeIsDeleted = document.IsDeleted;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@
|
|||
public string Reviewer { get; set; } = String.Empty;
|
||||
public DateTime BeginMonth { get; set; }
|
||||
public DateTime EndMonth { get; set; }
|
||||
public int? Nation { get; set; }
|
||||
public DoctorNation? Nation { get; set; }
|
||||
}
|
||||
public class MonthlyPaymentDTO
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
{
|
||||
public DateTime StatisticsDate { get; set; }
|
||||
public string KeyWord { get; set; } = String.Empty;
|
||||
public int? Nation { get; set; }
|
||||
public DoctorNation? Nation { get; set; }
|
||||
}
|
||||
|
||||
public class MonthlyPaymentDetailQuery
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
public DateTime BeginDate { get; set; }
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
public int? Nation { get; set; }
|
||||
public DoctorNation? Nation { get; set; }
|
||||
}
|
||||
|
||||
public class TrialAnalysisQueryDTO
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public bool IsTestUser { get; set; }
|
||||
|
||||
|
||||
public UserWorkLanguage UserWorkLanguage { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -338,6 +338,8 @@ namespace IRaCIS.Application.Contracts
|
|||
public Guid? AuditRecordId { get; set; }
|
||||
|
||||
public bool? IsAuditRecordUserSelect { get; set; }
|
||||
|
||||
public UserWorkLanguage? UserWorkLanguage { get; set; }
|
||||
}
|
||||
|
||||
public class UserRoleInfoDTO
|
||||
|
|
|
|||
|
|
@ -534,6 +534,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(inQuery.UserCeateSource != null, t => t.UserCeateSource == inQuery.UserCeateSource)
|
||||
.WhereIf(inQuery.AuditRecordId != null && inQuery.IsAuditRecordUserSelect == true, t => t.AuditRecordList.Any(t => t.AuditRecordId == inQuery.AuditRecordId))
|
||||
.WhereIf(inQuery.AuditRecordId != null && inQuery.IsAuditRecordUserSelect == false, t => !t.AuditRecordList.Any(t => t.AuditRecordId == inQuery.AuditRecordId))
|
||||
.WhereIf(inQuery.UserWorkLanguage != null, t => t.UserWorkLanguage == inQuery.UserWorkLanguage)
|
||||
.ProjectTo<UserListDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await userQueryable.ToPagedListAsync(inQuery);
|
||||
|
|
@ -1269,6 +1270,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
PermissionStr = t.UserTypeRole.PermissionStr,
|
||||
UserName = t.IdentityUser.UserName,
|
||||
UserTypeShortName = t.UserTypeRole.UserTypeShortName,
|
||||
UserWorkLanguage=t.IdentityUser.UserWorkLanguage
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = userTokenInfo.IdentityUserId, ActionUserName = $"{userTokenInfo.UserName}", ActionUserType = userTokenInfo.UserTypeShortName, OptType = UserOptType.LoginSelectRole }, true);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
// 外部人员生成账号 都是外部的
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@
|
|||
public int StatType { get; set; }
|
||||
|
||||
//医生付费类型 CN US
|
||||
public int? Nation { get; set; }
|
||||
public DoctorNation? Nation { get; set; }
|
||||
|
||||
//public AttendedReviewerType? AttendedReviewerType { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
|
||||
public string UserKeyInfo { get; set; } = String.Empty;
|
||||
|
||||
|
||||
public string? Country { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class SiteCRCExportQueryDTO
|
||||
|
|
@ -43,6 +46,8 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
|
||||
public string TrialSiteAliasName { get; set; } = String.Empty;
|
||||
|
||||
public string Country { get; set; }
|
||||
|
||||
public bool IsDeleted { get; set; } = true;
|
||||
|
||||
}
|
||||
|
|
@ -62,6 +67,8 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
|
||||
public string TrialSiteCode { get; set; } = String.Empty;
|
||||
|
||||
public string Country { get; set; }
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
}
|
||||
|
|
@ -119,6 +126,8 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
public string SiteName { get; set; } = String.Empty;
|
||||
|
||||
public string AliasName { get; set; } = string.Empty;
|
||||
|
||||
public string Country { get; set; }
|
||||
}
|
||||
|
||||
public class TrialSiteScreeningDTO
|
||||
|
|
|
|||
|
|
@ -441,6 +441,8 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public Guid TrialSiteId { get; set; }
|
||||
|
||||
public string Country { get; set; }
|
||||
|
||||
public string TrialSiteCode { get; set; } = String.Empty;
|
||||
|
||||
public string TrialSiteName { get; set; } = String.Empty;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace IRaCIS.Core.Application.Interfaces
|
|||
Task<IResponseOutput> DeleteSiteCRC(Guid id, bool isDelete);
|
||||
Task<IResponseOutput> DeleteTrialSite(Guid id);
|
||||
Task<PageOutput<SiteStatDTO>> GetSiteCRCList(SiteCrcQueryDTO param);
|
||||
Task<(PageOutput<SiteStatSimpleDTO>,object)> GetSiteCRCSimpleList(SiteCrcQueryDTO param);
|
||||
Task<IResponseOutput<PageOutput<SiteStatSimpleDTO>> > GetSiteCRCSimpleList(SiteCrcQueryDTO param);
|
||||
Task<PageOutput<TrialSiteScreeningDTO>> GetTrialSiteScreeningList(TrialSiteQuery trialSiteQuery);
|
||||
Task<IEnumerable<TrialSiteForSelect>> GetTrialSiteSelect(Guid trialId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ using DocumentFormat.OpenXml.Spreadsheet;
|
|||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using MassTransit;
|
||||
using System.Globalization;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
|
@ -271,6 +272,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
generateUser.IsTestUser = true;
|
||||
}
|
||||
|
||||
//外部人员语言类型,根据PM创建时界面语言决定
|
||||
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||
generateUser.UserWorkLanguage = isEn_US ? UserWorkLanguage.US : UserWorkLanguage.CN;
|
||||
|
||||
|
||||
// 外部人员生成账号 都是外部的
|
||||
generateUser.IsZhiZhun = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
/// <summary>[new] setting页面Site列表,和getSiteCRCList对比 没有统计数据,增加了一些site信息 </summary>
|
||||
[HttpPost]
|
||||
public async Task<(PageOutput<SiteStatSimpleDTO>,object)> GetSiteCRCSimpleList(SiteCrcQueryDTO inQuery)
|
||||
public async Task<IResponseOutput<PageOutput<SiteStatSimpleDTO>>> GetSiteCRCSimpleList(SiteCrcQueryDTO inQuery)
|
||||
{
|
||||
|
||||
var trialinfo = await _trialRepository.Where(x => x.Id == inQuery.TrialId).FirstNotNullAsync();
|
||||
|
|
@ -110,6 +110,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.SiteName), t => t.TrialSiteName.Contains(inQuery.SiteName) || t.TrialSiteAliasName.Contains(inQuery.TrialSiteAliasName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteAliasName), t => t.TrialSiteAliasName.Contains(inQuery.TrialSiteAliasName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteCode), t => t.TrialSiteCode.Contains(inQuery.TrialSiteCode))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Country), t => t.Country.Contains(inQuery.Country))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, t => t.CRCUserList.Any(k => k.UserId == _userInfo.UserRoleId))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserKeyInfo), t => t.CRCUserList.Any(k => (k.UserRole.FullName).Contains(inQuery.UserKeyInfo)
|
||||
|| k.UserRole.IdentityUser.UserName.Contains(inQuery.UserKeyInfo) || k.UserRole.IdentityUser.EMail.Contains(inQuery.UserKeyInfo)))
|
||||
|
|
@ -119,8 +120,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var result = await siteStatQuery.ToPagedListAsync(inQuery);
|
||||
|
||||
return (result,new {
|
||||
IsPACSConnectAndIsTrialPACSConfirmed = trialinfo.IsPACSConnect&&trialinfo.IsTrialPACSConfirmed,
|
||||
return ResponseOutput.Ok(result, new
|
||||
{
|
||||
IsPACSConnectAndIsTrialPACSConfirmed = trialinfo.IsPACSConnect && trialinfo.IsTrialPACSConfirmed,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -150,8 +152,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
var list = _siteRepository
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(siteName), t => t.SiteName.Contains(siteName) || t.SiteNameCN.Contains(siteName) || t.AliasName.Contains(siteName))
|
||||
.Select(t => new TrialSiteSelect() { SiteId = t.Id, SiteName = _userInfo.IsEn_Us ? t.SiteName : t.SiteNameCN, AliasName = t.AliasName }).ToList()
|
||||
.OrderBy(x=>x.SiteName)
|
||||
.Select(t => new TrialSiteSelect() { SiteId = t.Id, SiteName = _userInfo.IsEn_Us ? t.SiteName : t.SiteNameCN, AliasName = t.AliasName, Country = t.Country }).ToList()
|
||||
.OrderBy(x => x.SiteName)
|
||||
.ToList();
|
||||
|
||||
return list;
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class Doctor : BaseFullAuditEntity
|
|||
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
|
||||
public int Nation { get; set; }
|
||||
public DoctorNation Nation { get; set; }
|
||||
|
||||
public Guid OrganizationId { get; set; }
|
||||
[MaxLength]
|
||||
|
|
@ -281,3 +281,12 @@ public class Doctor : BaseFullAuditEntity
|
|||
/// </summary>
|
||||
public string HospitalNameCN { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public enum DoctorNation
|
||||
{
|
||||
CN = 0,
|
||||
US = 1,
|
||||
Europe = 2,
|
||||
Other = 3
|
||||
|
||||
}
|
||||
|
|
@ -52,6 +52,9 @@ public class SystemDocument : BaseFullDeleteAuditEntity
|
|||
public DateTime? PublishDate { get; set; }
|
||||
|
||||
|
||||
public DocLanguageType DocLanguageType { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -107,3 +110,14 @@ public enum DocUserSignType
|
|||
|
||||
|
||||
}
|
||||
|
||||
public enum DocLanguageType
|
||||
{
|
||||
CN = 0,
|
||||
|
||||
US = 1,
|
||||
|
||||
//共用
|
||||
CN_US = 2
|
||||
|
||||
}
|
||||
|
|
@ -157,6 +157,17 @@ public class IdentityUser : BaseFullAuditEntity
|
|||
/// 隐私政策Id
|
||||
/// </summary>
|
||||
public Guid? PrivacyPolicyId { get; set; }
|
||||
|
||||
|
||||
public UserWorkLanguage UserWorkLanguage { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public enum UserWorkLanguage
|
||||
{
|
||||
CN = 0,
|
||||
US = 1,
|
||||
}
|
||||
|
||||
public enum UserCeateSource
|
||||
|
|
@ -169,6 +180,6 @@ public enum UserCeateSource
|
|||
|
||||
ReviewerSelect = 3,
|
||||
|
||||
External=4
|
||||
External = 4
|
||||
|
||||
}
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
namespace IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models;
|
||||
|
||||
[Comment("项目 - 项目中心表")]
|
||||
[Table("TrialSite")]
|
||||
|
|
@ -40,4 +42,9 @@ public class TrialSite : BaseFullDeleteAuditEntity
|
|||
|
||||
public string TrialSiteAliasName { get; set; } = String.Empty;
|
||||
public DateTime? EnabledTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 使用 StaticData.SiteCountry.CN;
|
||||
/// </summary>
|
||||
public string Country { get; set; }
|
||||
}
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
namespace IRaCIS.Core.Domain.Share
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Share
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户信息接口
|
||||
|
|
@ -59,5 +61,7 @@
|
|||
string TimeZoneId { get; }
|
||||
|
||||
string BrowserFingerprint { get; }
|
||||
|
||||
UserWorkLanguage UserWorkLanguage { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Share
|
||||
{
|
||||
|
|
@ -328,6 +329,25 @@ namespace IRaCIS.Core.Domain.Share
|
|||
}
|
||||
}
|
||||
|
||||
public UserWorkLanguage UserWorkLanguage
|
||||
{
|
||||
get
|
||||
{
|
||||
var userWorkLanguage = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.UserWorkLanguage);
|
||||
|
||||
if (userWorkLanguage != null && !string.IsNullOrEmpty(userWorkLanguage.Value))
|
||||
{
|
||||
return Enum.Parse<UserWorkLanguage>(userWorkLanguage.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return UserWorkLanguage.US;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Guid? SignId
|
||||
{
|
||||
|
|
@ -397,6 +417,7 @@ namespace IRaCIS.Core.Domain.Share
|
|||
|
||||
public const string PermissionStr = "permissionStr";
|
||||
|
||||
public const string UserWorkLanguage = "userWorkLanguage";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
22232
IRaCIS.Core.Infra.EFCore/Migrations/20260512034342_addWorkLanguage.Designer.cs
generated
Normal file
22232
IRaCIS.Core.Infra.EFCore/Migrations/20260512034342_addWorkLanguage.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,52 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addWorkLanguage : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Country",
|
||||
table: "TrialSite",
|
||||
type: "nvarchar(400)",
|
||||
maxLength: 400,
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "DocLanguageType",
|
||||
table: "SystemDocument",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "UserWorkLanguage",
|
||||
table: "IdentityUser",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Country",
|
||||
table: "TrialSite");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DocLanguageType",
|
||||
table: "SystemDocument");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UserWorkLanguage",
|
||||
table: "IdentityUser");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3682,6 +3682,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasColumnType("nvarchar(400)")
|
||||
.UseCollation("Chinese_PRC_CS_AS");
|
||||
|
||||
b.Property<int>("UserWorkLanguage")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false);
|
||||
|
|
@ -11264,6 +11267,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<DateTime?>("DeletedTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("DocLanguageType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DocUserSignType")
|
||||
.HasColumnType("int");
|
||||
|
||||
|
|
@ -14873,6 +14879,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
|
|
|
|||
|
|
@ -192,8 +192,14 @@ public static class StaticData
|
|||
public const string Anonymize_AddIRCInfoFiled = "Anonymize_AddIRCInfoFiled";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 中心国家
|
||||
/// </summary>
|
||||
public static class SiteCountry
|
||||
{
|
||||
public const string CN = "China";
|
||||
public const string US = "United States";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue