用户角色重命名初步修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
76649f264b
commit
32c6d745b6
|
@ -130,7 +130,7 @@ namespace IRaCIS.Api.Controllers
|
|||
//验证MFA 编码是否有问题 ,前端要拆开,自己调用验证的逻辑
|
||||
//await _userService.VerifyMFACodeAsync(userId, loginUser.MFACode);
|
||||
|
||||
//var loginUser = await _userRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
//var loginUser = await _userRoleRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
var basicInfo = await _userService.GetUserBasicInfo(userId, loginUser.Password);
|
||||
|
||||
|
@ -375,7 +375,7 @@ namespace IRaCIS.Api.Controllers
|
|||
|
||||
[HttpGet("User/UserRedirect")]
|
||||
[AllowAnonymous]
|
||||
public async Task<IActionResult> UserRedirect([FromServices] IRepository<User> _userRepository, string url, [FromServices] ILogger<ExtraController> _logger)
|
||||
public async Task<IActionResult> UserRedirect([FromServices] IRepository<UserRole> _userRoleRepository, string url, [FromServices] ILogger<ExtraController> _logger)
|
||||
{
|
||||
|
||||
var decodeUrl = System.Web.HttpUtility.UrlDecode(url);
|
||||
|
@ -391,7 +391,7 @@ namespace IRaCIS.Api.Controllers
|
|||
var errorUrl = domainStrList[0] + "//" + domainStrList[2] + "/error";
|
||||
|
||||
|
||||
if (!await _userRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd))
|
||||
if (!await _userRoleRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd))
|
||||
{
|
||||
decodeUrl = errorUrl + $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(lang == "zh" ? "您的初始化链接已过期" : "Error!The initialization link has expired. Return")} ";
|
||||
}
|
||||
|
|
|
@ -370,7 +370,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
//await _uploadHub.Clients.All.ReceivProgressAsync(archiveStudyCommand.StudyInstanceUid, receivedCount);
|
||||
|
||||
|
||||
await _uploadHub.Clients.User(_userInfo.Id.ToString()).ReceivProgressAsync(archiveStudyCommand.StudyInstanceUid, receivedCount);
|
||||
await _uploadHub.Clients.User(_userInfo.UserRoleId.ToString()).ReceivProgressAsync(archiveStudyCommand.StudyInstanceUid, receivedCount);
|
||||
|
||||
archiveResult.ReceivedFileCount = receivedCount;
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ public static class AppSettings
|
|||
case nameof(Doctor):
|
||||
return IRaCISBasicConfig.DoctorCodePrefix + codeInt.ToString("D4");
|
||||
|
||||
case nameof(User):
|
||||
case nameof(UserRole):
|
||||
return IRaCISBasicConfig.UserCodePrefix + codeInt.ToString("D4");
|
||||
|
||||
case nameof(QCChallenge):
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
分配规则
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskAllocationRuleService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskAllocationRule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Enroll},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectCanceDoctor},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskAllocationRuleService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskAllocationRule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Enroll},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectCanceDoctor},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
分配规则
|
||||
</summary>
|
||||
|
@ -147,7 +147,7 @@
|
|||
一致性分析配置表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskConsistentRule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Application.Contracts.IReadingClinicalDataService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},Medallion.Threading.IDistributedLockProvider,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSite},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Enroll},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskConsistentRule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Application.Contracts.IReadingClinicalDataService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},Medallion.Threading.IDistributedLockProvider,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSite},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Enroll},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
一致性分析配置表
|
||||
</summary>
|
||||
|
@ -1940,7 +1940,7 @@
|
|||
FrontAuditConfigService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.FrontAuditConfig},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DataInspection},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CheckChallengeDialog},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.FrontAuditConfig},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DataInspection},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CheckChallengeDialog},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
FrontAuditConfigService
|
||||
</summary>
|
||||
|
@ -2249,7 +2249,7 @@
|
|||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.UserService.GetUser">
|
||||
<member name="M:IRaCIS.Core.Application.Service.UserService.GetUser(System.Guid)">
|
||||
<summary>
|
||||
根据用户Id获取用户详细信息[New]
|
||||
</summary>
|
||||
|
@ -12576,7 +12576,7 @@
|
|||
生成的阅片模块(在大列表上展示的) 阅片期
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadModuleService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ClinicalDataTrialSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModuleView},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingClinicalData},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingPeriodSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModule},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadModuleService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ClinicalDataTrialSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModuleView},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingClinicalData},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingPeriodSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModule},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
生成的阅片模块(在大列表上展示的) 阅片期
|
||||
</summary>
|
||||
|
@ -12671,7 +12671,7 @@
|
|||
用户WL模板
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.UserWLTemplateService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserWLTemplate},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.UserWLTemplateService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserWLTemplate},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
用户WL模板
|
||||
</summary>
|
||||
|
@ -12715,7 +12715,7 @@
|
|||
Dashboard统计、全局工作量统计、入组两个维度统计(按照项目、按照人)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.StatisticsService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Enroll},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Workload},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CRO},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Hospital},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EnrollDetail},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.StatisticsService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Enroll},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Workload},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CRO},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Hospital},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EnrollDetail},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
Dashboard统计、全局工作量统计、入组两个维度统计(按照项目、按照人)
|
||||
</summary>
|
||||
|
@ -12834,7 +12834,7 @@
|
|||
项目外部人员 录入流程相关
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialExternalUserService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialExternalUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserType},IRaCIS.Core.Application.Service.IMailVerificationService,Medallion.Threading.IDistributedLockProvider,AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialExternalUserService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialExternalUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserType},IRaCIS.Core.Application.Service.IMailVerificationService,Medallion.Threading.IDistributedLockProvider,AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
项目外部人员 录入流程相关
|
||||
</summary>
|
||||
|
@ -13314,7 +13314,7 @@
|
|||
加急的医学反馈任务 通知MIM
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.UrgentMedicalReviewAddedEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.UrgentMedicalReviewAddedEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
加急的医学反馈任务 通知MIM
|
||||
</summary>
|
||||
|
@ -13332,7 +13332,7 @@
|
|||
MIM 回复医学返回通知IR
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.UrgentMIMRepliedMedicalReviewConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.UrgentMIMRepliedMedicalReviewConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
MIM 回复医学返回通知IR
|
||||
</summary>
|
||||
|
@ -13349,7 +13349,7 @@
|
|||
加急阅片 IR 申请重阅 或者PM 申请重阅
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.UrgentIRApplyedReReadingConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.UrgentIRApplyedReReadingConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
加急阅片 IR 申请重阅 或者PM 申请重阅
|
||||
</summary>
|
||||
|
@ -13389,7 +13389,7 @@
|
|||
CRC 提交了 通知QC进行质控 Code005,006
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.CRCSubmitedAndQCToAuditEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.CRCSubmitedAndQCToAuditEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
CRC 提交了 通知QC进行质控 Code005,006
|
||||
</summary>
|
||||
|
@ -13399,7 +13399,7 @@
|
|||
CRC 回复质控质疑 通知QC Code012,013
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.CRCRepliedQCChallengeEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.CRCRepliedQCChallengeEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
CRC 回复质控质疑 通知QC Code012,013
|
||||
</summary>
|
||||
|
@ -13409,7 +13409,7 @@
|
|||
QC回复 质控质疑,通知CRC (014,015)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.QCRepliedQCChallengeEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.QCRepliedQCChallengeEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
QC回复 质控质疑,通知CRC (014,015)
|
||||
</summary>
|
||||
|
@ -13419,19 +13419,19 @@
|
|||
CRC 回复一致性核查质疑 通知PM (019,020)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.CRCRepliedCheckChallengeEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.CRCRepliedCheckChallengeEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
CRC 回复一致性核查质疑 通知PM (019,020)
|
||||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "T:IRaCIS.Core.Application.MassTransit.Consumer.PMRepliedCheckChallengeEventConsumer" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.MassTransit.Consumer.PMRepliedCheckChallengeEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CheckChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.MassTransit.Consumer.PMRepliedCheckChallengeEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CheckChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})" -->
|
||||
<member name="T:IRaCIS.Core.Application.MassTransit.Consumer.CheckStateChangedToAuditEventConsumer">
|
||||
<summary>
|
||||
通知PM 进行一致性核查 (018,030)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.CheckStateChangedToAuditEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.CheckStateChangedToAuditEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
通知PM 进行一致性核查 (018,030)
|
||||
</summary>
|
||||
|
@ -13441,7 +13441,7 @@
|
|||
QC 领取了质控任务 (007,008)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.QCClaimTaskEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.QCClaimTaskEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
QC 领取了质控任务 (007,008)
|
||||
</summary>
|
||||
|
@ -13452,15 +13452,15 @@
|
|||
publish 请求流不会先到消费者,发布后,直接执行后续代码
|
||||
|
||||
</summary>
|
||||
<param name="_userRepository"></param>
|
||||
<param name="_userRoleRepository"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.MasstransitTestConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.MasstransitTestConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole})">
|
||||
<summary>
|
||||
meditor send 的时候,请求流会先到消费者,返回后才会执行后续代码
|
||||
publish 请求流不会先到消费者,发布后,直接执行后续代码
|
||||
|
||||
</summary>
|
||||
<param name="_userRepository"></param>
|
||||
<param name="_userRoleRepository"></param>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.MassTransit.Consumer.QCImageQuestionRecurringEventConsumer">
|
||||
<summary>
|
||||
|
@ -14985,7 +14985,7 @@
|
|||
UserTypeRoleService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.UserTypeRoleService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.UserTypeRoleService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
UserTypeRoleService
|
||||
</summary>
|
||||
|
@ -15418,7 +15418,7 @@
|
|||
TrialSiteSurveyService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSite},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VerificationCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUser},Medallion.Threading.IDistributedLockProvider,IRaCIS.Core.Application.Auth.ITokenService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserType},IRaCIS.Core.Application.Service.IMailVerificationService,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSite},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VerificationCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUser},Medallion.Threading.IDistributedLockProvider,IRaCIS.Core.Application.Auth.ITokenService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserType},IRaCIS.Core.Application.Service.IMailVerificationService,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
TrialSiteSurveyService
|
||||
</summary>
|
||||
|
@ -15524,7 +15524,7 @@
|
|||
TrialSiteUserSurveyService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteUserSurveyService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteUserSurveyService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
TrialSiteUserSurveyService
|
||||
</summary>
|
||||
|
@ -16045,7 +16045,7 @@
|
|||
SystemDocumentService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocConfirmedUser},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocConfirmedUser},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
SystemDocumentService
|
||||
</summary>
|
||||
|
|
|
@ -191,7 +191,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
|
||||
// dialogMsg.AppendLine(@$"<br>说明:为高效解决/处理以上全部质疑问题,麻烦您准确核实实际影像检查情况。请注意影像日期与实际检查的日期可能会不一致,部分检查(如PET -CT)可能同时存在多种模态影像。准确核实后,请回复该访视正确的影像检查情况。");
|
||||
dbSV.CheckState = CheckStateEnum.CVPassed;
|
||||
dbSV.CheckUserId = _userInfo.Id;
|
||||
dbSV.CheckUserId = _userInfo.UserRoleId;
|
||||
dbSV.CheckPassedTime = DateTime.Now;
|
||||
dbSV.CheckChallengeState = CheckChanllengeTypeEnum.Closed;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer;
|
|||
/// 加急的医学反馈任务 通知MIM
|
||||
/// </summary>
|
||||
public class UrgentMedicalReviewAddedEventConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TaskMedicalReview> _taskMedicalReviewRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
|
@ -58,7 +58,7 @@ public class UrgentMedicalReviewAddedEventConsumer(
|
|||
return;
|
||||
}
|
||||
var criterion = await _readingQuestionCriterionTrialRepository.FirstOrDefaultAsync(x => x.Id == medicalReview.VisitTask.TrialReadingCriterionId);
|
||||
var userinfo = await _userRepository.Where(x => x.Id == medicalReview.MedicalManagerUserId).FirstOrDefaultAsync();
|
||||
var userinfo = await _userRoleRepository.Where(x => x.Id == medicalReview.MedicalManagerUserId).FirstOrDefaultAsync();
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == medicalReview.VisitTaskId).Include(x=>x.SourceSubjectVisit).Include(x => x.ReadModule).Include(x => x.Subject).FirstNotNullAsync();
|
||||
|
||||
|
@ -128,7 +128,7 @@ public class UrgentMedicalReviewAddedEventConsumer(
|
|||
|
||||
//IR 回复医学反馈通知MIM
|
||||
public class UrgentIRRepliedMedicalReviewConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TaskMedicalReview> _taskMedicalReviewRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
|
@ -159,7 +159,7 @@ public class UrgentIRRepliedMedicalReviewConsumer(
|
|||
return;
|
||||
}
|
||||
var criterion = await _readingQuestionCriterionTrialRepository.FirstOrDefaultAsync(x => x.Id == medicalReview.VisitTask.TrialReadingCriterionId);
|
||||
var userinfo = await _userRepository.Where(x => x.Id == medicalReview.MedicalManagerUserId).FirstOrDefaultAsync();
|
||||
var userinfo = await _userRoleRepository.Where(x => x.Id == medicalReview.MedicalManagerUserId).FirstOrDefaultAsync();
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == medicalReview.VisitTaskId).Include(x => x.SourceSubjectVisit).Include(x => x.ReadModule).Include(x => x.Subject).FirstNotNullAsync();
|
||||
|
||||
|
@ -231,7 +231,7 @@ public class UrgentIRRepliedMedicalReviewConsumer(
|
|||
/// MIM 回复医学返回通知IR
|
||||
/// </summary>
|
||||
public class UrgentMIMRepliedMedicalReviewConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TaskMedicalReview> _taskMedicalReviewRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
|
@ -268,7 +268,7 @@ public class UrgentMIMRepliedMedicalReviewConsumer(
|
|||
var criterion = await _readingQuestionCriterionTrialRepository.FirstOrDefaultAsync(x => x.Id == medicalReview.VisitTask.TrialReadingCriterionId);
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == medicalReview.VisitTaskId).Include(x => x.SourceSubjectVisit).Include(x => x.ReadModule).Include(x => x.Subject).FirstNotNullAsync();
|
||||
|
||||
var userinfo = await _userRepository.Where(x => x.Id == taskInfo.DoctorUserId).FirstOrDefaultAsync();
|
||||
var userinfo = await _userRoleRepository.Where(x => x.Id == taskInfo.DoctorUserId).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
|
||||
|
@ -346,7 +346,7 @@ public class UrgentMIMRepliedMedicalReviewConsumer(
|
|||
/// 加急阅片 IR 申请重阅 或者PM 申请重阅
|
||||
/// </summary>
|
||||
public class UrgentIRApplyedReReadingConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _trialUseRepository,
|
||||
IRepository<TaskMedicalReview> _taskMedicalReviewRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
|
@ -370,7 +370,7 @@ public class UrgentIRApplyedReReadingConsumer(
|
|||
var criterion = await _readingQuestionCriterionTrialRepository.FirstOrDefaultAsync(x => x.Id == taskInfo.TrialReadingCriterionId);
|
||||
|
||||
|
||||
var doctorInfo = await _userRepository.Where(x => x.Id == taskInfo.DoctorUserId).FirstOrDefaultAsync();
|
||||
var doctorInfo = await _userRoleRepository.Where(x => x.Id == taskInfo.DoctorUserId).FirstOrDefaultAsync();
|
||||
|
||||
var trialUser = await _trialUseRepository.Where(x => x.TrialId == taskInfo.TrialId).Include(x => x.User).Select(x=>x.User).ToListAsync();
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ public class SiteSurverRejectedEventConsumer(
|
|||
//PM 驳回到SPM
|
||||
if (siteSurveyInfo.State == TrialSiteSurveyEnum.CRCSubmitted)
|
||||
{
|
||||
//var user = await _userRepository.FirstOrDefaultAsync(t => t.Id == siteSurveyInfo.PreliminaryUserId);
|
||||
//var user = await _userRoleRepository.FirstOrDefaultAsync(t => t.Id == siteSurveyInfo.PreliminaryUserId);
|
||||
|
||||
//name = user.FullName;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer;
|
|||
/// CRC 提交了 通知QC进行质控 Code005,006
|
||||
/// </summary>
|
||||
public class CRCSubmitedAndQCToAuditEventConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _trialUseRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
|
@ -127,7 +127,7 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
|
|||
/// CRC 回复质控质疑 通知QC Code012,013
|
||||
/// </summary>
|
||||
public class CRCRepliedQCChallengeEventConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _trialUseRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
|
@ -224,7 +224,7 @@ public class CRCRepliedQCChallengeEventConsumer(
|
|||
/// QC回复 质控质疑,通知CRC (014,015)
|
||||
/// </summary>
|
||||
public class QCRepliedQCChallengeEventConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _trialUseRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
|
@ -333,7 +333,7 @@ public class QCRepliedQCChallengeEventConsumer(
|
|||
/// CRC 回复一致性核查质疑 通知PM (019,020)
|
||||
/// </summary>
|
||||
public class CRCRepliedCheckChallengeEventConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _trialUseRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
|
@ -425,7 +425,7 @@ public class CRCRepliedCheckChallengeEventConsumer(
|
|||
|
||||
/// </summary>
|
||||
public class PMRepliedCheckChallengeEventConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _trialUseRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
|
@ -524,7 +524,7 @@ public class PMRepliedCheckChallengeEventConsumer(
|
|||
/// 通知PM 进行一致性核查 (018,030)
|
||||
/// </summary>
|
||||
public class CheckStateChangedToAuditEventConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _trialUseRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
|
@ -612,7 +612,7 @@ public class CheckStateChangedToAuditEventConsumer(
|
|||
/// QC 领取了质控任务 (007,008)
|
||||
/// </summary>
|
||||
public class QCClaimTaskEventConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _trialUseRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
|
|
|
@ -30,13 +30,13 @@ public class MasstransiTestCommand
|
|||
/// publish 请求流不会先到消费者,发布后,直接执行后续代码
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="_userRepository"></param>
|
||||
public class MasstransitTestConsumer(IRepository<User> _userRepository) : IConsumer<MasstransiTestCommand>
|
||||
/// <param name="_userRoleRepository"></param>
|
||||
public class MasstransitTestConsumer(IRepository<UserRole> _userRoleRepository) : IConsumer<MasstransiTestCommand>
|
||||
{
|
||||
public async Task Consume(ConsumeContext<MasstransiTestCommand> context)
|
||||
{
|
||||
|
||||
Console.WriteLine(_userRepository._dbContext.GetHashCode());
|
||||
Console.WriteLine(_userRoleRepository._dbContext.GetHashCode());
|
||||
Console.WriteLine("Now is " + DateTime.Now.ToString());
|
||||
Console.WriteLine($"MassTransit.Consumer :{context.Message.value}");
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class TaskAllocationRuleService(IRepository<TaskAllocationRule> _taskAllocationRuleRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<Enroll> _enrollRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||
IRepository<SubjectCanceDoctor> _subjectCanceDoctorRepository,
|
||||
|
@ -124,7 +124,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<List<TrialDoctorUserSelectView>> GetDoctorUserSelectList(Guid trialId, [FromServices] IRepository<Enroll> _enrollRepository)
|
||||
{
|
||||
var query = from enroll in _enrollRepository.Where(t => t.TrialId == trialId && t.EnrollStatus >= EnrollStatus.ConfirmIntoGroup)
|
||||
join user in _userRepository.AsQueryable() on enroll.DoctorId equals user.DoctorId
|
||||
join user in _userRoleRepository.AsQueryable() on enroll.DoctorId equals user.DoctorId
|
||||
select new TrialDoctorUserSelectView()
|
||||
{
|
||||
TrialId = enroll.TrialId,
|
||||
|
@ -151,7 +151,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(selectQuery.TrialReadingCriterionId != null && selectQuery.ReadingCategory == null, t => t.Enroll.EnrollReadingCategoryList.Any(t => t.TrialReadingCriterionId == selectQuery.TrialReadingCriterionId))
|
||||
.WhereIf(selectQuery.TrialReadingCriterionId != null && selectQuery.ReadingCategory != null,
|
||||
t => t.Enroll.EnrollReadingCategoryList.Any(t => t.TrialReadingCriterionId == selectQuery.TrialReadingCriterionId && t.ReadingCategory == selectQuery.ReadingCategory))
|
||||
join user in _userRepository.AsQueryable() on allocationRule.DoctorUserId equals user.Id
|
||||
join user in _userRoleRepository.AsQueryable() on allocationRule.DoctorUserId equals user.Id
|
||||
select new TrialDoctorUserSelectView()
|
||||
{
|
||||
TrialId = allocationRule.TrialId,
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<Trial> _trialRepository,
|
||||
IRepository<TrialSite> _trialSiteRepository,
|
||||
IRepository<Enroll> _enrollRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialVirtualSiteCodeUpdate> _trialVirtualSiteCodeUpdateRepository,
|
||||
IVisitTaskHelpeService _visitTaskCommonService, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITaskConsistentRuleService
|
||||
{
|
||||
|
@ -369,7 +369,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var doctorUserIdQuery = from enroll in _enrollRepository.Where(t => t.TrialId == trialId).Where(t => t.EnrollReadingCategoryList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(c => c.ReadingCategory == ReadingCategory.Global || c.ReadingCategory == ReadingCategory.Visit))
|
||||
.Where(t => t.EnrollReadingCriteriaList.Any(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsJoinAnalysis == true))
|
||||
join user in _userRepository.Where() on enroll.DoctorId equals user.DoctorId
|
||||
join user in _userRoleRepository.Where() on enroll.DoctorId equals user.DoctorId
|
||||
select user.Id;
|
||||
|
||||
var configDoctorUserIdList = await doctorUserIdQuery.ToListAsync();
|
||||
|
@ -784,7 +784,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var taskConsistentRuleQueryable = from enroll in _enrollRepository.Where(t => t.TrialId == trialId && t.EnrollStatus == EnrollStatus.ConfirmIntoGroup
|
||||
&& t.EnrollReadingCriteriaList.Any(c => c.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && c.IsJoinAnalysis))
|
||||
join user in _userRepository.Where() on enroll.DoctorUserId equals user.Id
|
||||
join user in _userRoleRepository.Where() on enroll.DoctorUserId equals user.Id
|
||||
join taskConsistentRule in _taskConsistentRuleRepository.Where(t => t.TrialId == trialId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.IsSelfAnalysis) on enroll.TrialId equals taskConsistentRule.TrialId
|
||||
select new TaskConsistentRuleView()
|
||||
{
|
||||
|
|
|
@ -196,7 +196,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<IResponseOutput<PageOutput<TaskMedicalReviewView>>> GetMIMMedicalReviewTaskList(TaskMedicalReviewQuery inQuery)
|
||||
{
|
||||
|
||||
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId && t.MedicalManagerUserId == _userInfo.Id && t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId && t.MedicalManagerUserId == _userInfo.UserRoleId && t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||
|
||||
.WhereIf(inQuery.IsGetNextMedicalReviewTask,
|
||||
x => (
|
||||
|
|
|
@ -843,7 +843,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
var visitTaskQueryable = _visitTaskReReadingRepository
|
||||
.Where(t => t.RequestReReadingType == RequestReReadingType.DocotorApply)
|
||||
.Where(t => t.OriginalReReadingTask.DoctorUserId == _userInfo.Id)
|
||||
.Where(t => t.OriginalReReadingTask.DoctorUserId == _userInfo.UserRoleId)
|
||||
.Where(t => t.OriginalReReadingTask.TrialId == inQuery.TrialId)
|
||||
.WhereIf(inQuery.RequestReReadingResultEnum != null, t => t.RequestReReadingResultEnum == inQuery.RequestReReadingResultEnum)
|
||||
.WhereIf(inQuery.RootReReadingTaskId != null, t => t.RootReReadingTaskId == inQuery.RootReReadingTaskId || t.OriginalReReadingTaskId == inQuery.RootReReadingTaskId)
|
||||
|
@ -961,7 +961,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
//随机阅片
|
||||
else
|
||||
{
|
||||
var taskQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId == trialReadingCriterionId)
|
||||
var taskQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.UserRoleId && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId == trialReadingCriterionId)
|
||||
.Where(x => !x.Subject.IsDeleted).Where(x => (x.IsNeedClinicalDataSign && x.IsClinicalDataSign) || !x.IsNeedClinicalDataSign);
|
||||
|
||||
iRUnReadOut = new IRUnReadOutDto()
|
||||
|
@ -1005,7 +1005,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
if (critrion.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||
{
|
||||
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect)
|
||||
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.UserRoleId && x.TaskState == TaskState.Effect)
|
||||
|
||||
.WhereIf(inQuery.SubjectId != null, x => x.SubjectId == inQuery.SubjectId)
|
||||
//前序 不存在 未生成任务的访视
|
||||
|
@ -1126,19 +1126,19 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
if (subjectId != null)
|
||||
{
|
||||
//找到 非一致性分析,未签名,状态正常的 并且任务名称是TimePoint的 任务
|
||||
var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||
var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId
|
||||
&& t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskBlindName == "Timepoint" && t.ReadingCategory == ReadingCategory.Visit
|
||||
&& (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze), true).ToListAsync();
|
||||
|
||||
if (needDealTaskList.Count > 0)
|
||||
{
|
||||
//已完成的访视任务数量(包含重阅的)
|
||||
var haveFinishedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||
var haveFinishedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit);
|
||||
|
||||
//已经处理过的任务名称的数量
|
||||
|
||||
var haveDealedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||
var haveDealedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId
|
||||
&& t.ReadingTaskState != ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit && t.TaskBlindName != "Timepoint");
|
||||
|
||||
|
||||
|
@ -1158,7 +1158,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
}
|
||||
}
|
||||
|
||||
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect)
|
||||
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.UserRoleId && x.TaskState == TaskState.Effect)
|
||||
.WhereIf(inQuery.SubjectId != null, x => x.SubjectId == inQuery.SubjectId)
|
||||
.WhereIf(!string.IsNullOrEmpty(subjectCode), t => (t.Subject.Code.Contains(subjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(subjectCode!) && t.IsAnalysisCreate));
|
||||
|
||||
|
@ -1221,7 +1221,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
|
||||
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据
|
||||
.Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据
|
||||
|
||||
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId)
|
||||
|
@ -1253,10 +1253,10 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> AIRReReading(AIRReReadingCommand command)
|
||||
{
|
||||
var baseLineTaskList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
|
||||
var baseLineTaskList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.UserRoleId
|
||||
&& t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.SourceSubjectVisit.IsBaseLine == true).ToListAsync();
|
||||
|
||||
var judegeList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
|
||||
var judegeList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.UserRoleId
|
||||
&& t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Judge && t.ReadingTaskState == ReadingTaskState.HaveSigned).ToListAsync();
|
||||
|
||||
foreach (var item in judegeList)
|
||||
|
@ -1284,7 +1284,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
|
||||
|
||||
var requestRecordList = await _visitTaskReReadingRepository.Where(t => baseLineTaskIdList.Contains(t.OriginalReReadingTaskId) && t.RequestReReadingUserId == _userInfo.Id && t.RequestReReadingReason == "AIR自动重阅基线").ToListAsync();
|
||||
var requestRecordList = await _visitTaskReReadingRepository.Where(t => baseLineTaskIdList.Contains(t.OriginalReReadingTaskId) && t.RequestReReadingUserId == _userInfo.UserRoleId && t.RequestReReadingReason == "AIR自动重阅基线").ToListAsync();
|
||||
|
||||
if (requestRecordList.Count != baseLineTaskIdList.Count)
|
||||
{
|
||||
|
@ -1496,7 +1496,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
RootReReadingTaskId = rootReReadingTaskId == Guid.Empty ? task.Id : rootReReadingTaskId,
|
||||
OriginalReReadingTaskId = task.Id,
|
||||
RequestReReadingTime = DateTime.Now,
|
||||
RequestReReadingUserId = _userInfo.Id,
|
||||
RequestReReadingUserId = _userInfo.UserRoleId,
|
||||
IsCopyOrigenalForms = applyReReadingCommand.IsCopyOrigenalForms,
|
||||
IsCopyFollowForms = applyReReadingCommand.IsCopyFollowForms,
|
||||
RequestReReadingReason = applyReReadingCommand.RequestReReadingReason,
|
||||
|
@ -1518,7 +1518,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
if (!isSPMjoin && IsPMOrAPm())
|
||||
{
|
||||
var requestRecordList = await _visitTaskReReadingRepository.Where(t => applyReReadingCommand.TaskIdList.Contains(t.OriginalReReadingTaskId) && t.RequestReReadingUserId == _userInfo.Id).ToListAsync();
|
||||
var requestRecordList = await _visitTaskReReadingRepository.Where(t => applyReReadingCommand.TaskIdList.Contains(t.OriginalReReadingTaskId) && t.RequestReReadingUserId == _userInfo.UserRoleId).ToListAsync();
|
||||
|
||||
await ConfirmReReading(new ConfirmReReadingCommand()
|
||||
{
|
||||
|
@ -1623,7 +1623,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
if ((origenalTask.TaskState != TaskState.Effect && origenalTask.TaskState != TaskState.Freeze))
|
||||
{
|
||||
await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new VisitTaskReReading() { RequestReReadingConfirmUserId = _userInfo.Id, RequestReReadingResultEnum = RequestReReadingResult.Invalid });
|
||||
await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new VisitTaskReReading() { RequestReReadingConfirmUserId = _userInfo.UserRoleId, RequestReReadingResultEnum = RequestReReadingResult.Invalid });
|
||||
|
||||
//---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作
|
||||
return ResponseOutput.Ok(string.Empty, msg: _localizer["VisitTask_ReapplyStatusConflict"]);
|
||||
|
@ -1634,7 +1634,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
//更新申请信息
|
||||
var visitTaskReReadingAppply = await _visitTaskReReadingRepository.FirstOrDefaultAsync(t => t.Id == item.Id);
|
||||
visitTaskReReadingAppply.RequestReReadingConfirmUserId = _userInfo.Id;
|
||||
visitTaskReReadingAppply.RequestReReadingConfirmUserId = _userInfo.UserRoleId;
|
||||
visitTaskReReadingAppply.RequestReReadingResultEnum = agreeReReadingCommand.RequestReReadingResultEnum;
|
||||
visitTaskReReadingAppply.RequestReReadingRejectReason = agreeReReadingCommand.RequestReReadingRejectReason;
|
||||
|
||||
|
@ -2616,7 +2616,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
{
|
||||
|
||||
// IR 申请 PM 同意
|
||||
if (((IsPMOrAPm() && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.IndependentReviewer))
|
||||
if (((IsPMOrAPm() && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUserRole.UserTypeEnum == UserTypeEnum.IndependentReviewer))
|
||||
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null)))
|
||||
{
|
||||
|
||||
|
@ -2659,7 +2659,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
//IR 申请 PM 同意 仅仅影响自己
|
||||
|
||||
if ((IsPMOrAPm() && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.IndependentReviewer))
|
||||
if ((IsPMOrAPm() && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUserRole.UserTypeEnum == UserTypeEnum.IndependentReviewer))
|
||||
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null))
|
||||
{
|
||||
|
||||
|
@ -2778,7 +2778,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
//PM 影响所有阅片人 仅仅针对访视 SPM CPM 调用
|
||||
|
||||
else if (((IsSpmOrCPM()) && applyId != null &&
|
||||
await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && (t.CreateUser.UserTypeEnum == UserTypeEnum.ProjectManager || t.CreateUser.UserTypeEnum == UserTypeEnum.APM)) && filterObj.IsAnalysisCreate == false && filterObj.ReadingCategory == ReadingCategory.Visit)
|
||||
await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && (t.CreateUserRole.UserTypeEnum == UserTypeEnum.ProjectManager || t.CreateUserRole.UserTypeEnum == UserTypeEnum.APM)) && filterObj.IsAnalysisCreate == false && filterObj.ReadingCategory == ReadingCategory.Visit)
|
||||
|| (IsPMOrAPm() && applyId == null))
|
||||
{
|
||||
|
||||
|
@ -2876,7 +2876,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
var list = await _visitTaskRepository.Where(filterExpression)
|
||||
//IR 申请的时候,仅仅看到影响自己的
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer, t => t.DoctorUserId == _userInfo.Id)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer, t => t.DoctorUserId == _userInfo.UserRoleId)
|
||||
.OrderBy(t => t.VisitTaskNum).ProjectTo<InfluenceTaskInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
#region 影响后的操作
|
||||
|
|
|
@ -205,7 +205,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<TaskAllocationRuleAddOrEdit, TaskAllocationRule>();
|
||||
|
||||
|
||||
CreateMap<User, TrialDoctorUserSelectView>()
|
||||
CreateMap<UserRole, TrialDoctorUserSelectView>()
|
||||
.ForMember(o => o.DoctorUserId, t => t.MapFrom(u => u.Id))
|
||||
.ForMember(o => o.FullName, t => t.MapFrom(u => u.FullName));
|
||||
|
||||
|
@ -250,7 +250,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
CreateMap<User, UserSimpleInfo>()
|
||||
CreateMap<UserRole, UserSimpleInfo>()
|
||||
|
||||
.ForMember(o => o.UserId, t => t.MapFrom(u => u.Id))
|
||||
.ForMember(o => o.UserCode, t => t.MapFrom(u => u.UserCode))
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(queryCommonDocument.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryCommonDocument.BusinessScenarioEnum)
|
||||
.WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Code), t => t.Code.Contains(queryCommonDocument.Code))
|
||||
.WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name) || t.NameCN.Contains(queryCommonDocument.Name))
|
||||
.ProjectTo<CommonDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
|
||||
.ProjectTo<CommonDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.UserRoleId });
|
||||
|
||||
return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument);
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode),
|
||||
t => t.TrialSite.TrialSiteCode.Contains(param.TrialSiteCode))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator,
|
||||
t => t.UserId == _userInfo.Id)
|
||||
t => t.UserId == _userInfo.UserRoleId)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserKeyInfo), t => (t.User.FullName).Contains(param.UserKeyInfo)
|
||||
|| t.User.UserName.Contains(param.UserKeyInfo) || t.User.EMail.Contains(param.UserKeyInfo))
|
||||
|
||||
|
@ -223,7 +223,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
.WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.ExperimentName.Contains(inQuery.ExperimentName))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId && t.IsDeleted == false) && t.IsDeleted == false)
|
||||
.WhereIf(inQuery.CriterionType != null, o => o.TrialReadingCriterionList.Any(t => t.CriterionType == inQuery.CriterionType && t.IsSigned && t.IsConfirm))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.PM_EMail), o => o.TrialUserList.Any(t => t.User.EMail.Contains(inQuery.PM_EMail) && (t.User.UserTypeEnum == UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM)))
|
||||
.Select(t => new TrialToBeDoneDto()
|
||||
|
@ -250,49 +250,49 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
SPM_ReviewerSelectApprovalCount = isSPMOrCPM ? t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).Count() : 0,
|
||||
|
||||
MIM_UrgentCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id)
|
||||
MIM_UrgentCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId)
|
||||
.Where(u => u.VisitTask.IsUrgent &&
|
||||
u.AuditState != MedicalReviewAuditState.HaveSigned).Count() : 0,
|
||||
|
||||
MIM_PendingResponseCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id)
|
||||
MIM_PendingResponseCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId)
|
||||
.Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IndependentReviewer && u.AuditState == MedicalReviewAuditState.Auditing).Count() : 0,
|
||||
|
||||
MIM_PendingReviewCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id)
|
||||
MIM_PendingReviewCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId)
|
||||
.Where(u => u.AuditState != MedicalReviewAuditState.HaveSigned && u.LatestReplyUser.UserTypeEnum != UserTypeEnum.IndependentReviewer).Count() : 0,
|
||||
|
||||
CRC_UrgentCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id) && t.IsUrgent).Count() : 0,
|
||||
CRC_UrgentCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId) && t.IsUrgent).Count() : 0,
|
||||
|
||||
CRC_CheckQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
CRC_CheckQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count() : 0,
|
||||
|
||||
CRC_QCQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)).SelectMany(c => c.QCChallengeList)
|
||||
CRC_QCQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)).SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.IsClosed == false && (u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC || u.LatestReplyUserId == null)).Count() : 0,
|
||||
|
||||
|
||||
//待审核 审核中 加急的数量
|
||||
IQC_UrgentCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id && t.QCProcessEnum != TrialQCProcess.NotAudit && t.IsUrgent).Count() : 0,
|
||||
IQC_UrgentCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId && t.QCProcessEnum != TrialQCProcess.NotAudit && t.IsUrgent).Count() : 0,
|
||||
|
||||
//审核未完成
|
||||
IQC_AuditToBeDealedCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id && t.QCProcessEnum != TrialQCProcess.NotAudit).Count() : 0,
|
||||
IQC_AuditToBeDealedCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId && t.QCProcessEnum != TrialQCProcess.NotAudit).Count() : 0,
|
||||
|
||||
//质疑待处理
|
||||
IQC_QuestionToBeDealedCount = isIQC ? t.SubjectVisitList.SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() : 0,
|
||||
.Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() : 0,
|
||||
|
||||
//待领取
|
||||
IQC_ToBeClaimedCount = isIQC ? t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed)
|
||||
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count() : 0,
|
||||
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count() : 0,
|
||||
|
||||
|
||||
IR_ReadingCriterionList = isIR ? t.TrialReadingCriterionList.Where(t => t.IsConfirm && t.IsSigned).OrderBy(t => t.CriterionName).Select(t => t.CriterionName).ToList() : null,
|
||||
|
||||
IR_PMEmailList = isIR ? t.TrialUserList.Where(t => t.User.UserTypeEnum == UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM).OrderBy(t => t.User.EMail).Select(t => t.User.EMail).ToList() : null,
|
||||
|
||||
IR_TotalReadCount = isIR ? t.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() : 0,
|
||||
IR_TotalReadCount = isIR ? t.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() : 0,
|
||||
|
||||
|
||||
IR_UnReadCount = isIR ? t.VisitTaskList
|
||||
.Where(c => c.DoctorUserId == _userInfo.Id && c.ReadingTaskState != ReadingTaskState.HaveSigned && c.TaskState == TaskState.Effect && c.TrialReadingCriterion.IsSigned)
|
||||
.Where(c => c.DoctorUserId == _userInfo.UserRoleId && c.ReadingTaskState != ReadingTaskState.HaveSigned && c.TaskState == TaskState.Effect && c.TrialReadingCriterion.IsSigned)
|
||||
// 前序 不存在 未一致性核查未通过的
|
||||
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
||||
//前序 不存在 未生成任务的访视
|
||||
|
@ -479,7 +479,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
.WhereIf(inQuery.SubmitState != null, t => t.SubmitState == inQuery.SubmitState)
|
||||
.WhereIf(inQuery.ChallengeState != null, t => t.ChallengeState == inQuery.ChallengeState)
|
||||
.WhereIf(inQuery.IsUrgent != null, t => t.IsUrgent == inQuery.IsUrgent)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.ProjectTo<CRCVisitExportDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
var list = query.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.BlindName).ToList();
|
||||
|
@ -587,7 +587,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
.WhereIf(inQuery.IsOverTime != null && inQuery.IsOverTime == true, t => t.IsClosed ? t.ClosedTime > t.DeadlineTime : DateTime.Now > t.DeadlineTime)
|
||||
.WhereIf(inQuery.IsOverTime != null && inQuery.IsOverTime == false, t => t.IsClosed ? t.ClosedTime < t.DeadlineTime : DateTime.Now < t.DeadlineTime)
|
||||
.WhereIf(inQuery.IsUrgent != null, t => t.SubjectVisit.IsUrgent == inQuery.IsUrgent)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.SubjectVisit.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.SubjectVisit.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
|
||||
.ProjectTo<QCChanllengeExportDto>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
@ -628,7 +628,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId)
|
||||
// CRC 只负责他管理site的受试者
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.ProjectTo<SubjectExportDTO>(_mapper.ConfigurationProvider)
|
||||
.WhereIf(inQuery.IsMissingImages == true, t => t.MissingSubmmitCount > 0)
|
||||
.WhereIf(inQuery.IsMissingImages == false, t => t.MissingSubmmitCount == 0)
|
||||
|
@ -810,7 +810,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var svExpression = QCCommon.GetStudyMonitorSubjectVisitFilter(inQuery.VisitPlanArray);
|
||||
var StudyMonitorQuery = _studyMonitorRepository.Where(t => t.TrialId == inQuery.TrialId, ignoreQueryFilters: true)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
//.WhereIf(!string.IsNullOrEmpty(studyQuery.VisitPlanInfo), studyQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.VisitNum.ToString().Contains(".") : t => t.SubjectVisit.VisitNum == decimal.Parse(studyQuery.VisitPlanInfo))
|
||||
.WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo))
|
||||
|
@ -818,7 +818,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
.WhereIf(inQuery.SubjectVisitId != null, t => t.SubjectId == inQuery.SubjectVisitId)
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId)
|
||||
.WhereIf(inQuery.IsDicom != null, t => t.IsDicom == inQuery.IsDicom)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.CreateUser.UserName.Contains(inQuery.Uploader))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.CreateUserRole.UserName.Contains(inQuery.Uploader))
|
||||
.WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.StudyCode), t => t.StudyCode.Contains(inQuery.StudyCode))
|
||||
.Select(t => new UnionStudyMonitorExportDto()
|
||||
|
@ -835,7 +835,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
IsDicom = t.IsDicom,
|
||||
|
||||
Uploader = t.CreateUser.UserName,
|
||||
Uploader = t.CreateUserRole.UserName,
|
||||
|
||||
IP = t.IP,
|
||||
|
||||
|
@ -925,7 +925,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
var svExpression = QCCommon.GetDicomStudySubjectVisitFilter(studyQuery.VisitPlanArray);
|
||||
|
||||
var dicomStudyQuery = _dicomStudyRepository.Where(t => t.TrialId == studyQuery.TrialId)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
||||
.Where(x => x.SubjectVisit.AuditState == AuditStateEnum.QCPassed)
|
||||
|
@ -953,7 +953,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
|
||||
var nodeDicomStudyQuery = _noneDicomStudyRepository.Where(t => t.TrialId == studyQuery.TrialId)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression2)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
||||
.Where(x => x.SubjectVisit.AuditState == AuditStateEnum.QCPassed)
|
||||
|
@ -1022,7 +1022,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo))
|
||||
.WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||
//.WhereIf(!string.IsNullOrEmpty(checkQuery.VisitPlanInfo), checkQuery.VisitPlanInfo.Contains('.') ? t => t.InPlan == false : t => t.VisitNum == decimal.Parse(checkQuery.VisitPlanInfo))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//CRC 过滤负责的site
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))//CRC 过滤负责的site
|
||||
.ProjectTo<PMKCheckEXportDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
var list = query.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.VisitNum).ToList();
|
||||
|
@ -1233,9 +1233,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
var query = _trialImageDownloadRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(inQuery.SubjectCode.IsNotNullOrEmpty(), t => t.SubjectCode.Contains(inQuery.SubjectCode))
|
||||
.WhereIf(inQuery.IP.IsNotNullOrEmpty(), t => t.IP.Contains(inQuery.IP))
|
||||
.WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.CreateUser.UserName.Contains(inQuery.Name) || t.CreateUser.FullName.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.CreateUserRole.UserName.Contains(inQuery.Name) || t.CreateUserRole.FullName.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.ImageType != null, t => t.ImageType == inQuery.ImageType)
|
||||
.WhereIf(inQuery.UserType != null, t => t.CreateUser.UserTypeEnum == inQuery.UserType)
|
||||
.WhereIf(inQuery.UserType != null, t => t.CreateUserRole.UserTypeEnum == inQuery.UserType)
|
||||
.WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess)
|
||||
.WhereIf(inQuery.DownloadStartTime != null, t => t.DownloadStartTime >= inQuery.DownloadStartTime)
|
||||
.WhereIf(inQuery.DownloadEndTime != null, t => t.DownloadEndTime <= inQuery.DownloadEndTime)
|
||||
|
|
|
@ -42,7 +42,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<SystemBasicData> _systemBasicDatarepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<TrialSite> _trialSiteRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<IdentityUser> _identityUserRepository,
|
||||
IRepository<UserFeedBack> _userFeedBackRepository,
|
||||
ITokenService _tokenService,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
|
@ -169,83 +170,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle);
|
||||
}
|
||||
|
||||
//用户重置邮箱
|
||||
public async Task SendMailEditEmail(Guid userId, string userName, string emailAddress, int verificationCode)
|
||||
{
|
||||
|
||||
var messageToSend = new MimeMessage();
|
||||
//发件地址
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
//收件地址
|
||||
messageToSend.To.Add(new MailboxAddress(userName, emailAddress));
|
||||
//主题
|
||||
//---[来自展影IRC] 关于重置邮箱的提醒
|
||||
|
||||
var companyName = _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
var topicStr = string.Format(input.topicStr, companyName);
|
||||
|
||||
var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr),
|
||||
|
||||
userName,
|
||||
//---您正在进行邮箱重置操作
|
||||
verificationCode
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
|
||||
await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UserResetEmail, messageToSend, emailConfigFunc);
|
||||
|
||||
|
||||
var sucessHandle = GetEmailSuccessHandle(userId, verificationCode, emailAddress);
|
||||
|
||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//不登录 通过邮箱重置密码
|
||||
public async Task AnolymousSendEmailForResetAccount(string emailAddress, int verificationCode)
|
||||
{
|
||||
var messageToSend = new MimeMessage();
|
||||
//发件地址
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
//收件地址
|
||||
messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress));
|
||||
|
||||
|
||||
var companyName = _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
var topicStr = string.Format(input.topicStr, companyName);
|
||||
|
||||
var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr),
|
||||
|
||||
"Sir/Madam",
|
||||
//---您正在进行邮箱重置密码操作
|
||||
verificationCode
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
|
||||
await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UnloginUseEmailResetPassword, messageToSend, emailConfigFunc);
|
||||
|
||||
////此时不知道用户
|
||||
var sucessHandle = GetEmailSuccessHandle(Guid.Empty, verificationCode, emailAddress);
|
||||
|
||||
|
||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reviewer简历录入 发送验证码
|
||||
/// </summary>
|
||||
|
@ -333,12 +262,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
}
|
||||
|
||||
#region 邮件已修改
|
||||
|
||||
//添加用户发送邮件
|
||||
public async Task AddUserSendEmailAsync(Guid userId, string baseUrl, string routeUrl)
|
||||
{
|
||||
|
||||
var sysUserInfo = (await _userRepository.Where(t => t.Id == userId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
var sysUserInfo = (await _identityUserRepository.Where(t => t.Id == userId).Include(t => t.UserRoleList).ThenInclude(c => c.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
|
||||
var messageToSend = new MimeMessage();
|
||||
|
@ -352,9 +282,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var token = _tokenService.GetToken(new UserTokenInfo() { UserRoleId = sysUserInfo.Id });
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new User() { EmailToken = token });
|
||||
await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new IdentityUser() { EmailToken = token });
|
||||
|
||||
routeUrl = routeUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + sysUserInfo.UserTypeRole.UserTypeShortName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token;
|
||||
routeUrl = routeUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token;
|
||||
|
||||
var domain = baseUrl.Substring(0, baseUrl.IndexOf("/login"));
|
||||
|
||||
|
@ -371,7 +301,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
sysUserInfo.FullName,
|
||||
sysUserInfo.UserName,
|
||||
sysUserInfo.UserTypeRole.UserTypeShortName,
|
||||
string.Join(',', sysUserInfo.UserRoleList.Select(t => t.UserTypeRole.UserTypeShortName)),
|
||||
redirectUrl
|
||||
);
|
||||
|
||||
|
@ -388,7 +318,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
//管理员重置密码发送邮件
|
||||
public async Task AdminResetPwdSendEmailAsync(Guid userId, string pwdNotMd5 = "123456")
|
||||
{
|
||||
var sysUserInfo = (await _userRepository.Where(t => t.Id == userId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
var sysUserInfo = (await _identityUserRepository.Where(t => t.Id == userId).Include(t => t.UserRoleList).ThenInclude(c => c.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
var messageToSend = new MimeMessage();
|
||||
//发件地址
|
||||
|
@ -408,7 +338,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
sysUserInfo.FullName,
|
||||
sysUserInfo.UserName,
|
||||
sysUserInfo.UserTypeRole.UserTypeShortName,
|
||||
string.Join(',', sysUserInfo.UserRoleList.Select(t => t.UserTypeRole.UserTypeShortName)),
|
||||
pwdNotMd5
|
||||
);
|
||||
|
||||
|
@ -421,11 +351,92 @@ namespace IRaCIS.Core.Application.Service
|
|||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||
}
|
||||
|
||||
//用户重置邮箱
|
||||
public async Task SendMailEditEmail(Guid userId, string userName, string emailAddress, int verificationCode)
|
||||
{
|
||||
|
||||
var messageToSend = new MimeMessage();
|
||||
//发件地址
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
//收件地址
|
||||
messageToSend.To.Add(new MailboxAddress(userName, emailAddress));
|
||||
//主题
|
||||
//---[来自展影IRC] 关于重置邮箱的提醒
|
||||
|
||||
var companyName = _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
var topicStr = string.Format(input.topicStr, companyName);
|
||||
|
||||
var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr),
|
||||
|
||||
userName,
|
||||
//---您正在进行邮箱重置操作
|
||||
verificationCode
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
|
||||
await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UserResetEmail, messageToSend, emailConfigFunc);
|
||||
|
||||
|
||||
var sucessHandle = GetEmailSuccessHandle(userId, verificationCode, emailAddress);
|
||||
|
||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//不登录 通过邮箱重置密码
|
||||
public async Task AnolymousSendEmailForResetAccount(string emailAddress, int verificationCode)
|
||||
{
|
||||
var messageToSend = new MimeMessage();
|
||||
//发件地址
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
//收件地址
|
||||
messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress));
|
||||
|
||||
|
||||
var companyName = _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
var topicStr = string.Format(input.topicStr, companyName);
|
||||
|
||||
var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr),
|
||||
|
||||
"Sir/Madam",
|
||||
//---您正在进行邮箱重置密码操作
|
||||
verificationCode
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
|
||||
await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UnloginUseEmailResetPassword, messageToSend, emailConfigFunc);
|
||||
|
||||
////此时不知道用户
|
||||
var sucessHandle = GetEmailSuccessHandle(Guid.Empty, verificationCode, emailAddress);
|
||||
|
||||
|
||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Site调研 用户加入项目
|
||||
public async Task SiteSurveyUserJoinEmail(Guid trialId, Guid userId, string baseUrl, string rootUrl)
|
||||
{
|
||||
var sysUserInfo = (await _userRepository.Where(t => t.Id == userId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
var sysUserInfo = (await _userRoleRepository.Where(t => t.Id == userId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId);
|
||||
|
||||
|
@ -442,7 +453,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
if (sysUserInfo.IsFirstAdd)
|
||||
{
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new User() { EmailToken = token });
|
||||
await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new UserRole() { EmailToken = token });
|
||||
}
|
||||
|
||||
var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + sysUserInfo.UserTypeRole.UserTypeShortName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token;
|
||||
|
@ -486,7 +497,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId)).IfNullThrowException();
|
||||
|
||||
var sysUserInfo = (await _userRepository.Where(t => t.Id == userId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
var sysUserInfo = (await _userRoleRepository.Where(t => t.Id == userId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
|
||||
var messageToSend = new MimeMessage();
|
||||
|
@ -502,7 +513,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
var token = _tokenService.GetToken(new UserTokenInfo() { UserRoleId = sysUserInfo.Id });
|
||||
if (sysUserInfo.IsFirstAdd)
|
||||
{
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new User() { EmailToken = token });
|
||||
await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new UserRole() { EmailToken = token });
|
||||
}
|
||||
|
||||
var domain = baseUrl.Substring(0, baseUrl.IndexOf("/login"));
|
||||
|
@ -545,7 +556,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<Guid> DoctorJoinTrialEmail(Guid trialId, Guid doctorId, string baseUrl, string rootUrl)
|
||||
{
|
||||
var doctor = await _doctorTypeRepository.FindAsync(doctorId);
|
||||
User sysUserInfo = new User();
|
||||
UserRole sysUserInfo = new UserRole();
|
||||
|
||||
var userType = await _userTypeRepository.FirstAsync(t => t.UserTypeEnum == UserTypeEnum.IndependentReviewer);
|
||||
|
||||
|
@ -553,13 +564,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
using (await @lock.AcquireAsync())
|
||||
{
|
||||
var isDoctorHaveAccount = await _userRepository.AnyAsync(t => t.DoctorId == doctorId);
|
||||
var isDoctorHaveAccount = await _userRoleRepository.AnyAsync(t => t.DoctorId == doctorId);
|
||||
|
||||
|
||||
if (!isDoctorHaveAccount)
|
||||
{
|
||||
|
||||
var saveItem = new User() { FirstName = doctor.FirstName, LastName = doctor.LastName, EMail = doctor.EMail };
|
||||
var saveItem = new UserRole() { FirstName = doctor.FirstName, LastName = doctor.LastName, EMail = doctor.EMail };
|
||||
|
||||
var trialType = await _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialType).FirstOrDefaultAsync();
|
||||
|
||||
|
@ -569,9 +580,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
|
||||
saveItem.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
|
||||
saveItem.Code = _userRoleRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
|
||||
|
||||
saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User));
|
||||
saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(UserRole));
|
||||
|
||||
saveItem.UserName = saveItem.UserCode;
|
||||
|
||||
|
@ -580,19 +591,19 @@ namespace IRaCIS.Core.Application.Service
|
|||
saveItem.DoctorId = doctorId;
|
||||
saveItem.UserTypeId = userType.Id;
|
||||
|
||||
var savedUser = await _userRepository.AddAsync(saveItem);
|
||||
var savedUser = await _userRoleRepository.AddAsync(saveItem);
|
||||
|
||||
//下面获取Token 需要这部分信息
|
||||
sysUserInfo = savedUser.Clone();
|
||||
|
||||
sysUserInfo.UserTypeRole = userType;
|
||||
|
||||
await _userRepository.SaveChangesAsync();
|
||||
await _userRoleRepository.SaveChangesAsync();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
sysUserInfo = (await _userRepository.Where(t => t.DoctorId == doctorId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
sysUserInfo = (await _userRoleRepository.Where(t => t.DoctorId == doctorId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -611,7 +622,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
if (sysUserInfo.IsFirstAdd)
|
||||
{
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new User() { EmailToken = token });
|
||||
await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new UserRole() { EmailToken = token });
|
||||
}
|
||||
|
||||
var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + userType.UserTypeShortName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token;
|
||||
|
@ -658,7 +669,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
public async Task UserFeedBackMail(Guid feedBackId)
|
||||
{
|
||||
var feedBack = await _userFeedBackRepository.Where(t => t.Id == feedBackId).Include(t => t.CreateUser).ThenInclude(t => t.UserTypeRole).FirstNotNullAsync();
|
||||
var feedBack = await _userFeedBackRepository.Where(t => t.Id == feedBackId).Include(t => t.CreateUserRole).ThenInclude(t => t.UserTypeRole).FirstNotNullAsync();
|
||||
|
||||
var messageToSend = new MimeMessage();
|
||||
//发件地址
|
||||
|
@ -674,7 +685,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var userTypeEnumList = emailConfigInfo.EmailNoticeUserTypeList.Where(t => t.EmailUserType == EmailUserType.To).Select(t => t.UserType).ToList();
|
||||
|
||||
var emailList = await _userRepository.Where(t => userTypeEnumList.Contains(t.UserTypeEnum) &&
|
||||
var emailList = await _userRoleRepository.Where(t => userTypeEnumList.Contains(t.UserTypeEnum) &&
|
||||
(isHaveTrialId ? t.UserTrials.Any(t => t.TrialId == feedBack.TrialId) : true)).Select(t => new { t.EMail, t.UserTypeEnum, t.FullName }).ToListAsync();
|
||||
|
||||
|
||||
|
@ -703,8 +714,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
info.TrialCode,
|
||||
info.SubejctCode,
|
||||
info.VisitName,
|
||||
feedBack.CreateUser.UserTypeRole.UserTypeShortName,
|
||||
feedBack.CreateUser.FullName,
|
||||
feedBack.CreateUserRole.UserTypeRole.UserTypeShortName,
|
||||
feedBack.CreateUserRole.FullName,
|
||||
emailType,
|
||||
feedBack.QuestionDescription,
|
||||
_systemEmailConfig.SiteUrl
|
||||
|
@ -733,8 +744,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
info.TrialCode,
|
||||
info.SubejctCode,
|
||||
info.VisitName,
|
||||
feedBack.CreateUser.UserTypeRole.UserTypeShortName,
|
||||
feedBack.CreateUser.FullName,
|
||||
feedBack.CreateUserRole.UserTypeRole.UserTypeShortName,
|
||||
feedBack.CreateUserRole.FullName,
|
||||
emailType,
|
||||
feedBack.QuestionDescription,
|
||||
_systemEmailConfig.SiteUrl
|
||||
|
@ -762,8 +773,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr),
|
||||
userNames,
|
||||
info.TrialCode,
|
||||
feedBack.CreateUser.UserTypeRole.UserTypeShortName,
|
||||
feedBack.CreateUser.FullName,
|
||||
feedBack.CreateUserRole.UserTypeRole.UserTypeShortName,
|
||||
feedBack.CreateUserRole.FullName,
|
||||
emailType,
|
||||
feedBack.QuestionDescription,
|
||||
_systemEmailConfig.SiteUrl
|
||||
|
@ -787,8 +798,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr),
|
||||
userNames,
|
||||
feedBack.CreateUser.UserTypeRole.UserTypeShortName,
|
||||
feedBack.CreateUser.FullName,
|
||||
feedBack.CreateUserRole.UserTypeRole.UserTypeShortName,
|
||||
feedBack.CreateUserRole.FullName,
|
||||
feedBack.QuestionDescription,
|
||||
_systemEmailConfig.SiteUrl
|
||||
);
|
||||
|
|
|
@ -98,9 +98,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
CreateMap<TrialImageDownload, TrialImageDownloadExportDto>()
|
||||
.ForMember(d => d.UserFullName, u => u.MapFrom(s => s.CreateUser.FullName))
|
||||
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.CreateUser.UserTypeEnum))
|
||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
||||
.ForMember(d => d.UserFullName, u => u.MapFrom(s => s.CreateUserRole.FullName))
|
||||
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.CreateUserRole.UserTypeEnum))
|
||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUserRole.UserName))
|
||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteCode));
|
||||
|
||||
|
||||
|
|
|
@ -721,7 +721,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<IResponseOutput> UpdateAuditResume(ResumeConfirmCommand auditResumeParam)
|
||||
{
|
||||
var userId = _userInfo.Id;
|
||||
var userId = _userInfo.UserRoleId;
|
||||
//判断 合作协议、正式简历 是否有。如果没有,显示提示信息,并且不能保存
|
||||
var attachmentList = await _attachmentRepository.Where(u => u.DoctorId == auditResumeParam.Id)
|
||||
.Select(u => u.Type).ToListAsync();
|
||||
|
|
|
@ -99,7 +99,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<DoctorDTO, SelectionReviewerDTO>()
|
||||
;
|
||||
|
||||
CreateMap<User, UserBasicInfo>();
|
||||
CreateMap<UserRole, UserBasicInfo>();
|
||||
|
||||
CreateMap<TrialExperience, TrialExperienceListDTO>()
|
||||
.ForMember(x=>x.VisitReadingCount, u => u.MapFrom(t => (t.ExperienceDataType==ExperienceDataType.TrialAuto||t.ExperienceDataType==ExperienceDataType.SystemAuto)?
|
||||
|
@ -178,7 +178,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<EnrollDetail, DoctorStateModelDTO>()
|
||||
.ForMember(d => d.IntoGroupState, u => u.MapFrom(s => s.EnrollStatus))
|
||||
.ForMember(d => d.OptTime, u => u.MapFrom(s => s.CreateTime))
|
||||
.ForMember(d => d.OptUserName, u => u.MapFrom(s => s.CreateUser.UserName));
|
||||
.ForMember(d => d.OptUserName, u => u.MapFrom(s => s.CreateUserRole.UserName));
|
||||
|
||||
CreateMap<Enroll, ConfirmationReviewerDTO>().IncludeMembers(t => t.Doctor, t => t.Doctor.Hospital)
|
||||
.ForMember(o => o.DictionaryList, t => t.MapFrom(u => u.Doctor.DoctorDicRelationList.Where(t => t.KeyName == StaticData.ReadingType || t.KeyName == StaticData.Subspeciality).Select(t => t.Dictionary).OrderBy(t => t.ShowOrder)))
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using User = IRaCIS.Core.Domain.Models.User;
|
||||
using UserRole = IRaCIS.Core.Domain.Models.UserRole;
|
||||
|
||||
namespace IRaCIS.Core.Application.Services
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class SystemDocumentService(IRepository<SystemDocument> _systemDocumentRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ISystemDocumentService
|
||||
{
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
.WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted)
|
||||
.ProjectTo<SystemDocumentView>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us, userId = _userInfo.Id });
|
||||
.ProjectTo<SystemDocumentView>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us, userId = _userInfo.UserRoleId });
|
||||
|
||||
return await systemDocumentQueryable.ToPagedListAsync(inQuery);
|
||||
}
|
||||
|
@ -151,10 +151,10 @@ namespace IRaCIS.Core.Application.Services
|
|||
//外部人员 只签署 文档类型枚举值有值的
|
||||
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
|
||||
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
|
||||
join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = _userInfo.Id, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
|
||||
join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = _userInfo.UserRoleId, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
|
||||
join user in _userRepository.Where() on _userInfo.Id equals user.Id
|
||||
join user in _userRoleRepository.Where() on _userInfo.UserRoleId equals user.Id
|
||||
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
.WhereIf(inQuery.TrialId != null, t => t.TrialId == inQuery.TrialId)
|
||||
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
|
||||
join trialUser in _trialUserRepository.Where(t => t.UserId == _userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId
|
||||
join trialUser in _trialUserRepository.Where(t => t.UserId == _userInfo.UserRoleId) on trialDoc.TrialId equals trialUser.TrialId
|
||||
join confirm in _trialDocConfirmedUserRepository.Where() on
|
||||
new { trialUser.UserId, TrialDocumentId = trialDoc.Id } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc
|
||||
|
||||
|
@ -221,9 +221,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
//系统文档查询
|
||||
var systemDocumentQueryable = from needConfirmedUserType in _systemDocNeedConfirmedUserTypeRepository.Where(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId, ignoreQueryFilters: true)
|
||||
.WhereIf(trialInfo.TrialFinishedTime != null, u => u.SystemDocument.CreateTime < trialInfo.TrialFinishedTime)
|
||||
.WhereIf(!_userInfo.IsAdmin, t => t.SystemDocument.IsDeleted == false || (t.SystemDocument.IsDeleted == true && t.SystemDocument.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id)))
|
||||
.WhereIf(!_userInfo.IsAdmin, t => t.SystemDocument.IsDeleted == false || (t.SystemDocument.IsDeleted == true && t.SystemDocument.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId)))
|
||||
|
||||
join trialUser in _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId && t.UserId == _userInfo.Id)
|
||||
join trialUser in _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId && t.UserId == _userInfo.UserRoleId)
|
||||
on needConfirmedUserType.NeedConfirmUserTypeId equals trialUser.User.UserTypeId
|
||||
join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = trialUser.UserId, SystemDocumentId = needConfirmedUserType.SystemDocumentId } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
|
@ -255,9 +255,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
//项目文档查询
|
||||
var trialDocQueryable = from trialDoc in _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(!_userInfo.IsAdmin, t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.WhereIf(!_userInfo.IsAdmin, t => t.IsDeleted == false || (t.IsDeleted == true && t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id)))
|
||||
.WhereIf(!_userInfo.IsAdmin, t => t.IsDeleted == false || (t.IsDeleted == true && t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId)))
|
||||
|
||||
join trialUser in _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId && t.UserId == _userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId
|
||||
join trialUser in _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId && t.UserId == _userInfo.UserRoleId) on trialDoc.TrialId equals trialUser.TrialId
|
||||
join confirm in _trialDocConfirmedUserRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) on
|
||||
new { trialUser.UserId, TrialDocumentId = trialDoc.Id } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
|
@ -321,13 +321,13 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
|
||||
var needSignTrialDocCount = await _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == inQuery.TrialId && t.Trial.TrialStatusStr != StaticData.TrialState.TrialStopped)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId && t.ConfirmTime != null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.CountAsync();
|
||||
|
||||
|
||||
var needSignSystemDocCount = await _systemDocumentRepository
|
||||
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId && t.ConfirmTime != null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.CountAsync();
|
||||
|
||||
var trialTaskConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).ProjectTo<TrialProcessConfigDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
|
||||
|
@ -470,13 +470,13 @@ namespace IRaCIS.Core.Application.Services
|
|||
var result = await unionQuery.ToPagedListAsync(inQuery);
|
||||
|
||||
var needSignTrialDocCount = await _trialDocumentRepository.AsQueryable(true)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.CountAsync();
|
||||
|
||||
|
||||
var needSignSystemDocCount = await _systemDocumentRepository
|
||||
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.CountAsync();
|
||||
|
||||
|
||||
|
@ -614,9 +614,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
var success = false;
|
||||
if (isSystemDoc)
|
||||
{
|
||||
if (!await _systemDocConfirmedUserRepository.AnyAsync(t => t.SystemDocumentId == documentId && t.ConfirmUserId == _userInfo.Id))
|
||||
if (!await _systemDocConfirmedUserRepository.AnyAsync(t => t.SystemDocumentId == documentId && t.ConfirmUserId == _userInfo.UserRoleId))
|
||||
{
|
||||
await _systemDocConfirmedUserRepository.AddAsync(new SystemDocConfirmedUser() { SystemDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now });
|
||||
await _systemDocConfirmedUserRepository.AddAsync(new SystemDocConfirmedUser() { SystemDocumentId = documentId, ConfirmUserId = _userInfo.UserRoleId, SignFirstViewTime = DateTime.Now });
|
||||
|
||||
}
|
||||
|
||||
|
@ -624,10 +624,10 @@ namespace IRaCIS.Core.Application.Services
|
|||
else
|
||||
{
|
||||
|
||||
if (!await _trialDocUserTypeConfirmedUserRepository.AnyAsync(t => t.TrialDocumentId == documentId && t.ConfirmUserId == _userInfo.Id))
|
||||
if (!await _trialDocUserTypeConfirmedUserRepository.AnyAsync(t => t.TrialDocumentId == documentId && t.ConfirmUserId == _userInfo.UserRoleId))
|
||||
{
|
||||
|
||||
await _trialDocConfirmedUserRepository.AddAsync(new TrialDocConfirmedUser() { TrialDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now });
|
||||
await _trialDocConfirmedUserRepository.AddAsync(new TrialDocConfirmedUser() { TrialDocumentId = documentId, ConfirmUserId = _userInfo.UserRoleId, SignFirstViewTime = DateTime.Now });
|
||||
|
||||
}
|
||||
|
||||
|
@ -642,9 +642,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
[HttpPut("{documentId:guid}")]
|
||||
public async Task<IResponseOutput> SetSystemDocFirstViewTime(Guid documentId)
|
||||
{
|
||||
if (!await _systemDocConfirmedUserRepository.AnyAsync(t => t.SystemDocumentId == documentId && t.ConfirmUserId == _userInfo.Id))
|
||||
if (!await _systemDocConfirmedUserRepository.AnyAsync(t => t.SystemDocumentId == documentId && t.ConfirmUserId == _userInfo.UserRoleId))
|
||||
{
|
||||
await _systemDocConfirmedUserRepository.AddAsync(new SystemDocConfirmedUser() { SystemDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now });
|
||||
await _systemDocConfirmedUserRepository.AddAsync(new SystemDocConfirmedUser() { SystemDocumentId = documentId, ConfirmUserId = _userInfo.UserRoleId, SignFirstViewTime = DateTime.Now });
|
||||
|
||||
}
|
||||
|
||||
|
@ -656,10 +656,10 @@ namespace IRaCIS.Core.Application.Services
|
|||
[HttpPut("{trialId:guid}/{documentId:guid}")]
|
||||
public async Task<IResponseOutput> SetTrialDocFirstViewTime(Guid documentId)
|
||||
{
|
||||
if (!await _trialDocUserTypeConfirmedUserRepository.AnyAsync(t => t.TrialDocumentId == documentId && t.ConfirmUserId == _userInfo.Id))
|
||||
if (!await _trialDocUserTypeConfirmedUserRepository.AnyAsync(t => t.TrialDocumentId == documentId && t.ConfirmUserId == _userInfo.UserRoleId))
|
||||
{
|
||||
|
||||
await _trialDocConfirmedUserRepository.AddAsync(new TrialDocConfirmedUser() { TrialDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now });
|
||||
await _trialDocConfirmedUserRepository.AddAsync(new TrialDocConfirmedUser() { TrialDocumentId = documentId, ConfirmUserId = _userInfo.UserRoleId, SignFirstViewTime = DateTime.Now });
|
||||
|
||||
}
|
||||
var success = await _trialDocConfirmedUserRepository.SaveChangesAsync();
|
||||
|
@ -678,7 +678,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
if (userConfirmCommand.isSystemDoc)
|
||||
{
|
||||
|
||||
var sysDocConfirm = await _systemDocConfirmedUserRepository.FirstOrDefaultAsync(t => t.SystemDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.Id, true);
|
||||
var sysDocConfirm = await _systemDocConfirmedUserRepository.FirstOrDefaultAsync(t => t.SystemDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.UserRoleId, true);
|
||||
|
||||
if (sysDocConfirm.ConfirmTime != null)
|
||||
{
|
||||
|
@ -705,7 +705,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
else
|
||||
{
|
||||
|
||||
var trialDocConfirm = await _trialDocUserTypeConfirmedUserRepository.FirstOrDefaultAsync(t => t.TrialDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.Id, true);
|
||||
var trialDocConfirm = await _trialDocUserTypeConfirmedUserRepository.FirstOrDefaultAsync(t => t.TrialDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.UserRoleId, true);
|
||||
|
||||
if (trialDocConfirm.ConfirmTime != null)
|
||||
{
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
SowPath = "",
|
||||
SowName = "",
|
||||
UpdateTime = DateTime.Now,
|
||||
UpdateUserId = _userInfo.Id
|
||||
UpdateUserId = _userInfo.UserRoleId
|
||||
});
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
|
|
|
@ -65,19 +65,19 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
(t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.Random && t.TrialReadingCriterion.ImageUploadEnum != ReadingImageUpload.None))))
|
||||
{
|
||||
//找到 非一致性分析,未签名,状态正常的 并且任务名称是TimePoint的 任务
|
||||
var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||
var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId
|
||||
&& t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskBlindName == "Timepoint" && t.ReadingCategory == ReadingCategory.Visit
|
||||
&& (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze), true).ToListAsync();
|
||||
|
||||
if (needDealTaskList.Count > 0)
|
||||
{
|
||||
//已完成的访视任务数量(包含重阅的)
|
||||
var haveFinishedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||
var haveFinishedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit);
|
||||
|
||||
//已经处理过的任务名称的数量
|
||||
|
||||
var haveDealedTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||
var haveDealedTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId
|
||||
&& t.ReadingTaskState != ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit && t.TaskBlindName != "Timepoint").Select(t => new { t.TaskBlindName, t.SourceSubjectVisitId, t.SouceReadModuleId }).ToListAsync();
|
||||
|
||||
|
||||
|
@ -153,7 +153,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
|
||||
var query = _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SourceSubjectVisitId != null
|
||||
&& t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect)
|
||||
&& t.DoctorUserId == _userInfo.UserRoleId && t.TaskState == TaskState.Effect)
|
||||
//满足 有序,或者随机只看到当前任务的dicom 非dicom检查
|
||||
.WhereIf(criterionInfo.IsReadingTaskViewInOrder != ReadingOrder.SubjectRandom && inQuery.VisitTaskId != null, t => t.Id == inQuery.VisitTaskId)
|
||||
.Select(u => new SubjectImageUploadDTO()
|
||||
|
@ -402,7 +402,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
else
|
||||
{
|
||||
//在事务未完成前 防止前端重复提交
|
||||
await _fusionCache.SetAsync(CacheKeys.TrialTaskStudyUidDBLock(incommand.TrialId, incommand.VisitTaskId, incommand.Study.StudyInstanceUid), _userInfo.Id, TimeSpan.FromMinutes(1));
|
||||
await _fusionCache.SetAsync(CacheKeys.TrialTaskStudyUidDBLock(incommand.TrialId, incommand.VisitTaskId, incommand.Study.StudyInstanceUid), _userInfo.UserRoleId, TimeSpan.FromMinutes(1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -653,7 +653,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
{
|
||||
var subjectCode = inQuery.SubjectCode;
|
||||
var subjectId = inQuery.SubjectId;
|
||||
var doctorUserId = _userInfo.Id;
|
||||
var doctorUserId = _userInfo.UserRoleId;
|
||||
|
||||
if (inQuery.VisitTaskId != null)
|
||||
{
|
||||
|
@ -839,7 +839,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
public async Task<List<SubjectCRCImageUploadedStudyDto>> GetSubjectImageDownloadSelectList(IRReadingDownloadQuery inQuery)
|
||||
{
|
||||
|
||||
var doctorUserId = _userInfo.Id;
|
||||
var doctorUserId = _userInfo.UserRoleId;
|
||||
var isAnalysisCreate = false;
|
||||
|
||||
//要根据标准阅片顺序,确定是否查询单个任务的,还是查询所有的
|
||||
|
@ -1129,9 +1129,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
var query = _trialImageDownloadRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(inQuery.SubjectCode.IsNotNullOrEmpty(), t => t.SubjectCode.Contains(inQuery.SubjectCode))
|
||||
.WhereIf(inQuery.IP.IsNotNullOrEmpty(), t => t.IP.Contains(inQuery.IP))
|
||||
.WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.CreateUser.UserName.Contains(inQuery.Name) || t.CreateUser.FullName.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.CreateUserRole.UserName.Contains(inQuery.Name) || t.CreateUserRole.FullName.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.ImageType != null, t => t.ImageType == inQuery.ImageType)
|
||||
.WhereIf(inQuery.UserType != null, t => t.CreateUser.UserTypeEnum == inQuery.UserType)
|
||||
.WhereIf(inQuery.UserType != null, t => t.CreateUserRole.UserTypeEnum == inQuery.UserType)
|
||||
.WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess)
|
||||
.WhereIf(inQuery.DownloadStartTime != null, t => t.DownloadStartTime >= inQuery.DownloadStartTime)
|
||||
.WhereIf(inQuery.DownloadEndTime != null, t => t.DownloadEndTime <= inQuery.DownloadEndTime)
|
||||
|
@ -1538,7 +1538,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
public async Task<List<SubjectUploadTaskInfo>> GetIRUploadTaskList_Old(CRCUploadTaskQuery inQuery)
|
||||
{
|
||||
var query = _visitTaskRepository.Where(t => t.SubjectId == inQuery.SubjectId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId
|
||||
&& t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect)
|
||||
&& t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.UserRoleId && t.TaskState == TaskState.Effect)
|
||||
.ProjectTo<SubjectUploadTaskInfo>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
|
|
|
@ -99,20 +99,20 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
if (visitTaskId != null)
|
||||
{
|
||||
var cacheValue = _fusionCache.GetOrDefault<Guid>(CacheKeys.TrialTaskStudyUidUploading(trialId, visitTaskId.Value, studyInstanceUid));
|
||||
if (cacheValue != Guid.Empty && cacheValue != _userInfo.Id)
|
||||
if (cacheValue != Guid.Empty && cacheValue != _userInfo.UserRoleId)
|
||||
{
|
||||
//---当前已有人正在上传和归档该检查!
|
||||
return ResponseOutput.NotOk(I18n.T("UploadDownLoad_ArchiveInProgress"));
|
||||
}
|
||||
else
|
||||
{
|
||||
await _fusionCache.SetAsync(CacheKeys.TrialTaskStudyUidUploading(trialId, visitTaskId.Value, studyInstanceUid), _userInfo.Id, TimeSpan.FromSeconds(15));
|
||||
await _fusionCache.SetAsync(CacheKeys.TrialTaskStudyUidUploading(trialId, visitTaskId.Value, studyInstanceUid), _userInfo.UserRoleId, TimeSpan.FromSeconds(15));
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await _fusionCache.SetAsync(CacheKeys.TrialStudyUidUploading(trialId, studyInstanceUid), _userInfo.Id, TimeSpan.FromSeconds(15));
|
||||
await _fusionCache.SetAsync(CacheKeys.TrialStudyUidUploading(trialId, studyInstanceUid), _userInfo.UserRoleId, TimeSpan.FromSeconds(15));
|
||||
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
else
|
||||
{
|
||||
//在事务未完成前 防止前端重复提交
|
||||
await _fusionCache.SetAsync(CacheKeys.TrialStudyUidDBLock(incommand.TrialId, incommand.Study.StudyInstanceUid), _userInfo.Id, TimeSpan.FromMinutes(3));
|
||||
await _fusionCache.SetAsync(CacheKeys.TrialStudyUidDBLock(incommand.TrialId, incommand.Study.StudyInstanceUid), _userInfo.UserRoleId, TimeSpan.FromMinutes(3));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -357,7 +357,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
var svExpression = QCCommon.GetDicomStudySubjectVisitFilter(inQuery.VisitPlanArray);
|
||||
|
||||
var dicomStudyQuery = _dicomStudyRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
//.WhereIf(!string.IsNullOrEmpty(studyQuery.VisitPlanInfo), studyQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.VisitNum.ToString().Contains(".") : t => t.SubjectVisit.VisitNum == decimal.Parse(studyQuery.VisitPlanInfo))
|
||||
.WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo))
|
||||
|
@ -394,7 +394,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
||||
|
||||
Uploader = t.CreateUser.UserName,
|
||||
Uploader = t.CreateUserRole.UserName,
|
||||
|
||||
UploadTime = t.CreateTime
|
||||
|
||||
|
@ -406,7 +406,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
|
||||
var nodeDicomStudyQuery = _noneDicomStudyRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
//.WhereIf(!string.IsNullOrEmpty(studyQuery.VisitPlanInfo), studyQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.VisitNum.ToString().Contains(".") : t => t.SubjectVisit.VisitNum == decimal.Parse(studyQuery.VisitPlanInfo))
|
||||
.WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression2)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo))
|
||||
|
@ -444,7 +444,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
||||
|
||||
Uploader = t.CreateUser.UserName,
|
||||
Uploader = t.CreateUserRole.UserName,
|
||||
|
||||
UploadTime = t.CreateTime
|
||||
|
||||
|
@ -468,7 +468,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
{
|
||||
var svExpression = QCCommon.GetStudyMonitorSubjectVisitFilter(inQuery.VisitPlanArray);
|
||||
var StudyMonitorQuery = _studyMonitorRepository.Where(t => t.TrialId == inQuery.TrialId, ignoreQueryFilters: true)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
//.WhereIf(!string.IsNullOrEmpty(studyQuery.VisitPlanInfo), studyQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.VisitNum.ToString().Contains(".") : t => t.SubjectVisit.VisitNum == decimal.Parse(studyQuery.VisitPlanInfo))
|
||||
.WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo))
|
||||
|
@ -476,7 +476,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
.WhereIf(inQuery.SubjectVisitId != null, t => t.SubjectId == inQuery.SubjectVisitId)
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId)
|
||||
.WhereIf(inQuery.IsDicom != null, t => t.IsDicom == inQuery.IsDicom)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.CreateUser.UserName.Contains(inQuery.Uploader))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.CreateUserRole.UserName.Contains(inQuery.Uploader))
|
||||
.WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.StudyCode), t => t.StudyCode.Contains(inQuery.StudyCode))
|
||||
.WhereIf(inQuery.UploadStartTime != null, t => t.UploadStartTime >= inQuery.UploadStartTime)
|
||||
|
@ -499,7 +499,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
||||
|
||||
Uploader = t.CreateUser.UserName,
|
||||
Uploader = t.CreateUserRole.UserName,
|
||||
|
||||
UploadTime = t.CreateTime,
|
||||
|
||||
|
@ -615,7 +615,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
public async Task<IResponseOutput<List<VerifyStudyUploadResult>>> VerifyTaskStudyAllowUploadAsync(VerifyTaskUploadOrReupload verifyInfo)
|
||||
{
|
||||
|
||||
var queryStudy = _visitTaskRepository.Where(t => t.SubjectId == verifyInfo.SubjectId && t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.Id).Select(u => new
|
||||
var queryStudy = _visitTaskRepository.Where(t => t.SubjectId == verifyInfo.SubjectId && t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.UserRoleId).Select(u => new
|
||||
{
|
||||
VisitTaskId = u.Id,
|
||||
SourceSubjectVisitId = u.SourceSubjectVisitId,
|
||||
|
@ -654,7 +654,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
var result = new VerifyStudyUploadResult();
|
||||
|
||||
if (_fusionCache.GetOrDefault<Guid>($"StudyUid_{trialId}_{studyInstanceUid}") != _userInfo.Id)
|
||||
if (_fusionCache.GetOrDefault<Guid>($"StudyUid_{trialId}_{studyInstanceUid}") != _userInfo.UserRoleId)
|
||||
{
|
||||
|
||||
result.AllowUpload = false;
|
||||
|
@ -704,7 +704,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
{
|
||||
if (result.AllowReUpload || result.AllowUpload)
|
||||
{
|
||||
await _fusionCache.SetAsync($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
|
||||
await _fusionCache.SetAsync($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.UserRoleId, TimeSpan.FromSeconds(30));
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -800,7 +800,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
var result = new VerifyStudyUploadResult();
|
||||
|
||||
if (cacheUserId.GetValueOrDefault() != _userInfo.Id && cacheUserId.HasValue)
|
||||
if (cacheUserId.GetValueOrDefault() != _userInfo.UserRoleId && cacheUserId.HasValue)
|
||||
{
|
||||
|
||||
result.AllowUpload = false;
|
||||
|
@ -869,7 +869,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
{
|
||||
if (result.AllowReUpload || result.AllowUpload)
|
||||
{
|
||||
_fusionCache.Set(CacheKeys.TrialStudyUidUploading(trialId, studyInstanceUid), _userInfo.Id, TimeSpan.FromSeconds(30));
|
||||
_fusionCache.Set(CacheKeys.TrialStudyUidUploading(trialId, studyInstanceUid), _userInfo.UserRoleId, TimeSpan.FromSeconds(30));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -40,8 +40,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<DicomStudy, StudyDTO>().IncludeMembers(t => t.Subject, u => u.SubjectVisit)
|
||||
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteName))
|
||||
.ForMember(d => d.UploaderFirstName, u => u.MapFrom(s => s.CreateUser.FirstName))
|
||||
.ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.CreateUser.LastName))
|
||||
.ForMember(d => d.UploaderFirstName, u => u.MapFrom(s => s.CreateUserRole.FirstName))
|
||||
.ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.CreateUserRole.LastName))
|
||||
.ForMember(d => d.UploadedTime, u => u.MapFrom(s => s.CreateTime));
|
||||
|
||||
CreateMap<Subject, StudyDTO>();
|
||||
|
@ -66,7 +66,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<DicomStudy, QAStudyInfoDTO>()
|
||||
.ForMember(o => o.IsCompleteClinicalData, t => t.MapFrom(u => !u.ReadingClinicalDataList.Any(x => x.ReadingClinicalDataPDFList.Count() == 0)))
|
||||
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
||||
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.CreateUser.LastName + " / " + u.CreateUser.FirstName))
|
||||
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.CreateUserRole.LastName + " / " + u.CreateUserRole.FirstName))
|
||||
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id))
|
||||
.ForMember(o => o.IsHaveUploadFailed, t => t.MapFrom(u => u.DicomStudyMonitorList.Any(t => t.FailedFileCount > 0)))
|
||||
.ForMember(o => o.Modalities, t => t.MapFrom(u => string.Join('、', u.SeriesList.Select(t => t.Modality).Distinct())));
|
||||
|
@ -141,9 +141,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
;
|
||||
|
||||
CreateMap<TrialImageDownload, TrialImageDownloadView>()
|
||||
.ForMember(d => d.UserFullName, u => u.MapFrom(s => s.CreateUser.FullName))
|
||||
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.CreateUser.UserTypeEnum))
|
||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
||||
.ForMember(d => d.UserFullName, u => u.MapFrom(s => s.CreateUserRole.FullName))
|
||||
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.CreateUserRole.UserTypeEnum))
|
||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUserRole.UserName))
|
||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteCode))
|
||||
;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<QCChallenge> _qCChallengeRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
|
||||
IRepository<CheckChallengeDialog> _checkChallengeDialogRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IFrontAuditConfigService
|
||||
{
|
||||
|
@ -60,19 +60,19 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
case AccessToDialogueEnum.Question:
|
||||
|
||||
AccessToDialogueOutDto title = (await _qCChallengeRepository.Where(x => x.Id == inDto.Id).Include(x => x.CreateUser).Select(x => new AccessToDialogueOutDto()
|
||||
AccessToDialogueOutDto title = (await _qCChallengeRepository.Where(x => x.Id == inDto.Id).Include(x => x.CreateUserRole).Select(x => new AccessToDialogueOutDto()
|
||||
{
|
||||
CreateTime = x.CreateTime,
|
||||
CreateUserName = x.CreateUser.UserName,
|
||||
CreateUserName = x.CreateUserRole.UserName,
|
||||
TalkContent = x.Content,
|
||||
IsTitle = true,
|
||||
}).FirstOrDefaultAsync()) ?? new AccessToDialogueOutDto();
|
||||
|
||||
data = await _qCChallengeDialogRepository.Where(x => x.QCChallengeId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUser).Select(
|
||||
data = await _qCChallengeDialogRepository.Where(x => x.QCChallengeId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUserRole).Select(
|
||||
x => new AccessToDialogueOutDto()
|
||||
{
|
||||
CreateTime = x.CreateTime,
|
||||
CreateUserName = x.CreateUser.UserName,
|
||||
CreateUserName = x.CreateUserRole.UserName,
|
||||
TalkContent = x.TalkContent
|
||||
}
|
||||
).OrderBy(x => x.CreateTime).ToListAsync();
|
||||
|
@ -81,11 +81,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
break;
|
||||
case AccessToDialogueEnum.Consistency:
|
||||
data = await _checkChallengeDialogRepository.Where(x => x.SubjectVisitId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUser).Select(
|
||||
data = await _checkChallengeDialogRepository.Where(x => x.SubjectVisitId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUserRole).Select(
|
||||
x => new AccessToDialogueOutDto()
|
||||
{
|
||||
CreateTime = x.CreateTime,
|
||||
CreateUserName = x.CreateUser.UserName,
|
||||
CreateUserName = x.CreateUserRole.UserName,
|
||||
TalkContent = x.TalkContent
|
||||
}
|
||||
).OrderBy(x => x.CreateTime).ToListAsync();
|
||||
|
@ -401,7 +401,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
//用户的数据稽查没有 临时处理
|
||||
|
||||
|
||||
var userObj = await _userRepository.Where(t => t.Id == objectRelationParentId).Select(t => new { UserRealName = t.FullName, t.Phone, t.UserName, UserType = t.UserTypeRole.UserTypeShortName, t.EMail, t.OrganizationName }).FirstOrDefaultAsync();
|
||||
var userObj = await _userRoleRepository.Where(t => t.Id == objectRelationParentId).Select(t => new { UserRealName = t.FullName, t.Phone, t.UserName, UserType = t.UserTypeRole.UserTypeShortName, t.EMail, t.OrganizationName }).FirstOrDefaultAsync();
|
||||
|
||||
if (userObj != null)
|
||||
{
|
||||
|
@ -1074,14 +1074,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
//IsConfig = lst.Select(x => x.IsConfig).FirstOrDefault(),
|
||||
IsShowParent = lst.Select(x => x.IsShowParent).FirstOrDefault(),
|
||||
ParentId = item.AddItemGuid,
|
||||
CreateUserId = _userInfo.Id,
|
||||
CreateUserId = _userInfo.UserRoleId,
|
||||
IsEnable = lst.Select(x => x.IsEnable).FirstOrDefault(),
|
||||
DictionaryKey = lst.Select(x => x.DictionaryKey).FirstOrDefault(),
|
||||
EnumType = lst.Select(x => x.EnumType).FirstOrDefault(),
|
||||
UpdateTime = DateTime.Now,
|
||||
ValueCN = lst.Select(x => x.ValueCN).FirstOrDefault(),
|
||||
Value = lst.Max(x => x.Value),
|
||||
UpdateUserId = _userInfo.Id,
|
||||
UpdateUserId = _userInfo.UserRoleId,
|
||||
ChildrenTypeId = additem?.ChildrenTypeId,
|
||||
ModuleTypeId = additem?.ModuleTypeId,
|
||||
ObjectTypeId = additem?.ObjectTypeId,
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
public class InspectionService(IRepository<DataInspection> _dataInspectionRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<TrialSign> _trialSignRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialSite> _trialSiteRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<Subject> _subjectRepository,
|
||||
|
@ -53,7 +53,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
from leftsubjectVisit in subjectVisittemp.DefaultIfEmpty()
|
||||
join parent in _dataInspectionRepository.Where() on data.ParentId equals parent.Id into parenttemp
|
||||
from leftparent in parenttemp.DefaultIfEmpty()
|
||||
join user in _userRepository.Where().IgnoreQueryFilters() on data.CreateUserId equals user.Id into usertemp
|
||||
join user in _userRoleRepository.Where().IgnoreQueryFilters() on data.CreateUserId equals user.Id into usertemp
|
||||
from leftuser in usertemp.DefaultIfEmpty()
|
||||
join usertype in _userTypeRepository.Where().IgnoreQueryFilters() on leftuser.UserTypeId equals usertype.Id into usertypetemp
|
||||
from leftusertype in usertypetemp.DefaultIfEmpty()
|
||||
|
@ -257,7 +257,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
/// <summary> 验证用户签名信息 </summary> ///
|
||||
public async Task<IResponseOutput> VerifySignatureAsync(SignDTO signDTO)
|
||||
{
|
||||
var user = await _userRepository.FirstOrDefaultAsync(u => u.UserName == signDTO.UserName && u.Password == signDTO.PassWord);
|
||||
var user = await _userRoleRepository.FirstOrDefaultAsync(u => u.UserName == signDTO.UserName && u.Password == signDTO.PassWord);
|
||||
if (user == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["User_CheckNameOrPw"]);
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
//---该CRO已经参与项目,不能被删除。
|
||||
return ResponseOutput.NotOk(_localizer["CRO_InProject"]);
|
||||
}
|
||||
//if (_userRepository.Find().Any(t => t.OrganizationId == cROCompanyId))
|
||||
//if (_userRoleRepository.Find().Any(t => t.OrganizationId == cROCompanyId))
|
||||
//{
|
||||
// return ResponseOutput.NotOk("该CRO下存在用户,暂时无法删除。");
|
||||
//}
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
if (entity.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished)
|
||||
{
|
||||
entity.PublishedUserId = _userInfo.Id;
|
||||
entity.PublishedUserId = _userInfo.UserRoleId;
|
||||
entity.PublishedTime = DateTime.Now;
|
||||
}
|
||||
await _systemNoticeRepository.SaveChangesAsync();
|
||||
|
@ -61,7 +61,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
if (addOrEditSystemNotice.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished && systemNotice.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.NotPublish)
|
||||
{
|
||||
systemNotice.PublishedUserId = _userInfo.Id;
|
||||
systemNotice.PublishedUserId = _userInfo.UserRoleId;
|
||||
systemNotice.PublishedTime = DateTime.Now;
|
||||
}
|
||||
else if (addOrEditSystemNotice.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.NotPublish && systemNotice.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished)
|
||||
|
@ -125,7 +125,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(inQuery.NoticeTypeEnum != null, t => t.NoticeTypeEnum == inQuery.NoticeTypeEnum)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.FileName), t => t.FileName.Contains(inQuery.FileName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.NoticeContent), t => t.NoticeContent.Contains(inQuery.NoticeContent))
|
||||
.ProjectTo<SystemNoticeReadDTO>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
|
||||
.ProjectTo<SystemNoticeReadDTO>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.UserRoleId });
|
||||
|
||||
return await systemNoticeQueryable.ToPagedListAsync(inQuery);
|
||||
}
|
||||
|
@ -137,9 +137,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
var appDateTimeNow = DateTime.Now;
|
||||
|
||||
var query = _systemNoticeRepository
|
||||
.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished && !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.Id))
|
||||
.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished && !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.EndDate == null || t.EndDate != null && t.EndDate > appDateTimeNow)
|
||||
.ProjectTo<SystemNoticeView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
|
||||
.ProjectTo<SystemNoticeView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.UserRoleId });
|
||||
|
||||
return await query.ToListAsync();
|
||||
}
|
||||
|
|
|
@ -32,15 +32,15 @@ namespace IRaCIS.Core.Application.Service
|
|||
var isCRCOrIR = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer;
|
||||
|
||||
var userFeedBackQueryable = _userFeedBackRepository
|
||||
.WhereIf(isCRCOrIR, t => t.CreateUserId == _userInfo.Id)
|
||||
.WhereIf(isCRCOrIR, t => t.CreateUserId == _userInfo.UserRoleId)
|
||||
.WhereIf(inQuery.State != null, t => t.State == inQuery.State)
|
||||
.WhereIf(inQuery.TrialId != null, t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(inQuery.QuestionType != null, t => t.QuestionType == inQuery.QuestionType)
|
||||
.WhereIf(inQuery.BeginCreatime != null, t => t.CreateTime >= inQuery.BeginCreatime)
|
||||
|
||||
.WhereIf(inQuery.EndCreatime != null, t => t.CreateTime == inQuery.EndCreatime)
|
||||
.WhereIf(inQuery.UserTypeEnum != null, t => t.CreateUser.UserTypeEnum == inQuery.UserTypeEnum)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.FeedBackUserKeyInfo), t => t.CreateUser.FullName.Contains(inQuery.FeedBackUserKeyInfo) || t.CreateUser.UserName.Contains(inQuery.FeedBackUserKeyInfo))
|
||||
.WhereIf(inQuery.UserTypeEnum != null, t => t.CreateUserRole.UserTypeEnum == inQuery.UserTypeEnum)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.FeedBackUserKeyInfo), t => t.CreateUserRole.FullName.Contains(inQuery.FeedBackUserKeyInfo) || t.CreateUserRole.UserName.Contains(inQuery.FeedBackUserKeyInfo))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.QuestionDescription), t => t.QuestionDescription.Contains(inQuery.QuestionDescription))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialKeyInfo), t => t.Trial.ExperimentName.Contains(inQuery.TrialKeyInfo) || t.Trial.TrialCode.Contains(inQuery.TrialKeyInfo))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubejctAndVisitKeyInfo), t => t.Subject.Code.Contains(inQuery.SubejctAndVisitKeyInfo) || t.SubjectVisit.VisitName.Contains(inQuery.SubejctAndVisitKeyInfo))
|
||||
|
|
|
@ -23,7 +23,7 @@ using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
|||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
[ApiExplorerSettings(GroupName = "Management")]
|
||||
public class UserService(IRepository<User> _userRepository,
|
||||
public class UserService(IRepository<UserRole> _userRoleRepository,
|
||||
IMailVerificationService _mailVerificationService,
|
||||
IRepository<VerificationCode> _verificationCodeRepository,
|
||||
IRepository<TrialUser> _userTrialRepository,
|
||||
|
@ -70,7 +70,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
private async Task VerifyUserPwdAsync(Guid identityUserId, string newPwd, string? oldPwd = null)
|
||||
{
|
||||
//var dbUser = (await _userRepository.FirstOrDefaultAsync(t => t.Id == userId)).IfNullThrowException();
|
||||
//var dbUser = (await _userRoleRepository.FirstOrDefaultAsync(t => t.Id == userId)).IfNullThrowException();
|
||||
|
||||
if (_verifyConfig.CurrentValue.OpenUserComplexPassword)
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
//验证码 6位
|
||||
int verificationCode = new Random().Next(100000, 1000000);
|
||||
|
||||
await _mailVerificationService.SendMailEditEmail(_userInfo.Id, _userInfo.FullName, email, verificationCode);
|
||||
await _mailVerificationService.SendMailEditEmail(_userInfo.IdentityUserId, _userInfo.FullName, email, verificationCode);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
|
@ -163,7 +163,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
var verificationRecord = await _verificationCodeRepository
|
||||
.FirstOrDefaultAsync(t => t.UserId == _userInfo.Id && t.Code == verificationCode && t.CodeType == 0);
|
||||
.FirstOrDefaultAsync(t => t.UserId == _userInfo.UserRoleId && t.Code == verificationCode && t.CodeType == 0);
|
||||
|
||||
//检查数据库是否存在该验证码
|
||||
if (verificationRecord == null)
|
||||
|
@ -200,9 +200,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
});
|
||||
|
||||
//删除验证码历史记录
|
||||
await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.UserId == _userInfo.Id && t.CodeType == 0);
|
||||
await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.UserId == _userInfo.UserRoleId && t.CodeType == 0);
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true);
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.UserRoleId, OptUserId = _userInfo.UserRoleId, OptType = UserOptType.UpdateUser }, true);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
|
@ -222,7 +222,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
Phone = newPhone
|
||||
});
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true);
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.UserRoleId, OptUserId = _userInfo.UserRoleId, OptType = UserOptType.UpdateUser }, true);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
UserName = newUserName
|
||||
});
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true);
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.UserRoleId, OptUserId = _userInfo.UserRoleId, OptType = UserOptType.UpdateUser }, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
@ -267,7 +267,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
}, true);
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true);
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.UserRoleId, OptUserId = _userInfo.UserRoleId, OptType = UserOptType.UpdateUser }, true);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
if (!string.IsNullOrEmpty(editPwModel.NewUserName))
|
||||
{
|
||||
|
||||
await VerifyUserNameAsync(_userInfo.Id, editPwModel.NewUserName);
|
||||
await VerifyUserNameAsync(_userInfo.UserRoleId, editPwModel.NewUserName);
|
||||
|
||||
await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.IdentityUserId, u => new IdentityUser()
|
||||
{
|
||||
|
@ -444,7 +444,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IsFirstAdd = false
|
||||
});
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.LoginModifyPassword }, true);
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.UserRoleId, OptUserId = _userInfo.UserRoleId, OptType = UserOptType.LoginModifyPassword }, true);
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
|
||||
|
@ -536,7 +536,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var user = await _identityUserRepository.Where(t => t.Id == _userInfo.IdentityUserId).ProjectTo<UserDetailDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
user.AccountList = await _userRepository.Where(t => t.IdentityUserId == _userInfo.IdentityUserId).ProjectTo<UserAccountInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
user.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == _userInfo.IdentityUserId).ProjectTo<UserAccountInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
return user;
|
||||
}
|
||||
|
@ -557,7 +557,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
// await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = userId, OptType = UserOptType.DeleteUser }, true);
|
||||
|
||||
// var success = await _userRepository.BatchDeleteNoTrackingAsync(t => t.Id == userId);
|
||||
// var success = await _userRoleRepository.BatchDeleteNoTrackingAsync(t => t.Id == userId);
|
||||
|
||||
// return ResponseOutput.Result(success);
|
||||
//}
|
||||
|
@ -602,11 +602,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
saveItem.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10));
|
||||
|
||||
var addRoleList = new List<User>();
|
||||
var addRoleList = new List<UserRole>();
|
||||
|
||||
foreach (var role in userAddModel.UserRoleList)
|
||||
{
|
||||
var addRole = _mapper.Map<User>(userAddModel);
|
||||
var addRole = _mapper.Map<UserRole>(userAddModel);
|
||||
|
||||
addRole.UserTypeEnum = role.UserTypeEnum;
|
||||
addRole.UserTypeId = role.UserTypeId;
|
||||
|
@ -664,7 +664,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
user.OrganizationName = _userInfo.IsEn_Us ? _systemEmailConfig.OrganizationName : _systemEmailConfig.OrganizationNameCN;
|
||||
}
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = model.Id, OptType = UserOptType.UpdateUser });
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.UserRoleId, OptUserId = model.Id, OptType = UserOptType.UpdateUser });
|
||||
|
||||
//处理角色的添加、禁用
|
||||
|
||||
|
@ -678,7 +678,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
else
|
||||
{
|
||||
var addRole = _mapper.Map<User>(model);
|
||||
var addRole = _mapper.Map<UserRole>(model);
|
||||
|
||||
addRole.UserTypeEnum = role.UserTypeEnum;
|
||||
addRole.UserTypeId = role.UserTypeId;
|
||||
|
@ -689,7 +689,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
user.UserRoleList = existDBRoleList;
|
||||
|
||||
var success = await _userRepository.SaveChangesAsync();
|
||||
var success = await _userRoleRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok(success);
|
||||
|
||||
|
@ -828,7 +828,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
var userLoginReturnModel = new LoginReturnDTO();
|
||||
|
||||
|
||||
var loginUser = await _userRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
var loginUser = await _userRoleRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
if (loginUser == null)
|
||||
{
|
||||
|
@ -931,8 +931,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
await _fusionCache.RemoveAsync(CacheKeys.UserToken(identityUserId));
|
||||
|
||||
//await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = userId, OptUserId = _userInfo.Id, OptType = UserOptType.LoginOut }, true);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
@ -1098,7 +1096,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(identityUserId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(_verifyConfig.CurrentValue.AutoLoginOutMinutes));
|
||||
}
|
||||
|
||||
userLoginReturnModel.BasicInfo.AccountList = await _userRepository.Where(t => t.IdentityUserId == identityUserId).ProjectTo<UserAccountInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
userLoginReturnModel.BasicInfo.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == identityUserId).ProjectTo<UserAccountInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
userLoginReturnModel.CompanyInfo = companyInfo;
|
||||
|
||||
return ResponseOutput.Ok(userLoginReturnModel);
|
||||
|
@ -1117,7 +1115,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var identityUserId = _userInfo.IdentityUserId;
|
||||
|
||||
var userTokenInfo = await _userRepository.Where(t => t.IdentityUserId == identityUserId && t.Id == userRoleId).Select(t => new UserTokenInfo()
|
||||
var userTokenInfo = await _userRoleRepository.Where(t => t.IdentityUserId == identityUserId && t.Id == userRoleId).Select(t => new UserTokenInfo()
|
||||
{
|
||||
UserRoleId = t.Id,
|
||||
IdentityUserId = t.IdentityUserId,
|
||||
|
@ -1136,48 +1134,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var jwt = _tokenService.GetToken(userTokenInfo);
|
||||
|
||||
var selectUserInfo = _userRepository.Where(t => t.IdentityUserId == identityUserId && t.Id == userRoleId).FirstOrDefault();
|
||||
|
||||
//if (!_identityUserRepository.Any(t => t.Id == identityUserId))
|
||||
//{
|
||||
// var identityUser = _mapper.Map<IdentityUser>(selectUserInfo);
|
||||
|
||||
// await _identityUserRepository.AddAsync(identityUser, true);
|
||||
//}
|
||||
|
||||
////多账号没维护
|
||||
//if (await _userRepository.Where(t => t.IdentityUserId == identityUserId).AnyAsync(t => t.IsMutiAccountInfoConfirm == false))
|
||||
//{
|
||||
// //将信息维护为一致
|
||||
// await _userRepository.BatchUpdateNoTrackingAsync(t => t.IdentityUserId == identityUserId, u => new User()
|
||||
// {
|
||||
// Code = selectUserInfo.Code,
|
||||
// UserName = selectUserInfo.UserName,
|
||||
// FirstName = selectUserInfo.FirstName,
|
||||
// LastName = selectUserInfo.LastName,
|
||||
// Phone = selectUserInfo.Phone,
|
||||
// EMail = selectUserInfo.EMail,
|
||||
// DepartmentName = selectUserInfo.DepartmentName,
|
||||
// OrganizationName = selectUserInfo.OrganizationName,
|
||||
// IsFirstAdd = selectUserInfo.IsFirstAdd,
|
||||
// Sex = selectUserInfo.Sex,
|
||||
// Status = selectUserInfo.Status,
|
||||
// UserCode = selectUserInfo.UserCode,
|
||||
// Password = selectUserInfo.Password,
|
||||
// PasswordChanged = selectUserInfo.PasswordChanged,
|
||||
// LastChangePassWordTime = selectUserInfo.LastChangePassWordTime,
|
||||
// PositionName = selectUserInfo.PositionName,
|
||||
// IsTestUser = selectUserInfo.IsTestUser,
|
||||
// IsZhiZhun = selectUserInfo.IsZhiZhun,
|
||||
// AutoCutNextTask = selectUserInfo.AutoCutNextTask,
|
||||
// //DoctorId=selectUserInfo.DoctorId,
|
||||
// LastLoginIP = selectUserInfo.LastLoginIP,
|
||||
// LastLoginTime = selectUserInfo.LastLoginTime,
|
||||
// });
|
||||
//}
|
||||
|
||||
|
||||
return jwt;
|
||||
//return new LoginSelectRoleReturn() { AccountList = accountList, JwtStr = jwt };
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
/// UserTypeRoleService
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Management")]
|
||||
public class UserTypeRoleService(IRepository<UserType> _userTypeRepository, IRepository<User> _userRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IUserTypeService
|
||||
public class UserTypeRoleService(IRepository<UserType> _userTypeRepository, IRepository<UserRole> _userRoleRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IUserTypeService
|
||||
{
|
||||
|
||||
[HttpPost]
|
||||
|
@ -79,7 +79,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
[HttpDelete("{userTypeId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteUserTypeRole(Guid userTypeId)
|
||||
{
|
||||
if (await _userRepository.AnyAsync(t => t.UserTypeId == userTypeId))
|
||||
if (await _userRoleRepository.AnyAsync(t => t.UserTypeId == userTypeId))
|
||||
{
|
||||
//---该用户类型中已存在用户,不能删除
|
||||
return ResponseOutput.NotOk(_localizer["UserType_InUse"]);
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
CreateMap<UserCommand, User>().ForMember(d => d.UserCode, x => x.Ignore());
|
||||
CreateMap<UserCommand, UserRole>().ForMember(d => d.UserCode, x => x.Ignore());
|
||||
CreateMap<UserType, UserTypeMenuAddOrEdit>().ReverseMap()
|
||||
.ForMember(t => t.UserTypeMenuList, u => u.MapFrom(c => c.MenuIds))
|
||||
.ForMember(t => t.UserTypeGroupList, u => u.MapFrom(c => c.UserTypeGroupIdList));
|
||||
|
@ -93,7 +93,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
var userId = Guid.Empty;
|
||||
CreateMap<SystemNotice, SystemNoticeView>()
|
||||
.ForMember(t => t.PublishUserName, d => d.MapFrom(t => t.PublishedUser.UserName))
|
||||
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUser.UserName))
|
||||
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUserRole.UserName))
|
||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token));
|
||||
|
||||
|
||||
|
@ -101,7 +101,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<SystemNotice, SystemNoticeReadDTO>()
|
||||
.ForMember(t => t.PublishUserName, d => d.MapFrom(t => t.PublishedUser.UserName))
|
||||
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUser.UserName))
|
||||
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUserRole.UserName))
|
||||
.ForMember(t => t.IsRead, d => d.MapFrom(t => t.NoticeUserReadList.Any(t => t.CreateUserId == userId)))
|
||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token));
|
||||
|
||||
|
@ -132,9 +132,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.SubjectCode, c => c.MapFrom(t => t.Subject.Code))
|
||||
.ForMember(d => d.TrialSiteCode, c => c.MapFrom(t => t.VisitTask.IsAnalysisCreate ? t.VisitTask.BlindTrialSiteCode : t.TrialSite.TrialSiteCode))
|
||||
.ForMember(d => d.SubjectVisitName, c => c.MapFrom(t => t.SubjectVisit.VisitName))
|
||||
.ForMember(d => d.FeedBackUserName, c => c.MapFrom(t => t.CreateUser.UserName))
|
||||
.ForMember(d => d.FeedBackFullName, c => c.MapFrom(t => t.CreateUser.FullName))
|
||||
.ForMember(d => d.UserTypeEnum, c => c.MapFrom(t => t.CreateUser.UserTypeEnum))
|
||||
.ForMember(d => d.FeedBackUserName, c => c.MapFrom(t => t.CreateUserRole.UserName))
|
||||
.ForMember(d => d.FeedBackFullName, c => c.MapFrom(t => t.CreateUserRole.FullName))
|
||||
.ForMember(d => d.UserTypeEnum, c => c.MapFrom(t => t.CreateUserRole.UserTypeEnum))
|
||||
.ForMember(d => d.ScreenshotList, c => c.MapFrom(t => t.FeedBackScreenshotList))
|
||||
;
|
||||
|
||||
|
@ -142,21 +142,21 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<UserBasicInfo, UserTokenInfo>();
|
||||
|
||||
CreateMap<User, UserAccountInfo>()
|
||||
CreateMap<UserRole, UserAccountInfo>()
|
||||
.ForMember(d => d.UserTypeShortName, c => c.MapFrom(t => t.UserTypeRole.UserTypeShortName));
|
||||
|
||||
|
||||
|
||||
CreateMap<User, IdentityUser>();
|
||||
CreateMap<UserRole, IdentityUser>();
|
||||
|
||||
CreateMap<IdentityUser, UserBasicInfo>()
|
||||
.ForMember(d => d.IdentityUserId, c => c.MapFrom(t => t.Id));
|
||||
CreateMap<IdentityUser, UserListDTO>();
|
||||
|
||||
CreateMap<User, UserAddUserType>();
|
||||
CreateMap<UserRole, UserAddUserType>();
|
||||
|
||||
|
||||
CreateMap<User, IdentityUserTypeDTO>()
|
||||
CreateMap<UserRole, IdentityUserTypeDTO>()
|
||||
.ForMember(d => d.UserTypeShortName, c => c.MapFrom(t => t.UserTypeRole.UserTypeShortName));
|
||||
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
subjectVisit = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId)).IfNullThrowException();
|
||||
}
|
||||
if (subjectVisit!.CurrentActionUserId != _userInfo.Id)
|
||||
if (subjectVisit!.CurrentActionUserId != _userInfo.UserRoleId)
|
||||
{
|
||||
//---您不是该质控任务当前领取人,没有操作权限!
|
||||
throw new BusinessValidationFailedException(_localizer["QCCommon_NoPermission"]);
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
.WhereIf(inQuery.SubmitState != null, t => t.SubmitState == inQuery.SubmitState)
|
||||
.WhereIf(inQuery.ChallengeState != null, t => t.ChallengeState == inQuery.ChallengeState)
|
||||
.WhereIf(inQuery.IsUrgent != null, t => t.IsUrgent == inQuery.IsUrgent)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.ProjectTo<QCCRCVisitViewModel>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
|
@ -148,7 +148,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
.WhereIf(inQuery.IsOverTime != null && inQuery.IsOverTime == true, t => t.IsClosed ? t.ClosedTime > t.DeadlineTime : DateTime.Now > t.DeadlineTime)
|
||||
.WhereIf(inQuery.IsOverTime != null && inQuery.IsOverTime == false, t => t.IsClosed ? t.ClosedTime < t.DeadlineTime : DateTime.Now < t.DeadlineTime)
|
||||
.WhereIf(inQuery.IsUrgent != null, t => t.SubjectVisit.IsUrgent == inQuery.IsUrgent)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.SubjectVisit.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.SubjectVisit.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.ProjectTo<QCCRCChallengeViewModel>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await query.ToPagedListAsync(inQuery, new string[] { nameof(QCCRCChallengeViewModel.IsUrgent) + " desc", nameof(QCCRCChallengeViewModel.CreateTime) });
|
||||
|
@ -209,7 +209,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
var result = await GetQCVisitList(new QCVisitSearchDTO()
|
||||
{
|
||||
TrialId = inDto.TrialId,
|
||||
CurrentActionUserId = _userInfo.Id,
|
||||
CurrentActionUserId = _userInfo.UserRoleId,
|
||||
VisitId = inDto.VisitId,
|
||||
PageIndex = 1,
|
||||
PageSize = 1,
|
||||
|
@ -291,7 +291,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo))
|
||||
.WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||
//.WhereIf(!string.IsNullOrEmpty(checkQuery.VisitPlanInfo), checkQuery.VisitPlanInfo.Contains('.') ? t => t.InPlan == false : t => t.VisitNum == decimal.Parse(checkQuery.VisitPlanInfo))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//CRC 过滤负责的site
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))//CRC 过滤负责的site
|
||||
.ProjectTo<QCCheckWithModalityView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await query.ToPagedListAsync(inQuery);
|
||||
|
@ -313,7 +313,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
var sv = (await _subjectVisitRepository.Where(t => t.Id == subjectVisitId)
|
||||
.ProjectTo<CheckDialogDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
sv.DialogList.ForEach(t => t.IsCurrentUser = _userInfo.Id == t.CreateUserId);
|
||||
sv.DialogList.ForEach(t => t.IsCurrentUser = _userInfo.UserRoleId == t.CreateUserId);
|
||||
|
||||
return sv;
|
||||
}
|
||||
|
@ -544,7 +544,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
|
||||
var list = await _qcChallengeRepository.Where(t => t.Id == qaChallengeId)
|
||||
.ProjectTo<ChallengeAndDialog>(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.Id }).ToListAsync();
|
||||
.ProjectTo<ChallengeAndDialog>(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.UserRoleId }).ToListAsync();
|
||||
|
||||
//利用automapper 运行时映射
|
||||
//list.ForEach(t => t.IsCurrentUser = _userInfo.Id == t.CreateUserId);
|
||||
|
@ -566,7 +566,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
|
||||
var qaChallengeQuery = _qcChallengeRepository.Where(t => t.SubjectVisitId == subjectVisitId && t.QCProcessEnum == trialQCProcess)
|
||||
.ProjectTo<ChallengeAndDialog>(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.Id });
|
||||
.ProjectTo<ChallengeAndDialog>(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.UserRoleId });
|
||||
|
||||
var list = await qaChallengeQuery.ToListAsync();
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
dbQCChallenge.LatestMsgTime = DateTime.Now;
|
||||
|
||||
|
||||
dbQCChallenge.LatestReplyUserId = _userInfo.Id;
|
||||
dbQCChallenge.LatestReplyUserId = _userInfo.UserRoleId;
|
||||
|
||||
|
||||
var success = await _qCChallengeDialogrepository.SaveChangesAsync();
|
||||
|
@ -345,7 +345,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
ResponseOutput.NotOk(_localizer["QCOperation_PassAfterClose"]);
|
||||
}
|
||||
|
||||
sv.CheckUserId = _userInfo.Id;
|
||||
sv.CheckUserId = _userInfo.UserRoleId;
|
||||
sv.CheckState = CheckStateEnum.CVPassed;
|
||||
|
||||
sv.ReadingStatus = ReadingStatusEnum.TaskAllocate;
|
||||
|
@ -835,7 +835,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
subjectVisit = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == sujectVisitId)).IfNullThrowException();
|
||||
}
|
||||
|
||||
if (subjectVisit!.CurrentActionUserId != _userInfo.Id)
|
||||
if (subjectVisit!.CurrentActionUserId != _userInfo.UserRoleId)
|
||||
{
|
||||
//---您不是该质控任务当前领取人,没有操作权限!
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_NoRecipient"]);
|
||||
|
@ -863,7 +863,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
dbSubjectVisit.IsTake = true;
|
||||
|
||||
dbSubjectVisit.CurrentActionUserId = _userInfo.Id;
|
||||
dbSubjectVisit.CurrentActionUserId = _userInfo.UserRoleId;
|
||||
|
||||
dbSubjectVisit.CurrentActionUserExpireTime = DateTime.Now.AddHours(1);
|
||||
|
||||
|
@ -919,8 +919,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
break;
|
||||
case TrialQCProcess.SingleAudit:
|
||||
visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted
|
||||
&& x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId != _userInfo.Id && (x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake)))
|
||||
.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.Id)
|
||||
&& x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId != _userInfo.UserRoleId && (x.CurrentActionUserId == _userInfo.UserRoleId || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake)))
|
||||
.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId)
|
||||
.Include(x => x.Subject).ToListAsync();
|
||||
|
||||
subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId)
|
||||
|
@ -953,9 +953,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
case TrialQCProcess.DoubleAudit:
|
||||
|
||||
visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId &&
|
||||
((x.CurrentActionUserId == _userInfo.Id) || (!x.IsTake && x.AuditState != AuditStateEnum.QCPassed && (x.PreliminaryAuditUserId != _userInfo.Id)))
|
||||
((x.CurrentActionUserId == _userInfo.UserRoleId) || (!x.IsTake && x.AuditState != AuditStateEnum.QCPassed && (x.PreliminaryAuditUserId != _userInfo.UserRoleId)))
|
||||
)
|
||||
.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.Id)
|
||||
.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId)
|
||||
.Include(x => x.Subject).ToListAsync();
|
||||
if (subjectVisit != null)
|
||||
{
|
||||
|
@ -1046,7 +1046,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
}
|
||||
else if (trialConfig.QCProcessEnum == TrialQCProcess.SingleAudit)
|
||||
{
|
||||
if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.Id)
|
||||
if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.UserRoleId)
|
||||
{
|
||||
//---初审已通过,不能继续领取
|
||||
return ResponseOutput.NotOk(_localizer["QCOperation_InitialAuditPassed"]);
|
||||
|
@ -1068,7 +1068,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
}
|
||||
else if (trialConfig.QCProcessEnum == TrialQCProcess.DoubleAudit)
|
||||
{
|
||||
if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.Id)
|
||||
if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.UserRoleId)
|
||||
{
|
||||
//---复审不能和初审是同一个人
|
||||
return ResponseOutput.NotOk(_localizer["QCOperation_NoSameReviewer"]);
|
||||
|
@ -1099,7 +1099,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
dbSubjectVisit.IsTake = true;
|
||||
|
||||
dbSubjectVisit.CurrentActionUserId = _userInfo.Id;
|
||||
dbSubjectVisit.CurrentActionUserId = _userInfo.UserRoleId;
|
||||
|
||||
dbSubjectVisit.CurrentActionUserExpireTime = DateTime.Now.AddHours(1);
|
||||
|
||||
|
@ -1109,7 +1109,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
}
|
||||
else
|
||||
{
|
||||
if (dbSubjectVisit!.CurrentActionUserId != _userInfo.Id)
|
||||
if (dbSubjectVisit!.CurrentActionUserId != _userInfo.UserRoleId)
|
||||
{
|
||||
//---您不是该质控任务当前领取人,没有操作权限!
|
||||
return ResponseOutput.NotOk(_localizer["QCOperation_NoRecipient"], ApiResponseCodeEnum.NeedTips);
|
||||
|
@ -1414,7 +1414,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
dbSubjectVisit.SubmitState = SubmitStateEnum.Submitted;
|
||||
dbSubjectVisit.SubmitTime = DateTime.Now;
|
||||
dbSubjectVisit.SubmitUserId = _userInfo.Id;
|
||||
dbSubjectVisit.SubmitUserId = _userInfo.UserRoleId;
|
||||
|
||||
//维护统一状态
|
||||
dbSubjectVisit.ReadingStatus = ReadingStatusEnum.ImageQuality;
|
||||
|
@ -1513,7 +1513,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
public async Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, [FromRoute] AuditStateEnum auditState)
|
||||
{
|
||||
|
||||
if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == _userInfo.Id))
|
||||
if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == _userInfo.UserRoleId))
|
||||
{
|
||||
//---您已经被移出项目,没有操作权限。
|
||||
return ResponseOutput.NotOk(_localizer["QCOperation_RemoveItem"]);
|
||||
|
@ -1574,7 +1574,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
dbSubjectVisit.AuditState = AuditStateEnum.QCPassed;
|
||||
dbSubjectVisit.CheckState = trialConfig.IsImageConsistencyVerification ? CheckStateEnum.ToCheck : CheckStateEnum.CVPassed;
|
||||
dbSubjectVisit.ForwardState = trialConfig.IsImageConsistencyVerification ? ForwardStateEnum.None : ForwardStateEnum.ToForward;
|
||||
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id;
|
||||
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId;
|
||||
dbSubjectVisit.PreliminaryAuditTime = DateTime.Now;
|
||||
|
||||
|
||||
|
@ -1618,7 +1618,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
}
|
||||
|
||||
dbSubjectVisit.AuditState = AuditStateEnum.PrimaryQCPassed;
|
||||
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id;
|
||||
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId;
|
||||
dbSubjectVisit.PreliminaryAuditTime = DateTime.Now;
|
||||
|
||||
|
||||
|
@ -1638,7 +1638,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
dbSubjectVisit.ForwardState = trialConfig.IsImageConsistencyVerification ? ForwardStateEnum.None : ForwardStateEnum.ToForward;
|
||||
|
||||
dbSubjectVisit.ReviewAuditUserId = _userInfo.Id;
|
||||
dbSubjectVisit.ReviewAuditUserId = _userInfo.UserRoleId;
|
||||
|
||||
dbSubjectVisit.ReviewAuditTime = DateTime.Now;
|
||||
|
||||
|
@ -1682,7 +1682,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
if (dbSubjectVisit.AuditState == AuditStateEnum.InPrimaryQC)
|
||||
{
|
||||
dbSubjectVisit.AuditState = AuditStateEnum.QCFailed;
|
||||
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id;
|
||||
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId;
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -1697,12 +1697,12 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
if (dbSubjectVisit.AuditState == AuditStateEnum.InPrimaryQC)
|
||||
{
|
||||
dbSubjectVisit.AuditState = AuditStateEnum.QCFailed;
|
||||
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id;
|
||||
dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId;
|
||||
}
|
||||
else if (dbSubjectVisit.AuditState == AuditStateEnum.InSecondaryQC)
|
||||
{
|
||||
dbSubjectVisit.AuditState = AuditStateEnum.QCFailed;
|
||||
dbSubjectVisit.ReviewAuditUserId = _userInfo.Id;
|
||||
dbSubjectVisit.ReviewAuditUserId = _userInfo.UserRoleId;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1717,7 +1717,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
|
||||
}
|
||||
dbSubjectVisit.Auditor = _userInfo.Id;
|
||||
dbSubjectVisit.Auditor = _userInfo.UserRoleId;
|
||||
dbSubjectVisit.IsTake = false;
|
||||
dbSubjectVisit.CurrentActionUserId = null;
|
||||
dbSubjectVisit.CurrentActionUserExpireTime = null;
|
||||
|
@ -1818,7 +1818,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
qcChallenge.ReuploadEnum = QCChanllengeReuploadEnum.QCAgreeUpload;
|
||||
qcChallenge.LatestMsgTime = DateTime.Now;
|
||||
qcChallenge.LatestReplyUserId = _userInfo.Id;
|
||||
qcChallenge.LatestReplyUserId = _userInfo.UserRoleId;
|
||||
|
||||
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == qcChallenge.SubjectVisitId, c => new SubjectVisit() { IsQCConfirmedReupload = true });
|
||||
|
||||
|
@ -1845,7 +1845,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
sv.AuditState = AuditStateEnum.InPrimaryQC;
|
||||
|
||||
sv.CurrentActionUserExpireTime = DateTime.Now.AddHours(1);
|
||||
sv.CurrentActionUserId = _userInfo.Id;
|
||||
sv.CurrentActionUserId = _userInfo.UserRoleId;
|
||||
|
||||
//BackgroundJob.Schedule<IObtainTaskAutoCancelJob>(t => t.CancelQCObtaion(qcChallenge.SubjectVisitId, DateTime.Now), TimeSpan.FromHours(1));
|
||||
sv.IsTake = true;
|
||||
|
@ -1936,13 +1936,13 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
qcChallenge.ReUploadedTime = DateTime.Now;
|
||||
|
||||
qcChallenge.ReUploadUserId = _userInfo.Id;
|
||||
qcChallenge.ReUploadUserId = _userInfo.UserRoleId;
|
||||
|
||||
qcChallenge.ReUploader = _userInfo.FullName;
|
||||
|
||||
qcChallenge.LatestMsgTime = DateTime.Now;
|
||||
|
||||
qcChallenge.LatestReplyUserId = _userInfo.Id;
|
||||
qcChallenge.LatestReplyUserId = _userInfo.UserRoleId;
|
||||
|
||||
var dbSubjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == qcChallenge.SubjectVisitId).IfNullThrowException();
|
||||
|
||||
|
@ -2013,7 +2013,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
}
|
||||
|
||||
qcChallenge.LatestMsgTime = DateTime.Now;
|
||||
qcChallenge.LatestReplyUserId = _userInfo.Id;
|
||||
qcChallenge.LatestReplyUserId = _userInfo.UserRoleId;
|
||||
qcChallenge.ReuploadEnum = QCChanllengeReuploadEnum.CRCRequestReupload;
|
||||
|
||||
qcChallenge.DialogList.Add(new QCChallengeDialog()
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<QCChallengeDialog, DialogInfo>()
|
||||
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
|
||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.FullName))
|
||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUserRole.FullName))
|
||||
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
|
||||
|
||||
CreateMap<QCChallenge, QCChanllengeExportDto>()
|
||||
|
@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.SubjectVisit.TrialSite.TrialSiteCode))
|
||||
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
|
||||
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUserRole.UserName))
|
||||
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
|
||||
.ForMember(d => d.LatestReplyUserFullName, u => u.MapFrom(t => t.LatestReplyUser.FullName))
|
||||
.ForMember(d => d.DialogList, u => u.MapFrom(t => t.DialogList))
|
||||
|
@ -89,8 +89,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.RadiologyClinicalDataCount, u => u.MapFrom(s => s.ClinicalDataList.Count(t => t.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.ImageRead)))
|
||||
.ForMember(d => d.OncologyClinicalDataCount, u => u.MapFrom(s => s.ClinicalDataList.Count(t => t.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead)))
|
||||
|
||||
.ForMember(d => d.ChallengeWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.SelectMany(c => c.QCChallengeList).Count(t => t.IsClosed == false && !t.DialogList.Any(t => t.CreateUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))))
|
||||
.ForMember(d => d.CheckWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.CheckState == CheckStateEnum.CVIng && t.CheckChallengeState != CheckChanllengeTypeEnum.Closed && !t.CheckChallengeDialogList.Any(t => t.CreateUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))))
|
||||
.ForMember(d => d.ChallengeWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.SelectMany(c => c.QCChallengeList).Count(t => t.IsClosed == false && !t.DialogList.Any(t => t.CreateUserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))))
|
||||
.ForMember(d => d.CheckWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.CheckState == CheckStateEnum.CVIng && t.CheckChallengeState != CheckChanllengeTypeEnum.Closed && !t.CheckChallengeDialogList.Any(t => t.CreateUserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))))
|
||||
;
|
||||
|
||||
CreateMap<Subject, SubjectProgressDto>()
|
||||
|
@ -124,7 +124,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<CheckChallengeDialog, DialogInfo>()
|
||||
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
|
||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.FullName))
|
||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUserRole.FullName))
|
||||
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
|
||||
|
||||
CreateMap<SubjectVisit, PMKCheckEXportDTO>()
|
||||
|
@ -554,8 +554,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
//一致性核查 质疑对话
|
||||
CreateMap<CheckChallengeDialog, CheckChanllengeDialogDTO>()
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName))
|
||||
.ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUser.FullName));
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.UserName))
|
||||
.ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUserRole.FullName));
|
||||
|
||||
CreateMap<SubjectVisit, CheckDialogDTO>()
|
||||
.ForMember(d => d.SubjectVisitCheck, u => u.MapFrom(t => t))
|
||||
|
@ -586,13 +586,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
// 临床数据上传 路径拼接返回
|
||||
|
||||
CreateMap<PreviousHistory, PreviousHistoryView>()
|
||||
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUser.FullName))
|
||||
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUserRole.FullName))
|
||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
|
||||
CreateMap<PreviousOther, PreviousOtherView>()
|
||||
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUser.FullName))
|
||||
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUserRole.FullName))
|
||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
|
||||
CreateMap<PreviousSurgery, PreviousSurgeryView>()
|
||||
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUser.FullName))
|
||||
.ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUserRole.FullName))
|
||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
|
||||
|
||||
|
||||
|
@ -602,14 +602,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
//QC 质疑对话
|
||||
var currentUserId = Guid.Empty;
|
||||
CreateMap<QCChallengeDialog, QCChanllengeDialogDTO>()
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName))
|
||||
.ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUser.FullName))
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.UserName))
|
||||
.ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUserRole.FullName))
|
||||
|
||||
.ForMember(d => d.IsCurrentUser, u => u.MapFrom(s => s.CreateUserId == currentUserId));
|
||||
//质疑编号
|
||||
CreateMap<QCChallenge, QCChallengeWithUser>()
|
||||
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.FullName))
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName))
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.FullName))
|
||||
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId))
|
||||
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.FullName))
|
||||
|
||||
|
@ -624,7 +624,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<QCChallenge, ChallengeAndDialog>()
|
||||
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.FullName))
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName))
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.FullName))
|
||||
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId))
|
||||
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.FullName))
|
||||
|
||||
|
@ -641,7 +641,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
// 一致性核查文件
|
||||
CreateMap<InspectionFile, GetUserUploadFileDto>()
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName));
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.FullName));
|
||||
|
||||
|
||||
//CRC 质疑列表
|
||||
|
@ -666,7 +666,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.BlindName, u => u.MapFrom(s => s.SubjectVisit.BlindName))
|
||||
//.ForMember(d => d.ClosedUserUserName, u => u.MapFrom(s => s.ClosedUser.UserName))
|
||||
.ForMember(d => d.IsQCConfirmedReupload, u => u.MapFrom(s => s.SubjectVisit.IsQCConfirmedReupload))
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUserRole.UserName))
|
||||
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
|
||||
.ForMember(d => d.LatestReplyUserFullName, u => u.MapFrom(t => t.LatestReplyUser.FullName))
|
||||
|
||||
|
|
|
@ -428,7 +428,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
|
||||
LatestReplyUserId = (inDto.IsSendDialog && !medicalReview.IsSendMessage && inDto.IsHaveQuestion) ? _userInfo.Id : null,
|
||||
LatestReplyUserId = (inDto.IsSendDialog && !medicalReview.IsSendMessage && inDto.IsHaveQuestion) ? _userInfo.UserRoleId : null,
|
||||
IsHaveQuestion = inDto.IsHaveQuestion,
|
||||
Questioning = inDto.Questioning,
|
||||
IsSendMessage = inDto.IsSendDialog && inDto.IsHaveQuestion,
|
||||
|
@ -471,7 +471,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
LatestReplyUserId = _userInfo.Id,
|
||||
LatestReplyUserId = _userInfo.UserRoleId,
|
||||
IsClosedDialog = inDto.IsClosedDialog,
|
||||
MedicalDialogCloseEnum = inDto.MedicalDialogCloseEnum,
|
||||
DialogCloseReason = inDto.DialogCloseReason,
|
||||
|
@ -510,7 +510,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
LatestReplyUserId = _userInfo.Id,
|
||||
LatestReplyUserId = _userInfo.UserRoleId,
|
||||
});
|
||||
|
||||
var visitTaskId = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).Select(x => x.VisitTaskId).FirstOrDefaultAsync();
|
||||
|
@ -566,7 +566,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(x => !x.IsClosedDialog && x.Id == inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
LatestReplyUserId = _userInfo.Id,
|
||||
LatestReplyUserId = _userInfo.UserRoleId,
|
||||
IsClosedDialog = true,
|
||||
MedicalDialogCloseEnum = MedicalDialogClose.IRApplyReReading,
|
||||
|
||||
|
@ -580,7 +580,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
LatestReplyUserId = _userInfo.Id,
|
||||
LatestReplyUserId = _userInfo.UserRoleId,
|
||||
DoctorUserIdeaEnum = inDto.DoctorUserIdeaEnum,
|
||||
});
|
||||
ReadingMedicalReviewDialog dialog = new ReadingMedicalReviewDialog()
|
||||
|
@ -617,7 +617,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.OrderBy(x => x.CreateTime).ToListAsync();
|
||||
result.ForEach(x =>
|
||||
{
|
||||
x.IsCurrentUser = x.CreateUserId == _userInfo.Id;
|
||||
x.IsCurrentUser = x.CreateUserId == _userInfo.UserRoleId;
|
||||
});
|
||||
return (result, new
|
||||
{
|
||||
|
@ -710,7 +710,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
LatestReplyUserId = _userInfo.Id,
|
||||
LatestReplyUserId = _userInfo.UserRoleId,
|
||||
DoctorUserIdeaEnum = inDto.DoctorUserIdeaEnum,
|
||||
DisagreeReason = inDto.DisagreeReason,
|
||||
IsApplyHeavyReading = inDto.IsApplyHeavyReading,
|
||||
|
@ -784,7 +784,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<PageOutput<GetIRMedicalFeedbackListOutDto>> GetIRMedicalFeedbackList(GetIRMedicalFeedbackListInDto inDto)
|
||||
{
|
||||
var taskMedicalReviewquery = _taskMedicalReviewRepository.Where(x => x.TrialId == inDto.TrialId).Include(x => x.VisitTask)
|
||||
.Where(x => x.VisitTask.DoctorUserId == _userInfo.Id)
|
||||
.Where(x => x.VisitTask.DoctorUserId == _userInfo.UserRoleId)
|
||||
.Where(x => x.IsHaveQuestion)
|
||||
.WhereIf(!inDto.TaskBlindName.IsNullOrEmpty(), x => x.VisitTask.TaskBlindName == inDto.TaskBlindName)
|
||||
.WhereIf(inDto.SubjectId != null, x => x.VisitTask.SubjectId == inDto.SubjectId!)
|
||||
|
|
|
@ -181,7 +181,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
};
|
||||
|
||||
return await _trialDocumentRepository.Where(x => x.TrialId == inDto.TrialId
|
||||
&& x.TrialDocConfirmedUserList.Any(y => y.ConfirmUserId == _userInfo.Id && y.ConfirmTime != null)
|
||||
&& x.TrialDocConfirmedUserList.Any(y => y.ConfirmUserId == _userInfo.UserRoleId && y.ConfirmTime != null)
|
||||
&& x.NeedConfirmedUserTypeList.Any(y => y.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.WhereIf(userType == UserTypeEnum.IndependentReviewer, t => t.FileType.Code == "2" || t.FileType.Code == "6")
|
||||
.WhereIf(userType == UserTypeEnum.IQC, t => t.FileType.Code == "4" || t.FileType.Code == "5")
|
||||
|
@ -2676,7 +2676,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<bool> ClearSkipReadingCache()
|
||||
{
|
||||
|
||||
await _fusionCache.RemoveAsync(CacheKeys.SkipReadingCacheKey(_userInfo.Id));
|
||||
await _fusionCache.RemoveAsync(CacheKeys.SkipReadingCacheKey(_userInfo.UserRoleId));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2689,18 +2689,18 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<bool> SetSkipReadingCache(SetSkipReadingCacheInDto inDto)
|
||||
{
|
||||
var clearSkipReadingCache = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.SkipReadingCacheKey(_userInfo.Id));
|
||||
var clearSkipReadingCache = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.SkipReadingCacheKey(_userInfo.UserRoleId));
|
||||
if (clearSkipReadingCache == null || clearSkipReadingCache == string.Empty)
|
||||
{
|
||||
List<Guid> cacheIds = new List<Guid>();
|
||||
cacheIds.Add(inDto.VisitTaskId);
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.SkipReadingCacheKey(_userInfo.Id), JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24));
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.SkipReadingCacheKey(_userInfo.UserRoleId), JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24));
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid>? cacheIds = JsonConvert.DeserializeObject<List<Guid>>(clearSkipReadingCache);
|
||||
cacheIds.Add(inDto.VisitTaskId);
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.SkipReadingCacheKey(_userInfo.Id), JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24));
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.SkipReadingCacheKey(_userInfo.UserRoleId), JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -2731,7 +2731,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
#region 跳过阅片
|
||||
var clearSkipReadingCache = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.SkipReadingCacheKey(_userInfo.Id));
|
||||
var clearSkipReadingCache = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.SkipReadingCacheKey(_userInfo.UserRoleId));
|
||||
|
||||
|
||||
List<Guid> cacheSkipIds = new List<Guid>();
|
||||
|
@ -2896,7 +2896,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
else
|
||||
{
|
||||
var query = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.Id
|
||||
var query = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.UserRoleId
|
||||
&& x.TrialReadingCriterionId == trialReadingCriterionId
|
||||
&& x.TaskState == TaskState.Effect)
|
||||
.Where(x=> !cacheSkipIds.Contains(x.Id));
|
||||
|
@ -3071,17 +3071,17 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
return true;
|
||||
}
|
||||
var startReadingTimeKey = _userInfo.Id.ToString() + "StartReadingTime";
|
||||
var startRestTimeKey = _userInfo.Id.ToString() + "StartRestTime";
|
||||
var startReadingTimeKey = _userInfo.UserRoleId.ToString() + "StartReadingTime";
|
||||
var startRestTimeKey = _userInfo.UserRoleId.ToString() + "StartRestTime";
|
||||
|
||||
int readingMinute = _verifyConfig.CurrentValue.ContinuousReadingTimeMin; // 为60整数
|
||||
int restMinute = _verifyConfig.CurrentValue.ReadingRestTimeMin; //
|
||||
var startReadingTime = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.StartReadingTimeKey(_userInfo.Id));
|
||||
var startRestTime = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.StartRestTime(_userInfo.Id));
|
||||
var startReadingTime = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.StartReadingTimeKey(_userInfo.UserRoleId));
|
||||
var startRestTime = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.StartRestTime(_userInfo.UserRoleId));
|
||||
|
||||
if (startReadingTime == null && startRestTime == null)
|
||||
{
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.StartReadingTimeKey(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.StartReadingTimeKey(_userInfo.UserRoleId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||
}
|
||||
else if (startRestTime != null)
|
||||
{
|
||||
|
@ -3094,8 +3094,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
else
|
||||
{
|
||||
// 休息时间>10分钟 删除休息时间的缓存 记录开始阅片时间
|
||||
await _fusionCache.RemoveAsync(CacheKeys.StartRestTime(_userInfo.Id));
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.StartReadingTimeKey(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||
await _fusionCache.RemoveAsync(CacheKeys.StartRestTime(_userInfo.UserRoleId));
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.StartReadingTimeKey(_userInfo.UserRoleId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3107,8 +3107,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
int timespanMin = (DateTime.Now - cacheDate).Minutes;
|
||||
if (timespanMin > readingMinute)
|
||||
{
|
||||
await _fusionCache.RemoveAsync(CacheKeys.StartReadingTimeKey(_userInfo.Id));
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.StartRestTime(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||
await _fusionCache.RemoveAsync(CacheKeys.StartReadingTimeKey(_userInfo.UserRoleId));
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.StartRestTime(_userInfo.UserRoleId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute / 60m, restMinute]);
|
||||
}
|
||||
|
@ -3128,26 +3128,26 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
if (userID == null)
|
||||
{
|
||||
userID = _userInfo.Id;
|
||||
userID = _userInfo.UserRoleId;
|
||||
}
|
||||
|
||||
//int readingMinute = 120; // 为60整数
|
||||
int restMinute = 10; //
|
||||
|
||||
var startReadingTime = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.StartReadingTimeKey(_userInfo.Id));
|
||||
var startRestTime = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.StartRestTime(_userInfo.Id));
|
||||
var startReadingTime = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.StartReadingTimeKey(_userInfo.UserRoleId));
|
||||
var startRestTime = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.StartRestTime(_userInfo.UserRoleId));
|
||||
if (startRestTime != null)
|
||||
{
|
||||
var cacheStartRestTime = DateTime.Parse(startRestTime!.ToString());
|
||||
int timespanMin = (DateTime.Now - cacheStartRestTime).Minutes;
|
||||
if (timespanMin > restMinute)
|
||||
{
|
||||
await _fusionCache.RemoveAsync(CacheKeys.StartRestTime(_userInfo.Id));
|
||||
await _fusionCache.RemoveAsync(CacheKeys.StartRestTime(_userInfo.UserRoleId));
|
||||
}
|
||||
}
|
||||
else if (startReadingTime != null)
|
||||
{
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.StartReadingTimeKey(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.StartReadingTimeKey(_userInfo.UserRoleId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
[ApiExplorerSettings(GroupName = "Reading")]
|
||||
public class ReadModuleService(IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Subject> _subjectRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IVisitTaskHelpeService _visitTaskHelpeService,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
|
@ -860,7 +860,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
};
|
||||
|
||||
readModule.StakeholderIds = stakeholderIds.Distinct().ToList();
|
||||
readModule.StakeholderNames = await _userRepository.Where(x => readModule.StakeholderIds.Contains(x.Id)).Select(x => x.FirstName + "/" + x.LastName).ToListAsync();
|
||||
readModule.StakeholderNames = await _userRoleRepository.Where(x => readModule.StakeholderIds.Contains(x.Id)).Select(x => x.FirstName + "/" + x.LastName).ToListAsync();
|
||||
|
||||
return readModule;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<List<DefaultShortcutKeyView>> GetDoctorShortcutKey(DefaultShortcutKeyQuery inQuery)
|
||||
{
|
||||
var shortcutKeyList = await _shortcutKeyRepository.Where(x => x.ImageToolType == inQuery.ImageToolType)
|
||||
.Where(x => x.UserId == _userInfo.Id)
|
||||
.Where(x => x.UserId == _userInfo.UserRoleId)
|
||||
.ToListAsync();
|
||||
|
||||
var defaultshortcutKeyList = this.GetDefaultShortcutKey();
|
||||
|
@ -302,17 +302,17 @@ namespace IRaCIS.Core.Application.Service
|
|||
var shortcutKeys = GetDefaultShortcutKey();
|
||||
shortcutKeys.ForEach(x =>
|
||||
{
|
||||
x.UserId = _userInfo.Id;
|
||||
x.UserId = _userInfo.UserRoleId;
|
||||
});
|
||||
|
||||
await _shortcutKeyRepository.BatchDeleteNoTrackingAsync(x => x.ImageToolType == inDto.ImageToolType && x.UserId == _userInfo.Id);
|
||||
await _shortcutKeyRepository.BatchDeleteNoTrackingAsync(x => x.ImageToolType == inDto.ImageToolType && x.UserId == _userInfo.UserRoleId);
|
||||
|
||||
await _shortcutKeyRepository.AddRangeAsync(shortcutKeys.Select(x => new ShortcutKey()
|
||||
{
|
||||
ImageToolType = inDto.ImageToolType,
|
||||
Keyboardkey = x.Keyboardkey,
|
||||
ShortcutKeyEnum = x.ShortcutKeyEnum,
|
||||
UserId = _userInfo.Id,
|
||||
UserId = _userInfo.UserRoleId,
|
||||
AltKey = x.AltKey,
|
||||
CtrlKey = x.CtrlKey,
|
||||
MetaKey = x.MetaKey,
|
||||
|
@ -332,14 +332,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<bool> SetShortcutKey(SetDefaultShortcutKey inDto)
|
||||
{
|
||||
await _shortcutKeyRepository.BatchDeleteNoTrackingAsync(x => x.ImageToolType == inDto.ImageToolType && x.UserId == _userInfo.Id);
|
||||
await _shortcutKeyRepository.BatchDeleteNoTrackingAsync(x => x.ImageToolType == inDto.ImageToolType && x.UserId == _userInfo.UserRoleId);
|
||||
|
||||
await _shortcutKeyRepository.AddRangeAsync(inDto.ShortcutKeyList.Select(x => new ShortcutKey()
|
||||
{
|
||||
ImageToolType = inDto.ImageToolType,
|
||||
Keyboardkey = x.Keyboardkey,
|
||||
ShortcutKeyEnum = x.ShortcutKeyEnum,
|
||||
UserId = _userInfo.Id,
|
||||
UserId = _userInfo.UserRoleId,
|
||||
AltKey = x.AltKey,
|
||||
CtrlKey = x.CtrlKey,
|
||||
MetaKey = x.MetaKey,
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Reading")]
|
||||
public class UserWLTemplateService(IRepository<UserWLTemplate> _userWLTemplateRepository,
|
||||
IRepository<User> _userRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService
|
||||
IRepository<UserRole> _userRoleRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService
|
||||
{
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<List<UserWLTemplateView>> GetUserWLTemplateList(UserWLTemplateQuery inQuery)
|
||||
{
|
||||
var userWLTemplateQueryable = _userWLTemplateRepository
|
||||
.Where(x => x.UserId == _userInfo.Id)
|
||||
.Where(x => x.UserId == _userInfo.UserRoleId)
|
||||
.ProjectTo<UserWLTemplateView>(_mapper.ConfigurationProvider);
|
||||
return await userWLTemplateQueryable.ToListAsync();
|
||||
}
|
||||
|
@ -40,10 +40,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> AddOrUpdateUserWLTemplate(UserWLTemplateAddOrEdit addOrEditUserWLTemplate)
|
||||
{
|
||||
addOrEditUserWLTemplate.UserId = _userInfo.Id;
|
||||
addOrEditUserWLTemplate.UserId = _userInfo.UserRoleId;
|
||||
if (addOrEditUserWLTemplate.Id == null)
|
||||
{
|
||||
var count = await _userWLTemplateRepository.Where(x => x.UserId == _userInfo.Id).CountAsync();
|
||||
var count = await _userWLTemplateRepository.Where(x => x.UserId == _userInfo.UserRoleId).CountAsync();
|
||||
if (count >= 10)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["UserWLTS_MaxTemplate"]);
|
||||
|
@ -51,12 +51,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
}
|
||||
|
||||
if (await _userWLTemplateRepository.AnyAsync(x => x.UserId == _userInfo.Id && x.TemplateName == addOrEditUserWLTemplate.TemplateName && x.Id != addOrEditUserWLTemplate.Id))
|
||||
if (await _userWLTemplateRepository.AnyAsync(x => x.UserId == _userInfo.UserRoleId && x.TemplateName == addOrEditUserWLTemplate.TemplateName && x.Id != addOrEditUserWLTemplate.Id))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["UserWLTS_NameRepeated"]);
|
||||
}
|
||||
|
||||
if (await _userWLTemplateRepository.AnyAsync(x => x.UserId == _userInfo.Id && x.WW == addOrEditUserWLTemplate.WW && x.WL == addOrEditUserWLTemplate.WL && x.Id != addOrEditUserWLTemplate.Id))
|
||||
if (await _userWLTemplateRepository.AnyAsync(x => x.UserId == _userInfo.UserRoleId && x.WW == addOrEditUserWLTemplate.WW && x.WL == addOrEditUserWLTemplate.WL && x.Id != addOrEditUserWLTemplate.Id))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["UserWLTS_ContentRepeated"]);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<object> GetAutoCutNextTask()
|
||||
{
|
||||
|
||||
return await _userRepository.Where(x => x.Id == _userInfo.Id).Select(x => new
|
||||
return await _userRoleRepository.Where(x => x.Id == _userInfo.UserRoleId).Select(x => new
|
||||
{
|
||||
AutoCutNextTask = x.AutoCutNextTask
|
||||
}).FirstNotNullAsync();
|
||||
|
@ -100,13 +100,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetAutoCutNextTask(SetAutoCutNextTaskInDto inDto)
|
||||
{
|
||||
await _userRepository.UpdatePartialFromQueryAsync(_userInfo.Id, x => new User()
|
||||
await _userRoleRepository.UpdatePartialFromQueryAsync(_userInfo.UserRoleId, x => new UserRole()
|
||||
{
|
||||
|
||||
AutoCutNextTask = inDto.AutoCutNextTask
|
||||
});
|
||||
|
||||
await _userRepository.SaveChangesAsync();
|
||||
await _userRoleRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
|
|
@ -38,21 +38,21 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<TrialClinicalTableQuestionDto, TrialClinicalTableQuestion>();
|
||||
|
||||
CreateMap<SystemClinicalQuestion, TrialClinicalQuestion>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.SystemClinicalQuestionId, opt => opt.MapFrom(src => src.Id));
|
||||
|
||||
CreateMap<SystemClinicalQuestion, TrialClinicalQuestionSynchronize>()
|
||||
.ForMember(d => d.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(d => d.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.SystemClinicalQuestionId, opt => opt.MapFrom(src => src.Id));
|
||||
|
||||
|
||||
CreateMap<SystemClinicalTableQuestion, TrialClinicalTableQuestion>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.SystemTableQuestionId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<SystemClinicalTableQuestion, TrialClinicalTableQuestionSynchronize>()
|
||||
.ForMember(d => d.SystemTableQuestionId, opt => opt.MapFrom(src => src.Id))
|
||||
.ForMember(d => d.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(d => d.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
|
||||
// 预览
|
||||
|
@ -67,22 +67,22 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<VisitTask, VisitTaskDto>();
|
||||
CreateMap<SubmitTableQuestionInDto, ReadingTableAnswerRowInfo>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));
|
||||
|
||||
CreateMap<ShortcutKey, DefaultShortcutKeyView>();
|
||||
CreateMap<TrialDataFromSystem, ReadingMedicineTrialQuestion>().ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<TrialDataFromSystem, ReadingMedicineTrialQuestion>().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<ReadingCustomTag, ReadingCustomTagDto>();
|
||||
CreateMap<ReadingCustomTagDto, ReadingCustomTag>().ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<ReadingCustomTagDto, ReadingCustomTag>().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<UserWLTemplate, UserWLTemplateView>();
|
||||
CreateMap<UserWLTemplate, UserWLTemplateAddOrEdit>().ReverseMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<UserWLTemplate, UserWLTemplateAddOrEdit>().ReverseMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<ReadingPeriodSetAddOrEdit, ReadingPeriodSet>().ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<ReadingPeriodSetAddOrEdit, ReadingPeriodSet>().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
CreateMap<ReadingTableQuestionAnswer, TableQuestionAnswerInfo>().ReverseMap()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<ReadingTableQuestionAnswer, TableQuestionAnswerInfo>()
|
||||
|
||||
|
@ -149,16 +149,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
//.ForMember(t=>t.SystemCriterionNameList,u=>u.MapFrom(c=>c.SystemClinicalDataCriterionList.Select(t=>t.SystemReadingCriterion.CriterionName)))
|
||||
//.ForMember(t => t.SystemCriterionIdList, u => u.MapFrom(c => c.SystemClinicalDataCriterionList.Select(t => t.SystemReadingCriterion.Id)));
|
||||
|
||||
CreateMap<PreviousPDF, PreviousPDFAddOrEdit>().ReverseMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<PreviousPDF, PreviousPDFAddOrEdit>().ReverseMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<PreviousPDF, PreviousPDFView>();
|
||||
|
||||
CreateMap<ReadModuleAddOrEdit, ReadModule>().ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<ReadModuleAddOrEdit, ReadModule>().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<TumorAssessment_RECIST1Point1, TumorAssessmentView>();
|
||||
|
||||
|
||||
CreateMap<CopyTableAnswerRowInfo, ReadingTableAnswerRowInfo>().ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<CopyTableAnswerRowInfo, ReadingTableAnswerRowInfo>().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<ReadingTableAnswerRowInfo, CopyTableAnswerRowInfo>()
|
||||
.ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id));
|
||||
|
@ -174,7 +174,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName))
|
||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => isEn_Us ? s.GroupEnName : s.GroupName))
|
||||
.ForMember(dest => dest.ReadingCriterionPage, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.ParentReadingQuestionTrial, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.RelevanceReadingQuestionTrial, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.ReadingQuestionCriterionTrial, opt => opt.Ignore());
|
||||
|
@ -192,20 +192,20 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
CreateMap<ReadingTableQuestionTrial, TableQuestionTrial>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
||||
CreateMap<ReadingTableQuestionAnswer, ReadingTableQuestionAnswerInfo>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.ShowOrder, u => u.MapFrom(s => s.ReadingQuestionTrial.ShowOrder))
|
||||
.ForMember(d => d.QuestionMark, u => u.MapFrom(s => s.ReadingTableQuestionTrial.QuestionMark));
|
||||
|
||||
CreateMap<ReadingQuestionTrial, TrialReadQuestionData>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName))
|
||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => isEn_Us ? s.GroupEnName : s.GroupName))
|
||||
.ForMember(d => d.PageShowOrder, u => u.MapFrom(s => s.ReadingCriterionPage.ShowOrder))
|
||||
.ForMember(d => d.PageName, u => u.MapFrom(s => s.ReadingCriterionPage.PageName))
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.IsPublicPage, u => u.MapFrom(s => s.ReadingCriterionPage.IsPublicPage));
|
||||
|
||||
CreateMap<ReadingQuestionSystem, GetSystemReadingQuestionOutDto>()
|
||||
|
@ -218,13 +218,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
||||
|
||||
CreateMap<ReadingTableQuestionSystem, ReadingTableQuestionSystemView>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.DependShowOrder, u => u.MapFrom(s => s.DependParentQuestion.ShowOrder));
|
||||
|
||||
|
||||
|
||||
CreateMap<ReadingTableQuestionTrial, ReadingTableQuestionSystemView>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.DependShowOrder, u => u.MapFrom(s => s.DependParentQuestion.ShowOrder));
|
||||
|
||||
CreateMap<ReadingQuestionTrial, GetCalculateQuestionsOutDto>();
|
||||
|
@ -243,66 +243,66 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
CreateMap<ReadingTableQuestionTrial, ReadingTableQuestionTrialView>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.DependShowOrder, u => u.MapFrom(s => s.DependParentQuestion.ShowOrder))
|
||||
.ForMember(d => d.CreateUser, u => u.Ignore());
|
||||
CreateMap<ReadingTableQuestionSystemAddOrEdit, ReadingTableQuestionSystem>().ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(d => d.CreateUserRole, u => u.Ignore());
|
||||
CreateMap<ReadingTableQuestionSystemAddOrEdit, ReadingTableQuestionSystem>().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<ReadingTableQuestionTrialAddOrEdit, ReadingTableQuestionTrial>().ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<ReadingTableQuestionTrialAddOrEdit, ReadingTableQuestionTrial>().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
|
||||
CreateMap<ReadingCriterionPageAddOrEdit, ReadingCriterionPage>().ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<ReadingCriterionPageAddOrEdit, ReadingCriterionPage>().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<ReadingQuestionTrial, ReadingQuestionSystem>()
|
||||
.ForMember(d => d.CreateUser, u => u.Ignore());
|
||||
.ForMember(d => d.CreateUserRole, u => u.Ignore());
|
||||
|
||||
CreateMap<Dictionary, OrganDictionary>()
|
||||
;
|
||||
|
||||
CreateMap<ReadingQuestionSystem, ReadingQuestionSystemData>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<ReadingTableQuestionSystem, ReadingTableQuestionSystemData>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<ReadingQuestionSystem, ReadingQuestionTrial>()
|
||||
.ForMember(d => d.CreateUser, u => u.Ignore())
|
||||
.ForMember(d => d.CreateUserRole, u => u.Ignore())
|
||||
.ForMember(d => d.ReadingTableQuestionTrialList, u => u.Ignore())
|
||||
.ForMember(d => d.ReadingQuestionSystemId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<ReadingTableAnswerRowInfo, TableAnsweRowInfo>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.MergeName, u => u.MapFrom(s => s.MergeRow == null ? string.Empty : s.MergeRow.ReadingQuestionTrial.OrderMark + s.MergeRow.RowIndex.GetLesionMark()))
|
||||
.ForMember(d => d.SplitName, u => u.MapFrom(s => s.SplitRow == null ? string.Empty : s.SplitRow.ReadingQuestionTrial.OrderMark + s.SplitRow.RowIndex.GetLesionMark()))
|
||||
.ForMember(d => d.LesionType, u => u.MapFrom(s => s.ReadingQuestionTrial == null ? null : s.ReadingQuestionTrial.LesionType));
|
||||
|
||||
|
||||
CreateMap<ReadingTableQuestionSystem, ReadingTrialTableQuestionData>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.DependParentQuestion, opt => opt.Ignore())
|
||||
.ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.SystemTableQuestionId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<ReadingTableQuestionTrial, ReadingTrialTableQuestionData>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<ReadingTrialTableQuestionData, ReadingTableQuestionTrial>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
;
|
||||
|
||||
|
||||
CreateMap<ReadingQuestionCriterionSystem, ReadingQuestionCriterionTrial>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.ReadingQuestionTrialList, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore())
|
||||
.ForMember(d => d.ReadingQuestionCriterionSystemId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
|
||||
CreateMap<AddOrUpdateReadingQuestionCriterionSystemInDto, ReadingQuestionCriterionSystem>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
CreateMap<ReadingQuestionCriterionSystem, ReadingQuestionCriterionSystemView>()
|
||||
|
||||
.ForMember(d => d.QuestionCount, u => u.MapFrom(s => s.ReadingQuestionSystemList.Count()));
|
||||
|
@ -312,7 +312,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<ReadingQuestionSystem, AddOrUpdateReadingQuestionSystemInDto>();
|
||||
|
||||
CreateMap<AddOrUpdateReadingQuestionSystemInDto, ReadingQuestionSystem>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
CreateMap<ReadingQuestionSystem, ReadingQuestionSystemView>()
|
||||
|
||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
|
||||
|
@ -326,14 +326,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
CreateMap<AddOrUpdateReadingQuestionCriterionTrialInDto, ReadingQuestionCriterionTrial>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
CreateMap<ReadingQuestionCriterionTrial, ReadingQuestionCriterionTrialView>()
|
||||
|
||||
.ForMember(d => d.QuestionCount, u => u.MapFrom(s => s.ReadingQuestionTrialList.Count()));
|
||||
|
||||
|
||||
CreateMap<AddOrUpdateReadingQuestionTrialInDto, ReadingQuestionTrial>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
CreateMap<ReadingQuestionTrial, ReadingQuestionTrialView>()
|
||||
|
||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
|
||||
|
@ -363,17 +363,17 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
#region 医学审核
|
||||
CreateMap<ReadingMedicineSystemQuestionAddOrEdit, ReadingMedicineSystemQuestion>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
CreateMap<ReadingMedicineSystemQuestion, ReadingMedicineSystemQuestionView>()
|
||||
|
||||
.ForMember(x => x.ParentShowOrder, y => y.MapFrom(n => n.ParentQuestion.ShowOrder));
|
||||
|
||||
|
||||
CreateMap<TrialDataFromSystem, ReadingMedicineTrialQuestion>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<ReadingMedicineTrialQuestionAddOrEdit, ReadingMedicineTrialQuestion>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
CreateMap<ReadingMedicineTrialQuestion, ReadingMedicineTrialQuestionView>()
|
||||
|
||||
.ForMember(x => x.ParentShowOrder, y => y.MapFrom(n => n.ParentQuestion.ShowOrder));
|
||||
|
@ -386,7 +386,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<ReadingMedicalReviewDialog, GetMedicalReviewDialogOutDto>()
|
||||
//.ForMember(x => x.FileList, y => y.MapFrom(n => n.FileList))
|
||||
.ForMember(x => x.CreateUserName, y => y.MapFrom(n => n.CreateUser.UserName));
|
||||
.ForMember(x => x.CreateUserName, y => y.MapFrom(n => n.CreateUserRole.UserName));
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -395,10 +395,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<CriterionNidusTrial, CriterionNidusView>();
|
||||
CreateMap<CriterionNidusSystem, CriterionNidusView>();
|
||||
CreateMap<CriterionNidusSystem, CriterionNidusAddOrEdit>().ReverseMap()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<OrganInfoAddOrEdit, OrganInfo>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
CreateMap<OrganInfo, OrganInfoView>();
|
||||
#endregion
|
||||
|
||||
|
@ -411,15 +411,15 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<SubjectCriteriaEvaluationAddOrEdit, SubjectCriteriaEvaluation>().ReverseMap();
|
||||
CreateMap<SubjectCriteriaEvaluation, SubjectCriteriaEvaluationView>().ReverseMap()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
CreateMap<SubjectCriteriaEvaluationVisitFilter, SubjectCriteriaEvaluationVisitFilterAddOrEdit>().ReverseMap()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<SubjectCriteriaEvaluationVisitStudyFilterAddOrEdit, SubjectCriteriaEvaluationVisitStudyFilter>().ReverseMap();
|
||||
|
||||
CreateMap<DicomStudy, SelectStudyView>()
|
||||
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
||||
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.CreateUser.LastName + " / " + u.CreateUser.FirstName))
|
||||
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.CreateUserRole.LastName + " / " + u.CreateUserRole.FirstName))
|
||||
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id));
|
||||
|
||||
CreateMap<VisitTask, HaveGeneratedTaskDto>()
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class TrialSiteSurveyService(IRepository<TrialSiteSurvey> _trialSiteSurveyRepository,
|
||||
IRepository<TrialSiteUserSurvey> _trialSiteUserSurveyRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<TrialSite> _trialSiteRepository,
|
||||
IRepository<Doctor> _doctorRepository,
|
||||
|
@ -81,7 +81,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public async Task<UseUserIDGetDoctorIDOutDto> UseUserIDGetDoctorID(UseUserIDGetDoctorIDInDto inDto)
|
||||
{
|
||||
|
||||
var userinfo = await _userRepository.Where(x => x.Id == inDto.UserID).FirstOrDefaultAsync();
|
||||
var userinfo = await _userRoleRepository.Where(x => x.Id == inDto.UserID).FirstOrDefaultAsync();
|
||||
|
||||
if (userinfo != null && userinfo.DoctorId != null)
|
||||
{
|
||||
|
@ -100,7 +100,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
var info = await _doctorRepository.AddAsync(doctor, true);
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.UserID, x => new User()
|
||||
await _userRoleRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.UserID, x => new UserRole()
|
||||
{
|
||||
|
||||
DoctorId = info.Id
|
||||
|
@ -226,7 +226,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
var info = await _doctorRepository.AddAsync(doctor, true);
|
||||
|
||||
//await _userRepository.BatchUpdateNoTrackingAsync(x => x.EMail == inDto.EmailOrPhone, x => new User()
|
||||
//await _userRoleRepository.BatchUpdateNoTrackingAsync(x => x.EMail == inDto.EmailOrPhone, x => new User()
|
||||
//{
|
||||
// DoctorId = info.DoctorId,
|
||||
|
||||
|
@ -695,7 +695,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
{
|
||||
|
||||
////PM 给SPM发 (初审人)
|
||||
//user = await _userRepository.FirstOrDefaultAsync(t => t.Id == survey.PreliminaryUserId);
|
||||
//user = await _userRoleRepository.FirstOrDefaultAsync(t => t.Id == survey.PreliminaryUserId);
|
||||
|
||||
//messageToSend.To.Add(new MailboxAddress(String.Empty, survey.PreliminaryUserId == null ? survey.Email : user.EMail));
|
||||
|
||||
|
@ -832,7 +832,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)
|
||||
{
|
||||
|
||||
await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.CRCSubmitted, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved, PreliminaryUserId = _userInfo.Id, PreliminaryTime = DateTime.Now });
|
||||
await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.CRCSubmitted, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved, PreliminaryUserId = _userInfo.UserRoleId, PreliminaryTime = DateTime.Now });
|
||||
|
||||
}
|
||||
else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM)
|
||||
|
@ -873,7 +873,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
{
|
||||
|
||||
//找下系统中是否存在该用户类型的 并且邮箱 或者手机的账户
|
||||
var sysUserInfo = await _userRepository.Where(t => t.UserTypeId == item.UserTypeId && t.EMail == item.Email).Include(t => t.UserTypeRole).FirstOrDefaultAsync();
|
||||
var sysUserInfo = await _userRoleRepository.Where(t => t.UserTypeId == item.UserTypeId && t.EMail == item.Email).Include(t => t.UserTypeRole).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
if (sysUserInfo == null)
|
||||
|
@ -883,7 +883,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
using (await @lock.AcquireAsync())
|
||||
{
|
||||
var saveItem = _mapper.Map<User>(item);
|
||||
var saveItem = _mapper.Map<UserRole>(item);
|
||||
|
||||
|
||||
if (trialType == TrialType.NoneOfficial)
|
||||
|
@ -893,9 +893,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
// 中心调研生成账号 都是外部的
|
||||
saveItem.IsZhiZhun = false;
|
||||
saveItem.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
|
||||
saveItem.Code = _userRoleRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
|
||||
|
||||
saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User));
|
||||
saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(UserRole));
|
||||
|
||||
saveItem.UserName = saveItem.UserCode;
|
||||
|
||||
|
@ -904,10 +904,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
saveItem.UserTypeEnum = _userTypeRepository.Where(t => t.Id == saveItem.UserTypeId).Select(t => t.UserTypeEnum).First();
|
||||
|
||||
|
||||
var newUser = _userRepository.AddAsync(saveItem).Result;
|
||||
var newUser = _userRoleRepository.AddAsync(saveItem).Result;
|
||||
|
||||
|
||||
_ = _userRepository.SaveChangesAsync().Result;
|
||||
_ = _userRoleRepository.SaveChangesAsync().Result;
|
||||
|
||||
|
||||
sysUserInfo = newUser;
|
||||
|
@ -983,15 +983,15 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
findTrialSiteUser.DeletedTime = null;
|
||||
}
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||
await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new UserRole() { Status = UserStateEnum.Enable });
|
||||
|
||||
|
||||
await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == userInfo.Id, u => new TrialSiteUserSurvey() { IsJoin = true });
|
||||
}
|
||||
|
||||
await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurvey.Id && t.State == TrialSiteSurveyEnum.SPMApproved, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.PMCreatedAndLock, ReviewerUserId = _userInfo.Id, ReviewerTime = DateTime.Now });
|
||||
await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurvey.Id && t.State == TrialSiteSurveyEnum.SPMApproved, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.PMCreatedAndLock, ReviewerUserId = _userInfo.UserRoleId, ReviewerTime = DateTime.Now });
|
||||
|
||||
await _userRepository.SaveChangesAsync();
|
||||
await _userRoleRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
|
@ -1027,7 +1027,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
foreach (var item in list)
|
||||
{
|
||||
//找下系统中是否存在该用户类型的 并且邮箱 或者手机的账户
|
||||
var sysUserInfo = await _userRepository.Where(t => t.UserTypeId == item.UserTypeId && t.EMail == item.Email).Include(t => t.UserTypeRole).FirstOrDefaultAsync();
|
||||
var sysUserInfo = await _userRoleRepository.Where(t => t.UserTypeId == item.UserTypeId && t.EMail == item.Email).Include(t => t.UserTypeRole).FirstOrDefaultAsync();
|
||||
|
||||
if (sysUserInfo == null)
|
||||
{
|
||||
|
@ -1036,7 +1036,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
using (await @lock.AcquireAsync())
|
||||
{
|
||||
var saveItem = _mapper.Map<User>(item);
|
||||
var saveItem = _mapper.Map<UserRole>(item);
|
||||
|
||||
|
||||
if (trialType == TrialType.NoneOfficial)
|
||||
|
@ -1046,17 +1046,17 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
// 中心调研生成账号 都是外部的
|
||||
saveItem.IsZhiZhun = false;
|
||||
saveItem.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
|
||||
saveItem.Code = _userRoleRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
|
||||
|
||||
saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User));
|
||||
saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(UserRole));
|
||||
|
||||
saveItem.UserName = saveItem.UserCode;
|
||||
|
||||
//saveItem.UserTypeEnum = _userTypeRepository.Where(t => t.Id == saveItem.UserTypeId).Select(t => t.UserTypeEnum).First();
|
||||
|
||||
var newUser = _userRepository.AddAsync(saveItem).Result;
|
||||
var newUser = _userRoleRepository.AddAsync(saveItem).Result;
|
||||
|
||||
_ = _userRepository.SaveChangesAsync().Result;
|
||||
_ = _userRoleRepository.SaveChangesAsync().Result;
|
||||
|
||||
sysUserInfo = newUser;
|
||||
|
||||
|
@ -1104,7 +1104,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
findTrialSiteUser.DeletedTime = null;
|
||||
}
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||
await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new UserRole() { Status = UserStateEnum.Enable });
|
||||
|
||||
await _trialSiteUserRepository.SaveChangesAsync();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class TrialSiteUserSurveyService(IRepository<TrialSiteUserSurvey> _trialSiteUserSurveyRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialSiteSurvey> _trialSiteSurveyRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialSiteUserSurveyService
|
||||
{
|
||||
|
||||
|
@ -56,7 +56,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
var item = addOrEditTrialSiteUserSurvey;
|
||||
|
||||
//找下系统中是否存在该用户类型的 并且邮箱 或者手机的账户
|
||||
var sysUserInfo = await _userRepository.Where(t => t.UserTypeId == item.UserTypeId && t.EMail == item.Email).Include(t => t.UserTypeRole).FirstOrDefaultAsync();
|
||||
var sysUserInfo = await _userRoleRepository.Where(t => t.UserTypeId == item.UserTypeId && t.EMail == item.Email).Include(t => t.UserTypeRole).FirstOrDefaultAsync();
|
||||
|
||||
if (sysUserInfo != null)
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
if (addOrEditTrialSiteUserSurvey.UserTypeId != null)
|
||||
{
|
||||
var existSysUser = await _userRepository.Where(t => t.EMail == addOrEditTrialSiteUserSurvey.Email && t.UserTypeId == addOrEditTrialSiteUserSurvey.UserTypeId).Include(d => d.UserTypeRole).FirstOrDefaultAsync();
|
||||
var existSysUser = await _userRoleRepository.Where(t => t.EMail == addOrEditTrialSiteUserSurvey.Email && t.UserTypeId == addOrEditTrialSiteUserSurvey.UserTypeId).Include(d => d.UserTypeRole).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
if (existSysUser != null)
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace IRaCIS.Core.Application.AutoMapper
|
|||
.ForMember(d => d.IsGenerateSuccess, u => u.MapFrom(c => true))
|
||||
.ForMember(d => d.SystemUserId, u => u.MapFrom(c => c.UserId))
|
||||
.ForMember(d => d.IsJoin, u => u.MapFrom(c => !c.IsDeleted))
|
||||
.ForMember(d => d.CreateUser, u => u.Ignore());
|
||||
.ForMember(d => d.CreateUserRole, u => u.Ignore());
|
||||
|
||||
|
||||
//列表
|
||||
|
@ -74,16 +74,16 @@ namespace IRaCIS.Core.Application.AutoMapper
|
|||
|
||||
|
||||
|
||||
CreateMap<TrialSiteUserSurvey, User>();
|
||||
CreateMap<TrialSiteUserSurvey, UserRole>();
|
||||
|
||||
CreateMap<SiteSurveyUserImportDto, User>()
|
||||
CreateMap<SiteSurveyUserImportDto, UserRole>()
|
||||
.ForMember(d => d.EMail, u => u.MapFrom(s => s.Email));
|
||||
|
||||
|
||||
CreateMap<TrialSiteUserSurveyView, User>();
|
||||
CreateMap<TrialSiteUserSurveyView, UserRole>();
|
||||
|
||||
|
||||
CreateMap<User, UserInfoBasic>().ForMember(d => d.RealName, u => u.MapFrom(s => s.LastName + " / " + s.FirstName));
|
||||
CreateMap<UserRole, UserInfoBasic>().ForMember(d => d.RealName, u => u.MapFrom(s => s.LastName + " / " + s.FirstName));
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<Hospital> _hospitalRepository,
|
||||
IRepository<EnrollDetail> _enrollDetailRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _userTrialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IStatisticsService
|
||||
{
|
||||
|
||||
|
@ -48,7 +48,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
else //不管是精鼎的pm还是我们的pm 还是运维人员 只能看到自己参与项目的统计
|
||||
{
|
||||
List<Guid> trialIdList = _userTrialRepository.Where(u => u.UserId == _userInfo.Id).Select(u => u.TrialId).ToList();
|
||||
List<Guid> trialIdList = _userTrialRepository.Where(u => u.UserId == _userInfo.UserRoleId).Select(u => u.TrialId).ToList();
|
||||
trialLambda = trialLambda.And(u => trialIdList.Contains(u.Id));
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(inQuery.TrialCode))
|
||||
|
@ -370,7 +370,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public PageOutput<UserParticipateTrialStat> GetParticipateTrialStat(ParticipateQueryDto param)
|
||||
{
|
||||
|
||||
Expression<Func<User, bool>> userLambda = x => true;
|
||||
Expression<Func<UserRole, bool>> userLambda = x => true;
|
||||
Expression<Func<TrialUser, bool>> userTrialLambda = x => true;
|
||||
if (!string.IsNullOrEmpty(param.UserInfo))
|
||||
{
|
||||
|
@ -385,7 +385,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
var userTypeEnumStr = _userInfo.UserTypeEnumStr;
|
||||
var userId = _userInfo.Id;
|
||||
var userId = _userInfo.UserRoleId;
|
||||
|
||||
|
||||
//PM 进来只能看到他负责的项目下的参与人员列表
|
||||
|
@ -406,7 +406,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
});
|
||||
|
||||
var userQuery = from trialStat in trialStatQuery
|
||||
join user in _userRepository.Where(userLambda) on trialStat.UserId equals user.Id
|
||||
join user in _userRoleRepository.Where(userLambda) on trialStat.UserId equals user.Id
|
||||
select new UserParticipateTrialStat
|
||||
{
|
||||
Email = user.EMail,
|
||||
|
@ -441,7 +441,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
Expression<Func<TrialUser, bool>> userTrialLambda = x => x.UserId == userId;
|
||||
|
||||
var userTypeEnum = _userInfo.UserTypeEnumStr;
|
||||
var loginUserId = _userInfo.Id;
|
||||
var loginUserId = _userInfo.UserRoleId;
|
||||
|
||||
|
||||
//PM 进来只能看到他负责的项目下的参与人员列表
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace IRaCIS.Core.Application.Service.Third_partyProject
|
|||
.WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.ExperimentName.Contains(inQuery.ExperimentName))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId && t.IsDeleted == false) && t.IsDeleted == false)
|
||||
.Select(t => new TrialListDTO_UltrasonicDicom()
|
||||
{
|
||||
TrialId = t.Id,
|
||||
|
@ -123,7 +123,7 @@ namespace IRaCIS.Core.Application.Service.Third_partyProject
|
|||
|
||||
TrialSiteCode = dicomStudy.Subject.TrialSite.TrialSiteCode,
|
||||
|
||||
Uploader = dicomStudy.CreateUser.UserName,
|
||||
Uploader = dicomStudy.CreateUserRole.UserName,
|
||||
|
||||
UploadTime = dicomStudy.CreateTime
|
||||
};
|
||||
|
|
|
@ -39,10 +39,10 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
return await _trialRepository
|
||||
.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.SPMApproved).Count() > 0)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.CRCSubmitted).Count() > 0)
|
||||
.ProjectTo<TrialSiteSurveyStat>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id })
|
||||
.ProjectTo<TrialSiteSurveyStat>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.UserRoleId })
|
||||
.OrderByDescending(t => t.ApprovalRequiredCount).ToPagedListAsync(inQuery);
|
||||
}
|
||||
|
||||
|
@ -70,10 +70,10 @@ namespace IRaCIS.Core.Application
|
|||
else
|
||||
{
|
||||
var trialDocStat = await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(!_userInfo.IsAdmin, c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.WhereIf(!_userInfo.IsAdmin, c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId && t.ConfirmTime != null))
|
||||
.Count() > 0)
|
||||
.ProjectTo<DocSignStat>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, userTypeId = _userInfo.UserTypeId })
|
||||
.ProjectTo<DocSignStat>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.UserRoleId, userTypeId = _userInfo.UserTypeId })
|
||||
.OrderByDescending(t => t.WaitSignCount)
|
||||
.ToPagedListAsync(inQuery);
|
||||
|
||||
|
@ -101,7 +101,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
var query = _trialRepository
|
||||
.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Select(t => new CheckToBeDoneDto()
|
||||
{
|
||||
TrialId = t.Id,
|
||||
|
@ -122,11 +122,11 @@ namespace IRaCIS.Core.Application
|
|||
var result = await query.ToPagedListAsync(inQuery, defalutSortArray);
|
||||
|
||||
var totalToBeCheckedCount = await _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.CheckState == CheckStateEnum.ToCheck).CountAsync();
|
||||
|
||||
var totalToBeRepliedCount = await _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.CheckState == CheckStateEnum.CVIng &&
|
||||
u.CheckChallengeDialogList.OrderByDescending(t => t.CreateTime).First().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).CountAsync();
|
||||
|
||||
|
@ -148,7 +148,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
var query = _visitTaskReReadingRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed)
|
||||
.GroupBy(t => new { t.OriginalReReadingTask.Trial.ExperimentName, t.OriginalReReadingTask.Trial.ResearchProgramNo, t.OriginalReReadingTask.Trial.TrialCode, t.OriginalReReadingTask.TrialId })
|
||||
.Select(g => new ReReadingApplyToBeDoneDto()
|
||||
|
@ -169,7 +169,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var toBeApprovalCount = _visitTaskReReadingRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed).Count();
|
||||
|
||||
return ResponseOutput.Ok(result, new { TotalToBeApprovalCount = toBeApprovalCount });
|
||||
|
@ -190,7 +190,7 @@ namespace IRaCIS.Core.Application
|
|||
[FromServices] IRepository<Trial> _trialRepository)
|
||||
{
|
||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Select(t => new ReviewerSelectToBeDoneDto()
|
||||
{
|
||||
TrialId = t.Id,
|
||||
|
@ -208,7 +208,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var toBeApprovalCount = await _enrollRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).CountAsync();
|
||||
|
||||
return ResponseOutput.Ok(result, new { ToBeApprovalCount = toBeApprovalCount }); ;
|
||||
|
@ -226,7 +226,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Select(t => new GetPMClinicalDataToBeDoneListOutDto()
|
||||
{
|
||||
TrialId = t.Id,
|
||||
|
@ -246,7 +246,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var all = await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Select(t => new GetPMClinicalDataToBeDoneListOutDto()
|
||||
{
|
||||
|
||||
|
@ -275,7 +275,7 @@ namespace IRaCIS.Core.Application
|
|||
[FromServices] IRepository<Trial> _trialRepository)
|
||||
{
|
||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Select(t => new ReviewerSelectToBeDoneDto()
|
||||
{
|
||||
TrialId = t.Id,
|
||||
|
@ -294,7 +294,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var toBeApprovalCount = await _enrollRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).CountAsync();
|
||||
|
||||
return ResponseOutput.Ok(result, new { TotalToBeApprovalCount = toBeApprovalCount }); ;
|
||||
|
@ -315,7 +315,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
{
|
||||
var query = _visitTaskReReadingRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed)
|
||||
.GroupBy(t => new { t.OriginalReReadingTask.Trial.ExperimentName, t.OriginalReReadingTask.Trial.ResearchProgramNo, t.OriginalReReadingTask.Trial.TrialCode, t.OriginalReReadingTask.TrialId })
|
||||
.Select(g => new ReReadingApprovalToBeDoneDto()
|
||||
|
@ -336,7 +336,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var toBeApprovalCount = _visitTaskReReadingRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed).Count();
|
||||
|
||||
return ResponseOutput.Ok(result, new { TotalToBeApprovalCount = toBeApprovalCount });
|
||||
|
@ -363,7 +363,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
//.Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
|
||||
.Select(t => new ImageClinicalDataToBeDoneDto()
|
||||
{
|
||||
|
@ -405,7 +405,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
//.Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
|
||||
.Select(t => new ImageClinicalDataToBeDoneDto()
|
||||
{
|
||||
|
@ -466,7 +466,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Select(t => new ImageQuestionToBeDoneDto()
|
||||
{
|
||||
TrialId = t.Id,
|
||||
|
@ -474,11 +474,11 @@ namespace IRaCIS.Core.Application
|
|||
ExperimentName = t.ExperimentName,
|
||||
TrialCode = t.TrialCode,
|
||||
|
||||
UrgentCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
UrgentCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC && u.SubjectVisit.IsUrgent).Count(),
|
||||
|
||||
ToBeDealedCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
ToBeDealedCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.SelectMany(c => c.QCChallengeList)
|
||||
|
||||
.Where(u => u.IsClosed == false && (u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC || u.LatestReplyUserId == null)).Count(),
|
||||
|
@ -491,8 +491,8 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var toBeDealedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC).Count();
|
||||
|
||||
|
@ -514,7 +514,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Select(t => new ImageCheckQuestionToBeDoneDto()
|
||||
{
|
||||
TrialId = t.Id,
|
||||
|
@ -522,10 +522,10 @@ namespace IRaCIS.Core.Application
|
|||
ExperimentName = t.ExperimentName,
|
||||
TrialCode = t.TrialCode,
|
||||
|
||||
UrgentCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
UrgentCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply && u.IsUrgent).Count(),
|
||||
|
||||
ToBeReplyedCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
ToBeReplyedCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count()
|
||||
|
||||
}).Where(x => x.ToBeReplyedCount > 0);
|
||||
|
@ -537,8 +537,8 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var toBeDealedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count();
|
||||
|
||||
return ResponseOutput.Ok(result, new { TotalToBeReplyedCount = toBeDealedCount });
|
||||
|
@ -560,7 +560,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Select(t => new ImageReUploadToBeDoneDto()
|
||||
{
|
||||
TrialId = t.Id,
|
||||
|
@ -568,11 +568,11 @@ namespace IRaCIS.Core.Application
|
|||
ExperimentName = t.ExperimentName,
|
||||
TrialCode = t.TrialCode,
|
||||
UrgentCount = t.SubjectVisitList
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.IsUrgent && ((u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading) || u.IsQCConfirmedReupload)).Count(),
|
||||
|
||||
ToBeReUploadCount = t.SubjectVisitList
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => (u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading) || (u.IsQCConfirmedReupload)).Count(),
|
||||
|
||||
}).Where(x => x.ToBeReUploadCount > 0);
|
||||
|
@ -583,7 +583,7 @@ namespace IRaCIS.Core.Application
|
|||
var result = await query.ToPagedListAsync(inQuery, defalutSortArray);
|
||||
|
||||
var toBeDealedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => (u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading) || (u.IsQCConfirmedReupload)).Count();
|
||||
|
||||
return ResponseOutput.Ok(result, new { TotalToBeReUploadCount = toBeDealedCount });
|
||||
|
@ -607,7 +607,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView))
|
||||
.Select(t => new ImageSubmittedToBeDoneDto()
|
||||
{
|
||||
TrialId = t.Id,
|
||||
|
@ -615,12 +615,12 @@ namespace IRaCIS.Core.Application
|
|||
ExperimentName = t.ExperimentName,
|
||||
TrialCode = t.TrialCode,
|
||||
UrgentCount = t.SubjectVisitList
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit && (u.IsEnrollmentConfirm || u.PDState == PDStateEnum.PDProgress || u.Trial.IsUrgent || u.Subject.IsUrgent)/*u.IsUrgent*/).Count(),
|
||||
|
||||
|
||||
ToBeDealedCount = t.SubjectVisitList
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count(),
|
||||
|
||||
}).Where(x => x.ToBeDealedCount > 0);
|
||||
|
@ -633,8 +633,8 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var toBeDealedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count();
|
||||
|
||||
return ResponseOutput.Ok(result, new { TotalToBeDealedCount = toBeDealedCount });
|
||||
|
@ -663,7 +663,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit)
|
||||
.Select(t => new ImageQualityToBeDoneDto()
|
||||
{
|
||||
|
@ -673,15 +673,15 @@ namespace IRaCIS.Core.Application
|
|||
TrialCode = t.TrialCode,
|
||||
|
||||
// 待审核 加急的(待领取 已领取)-- 领取了 还没做完 就是待审核
|
||||
UrgentCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id && u.IsUrgent).Count(),
|
||||
UrgentCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId && u.IsUrgent).Count(),
|
||||
|
||||
|
||||
//待领取量
|
||||
ToBeClaimedCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed && t.AuditState != AuditStateEnum.QCFailed)
|
||||
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count(),
|
||||
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count(),
|
||||
|
||||
//待审核通过,统计从已领取到QC提交之间的 已领取 待审核 审核中 (审核完成 领取人就会清理 所以只用查询当前领取人是自己的就好了)
|
||||
ToBeReviewedCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id).Count()
|
||||
ToBeReviewedCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId).Count()
|
||||
|
||||
}).Where(x => x.ToBeClaimedCount + x.ToBeReviewedCount > 0);
|
||||
|
||||
|
@ -693,13 +693,13 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var toBeClaimedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed && t.AuditState != AuditStateEnum.QCFailed)
|
||||
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count();
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId) && t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed && t.AuditState != AuditStateEnum.QCFailed)
|
||||
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count();
|
||||
|
||||
|
||||
var toBeReviwedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(u => u.CurrentActionUserId == _userInfo.Id).Count();
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId).Count();
|
||||
|
||||
|
||||
return ResponseOutput.Ok(result, new { TotalToBeClaimedCount = toBeClaimedCount, TotalToBeReviewedCount = toBeReviwedCount });
|
||||
|
@ -721,7 +721,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Select(t => new ImageQuestionToBeDoneDto()
|
||||
{
|
||||
TrialId = t.Id,
|
||||
|
@ -729,10 +729,10 @@ namespace IRaCIS.Core.Application
|
|||
ExperimentName = t.ExperimentName,
|
||||
TrialCode = t.TrialCode,
|
||||
UrgentCount = t.SubjectVisitList.SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator && u.SubjectVisit.IsUrgent).Count(),
|
||||
.Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator && u.SubjectVisit.IsUrgent).Count(),
|
||||
|
||||
ToBeDealedCount = t.SubjectVisitList.SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count(),
|
||||
.Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count(),
|
||||
|
||||
}).Where(x => x.ToBeDealedCount > 0); ;
|
||||
|
||||
|
@ -742,9 +742,9 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var toBeDealedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count();
|
||||
.Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count();
|
||||
|
||||
return ResponseOutput.Ok(result, new { TotalToBeDealedCount = toBeDealedCount });
|
||||
|
||||
|
@ -775,7 +775,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
|
||||
var newQuery = _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
var newQuery = _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Select(c => new IRImageReadingToBeDoneDto()
|
||||
{
|
||||
TrialId = c.TrialId,
|
||||
|
@ -785,7 +785,7 @@ namespace IRaCIS.Core.Application
|
|||
CriterionName = c.CriterionName,
|
||||
TrialReadingCriterionId = c.Id,
|
||||
|
||||
UrgentCount = c.VisitTaskList.AsQueryable().Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
||||
UrgentCount = c.VisitTaskList.AsQueryable().Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
||||
// 前序 不存在 未一致性核查未通过的
|
||||
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
||||
//前序 不存在 未生成任务的访视
|
||||
|
@ -795,7 +795,7 @@ namespace IRaCIS.Core.Application
|
|||
.Count(t => t.IsUrgent),
|
||||
|
||||
|
||||
UnReadCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
||||
UnReadCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
||||
// 前序 不存在 未一致性核查未通过的
|
||||
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
||||
//前序 不存在 未生成任务的访视
|
||||
|
@ -807,7 +807,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
|
||||
HaveSignedCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze)
|
||||
HaveSignedCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.UserRoleId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze)
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
|
||||
}).Where(x => x.UnReadCount > 0);
|
||||
|
||||
|
@ -885,9 +885,9 @@ namespace IRaCIS.Core.Application
|
|||
var result = await newQuery.ToPagedListAsync(inQuery, defalutSortArray);
|
||||
|
||||
var toBeDealedCount = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.SelectMany(t => t.VisitTaskList)
|
||||
.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect && t.TrialReadingCriterion.IsSigned == true && t.TrialReadingCriterion.IsConfirm == true)
|
||||
.Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect && t.TrialReadingCriterion.IsSigned == true && t.TrialReadingCriterion.IsConfirm == true)
|
||||
// 前序 不存在 未一致性核查未通过的
|
||||
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
||||
//前序 不存在 未生成任务的访视
|
||||
|
@ -913,8 +913,8 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
var query = _taskMedicalReviewRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.VisitTask.DoctorUserId == _userInfo.Id)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.VisitTask.DoctorUserId == _userInfo.UserRoleId)
|
||||
.GroupBy(t => new
|
||||
{
|
||||
t.TrialId,
|
||||
|
@ -957,8 +957,8 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var toBeDealedCount = _taskMedicalReviewRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.DoctorUserId == _userInfo.Id)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.DoctorUserId == _userInfo.UserRoleId)
|
||||
.Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.MIM)
|
||||
//.Where(u => u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.MIM)
|
||||
.Count();
|
||||
|
@ -990,8 +990,8 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
#region 废弃不能对包含聚合或子查询的表达式执行聚合函数
|
||||
var query = _taskMedicalReviewRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId)
|
||||
.GroupBy(t => new
|
||||
{
|
||||
t.TrialId,
|
||||
|
@ -1028,16 +1028,16 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
var toBeReplyedQuery = _taskMedicalReviewRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId)
|
||||
.Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IndependentReviewer && u.AuditState == MedicalReviewAuditState.Auditing);
|
||||
|
||||
|
||||
var toBeReplyedCount = toBeReplyedQuery.Count();
|
||||
|
||||
var tobeReviewedCount = _taskMedicalReviewRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId)
|
||||
.Where(u => u.AuditState != MedicalReviewAuditState.HaveSigned && u.LatestReplyUser.UserTypeEnum != UserTypeEnum.IndependentReviewer).Count();
|
||||
|
||||
|
||||
|
@ -1089,9 +1089,9 @@ namespace IRaCIS.Core.Application
|
|||
if (!_userInfo.IsAdmin)
|
||||
{
|
||||
var list = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.WhereIf(!_userInfo.IsAdmin, c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) &&
|
||||
!t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)).Count() > 0)
|
||||
!t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId && t.ConfirmTime != null)).Count() > 0)
|
||||
.Select(t => t.Id).ToListAsync();
|
||||
|
||||
return list;
|
||||
|
@ -1115,30 +1115,30 @@ namespace IRaCIS.Core.Application
|
|||
var isInternal = _userInfo.IsZhiZhun;
|
||||
|
||||
var needSignTrialCount = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)
|
||||
&& !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)).Count() > 0).CountAsync();
|
||||
&& !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId && t.ConfirmTime != null)).Count() > 0).CountAsync();
|
||||
|
||||
var needSignSysDocCont = await _systemDocumentRepository
|
||||
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null))
|
||||
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId && t.ConfirmTime != null))
|
||||
//外部人员 只签署 文档类型枚举值有值的
|
||||
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
|
||||
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
||||
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
|
||||
|
||||
var signedTrialCount = await _trialDocumentRepository.AsQueryable(true)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.Where(t => t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)).CountAsync();
|
||||
.Where(t => t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId && t.ConfirmTime != null)).CountAsync();
|
||||
|
||||
var signedSysDocCont = await _systemDocumentRepository
|
||||
.Where(t => t.IsDeleted == false && t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null))
|
||||
.Where(t => t.IsDeleted == false && t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId && t.ConfirmTime != null))
|
||||
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
||||
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
|
||||
|
||||
|
||||
var siteSurveyCount = await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.SPMApproved).Count() > 0)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.CRCSubmitted).Count() > 0)
|
||||
.CountAsync();
|
||||
|
@ -1178,7 +1178,7 @@ namespace IRaCIS.Core.Application
|
|||
SysSignedDocCount = signedSysDocCont,
|
||||
|
||||
SysNoticeUnReadCount = await _systemNoticeRepository.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished
|
||||
&& !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.Id))
|
||||
&& !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.EndDate == null || t.EndDate != null && t.EndDate > appDateTimeNow)
|
||||
.CountAsync(),
|
||||
|
||||
|
@ -1187,16 +1187,16 @@ namespace IRaCIS.Core.Application
|
|||
PM_SiteSurveryCount = isPM ? siteSurveyCount : 0,
|
||||
|
||||
PM_CheckCount = isPM ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.SubjectVisitList.Any(t => t.CheckState == CheckStateEnum.ToCheck || (t.CheckState == CheckStateEnum.CVIng &&
|
||||
t.CheckChallengeDialogList.OrderByDescending(t => t.CreateTime).First().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))).CountAsync() : 0,
|
||||
|
||||
PM_ReviewerSelectCount = isPM ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.InviteIntoGroup).Count() > 0).CountAsync() : 0,
|
||||
|
||||
PM_ReReadingApprovalCount = isPM ? await _visitTaskReReadingRepository
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed)
|
||||
.GroupBy(t => t.OriginalReReadingTask.TrialId)
|
||||
.Select(g => new ReReadingApplyToBeDoneDto()
|
||||
|
@ -1207,7 +1207,7 @@ namespace IRaCIS.Core.Application
|
|||
}).Where(x => x.ToBeApprovalCount > 0).CountAsync() : 0,
|
||||
|
||||
PM_ClinicalDataCount = isPM ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.ReadModuleList.Where(u => u.IsCRCConfirm && !u.IsPMConfirm).Count() > 0).CountAsync() : 0,
|
||||
|
||||
#endregion
|
||||
|
@ -1215,34 +1215,34 @@ namespace IRaCIS.Core.Application
|
|||
#region CRC
|
||||
|
||||
CRC_ImageSubmitCount = isCRC ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView))
|
||||
.Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)).Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count() > 0).CountAsync() : 0,
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView))
|
||||
.Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)).Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count() > 0).CountAsync() : 0,
|
||||
|
||||
|
||||
CRC_ImageQuestionCount = isCRC ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)).SelectMany(c => c.QCChallengeList)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)).SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.IsClosed == false && (u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC || u.LatestReplyUserId == null)).Count() > 0).CountAsync() : 0,
|
||||
|
||||
|
||||
|
||||
CRC_CheckQuestionCount = isCRC ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count() > 0).CountAsync() : 0,
|
||||
|
||||
CRC_ImageReUploadCount = isCRC ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.SubjectVisitList
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => (u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading) || (u.IsQCConfirmedReupload)).Count() > 0).CountAsync() : 0,
|
||||
|
||||
CRC_ClinicalDataTobeDoneCount = isCRC ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.ReadingClinicalDataList.Where(x => !x.IsSign && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC).Count() > 0).CountAsync() : 0,
|
||||
|
||||
CRC_ClinialDataTobeConfirmCount = isCRC ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.ReadModuleList.Where(x => !x.IsCRCConfirm).Count() > 0).CountAsync() : 0,
|
||||
|
||||
|
||||
|
@ -1256,11 +1256,11 @@ namespace IRaCIS.Core.Application
|
|||
SPM_SiteSurveryCount = isSPMOrCPM ? siteSurveyCount : 0,
|
||||
|
||||
SPM_ReviewerApprovalCount = isSPMOrCPM ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).Count() > 0).CountAsync() : 0,
|
||||
|
||||
SPM_ReReadingApprovalCount = isSPMOrCPM ? await _visitTaskReReadingRepository
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed)
|
||||
.GroupBy(t => t.OriginalReReadingTask.TrialId)
|
||||
.Select(g => new ReReadingApplyToBeDoneDto()
|
||||
|
@ -1277,23 +1277,23 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
IQC_IamgeQCCount = isIQC ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit)
|
||||
.Select(t => new
|
||||
{
|
||||
//待领取量
|
||||
ToBeClaimedCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed)
|
||||
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count(),
|
||||
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count(),
|
||||
|
||||
//待审核通过,统计从已领取到QC提交之间的 已领取 待审核 审核中 (审核完成 领取人就会清理 所以只用查询当前领取人是自己的就好了)
|
||||
ToBeReviewedCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id).Count()
|
||||
ToBeReviewedCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId).Count()
|
||||
|
||||
}).Where(x => x.ToBeClaimedCount + x.ToBeReviewedCount > 0).CountAsync() : 0,
|
||||
|
||||
IQC_QCQuestionCount = isIQC ? await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.SubjectVisitList.SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() > 0).CountAsync() : 0,
|
||||
.Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() > 0).CountAsync() : 0,
|
||||
|
||||
|
||||
|
||||
|
@ -1315,8 +1315,8 @@ namespace IRaCIS.Core.Application
|
|||
// .Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)).Count()>0).CountAsync() : 0,
|
||||
|
||||
|
||||
await _trialReadingCriterionRepository.Where(t => t.IsSigned == true && t.IsConfirm == true && t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(c => c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
||||
await _trialReadingCriterionRepository.Where(t => t.IsSigned == true && t.IsConfirm == true && t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(c => c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
||||
// 前序 不存在 未一致性核查未通过的
|
||||
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
||||
//前序 不存在 未生成任务的访视
|
||||
|
@ -1328,8 +1328,8 @@ namespace IRaCIS.Core.Application
|
|||
: 0,
|
||||
|
||||
|
||||
IR_MedicalReviewCount = isIR ? await _taskMedicalReviewRepository.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.VisitTask.DoctorUserId == _userInfo.Id)
|
||||
IR_MedicalReviewCount = isIR ? await _taskMedicalReviewRepository.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.VisitTask.DoctorUserId == _userInfo.UserRoleId)
|
||||
.GroupBy(t => new { t.TrialId, t.VisitTask.TrialReadingCriterionId })
|
||||
.Where(g => g.Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.MIM && u.AuditState == MedicalReviewAuditState.Auditing).Count() > 0).CountAsync() : 0,
|
||||
|
||||
|
@ -1339,8 +1339,8 @@ namespace IRaCIS.Core.Application
|
|||
#region MIM
|
||||
|
||||
MIM_MedicalReviewCount = isMIM ? await _taskMedicalReviewRepository
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id)
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId)
|
||||
.GroupBy(t => new { t.TrialId, t.VisitTask.TrialReadingCriterionId })
|
||||
.Select(g => new
|
||||
{
|
||||
|
@ -1379,7 +1379,7 @@ namespace IRaCIS.Core.Application
|
|||
.WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.ExperimentName.Contains(inQuery.ExperimentName))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId && t.IsDeleted == false) && t.IsDeleted == false)
|
||||
.WhereIf(inQuery.CriterionType != null, o => o.TrialReadingCriterionList.Any(t => t.CriterionType == inQuery.CriterionType && t.IsSigned && t.IsConfirm))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.PM_EMail), o => o.TrialUserList.Any(t => t.User.EMail.Contains(inQuery.PM_EMail) && (t.User.UserTypeEnum == UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM)))
|
||||
.Select(t => new TrialToBeDoneDto()
|
||||
|
@ -1406,49 +1406,49 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
SPM_ReviewerSelectApprovalCount = isSPMOrCPM ? t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).Count() : 0,
|
||||
|
||||
MIM_UrgentCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id)
|
||||
MIM_UrgentCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId)
|
||||
.Where(u => u.VisitTask.IsUrgent &&
|
||||
u.AuditState != MedicalReviewAuditState.HaveSigned).Count() : 0,
|
||||
|
||||
MIM_PendingResponseCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id)
|
||||
MIM_PendingResponseCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId)
|
||||
.Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IndependentReviewer && u.AuditState == MedicalReviewAuditState.Auditing).Count() : 0,
|
||||
|
||||
MIM_PendingReviewCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id)
|
||||
MIM_PendingReviewCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId)
|
||||
.Where(u => u.AuditState != MedicalReviewAuditState.HaveSigned && u.LatestReplyUser.UserTypeEnum != UserTypeEnum.IndependentReviewer).Count() : 0,
|
||||
|
||||
CRC_UrgentCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id) && t.IsUrgent).Count() : 0,
|
||||
CRC_UrgentCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId) && t.IsUrgent).Count() : 0,
|
||||
|
||||
CRC_CheckQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||
CRC_CheckQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count() : 0,
|
||||
|
||||
CRC_QCQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)).SelectMany(c => c.QCChallengeList)
|
||||
CRC_QCQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)).SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.IsClosed == false && (u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC || u.LatestReplyUserId == null)).Count() : 0,
|
||||
|
||||
|
||||
//待审核 审核中 加急的数量
|
||||
IQC_UrgentCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id && t.QCProcessEnum != TrialQCProcess.NotAudit && t.IsUrgent).Count() : 0,
|
||||
IQC_UrgentCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId && t.QCProcessEnum != TrialQCProcess.NotAudit && t.IsUrgent).Count() : 0,
|
||||
|
||||
//审核未完成
|
||||
IQC_AuditToBeDealedCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id && t.QCProcessEnum != TrialQCProcess.NotAudit).Count() : 0,
|
||||
IQC_AuditToBeDealedCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId && t.QCProcessEnum != TrialQCProcess.NotAudit).Count() : 0,
|
||||
|
||||
//质疑待处理
|
||||
IQC_QuestionToBeDealedCount = isIQC ? t.SubjectVisitList.SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() : 0,
|
||||
.Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() : 0,
|
||||
|
||||
//待领取
|
||||
IQC_ToBeClaimedCount = isIQC ? t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed)
|
||||
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count() : 0,
|
||||
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count() : 0,
|
||||
|
||||
|
||||
IR_ReadingCriterionList = isIR ? t.TrialReadingCriterionList.Where(t => t.IsConfirm && t.IsSigned).OrderBy(t => t.CriterionName).Select(t => t.CriterionName).ToList() : null,
|
||||
|
||||
IR_PMEmailList = isIR ? t.TrialUserList.Where(t => t.User.UserTypeEnum == UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM).OrderBy(t => t.User.EMail).Select(t => t.User.EMail).ToList() : null,
|
||||
|
||||
IR_TotalReadCount = isIR ? t.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() : 0,
|
||||
IR_TotalReadCount = isIR ? t.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() : 0,
|
||||
|
||||
|
||||
IR_UnReadCount = isIR ? t.VisitTaskList
|
||||
.Where(c => c.DoctorUserId == _userInfo.Id && c.ReadingTaskState != ReadingTaskState.HaveSigned && c.TaskState == TaskState.Effect && c.TrialReadingCriterion.IsSigned)
|
||||
.Where(c => c.DoctorUserId == _userInfo.UserRoleId && c.ReadingTaskState != ReadingTaskState.HaveSigned && c.TaskState == TaskState.Effect && c.TrialReadingCriterion.IsSigned)
|
||||
// 前序 不存在 未一致性核查未通过的
|
||||
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
||||
//前序 不存在 未生成任务的访视
|
||||
|
@ -1511,7 +1511,7 @@ namespace IRaCIS.Core.Application
|
|||
// QC IQC 待领取
|
||||
QC_IQC_ToBeClaimedCount =
|
||||
(t.User.UserTypeEnum == UserTypeEnum.IQC) ?
|
||||
t.Trial.SubjectVisitList.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count() : 0,
|
||||
t.Trial.SubjectVisitList.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count() : 0,
|
||||
|
||||
|
||||
// CRC 质疑待回复 --区分人
|
||||
|
|
|
@ -802,7 +802,7 @@ namespace IRaCIS.Core.Application
|
|||
throw new BusinessValidationFailedException(_localizer["TrialConfig_InvalidParentQuestionId"]);
|
||||
}
|
||||
|
||||
if (await _trialRepository.AnyAsync(t => t.Id == signConfirmDTO.TrialId && t.QCQuestionConfirmedUserId != null && t.QCQuestionConfirmedUserId != _userInfo.Id))
|
||||
if (await _trialRepository.AnyAsync(t => t.Id == signConfirmDTO.TrialId && t.QCQuestionConfirmedUserId != null && t.QCQuestionConfirmedUserId != _userInfo.UserRoleId))
|
||||
{
|
||||
//---影像质控审核问题已被其他人员确认,不允许再次确认。
|
||||
throw new BusinessValidationFailedException(_localizer["TrialConfig_AuditQuestionConfirmed"]);
|
||||
|
@ -872,7 +872,7 @@ namespace IRaCIS.Core.Application
|
|||
throw new BusinessValidationFailedException(_localizer["TrialConfig_InvalidParentQuestionId"]);
|
||||
}
|
||||
|
||||
if (await _trialRepository.AnyAsync(t => t.Id == signConfirmDTO.TrialId && t.QCQuestionConfirmedUserId != null && t.QCQuestionConfirmedUserId != _userInfo.Id))
|
||||
if (await _trialRepository.AnyAsync(t => t.Id == signConfirmDTO.TrialId && t.QCQuestionConfirmedUserId != null && t.QCQuestionConfirmedUserId != _userInfo.UserRoleId))
|
||||
{
|
||||
//---影像质控审核问题已被其他人员确认,不允许再次确认。
|
||||
throw new BusinessValidationFailedException(_localizer["TrialConfig_AuditQuestionConfirmed"]);
|
||||
|
@ -882,7 +882,7 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
IsConfirm = true
|
||||
});
|
||||
await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = DateTime.Now, QCQuestionConfirmedUserId = _userInfo.Id, IsQCQuestionConfirmed = true });
|
||||
await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = DateTime.Now, QCQuestionConfirmedUserId = _userInfo.UserRoleId, IsQCQuestionConfirmed = true });
|
||||
await _trialRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class TrialExternalUserService(IRepository<TrialExternalUser> _trialExternalUseRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _trialUserRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<UserType> _userTypeRepository,
|
||||
|
@ -64,7 +64,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
using (await @lock.AcquireAsync())
|
||||
{
|
||||
var existSysUser = await _userRepository.FirstOrDefaultAsync(t => t.EMail == addOrEditTrialExternalUser.Email && t.UserTypeId == addOrEditTrialExternalUser.UserTypeId);
|
||||
var existSysUser = await _userRoleRepository.FirstOrDefaultAsync(t => t.EMail == addOrEditTrialExternalUser.Email && t.UserTypeId == addOrEditTrialExternalUser.UserTypeId);
|
||||
|
||||
if (existSysUser != null)
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
await _trialExternalUseRepository.AddAsync(addEntity);
|
||||
|
||||
|
||||
var existUser = await _userRepository.FirstOrDefaultAsync(t => t.EMail == addOrEditTrialExternalUser.Email && t.UserTypeId == addOrEditTrialExternalUser.UserTypeId);
|
||||
var existUser = await _userRoleRepository.FirstOrDefaultAsync(t => t.EMail == addOrEditTrialExternalUser.Email && t.UserTypeId == addOrEditTrialExternalUser.UserTypeId);
|
||||
var trialType = await _trialRepository.Where(t => t.Id == addOrEditTrialExternalUser.TrialId).Select(t => t.TrialType).FirstOrDefaultAsync();
|
||||
|
||||
if (existUser != null)
|
||||
|
@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
//生成账户 并插入
|
||||
|
||||
var generateUser = _mapper.Map<User>(addOrEditTrialExternalUser);
|
||||
var generateUser = _mapper.Map<UserRole>(addOrEditTrialExternalUser);
|
||||
|
||||
if (trialType == TrialType.NoneOfficial)
|
||||
{
|
||||
|
@ -117,10 +117,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
// 外部人员生成账号 都是外部的
|
||||
generateUser.IsZhiZhun = false;
|
||||
|
||||
generateUser.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
|
||||
generateUser.Code = _userRoleRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
|
||||
|
||||
|
||||
generateUser.UserCode = AppSettings.GetCodeStr(generateUser.Code, nameof(User));
|
||||
generateUser.UserCode = AppSettings.GetCodeStr(generateUser.Code, nameof(UserRole));
|
||||
|
||||
generateUser.UserName = generateUser.UserCode;
|
||||
|
||||
|
@ -130,7 +130,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
generateUser.Status = UserStateEnum.Disable;
|
||||
|
||||
var newAddUser = await _userRepository.AddAsync(generateUser);
|
||||
var newAddUser = await _userRoleRepository.AddAsync(generateUser);
|
||||
|
||||
|
||||
addEntity.IsSystemUser = false;
|
||||
|
@ -224,7 +224,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
if (isSystemUser == false)
|
||||
{
|
||||
await _userRepository.BatchDeleteNoTrackingAsync(t => t.Id == systemUserId);
|
||||
await _userRoleRepository.BatchDeleteNoTrackingAsync(t => t.Id == systemUserId);
|
||||
}
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
|
@ -253,12 +253,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now });
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||
await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new UserRole() { Status = UserStateEnum.Enable });
|
||||
|
||||
await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == userInfo.Id, u => new TrialExternalUser() { IsJoin = true });
|
||||
|
||||
|
||||
await _userRepository.SaveChangesAsync();
|
||||
await _userRoleRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
await _mailVerificationService.ExternalUserJoinEmail(trialId, userId, sendEmail.BaseUrl, sendEmail.RouteUrl);
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class TrialMaintenanceService(IRepository<TrialUser> _trialUseRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialSiteUser> _trialSiteUserRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Trial> _trialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialMaintenanceService
|
||||
|
@ -82,7 +82,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
//之前已经选择的用户 不放在列表中,现在又要改回去 废弃
|
||||
var query = _userRepository.Where(t => t.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||
var query = _userRoleRepository.Where(t => t.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||
|
||||
//正式或者培训的项目 不能允许测试用户(必须正式用户) 同时必须是内部的用户
|
||||
.WhereIf(trialType == TrialType.OfficialTrial || trialType == TrialType.Training, t => t.IsTestUser == false && t.IsZhiZhun)
|
||||
|
|
|
@ -90,8 +90,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(multiModalityIdSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Modality) == multiModalityIdSelectCount)
|
||||
.WhereIf(multiCriteriaSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Criterion) == multiCriteriaSelectCount)
|
||||
.WhereIf(multiReviewTypeSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.ReviewType) == multiReviewTypeSelectCount)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false)
|
||||
.ProjectTo<TrialDetailDTO>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, isEn_Us = _userInfo.IsEn_Us });
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId && t.IsDeleted == false) && t.IsDeleted == false)
|
||||
.ProjectTo<TrialDetailDTO>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.UserRoleId, isEn_Us = _userInfo.IsEn_Us });
|
||||
|
||||
return await query.ToPagedListAsync(inQuery);
|
||||
|
||||
|
@ -102,7 +102,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<List<TrialSelectDTO>> GetTrialSelect()
|
||||
{
|
||||
return await _trialRepository.AsQueryable()
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.IsDeleted == false)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId) && t.IsDeleted == false)
|
||||
|
||||
.ProjectTo<TrialSelectDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
//如果是PM, 则需要将该人员添加到 运维人员表
|
||||
//添加运维人员PM
|
||||
await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trial.Id, UserId = _userInfo.Id, JoinTime = DateTime.Now });
|
||||
await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trial.Id, UserId = _userInfo.UserRoleId, JoinTime = DateTime.Now });
|
||||
|
||||
// 添加扩展信息表记录
|
||||
await _trialPaymentPriceRepository.AddAsync(new TrialPaymentPrice() { TrialId = trial.Id });
|
||||
|
@ -588,7 +588,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(inQuery.Status == 8, t => t.EnrollList.Any(u => u.EnrollStatus == EnrollStatus.InviteIntoGroup))
|
||||
.WhereIf(inQuery.Status == 10, t => t.EnrollList.Any(u => u.EnrollStatus == EnrollStatus.DoctorReading))
|
||||
.WhereIf(inQuery.Status == 14, t => t.EnrollList.Any(u => u.EnrollStatus == EnrollStatus.Finished))
|
||||
.ProjectTo<TrialDetailDTO>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, isEn_Us = _userInfo.IsEn_Us });
|
||||
.ProjectTo<TrialDetailDTO>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.UserRoleId, isEn_Us = _userInfo.IsEn_Us });
|
||||
|
||||
return await query.ToPagedListAsync(inQuery, nameof(TrialDetailDTO.CreateTime));
|
||||
|
||||
|
@ -617,13 +617,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var query = _trialRepository
|
||||
.WhereIf(inQuery.EnrollStatus != null, o => (int)inQuery.EnrollStatus! == 10 ?
|
||||
o.EnrollList.Any(o => o.EnrollStatus >= EnrollStatus.ConfirmIntoGroup && o.EnrollStatus <= EnrollStatus.DoctorReading && o.DoctorId == _userInfo.Id) :
|
||||
o.EnrollList.Any(o => o.EnrollStatus == inQuery.EnrollStatus && o.DoctorId == _userInfo.Id))
|
||||
o.EnrollList.Any(o => o.EnrollStatus >= EnrollStatus.ConfirmIntoGroup && o.EnrollStatus <= EnrollStatus.DoctorReading && o.DoctorId == _userInfo.UserRoleId) :
|
||||
o.EnrollList.Any(o => o.EnrollStatus == inQuery.EnrollStatus && o.DoctorId == _userInfo.UserRoleId))
|
||||
.WhereIf(inQuery.Expedited != null, o => o.Expedited == inQuery.Expedited)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Indication), o => o.Indication.Contains(inQuery.Indication))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.ProjectTo<TrialDetailDTO>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, isEn_Us = _userInfo.IsEn_Us });
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.ProjectTo<TrialDetailDTO>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.UserRoleId, isEn_Us = _userInfo.IsEn_Us });
|
||||
|
||||
|
||||
return await query.ToPagedListAsync(inQuery, nameof(TrialDetailDTO.CreateTime));
|
||||
|
@ -646,12 +646,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
await _enrollDetailRepository.AddAsync(new EnrollDetail()
|
||||
{
|
||||
DoctorId = _userInfo.Id,
|
||||
DoctorId = _userInfo.UserRoleId,
|
||||
TrialId = trialId,
|
||||
EnrollStatus = status,
|
||||
OptUserType = (int)SystemUserType.DoctorUser,
|
||||
});
|
||||
return ResponseOutput.Result(await _enrollRepository.BatchUpdateNoTrackingAsync(u => u.TrialId == trialId && u.DoctorId == _userInfo.Id, e => new Enroll
|
||||
return ResponseOutput.Result(await _enrollRepository.BatchUpdateNoTrackingAsync(u => u.TrialId == trialId && u.DoctorId == _userInfo.UserRoleId, e => new Enroll
|
||||
{
|
||||
EnrollStatus = status
|
||||
}));
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.SiteName), t => t.TrialSiteName.Contains(inQuery.SiteName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteAliasName), t => t.TrialSiteAliasName.Contains(inQuery.TrialSiteAliasName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteCode), t => t.TrialSiteCode.Contains(inQuery.TrialSiteCode))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, t => t.CRCUserList.Any(k => k.UserId == _userInfo.Id))
|
||||
.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.User.FullName).Contains(inQuery.UserKeyInfo)
|
||||
|| k.User.UserName.Contains(inQuery.UserKeyInfo) || k.User.EMail.Contains(inQuery.UserKeyInfo)))
|
||||
|
||||
|
@ -52,7 +52,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(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, t => t.CRCUserList.Any(k => k.UserId == _userInfo.Id))
|
||||
.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.User.FullName).Contains(inQuery.UserKeyInfo)
|
||||
|| k.User.UserName.Contains(inQuery.UserKeyInfo) || k.User.EMail.Contains(inQuery.UserKeyInfo)))
|
||||
|
||||
|
@ -255,7 +255,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
//CRC只看到他负责的
|
||||
|
||||
var list = await _trialSiteRepository.Where(t => t.TrialId == trialId)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.ProjectTo<TrialSiteForSelect>(_mapper.ConfigurationProvider).OrderBy(t => t.TrialSiteCode).ToListAsync();
|
||||
|
||||
|
||||
|
@ -269,7 +269,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
//CRC只看到他负责的
|
||||
|
||||
var list = await _trialSiteRepository.Where(t => t.TrialId == trialId)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.Select(t => t.TrialSiteCode).ToListAsync();
|
||||
|
||||
var virtualList = await _visitTaskRepository.Where(t => t.IsSelfAnalysis == true && t.TrialId == trialId).Select(t => t.BlindTrialSiteCode).Distinct().ToListAsync();
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<TrialUser, TrialMaintenanceDTO>().IncludeMembers(t => t.User)
|
||||
.ForMember(d => d.UserRealName, u => u.MapFrom(s => s.User.FullName))
|
||||
.ForMember(t => t.UserType, u => u.MapFrom(t => t.User.UserTypeRole.UserTypeShortName));
|
||||
CreateMap<User, TrialMaintenanceDTO>();
|
||||
CreateMap<UserRole, TrialMaintenanceDTO>();
|
||||
|
||||
var trialSiteId = Guid.Empty;
|
||||
CreateMap<TrialUser, AssginSiteCRCListDTO>().IncludeMembers(t => t.User)
|
||||
|
@ -97,10 +97,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.TrialSiteId, u => u.MapFrom(t => trialSiteId))
|
||||
.ForMember(d => d.UserType, u => u.MapFrom(t => t.User.UserTypeRole.UserTypeShortName))
|
||||
.ForMember(d => d.IsSelect, u => u.MapFrom(t => t.Trial.TrialSiteUserList.Any(k => k.UserId == t.UserId && k.TrialSiteId== trialSiteId)));
|
||||
CreateMap<User, AssginSiteCRCListDTO>();
|
||||
CreateMap<UserRole, AssginSiteCRCListDTO>();
|
||||
|
||||
var trialId = Guid.Empty;
|
||||
CreateMap<User, TrialUserScreeningDTO>()
|
||||
CreateMap<UserRole, TrialUserScreeningDTO>()
|
||||
.ForMember(d => d.UserRealName, u => u.MapFrom(s => s.FullName))
|
||||
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
|
||||
.ForMember(d => d.UserId, u => u.MapFrom(s => s.Id))
|
||||
|
@ -151,7 +151,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<TrialSiteUser, UserTrialDTO>().IncludeMembers(t => t.User)
|
||||
.ForMember(d => d.UserType, u => u.MapFrom(s => s.User.UserTypeRole.UserTypeShortName))
|
||||
.ForMember(d => d.UserRealName, u => u.MapFrom(s => s.User.FullName));
|
||||
CreateMap<User, UserTrialDTO>();
|
||||
CreateMap<UserRole, UserTrialDTO>();
|
||||
#endregion
|
||||
|
||||
|
||||
|
@ -189,22 +189,22 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<SignDTO, TrialSign>();
|
||||
|
||||
CreateMap<TrialStateChange, TrialStateChangeDTO>()
|
||||
.ForMember(t => t.UserRealName, u => u.MapFrom(c => c.CreateUser.FullName))
|
||||
.ForMember(t => t.UserName, u => u.MapFrom(c => c.CreateUser.UserName));
|
||||
.ForMember(t => t.UserRealName, u => u.MapFrom(c => c.CreateUserRole.FullName))
|
||||
.ForMember(t => t.UserName, u => u.MapFrom(c => c.CreateUserRole.UserName));
|
||||
|
||||
|
||||
|
||||
CreateMap<TrialExternalUserAddAndSendEmail, TrialExternalUser>().ReverseMap();
|
||||
|
||||
CreateMap<TrialExternalUserAddAndSendEmail, User>();
|
||||
CreateMap<TrialExternalUserAddAndSendEmail, UserRole>();
|
||||
|
||||
CreateMap<TrialExternalUser, TrialExternalUserAddOrEdit>().ReverseMap();
|
||||
CreateMap<TrialExternalUserAddOrEdit, User>();
|
||||
CreateMap<TrialExternalUserAddOrEdit, UserRole>();
|
||||
|
||||
CreateMap<TrialExternalUser, TrialExternalUserView>();
|
||||
|
||||
|
||||
CreateMap<User, TrialExternalUser>().ReverseMap();
|
||||
CreateMap<UserRole, TrialExternalUser>().ReverseMap();
|
||||
|
||||
|
||||
|
||||
|
@ -270,7 +270,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(t => t.TrialSiteAliasName, u => u.MapFrom(c => c.TrialSite.TrialSiteAliasName))
|
||||
.ForMember(t => t.UserRealName, u => u.MapFrom(c => c.User.FullName))
|
||||
.ForMember(t => t.UserType, u => u.MapFrom(c => c.User.UserTypeRole.UserTypeShortName));
|
||||
CreateMap<User, SiteUserExportDTO>();
|
||||
CreateMap<UserRole, SiteUserExportDTO>();
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId)
|
||||
// CRC 只负责他管理site的受试者
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.ProjectTo<SubjectQueryView>(_mapper.ConfigurationProvider)
|
||||
.WhereIf(inQuery.IsMissingImages != null, t => t.IsMissingImages == inQuery.IsMissingImages);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
CreateMap<VisitPlanInfluenceStat, VisitPlanInfluenceSubjectVisitStatDTO>()
|
||||
.ForMember(d => d.CreateUser, u => u.MapFrom(g => g.CreateUser.LastName + " / " + g.CreateUser.FirstName));
|
||||
.ForMember(d => d.CreateUser, u => u.MapFrom(g => g.CreateUserRole.LastName + " / " + g.CreateUserRole.FirstName));
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<Doctor> _doctorRepository,
|
||||
IRepository<EnrollDetail> _enrollDetailRepository,
|
||||
IRepository<Workload> _workloadRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _trialUserRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> _ReadingQuestionCriterionTrialRepository,
|
||||
|
||||
|
@ -146,7 +146,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
TrialId = trialId,
|
||||
EnrollStatus = EnrollStatus.HasApplyDownloadResume,
|
||||
|
||||
DoctorUserId = _userRepository.Where(t => t.DoctorId == doctorId).Select(t => t.Id).FirstOrDefault()
|
||||
DoctorUserId = _userRoleRepository.Where(t => t.DoctorId == doctorId).Select(t => t.Id).FirstOrDefault()
|
||||
}); ;
|
||||
|
||||
await _enrollDetailRepository.AddAsync(new EnrollDetail()
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<DicomSeries> _dicomSeriesRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialBodyPart> _trialBodyPartRepository,
|
||||
IDistributedLockProvider _distributedLockProvider,
|
||||
ILogger<TestService> _logger, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService
|
||||
|
@ -160,7 +160,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<IResponseOutput> UserMutiAccount([FromServices] IRepository<IdentityUser> _identityUserRepository)
|
||||
{
|
||||
|
||||
var userList = _userRepository.Where().ToList();
|
||||
var userList = _userRoleRepository.Where().ToList();
|
||||
|
||||
foreach (var item in userList.GroupBy(t => t.EMail.Trim()))
|
||||
{
|
||||
|
@ -174,7 +174,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
await _identityUserRepository.AddAsync(identityUser);
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => emailUserIdList.Contains(t.Id), u => new User() { IdentityUserId = identityUserId });
|
||||
await _userRoleRepository.BatchUpdateNoTrackingAsync(t => emailUserIdList.Contains(t.Id), u => new UserRole() { IdentityUserId = identityUserId });
|
||||
}
|
||||
|
||||
await _identityUserRepository.SaveChangesAsync();
|
||||
|
@ -241,7 +241,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var timeSpan = HolidayHelper.GetChinaWorkTimeSpan(startdate, endDate);
|
||||
|
||||
_userRepository.Where(t => t.Id == _userInfo.Id).Select(t => t.FullName).FirstOrDefault();
|
||||
_userRoleRepository.Where(t => t.Id == _userInfo.UserRoleId).Select(t => t.FullName).FirstOrDefault();
|
||||
|
||||
return $"{timeSpan.Days}天,{timeSpan.Hours}小时{timeSpan.Minutes}分钟{timeSpan.Seconds}秒";
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<IResponseOutput> TestDistributedLock()
|
||||
{
|
||||
|
||||
await _userRepository.Where().Select(t => t.FullName).FirstNotNullAsync();
|
||||
await _userRoleRepository.Where().Select(t => t.FullName).FirstNotNullAsync();
|
||||
|
||||
Console.WriteLine($"我进来了当前值是:" + IntValue);
|
||||
_logger.LogWarning($"我进来了当前值是:" + IntValue);
|
||||
|
@ -633,7 +633,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
//var d = _userRepository.Where(t => t.FullName.Contains("cc")).Select(t => t.FullName).FirstOrDefault();
|
||||
//var d = _userRoleRepository.Where(t => t.FullName.Contains("cc")).Select(t => t.FullName).FirstOrDefault();
|
||||
//var c = _dicRepository.Where(t => t.ParentId != null).Select(t => t.MappedValue).First();
|
||||
//CultureInfo culture = CultureInfo.CurrentUICulture;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
public class AddlTrialUserTrigger(
|
||||
IStringLocalizer _localizer,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<User> _userRepository) : IBeforeSaveTrigger<TrialUser>
|
||||
IRepository<UserRole> _userRoleRepository) : IBeforeSaveTrigger<TrialUser>
|
||||
|
||||
{
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
var trialInfo = await _trialRepository.FindAsync(trialUser.TrialId);
|
||||
|
||||
// 必须包在同一个事务,有的时候是数据库还没用户,不能直接查询数据库
|
||||
var user = await _userRepository.FindAsync(trialUser.UserId);
|
||||
var user = await _userRoleRepository.FindAsync(trialUser.UserId);
|
||||
|
||||
if (trialInfo.TrialType == Domain.Share.TrialType.OfficialTrial || trialInfo.TrialType == Domain.Share.TrialType.Training)
|
||||
{
|
||||
|
|
|
@ -28,15 +28,15 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
}
|
||||
|
||||
|
||||
public class UserAddTrigger(IUserInfo _userInfo, IRepository<UserLog> _userLogReposiotry) : IBeforeSaveTrigger<User>
|
||||
public class UserAddTrigger(IUserInfo _userInfo, IRepository<UserLog> _userLogReposiotry) : IBeforeSaveTrigger<UserRole>
|
||||
{
|
||||
public async Task BeforeSave(ITriggerContext<User> context, CancellationToken cancellationToken)
|
||||
public async Task BeforeSave(ITriggerContext<UserRole> context, CancellationToken cancellationToken)
|
||||
{
|
||||
var user = context.Entity;
|
||||
|
||||
if (context.ChangeType == ChangeType.Added)
|
||||
{
|
||||
await _userLogReposiotry.AddAsync(new UserLog() { OptType = UserOptType.AddUser, OptUserId = user.Id, LoginUserId = _userInfo.Id, IP = _userInfo.IP });
|
||||
await _userLogReposiotry.AddAsync(new UserLog() { OptType = UserOptType.AddUser, OptUserId = user.Id, LoginUserId = _userInfo.UserRoleId, IP = _userInfo.IP });
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ public class SubjectUser : BaseFullAuditEntity
|
|||
[JsonIgnore]
|
||||
public List<SubjectUser> EarlierSubjectUserList { get; set; }
|
||||
[JsonIgnore]
|
||||
public User DoctorUser { get; set; }
|
||||
public UserRole DoctorUser { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public Subject Subject { get; set; }
|
||||
|
|
|
@ -8,7 +8,7 @@ public class TaskAllocationRule : BaseFullAuditEntity
|
|||
|
||||
[ForeignKey("DoctorUserId")]
|
||||
[JsonIgnore]
|
||||
public User DoctorUser { get; set; }
|
||||
public UserRole DoctorUser { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public Enroll Enroll { get; set; }
|
||||
|
|
|
@ -16,10 +16,10 @@ public class TaskMedicalReview : BaseFullAuditEntity
|
|||
#region 导航属性
|
||||
|
||||
[JsonIgnore]
|
||||
public User LatestReplyUser { get; set; }
|
||||
public UserRole LatestReplyUser { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public User MedicalManagerUser { get; set; }
|
||||
public UserRole MedicalManagerUser { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("VisitTaskId")]
|
||||
|
|
|
@ -7,7 +7,7 @@ public class TaskMedicalReviewRule : BaseFullAuditEntity
|
|||
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
public User DoctorUser { get; set; }
|
||||
public UserRole DoctorUser { get; set; }
|
||||
#endregion
|
||||
|
||||
public Guid DoctorUserId { get; set; }
|
||||
|
|
|
@ -18,7 +18,7 @@ public class VisitTask : BaseFullAuditEntity
|
|||
[ForeignKey("TrialReadingCriterionId")]
|
||||
public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }
|
||||
[ForeignKey("DoctorUserId")]
|
||||
public User DoctorUser { get; set; }
|
||||
public UserRole DoctorUser { get; set; }
|
||||
|
||||
[ForeignKey("SouceReadModuleId")]
|
||||
public ReadModule ReadModule { get; set; }
|
||||
|
|
|
@ -9,7 +9,7 @@ public class VisitTaskReReading : BaseFullAuditEntity
|
|||
#region 导航属性
|
||||
|
||||
[JsonIgnore]
|
||||
public User RequestReReadingUser { get; set; }
|
||||
public UserRole RequestReReadingUser { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public VisitTask NewReReadingTask { get; set; }
|
||||
|
@ -18,7 +18,7 @@ public class VisitTaskReReading : BaseFullAuditEntity
|
|||
[JsonIgnore]
|
||||
public VisitTask OriginalReReadingTask { get; set; }
|
||||
[JsonIgnore]
|
||||
public User RequestReReadingConfirmUser { get; set; }
|
||||
public UserRole RequestReReadingConfirmUser { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public Trial Trial { get; set; }
|
||||
|
|
|
@ -81,7 +81,7 @@ public abstract class BaseAddAuditEntity : Entity, IAuditAdd
|
|||
|
||||
[ForeignKey("CreateUserId")]
|
||||
[JsonIgnore]
|
||||
public virtual User CreateUser { get; set; }
|
||||
public virtual UserRole CreateUserRole { get; set; }
|
||||
}
|
||||
|
||||
public abstract class BaseAddDeleteAuditEntity : Entity, IAuditAdd, ISoftDelete
|
||||
|
@ -95,7 +95,7 @@ public abstract class BaseAddDeleteAuditEntity : Entity, IAuditAdd, ISoftDelete
|
|||
|
||||
[ForeignKey("CreateUserId")]
|
||||
[JsonIgnore]
|
||||
public User CreateUser { get; set; }
|
||||
public UserRole CreateUserRole { get; set; }
|
||||
}
|
||||
|
||||
public abstract class BaseFullAuditEntity : Entity, IAuditUpdate, IAuditAdd
|
||||
|
@ -107,7 +107,7 @@ public abstract class BaseFullAuditEntity : Entity, IAuditUpdate, IAuditAdd
|
|||
|
||||
[ForeignKey("CreateUserId")]
|
||||
[JsonIgnore]
|
||||
public User CreateUser { get; set; }
|
||||
public UserRole CreateUserRole { get; set; }
|
||||
}
|
||||
public abstract class BaseFullDeleteAuditEntity : Entity, IAuditUpdate, IAuditAdd, ISoftDelete
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ public abstract class BaseFullDeleteAuditEntity : Entity, IAuditUpdate, IAuditAd
|
|||
|
||||
[ForeignKey("CreateUserId")]
|
||||
[JsonIgnore]
|
||||
public User CreateUser { get; set; }
|
||||
public UserRole CreateUserRole { get; set; }
|
||||
}
|
||||
|
||||
public abstract class BaseAuditUpdateEntity : Entity, IAuditUpdate
|
||||
|
|
|
@ -39,7 +39,7 @@ public class Doctor : BaseFullAuditEntity
|
|||
public List<DoctorCriterionFile> CriterionFileList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public User User { get; set; }
|
||||
public UserRole User { get; set; }
|
||||
#endregion
|
||||
|
||||
public bool AcceptingNewTrial { get; set; }
|
||||
|
|
|
@ -11,7 +11,7 @@ public class SystemDocConfirmedUser : BaseAddDeleteAuditEntity
|
|||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("ConfirmUserId")]
|
||||
public User ConfirmUser { get; set; }
|
||||
public UserRole ConfirmUser { get; set; }
|
||||
#endregion
|
||||
public Guid SystemDocumentId { get; set; }
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ public class TrialDocConfirmedUser : BaseAddDeleteAuditEntity
|
|||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("ConfirmUserId")]
|
||||
public User User { get; set; }
|
||||
public UserRole User { get; set; }
|
||||
[JsonIgnore]
|
||||
public TrialDocument TrialDocument { get; set; }
|
||||
#endregion
|
||||
|
|
|
@ -96,7 +96,7 @@ public class TrialEmailBlackUser : Entity
|
|||
public TrialEmailNoticeConfig TrialEmailNoticeConfig { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public User User { get; set; }
|
||||
public UserRole User { get; set; }
|
||||
public Guid TrialEmailNoticeConfigId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SystemNotice : BaseFullAuditEntity
|
|||
|
||||
public Guid? PublishedUserId { get; set; }
|
||||
|
||||
public User PublishedUser { get; set; }
|
||||
public UserRole PublishedUser { get; set; }
|
||||
|
||||
public DateTime? PublishedTime { get; set; }
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace IRaCIS.Core.Domain.Models;
|
|||
|
||||
[Comment("后台 - 系统账户角色关系表")]
|
||||
[Table("User")]
|
||||
public class User : BaseFullAuditEntity
|
||||
public class UserRole : BaseFullAuditEntity
|
||||
{
|
||||
#region 导航属性
|
||||
|
||||
|
@ -111,7 +111,7 @@ public class User : BaseFullAuditEntity
|
|||
[Table("IdentityUser")]
|
||||
public class IdentityUser: BaseFullAuditEntity
|
||||
{
|
||||
public List<User> UserRoleList { get; set; } = new List<User>();
|
||||
public List<UserRole> UserRoleList { get; set; } = new List<UserRole>();
|
||||
|
||||
[Projectable]
|
||||
public string FullName => LastName + " / " + FirstName;
|
||||
|
|
|
@ -8,10 +8,10 @@ public class UserLog : BaseAddAuditEntity
|
|||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
public User LoginUser { get; set; }
|
||||
public UserRole LoginUser { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public User OptUser { get; set; }
|
||||
public UserRole OptUser { get; set; }
|
||||
#endregion
|
||||
|
||||
public string IP { get; set; } = string.Empty;
|
||||
|
|
|
@ -15,7 +15,7 @@ public class UserType : Entity
|
|||
public List<SystemDocNeedConfirmedUserType> SystemDocNeedConfirmedUserTypeList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<User> UserList { get; set; }
|
||||
public List<UserRole> UserList { get; set; }
|
||||
#endregion
|
||||
public UserTypeEnum UserTypeEnum { get; set; }
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ public class QCChallenge : BaseAddAuditEntity
|
|||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
[ForeignKey("LatestReplyUserId")]
|
||||
public User LatestReplyUser { get; set; }
|
||||
public UserRole LatestReplyUser { get; set; }
|
||||
[JsonIgnore]
|
||||
[Comment("导航属性")]
|
||||
[ForeignKey("SubjectVisitId")]
|
||||
|
|
|
@ -17,9 +17,9 @@ public class TrialSiteSurvey : BaseFullDeleteAuditEntity
|
|||
[JsonIgnore]
|
||||
public Trial Trial { get; set; }
|
||||
[JsonIgnore]
|
||||
public User ReviewerUser { get; set; }
|
||||
public UserRole ReviewerUser { get; set; }
|
||||
[JsonIgnore]
|
||||
public User PreliminaryUser { get; set; }
|
||||
public UserRole PreliminaryUser { get; set; }
|
||||
#endregion
|
||||
|
||||
public Guid TrialSiteId { get; set; }
|
||||
|
|
|
@ -13,7 +13,7 @@ public partial class Enroll : BaseFullAuditEntity
|
|||
[JsonIgnore]
|
||||
public virtual Doctor Doctor { get; set; }
|
||||
[JsonIgnore]
|
||||
public User DoctorUser { get; set; }
|
||||
public UserRole DoctorUser { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<EnrollReadingCategory> EnrollReadingCategoryList { get; set; }
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ public partial class Trial : BaseFullDeleteAuditEntity
|
|||
|
||||
public bool IsTrialStart { get; set; } = false;
|
||||
[Comment("QC 问题流程")]
|
||||
public User QCQuestionConfirmedUser { get; set; }
|
||||
public UserRole QCQuestionConfirmedUser { get; set; }
|
||||
public Guid? QCQuestionConfirmedUserId { get; set; }
|
||||
public DateTime? QCQuestionConfirmedTime { get; set; }
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ public class TrialSiteUser : BaseFullDeleteAuditEntity
|
|||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
[ForeignKey("UserId")]
|
||||
public User User { get; set; }
|
||||
public UserRole User { get; set; }
|
||||
[JsonIgnore]
|
||||
[ForeignKey("TrialId")]
|
||||
public Trial Trial { get; set; }
|
||||
|
|
|
@ -11,7 +11,7 @@ public class TrialUser : BaseFullDeleteAuditEntity
|
|||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("UserId")]
|
||||
public User User { get; set; }
|
||||
public UserRole User { get; set; }
|
||||
#endregion
|
||||
|
||||
public Guid UserId { get; set; }
|
||||
|
|
|
@ -14,28 +14,28 @@ public class SubjectVisit : BaseFullDeleteAuditEntity
|
|||
[ForeignKey("OutPlanPreviousVisitId")]
|
||||
public SubjectVisit OutPlanPreviousVisit { get; set; }
|
||||
[ForeignKey("ForwardUserId")]
|
||||
public User ForwardUser { get; set; }
|
||||
public UserRole ForwardUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 初审
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[ForeignKey("PreliminaryAuditUserId")]
|
||||
public User PreliminaryAuditUser { get; set; }
|
||||
public UserRole PreliminaryAuditUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 复审
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[ForeignKey("ReviewAuditUserId")]
|
||||
public User ReviewAuditUser { get; set; }
|
||||
public UserRole ReviewAuditUser { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("CurrentActionUserId")]
|
||||
public User CurrentActionUser { get; set; }
|
||||
public UserRole CurrentActionUser { get; set; }
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SubmitUserId")]
|
||||
public User SubmitUser { get; set; }
|
||||
public UserRole SubmitUser { get; set; }
|
||||
[JsonIgnore]
|
||||
[ForeignKey("TrialId")]
|
||||
public Trial Trial { get; set; }
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
public interface IUserInfo
|
||||
{
|
||||
|
||||
Guid Id { get; }
|
||||
Guid UserRoleId { get; }
|
||||
|
||||
Guid IdentityUserId { get; }
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ namespace IRaCIS.Core.Domain.Share
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户角色Id
|
||||
/// 用户角色Id
|
||||
/// </summary>
|
||||
public Guid Id
|
||||
public Guid UserRoleId
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -30,6 +30,9 @@ namespace IRaCIS.Core.Domain.Share
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 真实用户Id
|
||||
/// </summary>
|
||||
public Guid IdentityUserId
|
||||
{
|
||||
get
|
||||
|
|
|
@ -2631,11 +2631,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
#region 阅片
|
||||
|
||||
//用户添加
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(User)))
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(UserRole)))
|
||||
{
|
||||
var type = GetEntityAuditOpt(item);
|
||||
|
||||
var entity = item.Entity as User;
|
||||
var entity = item.Entity as UserRole;
|
||||
|
||||
var extraIdentification = string.Empty;
|
||||
|
||||
|
@ -2645,7 +2645,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
extraIdentification = "/Personalization";
|
||||
}
|
||||
|
||||
await InsertInspection<User>(entity, type, x => new InspectionConvertDTO()
|
||||
await InsertInspection<UserRole>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
IsDistinctionInterface = false,
|
||||
ExtraIndentification = extraIdentification
|
||||
|
@ -3533,7 +3533,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
inspection.CreateUserName = _userInfo.UserName;
|
||||
inspection.CreateUserRealName = _userInfo.FullName;
|
||||
inspection.RoleName = _userInfo.UserTypeShortName;
|
||||
inspection.CreateUserId = _userInfo.Id;
|
||||
inspection.CreateUserId = _userInfo.UserRoleId;
|
||||
inspection.IP = _userInfo.IP;
|
||||
inspection.CreateTime = inspection.CreateTime == default(DateTime) ? DateTime.Now : inspection.CreateTime;
|
||||
|
||||
|
|
|
@ -424,7 +424,7 @@ public class IRaCISDBContext : DbContext
|
|||
public virtual DbSet<VerificationCode> VerificationCodes { get; set; }
|
||||
public virtual DbSet<Menu> MenuFunctions { get; set; }
|
||||
public virtual DbSet<UserTypeMenu> UserTypeMenuFunction { get; set; }
|
||||
public virtual DbSet<User> Users { get; set; }
|
||||
public virtual DbSet<UserRole> Users { get; set; }
|
||||
public virtual DbSet<UserType> UserType { get; set; }
|
||||
|
||||
|
||||
|
@ -456,7 +456,7 @@ public class IRaCISDBContext : DbContext
|
|||
|
||||
public virtual DbSet<Site> Site { get; set; }
|
||||
|
||||
public virtual DbSet<User> User { get; set; }
|
||||
public virtual DbSet<UserRole> User { get; set; }
|
||||
|
||||
public virtual DbSet<UserPassWordLog> UserPassWordLog { get; set; }
|
||||
|
||||
|
|
|
@ -44,9 +44,9 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
|
|||
}
|
||||
}
|
||||
|
||||
public class UserConfigration : IEntityTypeConfiguration<User>
|
||||
public class UserConfigration : IEntityTypeConfiguration<UserRole>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<User> builder)
|
||||
public void Configure(EntityTypeBuilder<UserRole> builder)
|
||||
{
|
||||
//User 和VisitTask 存在一对多的关系 这里不显式配置就报错,why?
|
||||
builder.HasMany(t => t.VisitTaskList).WithOne(t => t.DoctorUser).HasForeignKey(t => t.DoctorUserId);
|
||||
|
|
|
@ -104,14 +104,14 @@ public class AuditEntityInterceptor(IUserInfo _userInfo,
|
|||
if (entry.Entity is IAuditUpdate updateEntity1)
|
||||
{
|
||||
updateEntity1.UpdateTime = DateTime.Now;
|
||||
updateEntity1.UpdateUserId = _userInfo.Id;
|
||||
updateEntity1.UpdateUserId = _userInfo.UserRoleId;
|
||||
}
|
||||
|
||||
if (entry.Entity is ISoftDelete softDelete)
|
||||
{
|
||||
if (softDelete.IsDeleted)
|
||||
{
|
||||
softDelete.DeleteUserId = _userInfo.Id;
|
||||
softDelete.DeleteUserId = _userInfo.UserRoleId;
|
||||
softDelete.DeletedTime = DateTime.Now;
|
||||
}
|
||||
else
|
||||
|
@ -133,7 +133,7 @@ public class AuditEntityInterceptor(IUserInfo _userInfo,
|
|||
}
|
||||
if (addEntity.CreateUserId == default(Guid))
|
||||
{
|
||||
addEntity.CreateUserId = _userInfo.Id;
|
||||
addEntity.CreateUserId = _userInfo.UserRoleId;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ public class AuditEntityInterceptor(IUserInfo _userInfo,
|
|||
if (entry.Entity is IAuditUpdate updateEntity)
|
||||
{
|
||||
updateEntity.UpdateTime = DateTime.Now;
|
||||
updateEntity.UpdateUserId = _userInfo.Id;
|
||||
updateEntity.UpdateUserId = _userInfo.UserRoleId;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -395,7 +395,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
public async Task<bool> BatchUpdateNoTrackingAsync<T>(Expression<Func<T, bool>> whereFilter, Expression<Func<T, T>> updateFactory) where T : Entity
|
||||
{
|
||||
|
||||
return await _dbContext.BatchUpdateNoTrackingAsync(whereFilter, updateFactory, _userInfo.Id);
|
||||
return await _dbContext.BatchUpdateNoTrackingAsync(whereFilter, updateFactory, _userInfo.UserRoleId);
|
||||
|
||||
//return await _dbContext.Set<T>().IgnoreQueryFilters().Where(whereFilter).BatchUpdateAsync(updateFactory).ConfigureAwait(false) > 0;
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
Expression<Func<TEntity, TEntity>> updateFactory)
|
||||
{
|
||||
|
||||
return await _dbContext.BatchUpdateNoTrackingAsync(where, updateFactory, _userInfo.Id);
|
||||
return await _dbContext.BatchUpdateNoTrackingAsync(where, updateFactory, _userInfo.UserRoleId);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue