diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index f3a48dad1..dc5ad1b8b 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -488,7 +488,6 @@ namespace IRaCIS.Core.Application.Services /// /// - [NonDynamicMethod] public async Task UserConfirm(UserConfirmCommand userConfirmCommand) { diff --git a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs index 79daeeb2d..9013975c1 100644 --- a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs @@ -48,7 +48,6 @@ namespace IRaCIS.Core.Application.Service CreateMap(); CreateMap(); - CreateMap(); CreateMap(); diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs index c7e3706aa..62e71f2ce 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs @@ -83,8 +83,13 @@ namespace IRaCIS.Core.Application.Contracts public int EfficacyEvaluatorType { get; set; } public bool IsFollowStudyParameters { get; set; } public string NotFollowReson { get; set; } = string.Empty; - //public bool IsLocked { get; set; } = false; + public TrialSiteSurveyEnum State { get; set; } + + public string LatestBackReason { get; set; } = string.Empty; + + + } ///TrialSiteSurveyQuery 列表查询参数模型 diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs index 515cbbf7f..77aab22a2 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs @@ -21,8 +21,21 @@ namespace IRaCIS.Core.Application.Contracts public string TrialRoleName { get; set; } public Guid? SystemUserId { get; set; } + + public UserInfoBasic ReviewerUser { get; set; } + public UserInfoBasic PreliminaryUser { get; set; } + } + + public class UserInfoBasic + { + public Guid Id { get; set; } + public string RealName { get; set; } = string.Empty; + public string UserName { get; set; } = string.Empty; + } + + ///TrialSiteUserSurveyQuery 列表查询参数模型 public class TrialSiteUserSurveyQuery { diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index 5a69cba93..618488be1 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -509,10 +509,10 @@ namespace IRaCIS.Core.Application.Contracts } else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) { - if (_repository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsCorrect == false).Any()) - { - return ResponseOutput.NotOk("人员信息有不正确项,不允许提交"); - } + //if (_repository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsCorrect == false).Any()) + //{ + // return ResponseOutput.NotOk("人员信息有不正确项,不允许提交"); + //} await _trialSiteSurveyRepository.UpdateFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.CRCSubmitted, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved }); @@ -524,13 +524,13 @@ namespace IRaCIS.Core.Application.Contracts if (trialSiteSurvey == null) return Null404NotFound(trialSiteSurvey); - if (_trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsCorrect == false).Any()) - { - return ResponseOutput.NotOk("人员信息有不正确项,不允许提交"); - } + //if (_trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsCorrect == false).Any()) + //{ + // return ResponseOutput.NotOk("人员信息有不正确项,不允许提交"); + //} //已生成的不管 管的只需要是 生成失败的并且需要生成账号的 - var needGenerateList = _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsCorrect && t.IsGenerateAccount && t.IsGenerateSuccess == false).ToList(); + var needGenerateList = _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsGenerateAccount && t.IsGenerateSuccess == false).ToList(); var trialInfo = await _repository.FirstOrDefaultAsync(t => t.Id == trialId); diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs index 0c1ea76f5..173d7b915 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs @@ -56,6 +56,10 @@ namespace IRaCIS.Core.Application.AutoMapper CreateMap(); + + CreateMap().ForMember(d => d.RealName, u => u.MapFrom(s => s.LastName + " / " + s.FirstName)); + + } } } \ No newline at end of file diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs index 9e6ff4b9e..f8c960a67 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs @@ -131,13 +131,7 @@ namespace IRaCIS.Application.Contracts - public class UserSelectionModel - { - public Guid Id { get; set; } - public string RealName { get; set; } = string.Empty; - public string UserName { get; set; } = string.Empty; - } public class TrialMaintenanceQuery : PageInput @@ -150,6 +144,8 @@ namespace IRaCIS.Application.Contracts public string OrganizationName { get; set; } = String.Empty; + public bool? IsDeleted { get; set; } + //public DateTime? RemoveTime { get; set; } //public DateTime? JoinTime { get; set; } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs index 0e5ed0476..fbf8f8682 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs @@ -31,15 +31,14 @@ namespace IRaCIS.Application.Services .WhereIf(!string.IsNullOrWhiteSpace(param.UserType), t => t.User.UserTypeRole.UserTypeShortName.Contains(param.UserType)) .WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.User.UserName.Contains(param.UserName)) - //.WhereIf( param.JoinTime!=null, t => t.JoinTime.to ==param.JoinTime.ToString("yyyy-MM-dd")) - //.WhereIf(param.RemoveTime!=null, t => t.RemoveTime.ToString("yyyy-MM-dd") == param.JoinTime.ToString("yyyy-MM-dd")) - + //.WhereIf( param.JoinTime!=null, t => t.JoinTime.to ==param.JoinTime.ToString("yyyy-MM-dd")) + //.WhereIf(param.RemoveTime!=null, t => t.RemoveTime.ToString("yyyy-MM-dd") == param.JoinTime.ToString("yyyy-MM-dd")) + .WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted) .WhereIf(!string.IsNullOrWhiteSpace(param.OrganizationName), t => t.User.OrganizationName.Contains(param.OrganizationName)) .WhereIf(!string.IsNullOrWhiteSpace(param.UserRealName), t => (t.User.LastName + " / " + t.User.FirstName).Contains(param.UserRealName)) .ProjectTo(_mapper.ConfigurationProvider); - return await query.ToPagedListAsync(param.PageIndex, - param.PageSize, string.IsNullOrWhiteSpace(param.SortField) ? "UpdateTime" : param.SortField, param.Asc); + return await query.ToPagedListAsync(param.PageIndex,param.PageSize, string.IsNullOrWhiteSpace(param.SortField) ? "UpdateTime" : param.SortField, param.Asc); } @@ -61,9 +60,7 @@ namespace IRaCIS.Application.Services return await query.ToPagedListAsync(param.PageIndex, param.PageSize, string.IsNullOrWhiteSpace(param.SortField) ? "UpdateTime" : param.SortField, param.Asc); - - - + } @@ -84,16 +81,6 @@ namespace IRaCIS.Application.Services return await query.ToPagedListAsync(trialUserQuery.PageIndex, trialUserQuery.PageSize, string.IsNullOrWhiteSpace(trialUserQuery.SortField) ? "UserRealName" : trialUserQuery.SortField, trialUserQuery.Asc); - - - - - - - - - - } @@ -128,7 +115,7 @@ namespace IRaCIS.Application.Services [HttpPut] public async Task UpdateTrialUser(UpdateTrialUserCommand updateTrialUserCommand) { - var trialUser = await _trialUseRepository.AsQueryable().IgnoreQueryFilters().FirstOrDefaultAsync(t => t.Id == updateTrialUserCommand.Id); + var trialUser = await _trialUseRepository.Where(t => t.Id == updateTrialUserCommand.Id,true,true).FirstOrDefaultAsync(); if (trialUser == null) return Null404NotFound(trialUser); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs index 9df635af4..c52089778 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs @@ -26,6 +26,7 @@ namespace IRaCIS.Core.Application.Services { var siteStatQuery = _trialSiteRepository.Where(t => t.TrialId == param.TrialId, ignoreQueryFilters: true) + .WhereIf(param.IsDeleted!=null, t => t.IsDeleted==param.IsDeleted) .WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.Site.SiteName.Contains(param.SiteName)) .WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName), t => t.TrialSiteAliasName.Contains(param.TrialSiteAliasName)) .WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode), t => t.TrialSiteAliasName.Contains(param.TrialSiteCode)) @@ -48,6 +49,7 @@ namespace IRaCIS.Core.Application.Services { var siteStatQuery = _trialSiteRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters() + .WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted) .WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.Site.SiteName.Contains(param.SiteName)) .WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName), t => t.TrialSiteAliasName.Contains(param.TrialSiteAliasName)) .WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode), t => t.TrialSiteAliasName.Contains(param.TrialSiteCode)) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs index ff1b2bf37..ceb2c34ab 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs @@ -23,6 +23,12 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.SiteName)) .ForMember(x => x.Id, x => x.Ignore()); + CreateMap(); + + CreateMap(); + + + CreateMap(); CreateMap(); diff --git a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs index 059716d54..8130e0648 100644 --- a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs +++ b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs @@ -123,7 +123,11 @@ namespace IRaCIS.Core.Domain.Models /// [Required] public string NotFollowReson { get; set; } = string.Empty; - - } + + + public string LatestBackReason { get; set; } = string.Empty; + + + } } diff --git a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs index b8b9ae462..47ee1b7e1 100644 --- a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs +++ b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs @@ -9,94 +9,82 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace IRaCIS.Core.Domain.Models { - /// - ///TrialSiteUserSurvey - /// - [Table("TrialSiteUserSurvey")] - public class TrialSiteUserSurvey : Entity, IAuditUpdate, IAuditAdd - { - [ForeignKey("TrialSiteSurveyId")] - public TrialSiteSurvey TrialSiteSurvey { get; set; } + /// + ///TrialSiteUserSurvey + /// + [Table("TrialSiteUserSurvey")] + public class TrialSiteUserSurvey : Entity, IAuditUpdate, IAuditAdd + { + [ForeignKey("TrialSiteSurveyId")] + public TrialSiteSurvey TrialSiteSurvey { get; set; } - public Guid TrialSiteSurveyId { get; set; } - - - //public TrialSiteSurveyEnum State { get; set; } = TrialSiteSurveyEnum.ToSubmit; - - public bool IsGenerateSuccess { get; set; } - - - [ForeignKey("UserTypeId")] - public UserType UserTypeRole { get; set; } - - public Guid? UserTypeId { get; set; } - - - public Guid? TrialRoleNameId { get; set; } - - public Dictionary TrialRoleName { get; set; } + public Guid TrialSiteSurveyId { get; set; } - /// - /// CreateTime - /// - [Required] - public DateTime CreateTime { get; set; } - - /// + + [ForeignKey("UserTypeId")] + public UserType UserTypeRole { get; set; } + + public Guid? UserTypeId { get; set; } + + + public Guid? TrialRoleNameId { get; set; } + + public Dictionary TrialRoleName { get; set; } + + + + + /// + /// CreateTime + /// + [Required] + public DateTime CreateTime { get; set; } + + /// /// CreateUserId /// - [Required] - public Guid CreateUserId { get; set; } - - /// + [Required] + public Guid CreateUserId { get; set; } + + /// /// UpdateTime /// - [Required] - public DateTime UpdateTime { get; set; } - - /// + [Required] + public DateTime UpdateTime { get; set; } + + /// /// UpdateUserId /// - [Required] - public Guid UpdateUserId { get; set; } - - public string UserName { get; set; } = string.Empty; + [Required] + public Guid UpdateUserId { get; set; } - /// - /// Phone - /// - [Required] - public string Phone { get; set; } = string.Empty; + public string UserName { get; set; } = string.Empty; - /// - /// Email - /// - [Required] - public string Email { get; set; } = string.Empty; - - /// - /// IsCorrect - /// - [Required] - public bool IsCorrect { get; set; } - - /// - /// IsGenerateAccount + /// + /// Phone /// - [Required] - public bool IsGenerateAccount { get; set; } + [Required] + public string Phone { get; set; } = string.Empty; - public string FirstName { get; set; } = string.Empty; - public string LastName { get; set; } = string.Empty; + /// + /// Email + /// + [Required] + public string Email { get; set; } = string.Empty; - public string OrganizationName { get; set; } = string.Empty; + public string FirstName { get; set; } = string.Empty; + public string LastName { get; set; } = string.Empty; - public Guid? SystemUserId { get; set; } + + + public string OrganizationName { get; set; } = string.Empty; + + public Guid? SystemUserId { get; set; } public DateTime? ExpireTime { get; set; } @@ -107,18 +95,27 @@ namespace IRaCIS.Core.Domain.Models public string RejectReason { get; set; } = string.Empty; + /// + /// IsGenerateAccount + /// + [Required] + public bool IsGenerateAccount { get; set; } + + public bool IsGenerateSuccess { get; set; } - //public Guid GenerateUserId { get; set; } + public Guid? PreliminaryUserId { get; set; } + - //public Guid TrialId { get; set; } - /// - /// IsDisable - /// - //[Required] - //public bool IsAddTrial { get; set; } - } + public Guid? ReviewerUserId { get; set; } -} + public User ReviewerUser { get; set; } + + public User PreliminaryUser { get; set; } + + + } + +} diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs index ad39e4b5b..a69ba833b 100644 --- a/IRaCIS.Core.Domain/Trial/Trial.cs +++ b/IRaCIS.Core.Domain/Trial/Trial.cs @@ -130,7 +130,7 @@ namespace IRaCIS.Core.Domain.Models /// /// ߱ž /// - public string SubjectCodeRule { get; set; } + public string SubjectCodeRule { get; set; } = "ɸѡ5λɣǰ2λΪıţ3λΪ˳ţEDC¼ıűһ"; /// /// Ƿ ߱Ź /// @@ -163,7 +163,7 @@ namespace IRaCIS.Core.Domain.Models /// /// Ƿ ֤Ƭ /// - public bool IsVerifyVisitImageDate { get; set; } = false; + public bool IsVerifyVisitImageDate { get; set; } = true; ///